:root {
  --ink: #172033;
  --muted: #697386;
  --line: #dfe5ec;
  --surface: #ffffff;
  --surface-soft: #f4f7fa;
  --navy: #102a43;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --green: #087f5b;
  --green-soft: #e7f8f1;
  --amber: #a45b00;
  --amber-soft: #fff4dd;
  --red: #b42318;
  --red-soft: #fff0ee;
  --shadow: 0 12px 32px rgba(16, 42, 67, 0.08);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  color: var(--ink);
  background: #eef3f7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

button, input { font: inherit; }

.app-header {
  color: white;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 2rem));
  min-height: 74px;
  margin: 0 auto;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand__mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 10px;
}

.brand__mark img { display: block; width: 100%; height: 100%; }

.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; }
.brand small { color: #b9c8d8; font-size: 0.78rem; }

.account-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: #d7e1eb;
  font-size: 0.86rem;
}

.account-nav > span { overflow-wrap: anywhere; }

.account-nav form { margin: 0; }

.button {
  border: 0;
  border-radius: 9px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-weight: 650;
}

.button--quiet {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.button--quiet:hover { background: rgba(255, 255, 255, 0.17); }

.dashboard-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.dashboard-shell > section + section { margin-top: 1.75rem; }

.dashboard-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.6rem 1.75rem;
  color: white;
  background: linear-gradient(130deg, #102a43 0%, #174b78 100%);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 0.3rem;
  color: #5f7185;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-hero .eyebrow { color: #a9c4de; }

h1, h2, h3, p { margin-top: 0; }
.dashboard-hero h1 { margin-bottom: 0.9rem; font-size: clamp(1.55rem, 3vw, 2.25rem); letter-spacing: -0.025em; }
h2 { margin-bottom: 0; font-size: 1.35rem; letter-spacing: -0.015em; }
h3 { margin-bottom: 0; }

.status-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.status-badge--success { color: var(--green); background: var(--green-soft); }
.status-badge--warning { color: var(--amber); background: var(--amber-soft); }
.status-badge--danger { color: var(--red); background: var(--red-soft); }
.status-badge--accent { color: #174ea6; background: var(--blue-soft); }

.status-dot {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}

.hero-meta div { padding: 0.7rem 1rem; background: rgba(255, 255, 255, 0.06); }
.hero-meta div + div { border-left: 1px solid rgba(255, 255, 255, 0.14); }
.hero-meta dt { color: #abc0d4; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.hero-meta dd { margin: 0.16rem 0 0; font-weight: 700; font-size: 0.84rem; white-space: nowrap; }

.notice {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  border: 1px solid;
}

.notice span { font-size: 0.86rem; }
.notice--warning { color: #784600; background: var(--amber-soft); border-color: #f1d28d; }
.notice--success { color: var(--green); background: var(--green-soft); border-color: #9ed9c5; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.section-note { color: var(--muted); font-size: 0.78rem; text-align: right; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.metric-card {
  display: flex;
  flex-direction: column;
  min-height: 140px;
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(16, 42, 67, 0.035);
}

.metric-card--wide { grid-column: span 2; }
.metric-label { color: var(--muted); font-size: 0.75rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
.metric-value { margin-top: auto; font-size: clamp(1.55rem, 2.4vw, 2rem); line-height: 1.1; letter-spacing: -0.035em; }
.metric-value small { margin-left: 0.3rem; color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0; }
.metric-value--text { font-size: clamp(1.05rem, 2vw, 1.35rem); letter-spacing: -0.01em; }
.metric-unavailable { color: var(--muted); font-size: 0.9rem; font-weight: 650; letter-spacing: 0; }
.metric-detail { margin-top: 0.48rem; color: var(--muted); font-size: 0.79rem; }

.exercise-card {
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.exercise-card__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.exercise-card__header h3 { margin-top: 0.55rem; font-size: 1.15rem; }
.exercise-card__header h3 span { color: var(--muted); font-weight: 500; }

.score { display: flex; flex-direction: column; align-items: center; min-width: 72px; }
.score strong { color: var(--blue); font-size: 2rem; line-height: 1; }
.score span { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }

.target-grid, .result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.target-grid div, .result-grid div { padding: 0.8rem; background: var(--surface-soft); border-radius: 10px; }
.target-grid span, .result-grid span { display: block; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }
.target-grid strong, .result-grid strong { display: block; margin-top: 0.18rem; font-size: 0.9rem; }

.exercise-message, .result-reason {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  color: #784600;
  background: var(--amber-soft);
  border-radius: 10px;
  font-size: 0.84rem;
}

.exercise-message span { color: #8c5a18; }

.progress-block { margin-top: 1.1rem; }
.progress-block div { display: flex; justify-content: space-between; margin-bottom: 0.4rem; font-size: 0.84rem; }
.progress-block progress { width: 100%; height: 10px; accent-color: var(--blue); }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 2rem;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 1px dashed #c7d1dd;
  border-radius: 14px;
}

.empty-state strong { color: var(--ink); }
.empty-state span { margin-top: 0.3rem; font-size: 0.84rem; }

.table-shell {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(16, 42, 67, 0.035);
}

.history-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.history-table th { color: var(--muted); background: var(--surface-soft); font-size: 0.7rem; text-align: left; text-transform: uppercase; letter-spacing: 0.05em; }
.history-table th, .history-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.history-table tr:last-child td { border-bottom: 0; }
.history-table td:first-child span { display: block; color: var(--muted); font-size: 0.72rem; }

.login-shell {
  display: grid;
  min-height: calc(100vh - 65px);
  place-items: center;
  padding: 2rem 1rem;
  background: radial-gradient(circle at top left, #dce9f5, transparent 38%), #eef3f7;
}

.login-card {
  width: min(430px, 100%);
  padding: 2rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.login-card h1 { margin-bottom: 0.4rem; }
.login-card > p { color: var(--muted); }
.login-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.login-brand .brand__mark { background: var(--navy); }
.login-field { margin: 1rem 0; }
.login-field label { display: block; margin-bottom: 0.35rem; font-size: 0.82rem; font-weight: 700; }
.login-field input { width: 100%; padding: 0.75rem; border: 1px solid #bdc8d5; border-radius: 9px; }
.login-submit { width: 100%; margin-top: 0.5rem; padding: 0.78rem; color: white; background: var(--blue); border: 0; border-radius: 9px; font-weight: 750; cursor: pointer; }
.alert { padding: 0.7rem 0.8rem; color: var(--red); background: var(--red-soft); border-radius: 8px; font-size: 0.84rem; }

@media (hover: none), (pointer: coarse), (max-width: 900px), (max-height: 700px) {
  body.login-page { min-height: 100%; overflow-y: auto; }
  .login-shell {
    display: block;
    min-height: 0;
    padding: 0.6rem 0.5rem 1.5rem;
  }
  .login-card { margin: 0 auto; padding: 1rem; border-radius: 12px; }
  .login-brand { margin-bottom: 0.65rem; }
  .login-brand .brand__mark { width: 34px; height: 34px; border-radius: 8px; }
  .login-card h1 { margin-bottom: 0.2rem; font-size: 1.45rem; }
  .login-card > p { margin-bottom: 0.6rem; font-size: 0.8rem; line-height: 1.35; }
  .login-field { margin: 0.6rem 0; }
  .login-field label { margin-bottom: 0.2rem; }
  .login-field input { padding: 0.62rem; }
  .login-submit { margin-top: 0.2rem; padding: 0.68rem; }
  body.login-page > footer { padding: 0.45rem 1rem 1rem; }
}

.settings-shell {
  width: min(820px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

.settings-heading { margin-bottom: 1.5rem; }
.settings-heading h1 { margin-bottom: 0.35rem; font-size: clamp(1.7rem, 4vw, 2.3rem); }
.settings-heading > p:last-child, .settings-card > p { color: var(--muted); }
.settings-shell > * + * { margin-top: 1rem; }

.settings-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.settings-card--danger { border-color: #efc2bd; }
.settings-card__heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.settings-meta { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1.2rem 0; background: var(--surface-soft); border-radius: 12px; }
.settings-meta div { padding: 0.8rem 1rem; }
.settings-meta dt { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; }
.settings-meta dd { margin: 0.15rem 0 0; font-weight: 700; }
.settings-form { margin-top: 1.2rem; }
.settings-field { margin-bottom: 1rem; }
.settings-field label { display: block; margin-bottom: 0.35rem; font-size: 0.82rem; font-weight: 700; }
.settings-field input { width: 100%; padding: 0.75rem; border: 1px solid #bdc8d5; border-radius: 9px; }
.button--primary { color: white; background: var(--blue); }
.button--danger { color: white; background: var(--red); }

.cockpit-shell {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}

.cockpit-flash {
  margin-bottom: 0.8rem;
  padding: 0.75rem 1rem;
  border: 1px solid;
  border-radius: 10px;
  font-weight: 700;
}

.cockpit-flash--success { color: var(--green); background: var(--green-soft); border-color: #9ed9c5; }
.cockpit-flash--danger { color: var(--red); background: var(--red-soft); border-color: #efc2bd; }

.cockpit-statusbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 1rem;
  color: #dbe8f4;
  background: #183b5b;
  border-radius: 12px;
  font-size: 0.8rem;
}

.cockpit-statusbar div { display: flex; align-items: center; gap: 0.45rem; }
.cockpit-statusbar > span:last-child { margin-left: auto; color: #abc0d4; }
.status-dot--online { color: #30d59b; background: #30d59b; }
.status-dot--offline { color: #ff8b80; background: #ff8b80; }

.cockpit-data-warning {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.8rem;
  padding: 0.75rem 1rem;
  color: #784600;
  background: var(--amber-soft);
  border: 1px solid #f1d28d;
  border-radius: 10px;
  font-size: 0.84rem;
}

.cockpit-data-warning span { color: #8c5a18; }

.sequence-progress {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(320px, 1.3fr);
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0.8rem 1rem;
  color: #173652;
  background: #eaf2ff;
  border: 1px solid #c4d8f6;
  border-radius: 14px;
}
.sequence-progress__heading { display: flex; justify-content: center; flex-direction: column; }
.sequence-progress__heading span, .sequence-progress__heading strong, .sequence-progress__heading small { display: block; }
.sequence-progress__heading span { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sequence-progress__heading strong { margin-top: 0.15rem; font-size: 1.1rem; }
.sequence-progress__heading small { margin-top: 0.2rem; color: #55708b; }
.sequence-progress ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.sequence-step { display: flex; align-items: center; gap: 0.55rem; padding: 0.6rem; color: #6a7786; background: rgba(255, 255, 255, 0.7); border: 1px solid #d2dce8; border-radius: 10px; }
.sequence-step > span { display: grid; width: 1.65rem; height: 1.65rem; place-items: center; flex: 0 0 auto; color: white; background: #8998a8; border-radius: 50%; font-weight: 800; }
.sequence-step strong { font-size: 0.78rem; }
.sequence-step--current { color: #0f438d; border-color: #74a6ea; box-shadow: inset 0 0 0 1px #74a6ea; }
.sequence-step--current > span { background: var(--blue); }
.sequence-step--complete { color: #126248; border-color: #9ed9c5; }
.sequence-step--complete > span { background: var(--green); }
.sequence-step--stopped { color: var(--red); border-color: #efc2bd; }
.sequence-step--stopped > span { background: var(--red); }

.lesson-runner {
  margin-top: 0.8rem;
  padding: 1rem 1.1rem;
  color: #173652;
  background: #f7faff;
  border: 1px solid #b9d3f5;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(16, 42, 67, 0.06);
}
.lesson-runner__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.lesson-runner__heading h1 { margin-bottom: 0; font-size: clamp(1.15rem, 2.5vw, 1.55rem); }
.lesson-runner__heading > strong { padding: 0.35rem 0.55rem; color: #174ea6; background: #eaf1ff; border-radius: 999px; font-size: 0.72rem; white-space: nowrap; }
.lesson-runner__progress { display: flex; align-items: center; gap: 0.65rem; margin-top: 0.65rem; }
.lesson-runner__progress progress { width: 100%; height: 8px; accent-color: var(--blue); }
.lesson-runner__progress span { min-width: max-content; color: var(--muted); font-size: 0.68rem; }
.lesson-runner__current { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-top: 0.7rem; padding: 0.75rem 0.85rem; background: white; border: 1px solid #d4e1ef; border-left: 5px solid var(--blue); border-radius: 10px; }
.lesson-runner__current > div > span { color: #55708b; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.lesson-runner__current h2 { margin-top: 0.12rem; font-size: 1.15rem; }
.lesson-runner__current p { margin: 0.25rem 0 0; color: #4e6478; font-size: 0.82rem; }
.lesson-runner__current--failed { border-left-color: var(--red); }
.lesson-runner__requirement { color: #5f7185; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.lesson-runner__warning { display: flex; flex-direction: column; margin-top: 0.55rem; padding: 0.6rem 0.75rem; color: var(--red); background: var(--red-soft); border-radius: 8px; font-size: 0.75rem; }
.lesson-runner__warning span { color: #7e3b35; }
.lesson-runner__monitor-state { margin: 0.55rem 0 0; color: #55708b; font-size: 0.75rem; }
.lesson-runner__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; margin-top: 0.65rem; }
.lesson-runner__actions form, .lesson-runner__actions .cockpit-button { width: 100%; }
.lesson-runner__secondary-action { margin-top: 0.5rem; text-align: right; }
.lesson-runner__secondary-action form { display: inline-block; }
.lesson-runner__secondary-action .button { padding: 0.38rem 0.6rem; font-size: 0.68rem; }
.lesson-runner__details, .lesson-runner__phases { margin-top: 0.55rem; }
.lesson-runner__details summary, .lesson-runner__phases summary { color: #174ea6; cursor: pointer; font-size: 0.72rem; font-weight: 750; }
.lesson-runner__details dl { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.lesson-runner__details dl div { padding: 0.35rem 0.5rem; background: white; border: 1px solid var(--line); border-radius: 7px; }
.lesson-runner__details dt { color: var(--muted); font-size: 0.58rem; text-transform: uppercase; }
.lesson-runner__details dd { margin: 0; font-size: 0.74rem; font-weight: 750; }
.lesson-runner__details p { margin: 0.35rem 0 0; color: var(--amber); font-size: 0.72rem; }

.flight-guidance {
  margin-top: 0.55rem;
  padding: 0.7rem 0.8rem;
  color: #12304a;
  background: #edf8f3;
  border: 1px solid #aadbc8;
  border-left: 5px solid var(--green);
  border-radius: 10px;
}
.flight-guidance--caution { background: #fff7e6; border-color: #edc66e; border-left-color: #d78a00; }
.flight-guidance--critical { background: #fff0ee; border-color: #e7aaa3; border-left-color: var(--red); }
.flight-guidance--unavailable { background: #f3f6f9; border-color: var(--line); border-left-color: #8d9aaa; }
.flight-guidance__heading { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.flight-guidance__heading span { color: var(--muted); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.flight-guidance__heading strong { font-size: 0.72rem; text-transform: uppercase; }
.flight-guidance p { margin: 0.35rem 0; font-size: 1.05rem; font-weight: 800; }
.flight-guidance small { color: var(--muted); font-size: 0.67rem; }
.flight-guidance__checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.35rem; margin: 0.45rem 0; }
.flight-guidance-check { min-width: 0; padding: 0.42rem 0.5rem; background: white; border: 1px solid #a8d7c6; border-top: 4px solid var(--green); border-radius: 8px; }
.flight-guidance-check--caution { border-color: #dfb34d; border-top-color: #d78a00; }
.flight-guidance-check--critical { border-color: #e3a49d; border-top-color: var(--red); }
.flight-guidance-check--unavailable { border-color: var(--line); border-top-color: #8d9aaa; }
.flight-guidance-check > div { display: flex; justify-content: space-between; gap: 0.35rem; }
.flight-guidance-check span { overflow: hidden; color: #536a80; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.05em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.flight-guidance-check em { color: #66798c; font-size: 0.55rem; font-style: normal; font-weight: 750; text-transform: uppercase; }
.flight-guidance-check > strong { display: block; margin: 0.15rem 0 0.1rem; font-size: 1.25rem; }
.flight-guidance-check > small { display: block; font-size: 0.58rem; line-height: 1.35; }
.flight-guidance__deviations { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.35rem 0; }
.flight-guidance__deviation { padding: 0.22rem 0.38rem; background: white; border: 1px solid var(--line); border-radius: 6px; font-size: 0.68rem; }
.flight-guidance__deviation--caution { border-color: #dfb34d; }
.flight-guidance__deviation--critical { border-color: var(--red); }
.lesson-runner__phases ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; margin: 0.55rem 0 0; padding: 0; list-style: none; }
.lesson-runner-phase { display: grid; grid-template-columns: 1.45rem 1fr auto; align-items: center; gap: 0.4rem; padding: 0.4rem 0.5rem; color: #6a7786; background: white; border: 1px solid var(--line); border-radius: 8px; }
.lesson-runner-phase > span { display: grid; width: 1.35rem; height: 1.35rem; place-items: center; color: white; background: #8998a8; border-radius: 50%; font-size: 0.62rem; font-weight: 800; }
.lesson-runner-phase strong { font-size: 0.7rem; }
.lesson-runner-phase small { font-size: 0.58rem; text-transform: uppercase; }
.lesson-runner-phase--active { color: #174ea6; border-color: #74a6ea; }
.lesson-runner-phase--active > span { background: var(--blue); }
.lesson-runner-phase--completed, .lesson-runner-phase--skipped { color: var(--green); border-color: #9ed9c5; }
.lesson-runner-phase--completed > span, .lesson-runner-phase--skipped > span { background: var(--green); }
.lesson-runner-phase--failed { color: var(--red); border-color: #efc2bd; }
.lesson-runner-phase--failed > span { background: var(--red); }
.lesson-plan-summary__start { width: 100%; margin: 0.65rem 0; }

.last-lesson {
  margin-top: 0.8rem;
  padding: 1rem 1.1rem;
  color: #173652;
  background: #f7faff;
  border: 1px solid #cad8e7;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(16, 42, 67, 0.06);
}
.last-lesson__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.last-lesson__heading h1 { margin-bottom: 0; font-size: clamp(1.15rem, 2.5vw, 1.55rem); }
.last-lesson__status { padding: 0.35rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 800; }
.last-lesson__status--completed { color: var(--green); background: var(--green-soft); }
.last-lesson__status--cancelled { color: var(--red); background: var(--red-soft); }
.last-lesson__result { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.65rem; }
.last-lesson__result div { padding: 0.55rem 0.65rem; background: white; border: 1px solid #d4e1ef; border-radius: 8px; }
.last-lesson__result span, .last-lesson__result strong { display: block; }
.last-lesson__result span { color: var(--muted); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.last-lesson__result strong { margin-top: 0.12rem; font-size: 0.88rem; }
.lesson-debrief { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.65rem; }
.lesson-debrief__card { min-width: 0; padding: 0.65rem; background: white; border: 1px solid #d4e1ef; border-top: 4px solid #73869a; border-radius: 8px; }
.lesson-debrief__card--success { border-top-color: var(--green); }
.lesson-debrief__card--attention { border-top-color: #d78a00; }
.lesson-debrief__card--limits { grid-column: 1 / -1; border-top-color: #73869a; }
.lesson-debrief__card h2 { margin: 0 0 0.4rem; font-size: 0.78rem; }
.lesson-debrief__card ul { display: grid; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.lesson-debrief__card li { display: grid; gap: 0.05rem; padding-top: 0.35rem; border-top: 1px solid #e4eaf0; }
.lesson-debrief__card li:first-child { padding-top: 0; border-top: 0; }
.lesson-debrief__card li strong { font-size: 0.7rem; }
.lesson-debrief__card li span, .lesson-debrief__card p { margin: 0; color: #617589; font-size: 0.65rem; line-height: 1.35; }
.lesson-debrief__item--critical strong { color: var(--red); }
.lesson-debrief__item--caution strong { color: #9b5d00; }
.last-lesson__actions { display: grid; grid-template-columns: minmax(180px, 0.45fr) minmax(240px, 1fr); align-items: center; gap: 0.65rem; margin-top: 0.65rem; }
.last-lesson__actions form, .last-lesson__actions .cockpit-button { width: 100%; }
.last-lesson__actions details { min-width: 0; }
.last-lesson__actions details[data-cockpit-details-key="last-lesson-corrections"] { grid-column: 1 / -1; }
.last-lesson__actions summary { color: #174ea6; cursor: pointer; font-size: 0.72rem; font-weight: 750; }
.last-lesson__actions ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; margin: 0.55rem 0 0; padding: 0; list-style: none; }

.cockpit-flight-panel {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(220px, 1.25fr) minmax(140px, 0.9fr) minmax(150px, 1fr);
  gap: 0.65rem;
  margin-top: 0.8rem;
  padding: 0.65rem;
  color: #edf6ff;
  background: #0b1e31;
  border: 1px solid #294660;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(8, 26, 43, 0.18);
}

.flight-readout, .attitude-display {
  min-width: 0;
  min-height: 142px;
  padding: 0.75rem;
  overflow: hidden;
  background: #102a43;
  border: 1px solid #2c4d69;
  border-radius: 10px;
}

.flight-readout { display: flex; flex-direction: column; justify-content: center; }
.flight-readout__label {
  color: #94b5d0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.flight-readout > strong {
  display: block;
  margin: 0.18rem 0;
  overflow: hidden;
  color: white;
  font-size: clamp(2rem, 5vw, 3.45rem);
  line-height: 1;
  letter-spacing: -0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flight-readout > strong small { margin-left: 0.25rem; color: #94b5d0; font-size: 0.25em; letter-spacing: 0; }
.flight-readout > span:last-child { color: #b8cad9; font-size: 0.7rem; }

.heading-ribbon { display: flex; align-items: center; gap: 0.4rem; margin: 0.25rem 0; color: #5f86a8; }
.heading-ribbon i { display: block; height: 1px; flex: 1; background: #5f86a8; }
.heading-ribbon b { color: #57a5ff; font-size: 0.72rem; }

.attitude-display { padding: 0.5rem; }
.attitude-display__viewport {
  position: relative;
  height: 98px;
  overflow: hidden;
  background: #4387bd;
  border: 1px solid #53748f;
  border-radius: 8px;
}
.attitude-display__world {
  position: absolute;
  inset: -75%;
  transform: translateY(var(--attitude-pitch, 0)) rotate(var(--attitude-bank, 0deg));
  transform-origin: center;
  transition: transform 180ms linear;
}
.attitude-display__sky, .attitude-display__ground { position: absolute; left: 0; width: 100%; height: 50%; }
.attitude-display__sky { top: 0; background: linear-gradient(#2d70aa, #72b4de); }
.attitude-display__ground { bottom: 0; background: linear-gradient(#9c7148, #62452f); }
.attitude-display__horizon { position: absolute; top: calc(50% - 1px); left: 0; width: 100%; height: 2px; background: white; }
.attitude-display__aircraft { position: absolute; top: 50%; left: 50%; display: flex; align-items: center; width: 58%; transform: translate(-50%, -50%); }
.attitude-display__aircraft i { display: block; height: 3px; flex: 1; background: #ffd74a; box-shadow: 0 1px 1px #473a00; }
.attitude-display__aircraft b { display: block; width: 8px; height: 8px; border: 2px solid #ffd74a; border-radius: 50%; }
.attitude-display__pitch-lines { position: absolute; inset: 0; display: grid; place-content: center; gap: 15px; }
.attitude-display__pitch-lines i { display: block; width: 28px; height: 1px; background: rgba(255, 255, 255, 0.72); }
.attitude-display__values { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.35rem; color: #94b5d0; font-size: 0.61rem; }
.attitude-display__values strong { color: white; }
.attitude-display--unavailable .attitude-display__viewport { filter: grayscale(1); opacity: 0.45; }

.systems-strip { display: flex; grid-column: 1 / -1; gap: 0.4rem; overflow-x: auto; }
.system-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  min-width: max-content;
  padding: 0.35rem 0.55rem;
  color: #adc0d0;
  background: #142d43;
  border: 1px solid #355169;
  border-radius: 7px;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}
.system-chip strong { color: white; }
.system-chip small { color: #94b5d0; }
.system-chip--on { border-color: #178c6a; }
.system-chip--on strong { color: #4de0ae; }
.system-chip--off { border-color: #9c3b34; }
.system-chip--off strong { color: #ff8b80; }
.system-chip--attention { border-color: #b97814; }
.system-chip--attention strong { color: #ffc45b; }
.system-chip--unknown { opacity: 0.65; }

.cockpit-exercise, .cockpit-empty {
  margin-top: 1rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.cockpit-exercise__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cockpit-exercise__heading h1, .cockpit-empty h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  letter-spacing: -0.04em;
}

.cockpit-command-state { margin: 0.35rem 0 0; color: var(--amber); font-weight: 700; }

.cockpit-status {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.cockpit-status--success { color: var(--green); background: var(--green-soft); }
.cockpit-status--warning { color: var(--amber); background: var(--amber-soft); }
.cockpit-status--danger { color: var(--red); background: var(--red-soft); }
.cockpit-status--accent { color: #174ea6; background: var(--blue-soft); }

.cockpit-instruments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.3rem;
}

.cockpit-instruments article {
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: #f4f7fa;
  border: 1px solid #d9e1e9;
  border-radius: 14px;
  border-top: 6px solid #9aa7b5;
}

.cockpit-instruments .cockpit-instrument--success { border-top-color: var(--green); background: #f0fbf7; }
.cockpit-instruments .cockpit-instrument--warning { border-top-color: #e18b13; background: #fff9ec; }
.cockpit-instruments .cockpit-instrument--danger { border-top-color: var(--red); background: #fff5f3; }
.cockpit-instruments .cockpit-instrument--unavailable { border-top-color: #9aa7b5; }
.cockpit-instruments .cockpit-instrument--time { border-top-color: var(--blue); }

.cockpit-instruments article > span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cockpit-instruments strong {
  display: block;
  margin-top: 0.25rem;
  overflow: hidden;
  font-size: clamp(2rem, 6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cockpit-instruments strong small { margin-left: 0.35rem; color: var(--muted); font-size: 0.28em; letter-spacing: 0; }
.cockpit-instruments p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.85rem; }

.taxi-primary-panel {
  display: grid;
  grid-template-columns: minmax(130px, 0.62fr) minmax(130px, 0.55fr) minmax(280px, 1.45fr);
  margin-top: 0.8rem;
  overflow: hidden;
  color: #edf6ff;
  background: #102d47;
  border: 1px solid #31536f;
  border-radius: 13px;
}

.taxi-primary-panel > div { min-width: 0; padding: 0.75rem 1rem; }
.taxi-primary-panel > div + div { border-left: 1px solid #31536f; }
.taxi-primary-panel span, .taxi-primary-panel em, .taxi-primary-panel small { display: block; }
.taxi-primary-panel span {
  color: #9db9d0;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.taxi-primary-panel strong { color: white; }
.taxi-primary-panel em { margin-top: 0.15rem; color: #a9bed0; font-size: 0.61rem; font-style: normal; font-weight: 750; }
.taxi-primary-metric strong, .taxi-secondary-metric strong {
  display: block;
  margin-top: 0.08rem;
  overflow: hidden;
  font-size: clamp(2rem, 4.3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.taxi-primary-metric strong small, .taxi-secondary-metric strong small { display: inline; margin-left: 0.2rem; color: #9db9d0; font-size: 0.28em; letter-spacing: 0; }
.taxi-next-action { display: flex; justify-content: center; flex-direction: column; }
.taxi-next-action strong { margin-top: 0.15rem; font-size: clamp(0.95rem, 2vw, 1.2rem); line-height: 1.15; }
.taxi-next-action small { margin-top: 0.2rem; overflow: hidden; color: #b8cad9; font-size: 0.67rem; text-overflow: ellipsis; white-space: nowrap; }
.taxi-primary-panel--warning { border-color: #b97814; }
.taxi-primary-panel--warning .taxi-primary-metric strong { color: #ffc45b; }
.taxi-primary-panel--danger { border-color: #ba4138; }
.taxi-primary-panel--danger .taxi-primary-metric strong { color: #ff8b80; }
.taxi-primary-panel--unavailable { opacity: 0.76; }

.taxi-systems { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }
.taxi-system {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  padding: 0.3rem 0.55rem;
  color: #546778;
  background: #edf2f6;
  border: 1px solid #cbd6e0;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}
.taxi-system--ok { color: #126248; background: #e8f8f2; border-color: #8fd1bb; }
.taxi-system--alert { color: #a2261e; background: #fff0ee; border-color: #efa59f; }
.taxi-system--advisory { color: #8a5810; background: #fff7e5; border-color: #ebc77b; }
.taxi-system--unknown { opacity: 0.68; }

.cockpit-actions--taxi { gap: 0.45rem; margin-top: 0.55rem; }
.cockpit-actions--taxi .cockpit-button { min-height: 56px; padding: 0.65rem; border-radius: 10px; font-size: 0.92rem; }
.taxi-details { margin-top: 0.55rem; color: var(--muted); border-top: 1px solid var(--line); }
.taxi-details summary { padding: 0.55rem 0.2rem 0; cursor: pointer; font-size: 0.72rem; font-weight: 800; }
.taxi-details summary span { float: right; color: #7b8997; font-weight: 650; }
.taxi-details .procedure-checklist { margin-top: 0.5rem; }

.cockpit-guidance {
  margin-top: 0.8rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(23, 32, 51, 0.1);
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  font-weight: 800;
}

.procedure-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.procedure-condition {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.75rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-left: 5px solid #9aa7b5;
  border-radius: 10px;
}

.procedure-condition__mark {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  color: white;
  background: #7c8997;
  border-radius: 50%;
  font-weight: 900;
}

.procedure-condition > span:nth-child(2) { min-width: 0; }
.procedure-condition strong, .procedure-condition small { display: block; }
.procedure-condition small { margin-top: 0.1rem; overflow: hidden; color: var(--muted); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.procedure-condition em { color: var(--muted); font-size: 0.58rem; font-style: normal; font-weight: 800; letter-spacing: 0.05em; }
.procedure-condition--success { border-left-color: var(--green); }
.procedure-condition--success .procedure-condition__mark { background: var(--green); }
.procedure-condition--danger { background: var(--red-soft); border-left-color: var(--red); }
.procedure-condition--danger .procedure-condition__mark { background: var(--red); }
.procedure-condition--warning { background: var(--amber-soft); border-left-color: var(--amber); }
.procedure-condition--warning .procedure-condition__mark { color: #543100; background: #ffc14d; }
.procedure-condition--unknown { opacity: 0.72; }
.procedure-checklist__waiting { grid-column: 1 / -1; margin: 0; padding: 1rem; color: var(--muted); background: var(--surface-soft); border-radius: 10px; }

.cockpit-progress { margin-top: 1rem; }
.cockpit-progress div { display: flex; justify-content: space-between; margin-bottom: 0.35rem; font-size: 0.84rem; }
.cockpit-progress progress { width: 100%; height: 12px; accent-color: var(--blue); }

.cockpit-message {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  color: #784600;
  background: var(--amber-soft);
  border: 1px solid #f1d28d;
  border-radius: 10px;
  font-weight: 700;
}

.cockpit-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.cockpit-actions form { display: contents; }

.cockpit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  padding: 1rem;
  color: white;
  background: #536273;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
  text-align: center;
}

.cockpit-button small { display: block; margin-left: 0.4rem; font-size: 0.65em; font-weight: 600; }
.cockpit-button--pause { color: #523100; background: #ffc14d; }
.cockpit-button--resume { background: var(--green); }
.cockpit-button--cancel { background: var(--red); }
.cockpit-button--ask { color: #556171; background: #e5eaf0; }
.cockpit-button--finish { background: var(--green); }
.cockpit-button--repeat { background: var(--green); }
.cockpit-button--new { color: #174ea6; background: var(--blue-soft); text-decoration: none; }
.cockpit-button--start { width: 100%; margin-top: 1rem; background: var(--blue); }
.cockpit-button--procedure { min-height: 58px; background: #12684f; white-space: nowrap; }
.cockpit-button--taxi { min-height: 58px; background: #8a5810; white-space: nowrap; }
.cockpit-button--briefing { min-height: 50px; background: #174ea6; }

.instructor-briefing {
  margin-top: 0.8rem;
  padding: 1.1rem;
  background: #f8fbff;
  border: 1px solid #bfd5f2;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.instructor-briefing__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.instructor-briefing__heading h1 { margin: 0; font-size: clamp(1.45rem, 4vw, 2rem); }
.instructor-briefing__heading p:last-child { max-width: 720px; margin: 0.25rem 0 0; color: var(--muted); font-size: 0.82rem; }
.instructor-briefing__ready { flex: 0 0 auto; padding: 0.45rem 0.7rem; color: #087454; background: #e1f6ee; border-radius: 999px; font-size: 0.72rem; font-weight: 800; }
.instructor-briefing__prompt { display: grid; grid-template-columns: auto 1fr; gap: 0.12rem 0.65rem; margin-top: 0.8rem; padding: 0.7rem 0.85rem; color: #173652; background: #eaf2ff; border-radius: 10px; }
.instructor-briefing__prompt span { grid-row: 1 / 3; align-self: center; color: #55708b; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.instructor-briefing__prompt strong { font-size: 1rem; }
.instructor-briefing__prompt small { color: #55708b; }
.planning-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.55rem; }
.planning-facts > div { min-width: 0; padding: 0.55rem 0.65rem; background: #fff; border: 1px solid #d6e2ef; border-radius: 9px; }
.planning-facts__runway { border-color: #a9c7ef !important; background: #f3f8ff !important; }
.planning-facts span, .planning-facts small { display: block; color: #61758a; font-size: 0.62rem; }
.planning-facts span { font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.planning-facts strong { display: block; margin: 0.12rem 0; color: #173652; font-size: 0.9rem; }
.instructor-briefing__form { margin-top: 0.7rem; }
.instructor-briefing__form summary { color: #174ea6; cursor: pointer; font-size: 0.8rem; font-weight: 800; }
.briefing-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; margin-top: 0.7rem; }
.briefing-fields label { min-width: 0; color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.briefing-fields label small { display: block; min-height: 1.1em; color: #7a8795; font-size: 0.78em; font-weight: 600; letter-spacing: 0; text-transform: none; }
.briefing-fields .briefing-field--disabled { opacity: 0.55; }
.briefing-fields select, .briefing-fields input, .briefing-fields textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 0.25rem;
  padding: 0.55rem;
  color: var(--ink);
  background: white;
  border: 1px solid #bdc8d5;
  border-radius: 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.briefing-fields textarea { min-height: 64px; resize: vertical; }
.briefing-fields__notes { grid-column: 1 / -1; }
.instructor-briefing__actions { display: flex; align-items: center; gap: 0.65rem; margin-top: 0.7rem; }
.instructor-briefing__actions .button { min-height: 50px; display: inline-grid; place-items: center; }
.instructor-briefing__clear { min-height: 42px; margin-top: 0.45rem; }
.lesson-plan-summary { margin-top: 0.7rem; padding: 0.8rem; color: #173652; background: #f7fbff; border: 1px solid #c7dbf4; border-radius: 10px; }
.lesson-plan-summary__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.lesson-plan-summary__heading span { color: #55708b; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.lesson-plan-summary__heading h2 { margin: 0.12rem 0 0; font-size: 1rem; }
.lesson-plan-summary__meta { flex: 0 0 auto; display: grid; justify-items: end; gap: 0.08rem; text-align: right; }
.lesson-plan-summary__meta strong { padding: 0.3rem 0.5rem; color: #08795b; background: #e5f7f0; border-radius: 999px; font-size: 0.65rem; }
.lesson-plan-summary__meta time { color: #35536e; font-size: 0.7rem; font-weight: 750; }
.lesson-plan-summary__meta small { color: #6e7f91; font-size: 0.63rem; }
.lesson-plan-summary > p { margin: 0.5rem 0; color: #55708b; font-size: 0.78rem; }
.lesson-plan-summary__runway-warning { margin: 0.55rem 0; padding: 0.65rem; color: #7a3f00; background: #fff3d9; border: 1px solid #e9c570; border-radius: 8px; font-size: 0.75rem; }
.lesson-plan-summary__runway-warning strong { display: block; margin-bottom: 0.15rem; }
.lesson-training-profile { margin: 0.65rem 0; padding: 0.65rem; background: #edf5ff; border: 1px solid #b8d2f2; border-radius: 9px; }
.lesson-training-profile__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.45rem; }
.lesson-training-profile__heading span { color: #174ea6; font-size: 0.7rem; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
.lesson-training-profile__heading small { color: #62778c; font-size: 0.63rem; }
.lesson-training-profile__phases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
.lesson-training-profile article { min-width: 0; padding: 0.5rem; background: #fff; border: 1px solid #d4e2f1; border-radius: 7px; }
.lesson-training-profile h3 { margin: 0 0 0.35rem; font-size: 0.76rem; }
.lesson-training-profile article > div { display: grid; gap: 0.3rem; }
.lesson-training-target { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 0.04rem 0.4rem; padding-top: 0.3rem; border-top: 1px solid #e3eaf2; }
.lesson-training-target:first-child { padding-top: 0; border-top: 0; }
.lesson-training-target > span { overflow: hidden; color: #5f7387; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.lesson-training-target > strong { font-size: 0.72rem; text-align: right; }
.lesson-training-target > small { grid-column: 1 / -1; color: #60758a; font-size: 0.59rem; text-align: right; }
.lesson-plan-summary ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; margin: 0.55rem 0; padding: 0; list-style: none; counter-reset: lesson-phase; }
.lesson-plan-summary li { display: grid; grid-template-columns: auto 1fr; gap: 0.02rem 0.45rem; align-items: center; padding: 0.4rem 0.5rem; background: #fff; border: 1px solid #dbe5ef; border-radius: 7px; counter-increment: lesson-phase; }
.lesson-plan-summary li::before { grid-row: 1 / 3; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; color: #fff; background: #174ea6; border-radius: 50%; font-size: 0.65rem; font-weight: 800; content: counter(lesson-phase); }
.lesson-plan-summary li span { font-size: 0.75rem; font-weight: 800; }
.lesson-plan-summary li small, .lesson-plan-summary > small { color: #6e7f91; font-size: 0.63rem; }
.cockpit-button:disabled { cursor: not-allowed; filter: saturate(0.35); opacity: 0.62; }
.cockpit-safety { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.78rem; text-align: center; }
.cockpit-empty { min-height: 420px; display: grid; place-items: center; align-content: center; text-align: center; }
.cockpit-empty > p:not(.eyebrow) { max-width: 620px; color: var(--muted); }
.cockpit-empty .cockpit-button { width: min(360px, 100%); }

@media (max-width: 760px) {
  .app-header__inner { align-items: flex-start; padding: 0.75rem 0; }
  .cockpit-header .account-nav form { display: none; }
  .cockpit-statusbar { align-items: flex-start; flex-direction: column; gap: 0.45rem; }
  .cockpit-statusbar > span:last-child { margin-left: 0; }
  .cockpit-exercise__heading { align-items: flex-start; }
  .cockpit-instruments { grid-template-columns: 1fr 1fr; }
  .cockpit-instruments article:last-child { grid-column: 1 / -1; }
  .cockpit-actions { grid-template-columns: 1fr; }
  .cockpit-actions form { display: block; }
  .cockpit-actions form .cockpit-button { width: 100%; }
  .cockpit-actions--taxi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cockpit-actions--taxi form { display: contents; }
  .cockpit-flight-panel { grid-template-columns: 1fr 1.35fr 1fr; }
  .sequence-progress { grid-template-columns: 1fr; gap: 0.6rem; }
  .lesson-plan-summary__heading { align-items: stretch; flex-direction: column; gap: 0.45rem; }
  .lesson-plan-summary__meta { grid-template-columns: auto 1fr; align-items: center; justify-items: start; text-align: left; }
  .lesson-plan-summary__meta time { justify-self: end; }
  .lesson-plan-summary__meta small { grid-column: 1 / -1; }
  .lesson-training-profile__phases { grid-template-columns: 1fr; }
  .flight-readout--altitude { grid-column: auto; }
  .flight-readout--heading { grid-column: auto; }
  .attitude-display { grid-column: auto; }
  .briefing-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 460px) {
  .cockpit-shell { width: min(100% - 1rem, 1280px); padding-top: 0.5rem; }
  .cockpit-exercise, .cockpit-empty { padding: 1rem; }
  .cockpit-instruments { grid-template-columns: 1fr; }
  .cockpit-instruments article:last-child { grid-column: auto; }
  .cockpit-status { display: none; }
  .cockpit-flight-panel { grid-template-columns: 1fr 1fr; }
  .sequence-progress { margin-top: 0.45rem; padding: 0.65rem; border-radius: 11px; }
  .sequence-progress__heading small { font-size: 0.68rem; }
  .sequence-step { gap: 0.35rem; padding: 0.45rem; }
  .sequence-step > span { width: 1.35rem; height: 1.35rem; font-size: 0.68rem; }
  .sequence-step strong { font-size: 0.65rem; }
  .attitude-display { grid-column: 1 / -1; grid-row: 1; }
  .flight-readout--altitude { grid-column: 1 / -1; }
}
.confirmation-field { display: flex; align-items: flex-start; gap: 0.55rem; margin: 1rem 0; color: var(--muted); font-size: 0.84rem; }
.confirmation-field input { margin-top: 0.25rem; }
.token-result { padding: 1rem; color: var(--green); background: var(--green-soft); border: 1px solid #9ed9c5; border-radius: 12px; }
.token-result p { margin: 0.3rem 0 0.8rem; color: #286956; font-size: 0.86rem; }
.token-result code { display: block; overflow-wrap: anywhere; padding: 0.75rem; color: var(--ink); background: white; border-radius: 8px; user-select: all; }
.token-copy { display: flex; align-items: stretch; gap: 0.6rem; }
.token-copy code { flex: 1; }
.setup-steps { margin-bottom: 0; padding-left: 1.25rem; color: var(--muted); font-size: 0.9rem; }
.setup-steps li + li { margin-top: 0.45rem; }

body > footer { padding: 1.2rem; color: var(--muted); text-align: center; font-size: 0.78rem; }

@media (max-width: 900px) {
  .dashboard-hero { align-items: stretch; flex-direction: column; }
  .hero-meta { grid-template-columns: repeat(3, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .target-grid, .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .app-header__inner { align-items: flex-start; flex-direction: column; padding: 0.8rem 0; }
  .account-nav { justify-content: space-between; width: 100%; }
  .account-nav > span { flex-basis: 100%; }
  .dashboard-shell { width: min(100% - 1rem, 1180px); padding-top: 0.5rem; }
  .dashboard-hero { margin: 0 -0.5rem; border-radius: 0 0 16px 16px; }
  .hero-meta { grid-template-columns: 1fr; }
  .hero-meta div + div { border-top: 1px solid rgba(255, 255, 255, 0.14); border-left: 0; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card--wide { grid-column: auto; }
  .target-grid, .result-grid { grid-template-columns: 1fr 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-note { text-align: left; }
  .settings-meta { grid-template-columns: 1fr; }
  .settings-card__heading { align-items: flex-start; flex-direction: column; }
  .token-copy { align-items: stretch; flex-direction: column; }
}

@media (max-width: 620px) {
  .cockpit-header .app-header__inner {
    align-items: center;
    flex-direction: row;
    min-height: 58px;
    padding: 0.45rem 0;
  }

  .cockpit-header .brand { gap: 0.55rem; }
  .cockpit-header .brand__mark { width: 34px; height: 34px; border-radius: 8px; }
  .cockpit-header .brand strong { font-size: 0.9rem; }
  .cockpit-header .brand small { font-size: 0.66rem; }
  .cockpit-header .account-nav { width: auto; margin-left: auto; }
  .cockpit-header .button { padding: 0.42rem 0.65rem; font-size: 0.76rem; }

  .cockpit-shell { width: min(100% - 0.75rem, 1280px); padding: 0.4rem 0 1rem; }
  .cockpit-statusbar {
    display: grid;
    grid-template-columns: auto auto minmax(54px, 1fr);
    align-items: center;
    gap: 0.35rem 0.55rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    font-size: 0.66rem;
  }
  .cockpit-statusbar div { gap: 0.3rem; white-space: nowrap; }
  .cockpit-statusbar .status-dot { width: 7px; height: 7px; }
  .cockpit-statusbar > span:last-child { grid-column: auto; margin: 0; font-size: 0.58rem; text-align: right; white-space: nowrap; }
  .cockpit-data-warning { margin-top: 0.4rem; padding: 0.5rem 0.65rem; flex-direction: column; gap: 0.08rem; }
  .lesson-runner { margin-top: 0.4rem; padding: 0.6rem; border-radius: 11px; }
  .lesson-runner__heading h1 { font-size: 1rem; }
  .lesson-runner__heading > strong { padding: 0.25rem 0.4rem; font-size: 0.58rem; }
  .lesson-runner__progress { margin-top: 0.4rem; }
  .lesson-runner__current { gap: 0.45rem; margin-top: 0.45rem; padding: 0.55rem; }
  .lesson-runner__current h2 { font-size: 1rem; }
  .lesson-runner__current p { font-size: 0.7rem; line-height: 1.35; }
  .lesson-runner__requirement { font-size: 0.5rem; }
  .lesson-runner__actions { gap: 0.35rem; }
  .lesson-runner__actions .cockpit-button { min-height: 48px; padding: 0.4rem 0.25rem; font-size: 0.7rem; }
  .flight-guidance { margin-top: 0.4rem; padding: 0.5rem 0.55rem; }
  .flight-guidance p { font-size: 0.86rem; }
  .flight-guidance__checks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.28rem; }
  .flight-guidance-check { padding: 0.36rem 0.42rem; }
  .flight-guidance-check > strong { font-size: 1.05rem; }
  .lesson-runner__phases ol { grid-template-columns: 1fr; }
  .last-lesson { margin-top: 0.4rem; padding: 0.6rem; border-radius: 11px; }
  .last-lesson__heading h1 { font-size: 1rem; }
  .last-lesson__status { padding: 0.25rem 0.4rem; font-size: 0.58rem; }
  .last-lesson__result { grid-template-columns: 1fr 1fr; gap: 0.3rem; margin-top: 0.45rem; }
  .last-lesson__result div { padding: 0.4rem; }
  .last-lesson__result span { font-size: 0.48rem; }
  .last-lesson__result strong { font-size: 0.72rem; }
  .lesson-debrief { grid-template-columns: 1fr; gap: 0.3rem; }
  .lesson-debrief__card, .lesson-debrief__card--limits { grid-column: auto; padding: 0.5rem; }
  .last-lesson__actions { grid-template-columns: 1fr; gap: 0.4rem; margin-top: 0.45rem; }
  .last-lesson__actions .cockpit-button { min-height: 46px; padding: 0.4rem; font-size: 0.72rem; }
  .last-lesson__actions ol { grid-template-columns: 1fr; }

  .cockpit-flight-panel { gap: 0.35rem; margin-top: 0.4rem; padding: 0.35rem; border-radius: 10px; }
  .flight-readout, .attitude-display { min-height: 104px; padding: 0.45rem; border-radius: 8px; }
  .flight-readout > strong { font-size: clamp(1.55rem, 8vw, 2.25rem); }
  .flight-readout__label { font-size: 0.57rem; }
  .flight-readout > span:last-child { font-size: 0.58rem; }
  .attitude-display__viewport { height: 67px; }
  .attitude-display__values { font-size: 0.53rem; }
  .systems-strip { gap: 0.25rem; }
  .system-chip { padding: 0.28rem 0.42rem; font-size: 0.54rem; }

  .cockpit-exercise, .cockpit-empty { margin-top: 0.45rem; padding: 0.75rem; border-radius: 13px; }
  .cockpit-exercise__heading h1, .cockpit-empty h1 { font-size: 1.65rem; }
  .cockpit-exercise__heading .eyebrow { margin-bottom: 0.15rem; font-size: 0.63rem; }
  .cockpit-command-state { margin-top: 0.2rem; font-size: 0.75rem; }

  .cockpit-exercise--taxi { padding: 0.6rem; }
  .cockpit-exercise--taxi .cockpit-exercise__heading h1 { font-size: 1.3rem; }
  .taxi-primary-panel { grid-template-columns: minmax(74px, 0.62fr) minmax(70px, 0.55fr) minmax(130px, 1.35fr); margin-top: 0.45rem; border-radius: 10px; }
  .taxi-primary-panel > div { padding: 0.5rem 0.55rem; }
  .taxi-primary-panel span { font-size: 0.48rem; letter-spacing: 0.06em; }
  .taxi-primary-metric strong, .taxi-secondary-metric strong { margin-top: 0.05rem; font-size: clamp(1.55rem, 8vw, 2.15rem); }
  .taxi-secondary-metric strong { font-size: clamp(1.4rem, 6.5vw, 1.85rem); }
  .taxi-primary-panel em { font-size: 0.48rem; }
  .taxi-next-action strong { font-size: 0.78rem; }
  .taxi-next-action small { margin-top: 0.12rem; font-size: 0.53rem; }
  .taxi-systems { gap: 0.25rem; margin-top: 0.35rem; }
  .taxi-system { padding: 0.24rem 0.42rem; font-size: 0.52rem; }
  .cockpit-actions--taxi { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem; margin-top: 0.4rem; }
  .cockpit-actions--taxi form { display: contents; }
  .cockpit-actions--taxi .cockpit-button { width: 100%; min-height: 50px; padding: 0.35rem 0.2rem; border-radius: 8px; font-size: 0.71rem; line-height: 1.05; }
  .taxi-details { margin-top: 0.35rem; }
  .taxi-details summary { padding-top: 0.4rem; font-size: 0.62rem; }
  .taxi-details .procedure-checklist { margin-top: 0.35rem; }

  .cockpit-instruments { grid-template-columns: 1fr 1fr; gap: 0.45rem; margin-top: 0.65rem; }
  .cockpit-instruments article { min-height: 0; padding: 0.65rem; border-radius: 10px; border-top-width: 4px; }
  .cockpit-instruments article:last-child { grid-column: 1 / -1; }
  .cockpit-instruments article > span { font-size: 0.61rem; }
  .cockpit-instruments strong { margin-top: 0.1rem; font-size: clamp(1.65rem, 10vw, 2.35rem); }
  .cockpit-instruments p { margin-top: 0.18rem; font-size: 0.68rem; line-height: 1.3; }
  .cockpit-guidance { margin-top: 0.42rem; padding-top: 0.38rem; font-size: 0.82rem; }
  .procedure-checklist { grid-template-columns: 1fr; gap: 0.35rem; margin-top: 0.6rem; }
  .procedure-condition { gap: 0.45rem; padding: 0.5rem; border-left-width: 4px; }
  .procedure-condition__mark { width: 1.45rem; height: 1.45rem; font-size: 0.75rem; }
  .procedure-condition strong { font-size: 0.76rem; }
  .procedure-condition small { font-size: 0.62rem; }
  .procedure-condition em { font-size: 0.5rem; }

  .cockpit-progress { margin-top: 0.55rem; }
  .cockpit-progress div { margin-bottom: 0.2rem; font-size: 0.72rem; }
  .cockpit-progress progress { height: 8px; }
  .cockpit-message { margin-top: 0.5rem; padding: 0.55rem 0.65rem; font-size: 0.75rem; }
  .cockpit-actions { gap: 0.45rem; margin-top: 0.55rem; }
  .cockpit-button { min-height: 56px; padding: 0.65rem; border-radius: 10px; font-size: 0.92rem; }
  .instructor-briefing { margin-top: 0.4rem; padding: 0.7rem; border-radius: 12px; }
  .instructor-briefing__heading { gap: 0.45rem; }
  .instructor-briefing__heading h1 { font-size: 1.25rem; }
  .instructor-briefing__heading p:last-child { display: none; }
  .instructor-briefing__ready { padding: 0.35rem 0.5rem; font-size: 0.58rem; }
  .instructor-briefing__prompt { grid-template-columns: 1fr; gap: 0.05rem; margin-top: 0.5rem; padding: 0.55rem 0.65rem; }
  .instructor-briefing__prompt span { grid-row: auto; }
  .instructor-briefing__prompt strong { font-size: 0.9rem; }
  .instructor-briefing__prompt small { font-size: 0.63rem; }
  .planning-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3rem; }
  .planning-facts > div { display: grid; grid-template-columns: 1fr auto; gap: 0.05rem 0.5rem; padding: 0.42rem 0.5rem; }
  .planning-facts span { align-self: center; }
  .planning-facts strong { margin: 0; text-align: right; }
  .planning-facts small { grid-column: 1 / -1; }
  .instructor-briefing__form { margin-top: 0.5rem; }
  .briefing-fields { gap: 0.45rem; margin-top: 0.5rem; }
  .briefing-fields label { font-size: 0.58rem; }
  .briefing-fields select, .briefing-fields input, .briefing-fields textarea { min-height: 42px; padding: 0.4rem; font-size: 0.74rem; }
  .instructor-briefing__actions { gap: 0.4rem; margin-top: 0.5rem; }
  .instructor-briefing__actions .cockpit-button, .instructor-briefing__actions .button { min-height: 46px; }
  .lesson-plan-summary { padding: 0.6rem; }
  .lesson-training-profile { padding: 0.5rem; }
  .lesson-training-profile__heading { align-items: flex-start; flex-direction: column; gap: 0.05rem; }
  .lesson-plan-summary ol { grid-template-columns: 1fr; }
  .cockpit-button--start { margin-top: 0.55rem; }
  .cockpit-safety { margin-top: 0.45rem; font-size: 0.66rem; }
  .cockpit-empty { min-height: 280px; }
  body > footer { padding: 0.6rem; }
}

@media (max-width: 360px) {
  .cockpit-header .brand small { display: none; }
  .cockpit-header .account-nav { gap: 0.35rem; }
  .cockpit-statusbar { gap: 0.25rem; font-size: 0.6rem; }
  .cockpit-statusbar > span:last-child { font-size: 0; }
  .cockpit-statusbar > span:last-child::after { content: "Live"; font-size: 0.56rem; }
  .taxi-next-action small { display: none; }
}
