/* Dedalum Theme V2 — aviation engineering SaaS
 * MAI-inspired (not official MAI brandbook).
 * See docs/DEDALUM_UI_GUIDELINES.md for design system.
 */

:root {
  /* Surface palette — cool aerospace whites */
  --dedalum-bg:          #F1F5FB;
  --dedalum-bg-2:        #E8EFF8;
  --dedalum-card:        #FFFFFF;
  --dedalum-card-elev:   #FBFCFE;

  /* Navy — deep aviation */
  --dedalum-navy:        #0A1628;
  --dedalum-navy-2:      #142844;
  --dedalum-navy-3:      #1F3A5F;

  /* Aviation blue — primary action */
  --dedalum-blue:        #1E58E8;
  --dedalum-blue-2:      #0F47CC;
  --dedalum-blue-3:      #0A39B0;
  --dedalum-blue-soft:   #E8F0FE;
  --dedalum-blue-glow:   rgba(30, 88, 232, 0.18);

  /* Steel / utility */
  --dedalum-steel:       #4A5A75;
  --dedalum-steel-2:     #7886A0;
  --dedalum-steel-3:     #A6B0C3;
  --dedalum-divider:     #DCE3EE;
  --dedalum-divider-soft:#EAF0F8;

  /* Semantic */
  --dedalum-success:     #1F8E5B;
  --dedalum-success-soft:#E7F5EE;
  --dedalum-warning:     #C77900;
  --dedalum-warning-soft:#FFF4E0;
  --dedalum-danger:      #C4321A;
  --dedalum-danger-soft: #FFF1F1;

  /* Text */
  --dedalum-text:        #0F1E33;
  --dedalum-text-2:      #3D4D6A;
  --dedalum-text-3:      #6B7B95;

  /* Shadows */
  --dedalum-shadow-1:    0 1px 2px rgba(10, 22, 40, 0.05), 0 1px 3px rgba(10, 22, 40, 0.06);
  --dedalum-shadow-2:    0 2px 4px rgba(10, 22, 40, 0.06), 0 4px 12px rgba(10, 22, 40, 0.08);
  --dedalum-shadow-3:    0 4px 8px rgba(10, 22, 40, 0.06), 0 12px 28px rgba(10, 22, 40, 0.12);
  --dedalum-shadow-glow: 0 0 0 4px rgba(30, 88, 232, 0.12);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Base                                                                         */
/* ─────────────────────────────────────────────────────────────────────────── */

body.dedalum-body {
  background: var(--dedalum-bg);
  color: var(--dedalum-text);
  font-feature-settings: "ss01", "kern";
}

/* Two-layer body background: subtle grid + radial blueprint glow */
body.dedalum-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(rgba(30, 88, 232, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 88, 232, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
}

body.dedalum-body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(30, 88, 232, 0.10) 0%, transparent 38%),
    radial-gradient(ellipse at 82% 76%, rgba(15, 71, 204, 0.08) 0%, transparent 42%),
    radial-gradient(ellipse at 50% 100%, rgba(232, 240, 254, 0.5) 0%, transparent 55%);
}

main { position: relative; z-index: 1; }

/* ─────────────────────────────────────────────────────────────────────────── */
/* Topbar                                                                       */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-topbar {
  background: linear-gradient(180deg, var(--dedalum-navy) 0%, var(--dedalum-navy-2) 100%);
  color: #E2E7EF;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18), 0 2px 8px rgba(10, 22, 40, 0.18);
  backdrop-filter: blur(6px);
}

.dedalum-topbar a,
.dedalum-topbar button {
  color: #E2E7EF;
  transition: color 0.12s;
}

.dedalum-topbar a:hover,
.dedalum-topbar button:hover { color: #FFFFFF; }

.dedalum-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.005em;
  color: #FFFFFF;
}

.dedalum-brand-mark {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #6FA0FF;
}

.dedalum-topbar-divider {
  width: 1px;
  height: 18px;
  background: rgba(226, 231, 239, 0.16);
  margin: 0 4px;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Page hero / page header                                                      */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-page-hero {
  position: relative;
  padding: 36px 0 28px;
}

.dedalum-page-hero h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
  color: var(--dedalum-navy);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.dedalum-page-hero p {
  margin: 12px 0 0;
  color: var(--dedalum-text-2);
  font-size: 16px;
  line-height: 1.55;
  max-width: 680px;
}

.dedalum-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 8px;
  background: var(--dedalum-blue-soft);
  border: 1px solid rgba(30, 88, 232, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dedalum-blue);
  margin-bottom: 14px;
}

