/* SITA Agentic Toolkit Course — SITA Design System V2 tokens
   Assumption: Saans / ABC Favorit Mono are not available as web fonts here,
   so the type scale below uses a close system-font fallback stack while
   keeping the documented sizes, weights and line-heights. */

:root {
  /* ---- Palette ---- */
  --forest-green: #2B3E2B;
  --off-black: #1E1E1E;
  --white: #FFFFFF;
  --gray-100: #F7F7F7;
  --gray-200: #E6E6E6;
  --gray-300: #C9C9C9;
  --gray-400: #A3A3A3;
  --vibrant-blue: #4C3DE3;
  --bright-purple: #E9E8FC;

  /* ---- Semantic tokens (light) ---- */
  --background: var(--gray-100);
  --foreground: var(--off-black);
  --card: var(--white);
  --card-foreground: var(--off-black);
  --primary: var(--forest-green);
  --primary-foreground: var(--white);
  --secondary-border: var(--off-black);
  --muted: #808080;
  --muted-foreground: var(--gray-400);
  --accent: var(--vibrant-blue);
  --accent-foreground: var(--white);
  --border: var(--gray-300);
  --ring: var(--vibrant-blue);
  --success: #538038;
  --success-bg: #EAFDEB;
  --error: #CA2F41;

  --header-bg: var(--forest-green);
  --header-fg: var(--white);
  --header-divider: rgba(255, 255, 255, 0.3);

  --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.10);

  font-size: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0E0E0E;
    --foreground: #E6E6E6;
    --card: #1E1E1E;
    --card-foreground: #E6E6E6;
    --primary: #538038;
    --primary-foreground: #FFFFFF;
    --secondary-border: #E6E6E6;
    --muted: #4F4F4F;
    --muted-foreground: #A3A3A3;
    --accent: #B2AAFF;
    --accent-foreground: #FFFFFF;
    --border: #383838;
    --ring: #B2AAFF;
    --success-bg: #17301c;

    --header-bg: #1E1E1E;
    --header-fg: #E6E6E6;
    --header-divider: rgba(230, 230, 230, 0.3);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Saans", "Inter", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

/* ---------- Mandatory SITA header (Non-Negotiable Rule #6) ---------- */
.app-header {
  height: 80px;
  padding: 0 24px 0 20px;
  background-color: var(--header-bg);
  color: var(--header-fg);
  border-radius: 0 0 8px 8px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-left { display: flex; align-items: center; }
.brand-logo { width: 74px; height: 24.13px; display: block; }
.header-divider {
  width: 1px;
  height: 32px;
  background-color: var(--header-divider);
  margin-left: 12px;
  margin-right: 12px;
}
.product-name {
  font-size: 16px;
  line-height: 18px;
  font-weight: 600;
}
.header-right {
  font-size: 10px;
  line-height: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ---------- Content shell ---------- */
/* SITA layout spec: 1224px outer frame, 1156px inner content (32px margins each side) */
main.content {
  max-width: 1156px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}

.kicker {
  font-size: 12px;
  line-height: 18px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

h1 {
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  margin: 4px 0 24px;
}
h2 {
  font-size: 24px;
  line-height: 28px;
  font-weight: 600;
  margin: 40px 0 12px;
}
h3 {
  font-size: 18px;
  line-height: 20px;
  font-weight: 600;
  margin: 24px 0 8px;
}
p, ul, ol { font-size: 14px; line-height: 20px; max-width: 720px; }
ul, ol { padding-left: 1.2em; }

/* ---------- No-line rule: tonal cards instead of borders ---------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  font-size: 14px;
  line-height: 20px;
}
th, td { padding: 12px 16px; text-align: left; vertical-align: top; }
th {
  background: var(--bright-purple);
  color: var(--off-black);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
}
tr:not(:last-child) td { box-shadow: inset 0 -1px 0 var(--border); }

code, pre {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.85em;
}
pre {
  background: var(--card);
  box-shadow: var(--card-shadow);
  padding: 16px 20px;
  overflow-x: auto;
  border-radius: 8px;
  line-height: 20px;
}

/* Layer-first depth: elevated surface, no hard border */
.callout {
  background: var(--bright-purple);
  color: var(--off-black);
  padding: 12px 20px;
  margin: 20px 0;
  border-radius: 8px;
}
.source {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted-foreground);
}
.ask-teacher {
  background: var(--card);
  box-shadow: var(--card-shadow);
  font-size: 12px;
  line-height: 18px;
  padding: 16px 20px;
  margin-top: 32px;
  border-radius: 8px;
  color: var(--muted-foreground);
}

a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

nav.lesson-nav {
  font-size: 14px;
  line-height: 20px;
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 20px;
  box-shadow: inset 0 1px 0 var(--border);
}
nav.lesson-nav a { text-decoration: none; }
nav.lesson-nav a:hover { text-decoration: underline; }
nav.lesson-nav .btn { text-decoration: none; }

/* ---------- Quiz card ---------- */
.quiz {
  background: var(--card);
  box-shadow: var(--card-shadow);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 8px;
}
.quiz .q { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.quiz label {
  display: block;
  font-size: 14px;
  line-height: 20px;
  padding: 8px 0;
  cursor: pointer;
}
.quiz .feedback {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  display: none;
  padding: 8px 12px;
  border-radius: 4px;
}
.quiz .feedback.correct { color: var(--success); background: var(--success-bg); display: block; }
.quiz .feedback.incorrect { color: var(--error); background: #FADCDD; display: block; }

/* ---------- Buttons (pill, per SITA button rules) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 22px;
  font-size: 16px;
  line-height: 16px;
  text-decoration: none;
  transition: background-color 150ms ease-in-out;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  text-transform: uppercase;
}
.btn-secondary {
  background: transparent;
  color: var(--secondary-border);
  box-shadow: inset 0 0 0 1px var(--secondary-border);
}
.btn-secondary:hover { background: var(--card); }
.btn[aria-current="page"] {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: none;
}

/* ---------- Lesson picker: jump to any lesson from any page ---------- */
.lesson-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1156px;
  margin: 24px auto 0;
  padding: 0 32px;
}
.btn-sm {
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  font-size: 12px;
  line-height: 32px;
}

.bottom-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  box-shadow: inset 0 1px 0 var(--border);
}