.dedalum-hero-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--dedalum-blue);
  box-shadow: 0 0 0 3px var(--dedalum-blue-glow);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Command Deck — hero composition for home                                     */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-command-deck {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 36px;
  align-items: stretch;
  padding: 36px 32px 32px;
  margin-bottom: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 251, 0.88) 100%);
  border: 1px solid var(--dedalum-divider);
  border-radius: 20px;
  box-shadow: var(--dedalum-shadow-2);
  overflow: hidden;
}

.dedalum-command-deck::before {
  /* Top accent line — engineering precision */
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--dedalum-blue) 30%, var(--dedalum-blue-2) 70%, transparent);
  opacity: 0.7;
}

.dedalum-command-deck__body {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.dedalum-command-deck__stage {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 960px) {
  .dedalum-command-deck { grid-template-columns: 1fr; padding: 28px 22px; gap: 24px; }
}

/* Telemetry panel — engineering instrument cluster */
.dedalum-telemetry-panel {
  background: var(--dedalum-navy);
  color: #C9D6E8;
  border-radius: 14px;
  padding: 18px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--dedalum-shadow-2);
}

.dedalum-telemetry-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(111, 160, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 160, 255, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}

.dedalum-telemetry-panel__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dedalum-steel-2);
}

.dedalum-telemetry-panel__indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dedalum-telemetry-panel__indicator::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #4ADE80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.22);
}

.dedalum-telemetry-row {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(111, 160, 255, 0.10);
  gap: 12px;
}

.dedalum-telemetry-row:last-child { border-bottom: 0; }

.dedalum-telemetry-row__label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dedalum-steel-2);
}

.dedalum-telemetry-row__value {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
}

.dedalum-telemetry-row__value--accent { color: #6FA0FF; }

/* ─────────────────────────────────────────────────────────────────────────── */
/* Blueprint scenes — distinct background motifs per page                       */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-blueprint-scene {
  position: absolute;
  pointer-events: none;
  color: var(--dedalum-blue);
  opacity: 0.12;
  z-index: 1;
}

.dedalum-blueprint-scene--wings {
  top: -40px;
  right: -120px;
  width: 760px;
  height: 520px;
}

.dedalum-blueprint-scene--courses {
  top: -60px;
  left: -80px;
  width: 100%;
  max-width: 1280px;
  height: 360px;
  opacity: 0.10;
}

.dedalum-blueprint-scene--orbit {
  top: -100px;
  right: -160px;
  width: 760px;
  height: 760px;
  opacity: 0.11;
}

.dedalum-blueprint-scene--navigation {
  top: -40px;
  left: -60px;
  width: 100%;
  max-width: 1380px;
  height: 400px;
  opacity: 0.11;
}

.dedalum-blueprint-scene--inline {
  position: relative;
  width: 100%;
  height: 100%;
  opacity: 0.85;
  color: var(--dedalum-blue);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Cards                                                                        */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-card {
  background: var(--dedalum-card);
  border: 1px solid var(--dedalum-divider);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--dedalum-shadow-1);
  position: relative;
}

.dedalum-card--elevated {
  box-shadow: var(--dedalum-shadow-2);
  border-color: var(--dedalum-divider-soft);
}

.dedalum-card--glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(251, 252, 254, 0.88));
  backdrop-filter: blur(8px);
}

.dedalum-card--accent {
  border-left: 3px solid var(--dedalum-blue);
}

.dedalum-card-hover {
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.dedalum-card-hover:hover {
  box-shadow: var(--dedalum-shadow-3);
  border-color: rgba(30, 88, 232, 0.28);
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Buttons                                                                      */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-button-primary,
.dedalum-button-secondary,
.dedalum-button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s, box-shadow 0.14s, transform 0.14s;
  border: 1px solid transparent;
  text-decoration: none;
}

.dedalum-button-primary {
  background: linear-gradient(180deg, var(--dedalum-blue) 0%, var(--dedalum-blue-2) 100%);
  color: #FFFFFF;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 1px 2px rgba(30, 88, 232, 0.28), 0 2px 8px rgba(30, 88, 232, 0.22);
}

.dedalum-button-primary:hover {
  background: linear-gradient(180deg, var(--dedalum-blue-2) 0%, var(--dedalum-blue-3) 100%);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 4px 12px rgba(30, 88, 232, 0.32);
}

.dedalum-button-primary:focus-visible {
  outline: 0;
  box-shadow: var(--dedalum-shadow-glow), 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 2px 8px rgba(30, 88, 232, 0.22);
}

.dedalum-button-secondary {
  background: var(--dedalum-card);
  color: var(--dedalum-navy);
  border-color: var(--dedalum-divider);
  box-shadow: var(--dedalum-shadow-1);
}

.dedalum-button-secondary:hover {
  border-color: var(--dedalum-blue);
  color: var(--dedalum-blue);
  background: var(--dedalum-blue-soft);
}

.dedalum-button-ghost {
  background: transparent;
  color: var(--dedalum-steel);
  border-color: transparent;
}

.dedalum-button-ghost:hover {
  color: var(--dedalum-navy);
  background: var(--dedalum-blue-soft);
}

button.dedalum-button-primary[disabled],
.dedalum-button-primary.disabled {
  background: var(--dedalum-steel-2);
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Icon tile — engineering icon badge                                           */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-icon-tile {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--dedalum-blue-soft) 0%, #FFFFFF 100%);
  border: 1px solid rgba(30, 88, 232, 0.16);
  color: var(--dedalum-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, var(--dedalum-shadow-1);
  position: relative;
}

.dedalum-icon-tile::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 1px dashed rgba(30, 88, 232, 0.15);
  pointer-events: none;
}

.dedalum-icon-tile svg { width: 24px; height: 24px; position: relative; z-index: 1; }

.dedalum-icon-tile--sm { width: 36px; height: 36px; border-radius: 10px; }
.dedalum-icon-tile--sm::after { inset: 4px; border-radius: 6px; }
.dedalum-icon-tile--sm svg { width: 18px; height: 18px; }

.dedalum-icon-tile--lg { width: 64px; height: 64px; border-radius: 16px; }
.dedalum-icon-tile--lg svg { width: 30px; height: 30px; }

.dedalum-icon-tile--navy {
  background: linear-gradient(135deg, var(--dedalum-navy) 0%, var(--dedalum-navy-3) 100%);
  border-color: transparent;
  color: #6FA0FF;
  box-shadow: 0 2px 8px rgba(10, 22, 40, 0.25);
}

.dedalum-icon-tile--navy::after { border-color: rgba(111, 160, 255, 0.22); }

.dedalum-icon-tile--muted {
  background: #F4F2EC;
  border-color: var(--dedalum-steel-3);
  color: var(--dedalum-steel);
}

.dedalum-icon-tile--muted::after { border-color: var(--dedalum-steel-3); }

/* ─────────────────────────────────────────────────────────────────────────── */
/* Chip (suggested prompts, meta pills)                                         */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--dedalum-blue-soft);
  color: var(--dedalum-blue);
  border: 1px solid rgba(30, 88, 232, 0.18);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
  text-align: left;
  line-height: 1.35;
}

.dedalum-chip:hover {
  background: #DCE7FD;
  border-color: var(--dedalum-blue);
  transform: translateY(-1px);
}

.dedalum-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Badges                                                                       */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  background: var(--dedalum-divider);
  color: var(--dedalum-text-2);
}

.dedalum-badge-success { background: var(--dedalum-success-soft); color: var(--dedalum-success); border-color: rgba(31, 142, 91, 0.25); }
.dedalum-badge-warning { background: var(--dedalum-warning-soft); color: var(--dedalum-warning); border-color: rgba(199, 121, 0, 0.25); }
.dedalum-badge-danger  { background: var(--dedalum-danger-soft);  color: var(--dedalum-danger);  border-color: rgba(196, 50, 26, 0.25); }
.dedalum-badge-info    { background: var(--dedalum-blue-soft);    color: var(--dedalum-blue);    border-color: rgba(30, 88, 232, 0.18); }

/* ─────────────────────────────────────────────────────────────────────────── */
/* Progress bar                                                                 */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-progress {
  width: 100%;
  height: 6px;
  background: var(--dedalum-divider);
  border-radius: 999px;
  overflow: hidden;
}

.dedalum-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--dedalum-blue), var(--dedalum-blue-2));
  border-radius: 999px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(30, 88, 232, 0.45);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Action grid                                                                  */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.dedalum-action-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--dedalum-card);
  border: 1px solid var(--dedalum-divider);
  border-radius: 14px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: var(--dedalum-shadow-1);
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.dedalum-action-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--dedalum-blue);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s ease;
}

.dedalum-action-card:hover {
  box-shadow: var(--dedalum-shadow-3);
  border-color: rgba(30, 88, 232, 0.28);
  transform: translateY(-2px);
}

.dedalum-action-card:hover::before { transform: scaleY(1); }

.dedalum-action-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dedalum-navy);
  margin: 0;
}

.dedalum-action-card__desc {
  font-size: 13px;
  color: var(--dedalum-text-3);
  margin: 0;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Role card (onboarding)                                                       */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-role-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 20px;
  background: var(--dedalum-card);
  border: 1px solid var(--dedalum-divider);
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s, background 0.16s;
  box-shadow: var(--dedalum-shadow-1);
}

.dedalum-role-card:hover {
  border-color: var(--dedalum-blue);
  background: #FBFCFE;
  box-shadow: var(--dedalum-shadow-2);
  transform: translateY(-1px);
}

.dedalum-role-card-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--dedalum-navy);
  margin: 0 0 4px;
}

.dedalum-role-card-desc {
  font-size: 13px;
  color: var(--dedalum-text-2);
  margin: 0 0 6px;
  line-height: 1.55;
}

.dedalum-role-card-route {
  font-size: 12px;
  color: var(--dedalum-blue);
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Course grid + card                                                           */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.dedalum-course-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: var(--dedalum-card);
  border: 1px solid var(--dedalum-divider);
  border-radius: 16px;
  box-shadow: var(--dedalum-shadow-1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.dedalum-course-card::after {
  /* Faint corner blueprint mark */
  content: "";
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  background-image:
    linear-gradient(135deg, transparent 48%, rgba(30, 88, 232, 0.16) 48%, rgba(30, 88, 232, 0.16) 52%, transparent 52%),
    linear-gradient(45deg,  transparent 48%, rgba(30, 88, 232, 0.16) 48%, rgba(30, 88, 232, 0.16) 52%, transparent 52%);
  background-size: 12px 12px;
  opacity: 0.5;
  pointer-events: none;
  border-radius: 4px;
}

.dedalum-course-card:hover {
  box-shadow: var(--dedalum-shadow-3);
  border-color: rgba(30, 88, 232, 0.28);
  transform: translateY(-3px);
}

.dedalum-course-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dedalum-navy);
  margin: 0;
  line-height: 1.3;
}

.dedalum-course-card-desc {
  font-size: 13.5px;
  color: var(--dedalum-text-2);
  line-height: 1.55;
  margin: 0;
}

.dedalum-course-card-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--dedalum-text-3);
  flex-wrap: wrap;
}

/* Sidebar filter (courses page) */
.dedalum-course-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .dedalum-course-layout { grid-template-columns: 1fr; }
}

.dedalum-sidebar {
  background: var(--dedalum-card);
  border: 1px solid var(--dedalum-divider);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--dedalum-shadow-1);
  position: sticky;
  top: 80px;
}

.dedalum-sidebar h3 {
  margin: 0 0 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dedalum-steel);
  font-weight: 700;
}

.dedalum-sidebar-section { margin-bottom: 22px; }

.dedalum-sidebar-section:last-child { margin-bottom: 0; }

.dedalum-sidebar label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--dedalum-text-2);
  cursor: pointer;
}

.dedalum-sidebar label input[type="checkbox"] {
  accent-color: var(--dedalum-blue);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Workbench (exercise page)                                                    */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 22px;
}

@media (max-width: 1024px) {
  .dedalum-workbench { grid-template-columns: 1fr; }
}

.dedalum-workbench__main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.dedalum-workbench__side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.dedalum-workbench-editor {
  background: var(--dedalum-card);
  border: 1px solid var(--dedalum-divider);
  border-radius: 16px;
  padding: 0;
  box-shadow: var(--dedalum-shadow-2);
  overflow: hidden;
}

.dedalum-workbench-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--dedalum-divider);
  background: var(--dedalum-card-elev);
}

.dedalum-workbench-editor__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--dedalum-navy);
}

.dedalum-workbench-editor__meta {
  font-size: 11px;
  color: var(--dedalum-text-3);
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.dedalum-workbench-editor textarea {
  width: 100%;
  display: block;
  padding: 18px 20px;
  border: 0;
  outline: 0;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  background: transparent;
  color: var(--dedalum-text);
  resize: vertical;
  min-height: 220px;
}

.dedalum-workbench-editor textarea::placeholder { color: var(--dedalum-steel-3); }

.dedalum-workbench-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--dedalum-divider);
  background: var(--dedalum-card-elev);
  flex-wrap: wrap;
}

.dedalum-rubric-panel {
  background: var(--dedalum-card);
  border: 1px solid var(--dedalum-divider);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--dedalum-shadow-1);
}

.dedalum-rubric-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--dedalum-divider-soft);
}

.dedalum-rubric-row:last-child { border-bottom: 0; padding-bottom: 0; }
.dedalum-rubric-row:first-child { padding-top: 0; }

.dedalum-rubric-row-body { flex: 1; min-width: 0; }

.dedalum-rubric-row-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dedalum-navy);
  margin: 0;
}

.dedalum-rubric-row-desc {
  font-size: 12px;
  color: var(--dedalum-text-3);
  margin: 2px 0 0;
  line-height: 1.5;
}

.dedalum-rubric-row-score {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--dedalum-steel);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Empty / spec-only state                                                      */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-empty-state {
  text-align: center;
  padding: 56px 28px;
  background: var(--dedalum-card);
  border: 1px solid var(--dedalum-divider);
  border-radius: 16px;
  color: var(--dedalum-text-2);
  box-shadow: var(--dedalum-shadow-1);
}

.dedalum-empty-state h3 {
  margin: 14px 0 8px;
  color: var(--dedalum-navy);
  font-size: 20px;
  font-weight: 700;
}

.dedalum-empty-state p {
  margin: 0 auto 18px;
  max-width: 480px;
  line-height: 1.55;
}

.dedalum-spec-only {
  padding: 16px 18px;
  background: linear-gradient(135deg, #FFF8E5 0%, #FBF6E8 100%);
  border: 1px dashed var(--dedalum-warning);
  border-radius: 14px;
  color: var(--dedalum-text-2);
  font-size: 13px;
  line-height: 1.55;
  position: relative;
}

.dedalum-spec-only strong { color: var(--dedalum-navy); }

/* ─────────────────────────────────────────────────────────────────────────── */
/* Theory list rows (home + theory page)                                        */
/* ─────────────────────────────────────────────────────────────────────────── */

.dedalum-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--dedalum-card);
  border: 1px solid var(--dedalum-divider);
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  transition: border-color 0.12s, background 0.12s;
}

.dedalum-list-row:hover {
  border-color: rgba(30, 88, 232, 0.28);
  background: #FBFCFE;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Strip residual Paideia violet across non-migrated templates                  */
/* ─────────────────────────────────────────────────────────────────────────── */

.text-violet-700, .text-violet-600, .text-violet-500 { color: var(--dedalum-blue) !important; }
.bg-violet-100, .bg-violet-50 { background-color: var(--dedalum-blue-soft) !important; }
.bg-violet-700, .bg-violet-600, .bg-violet-500 { background-color: var(--dedalum-blue) !important; }
.border-violet-500, .border-violet-400, .border-violet-200 { border-color: var(--dedalum-blue) !important; }
.hover\:bg-violet-100:hover { background-color: var(--dedalum-blue-soft) !important; }
.hover\:bg-violet-600:hover, .hover\:bg-violet-700:hover { background-color: var(--dedalum-blue-2) !important; }
.hover\:text-violet-700:hover, .hover\:text-violet-600:hover { color: var(--dedalum-blue-2) !important; }

/* ─────────────────────────────────────────────────────────────────────────── */
/* Mobile                                                                       */
/* ─────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .dedalum-page-hero h1 { font-size: 26px; }
  .dedalum-page-hero p { font-size: 14px; }
  .dedalum-command-deck { padding: 22px 16px; }
  .dedalum-action-grid { grid-template-columns: 1fr 1fr; }
  .dedalum-course-grid { grid-template-columns: 1fr; }
}
