/* ============================================================
   ATIP Shop Training Platform — atipshop.css v3.0.0
   Institutional design: Canadian federal legal authority
   Palette: Navy #0d1f3c · Gold #b8960c · Parchment #f9f5ee
   © Gagné Legal Services / Services Juridiques Gagné
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  /* Institutional palette */
  --navy:       #0d1f3c;
  --navy-mid:   #1a3461;
  --navy-light: #243d6f;
  --gold:       #b8960c;
  --gold-bright:#d4ac14;
  --gold-pale:  #f7f0d8;
  --gold-dim:   rgba(184,150,12,.12);
  --red:        #cc0000;
  --red-dark:   #a30000;
  --red-dim:    rgba(204,0,0,.08);

  /* Surface / neutral */
  --parchment:  #f9f5ee;
  --parchment-2:#f3ece0;
  --white:      #ffffff;
  --ink:        #0d1422;
  --ink-mid:    #2c3648;
  --ink-soft:   #4a5568;
  --ink-muted:  #718096;
  --rule:       #d5cbbf;
  --rule-light: #e8e2d8;

  /* Semantics */
  --pass:       #1a5c38;
  --pass-bg:    #edf7f1;
  --fail-bg:    #fdf2f2;
  --amber:      #92400e;
  --purple:     #4c1d95;

  /* Shadows — more formal, less diffuse */
  --shadow-xs:  0 1px 3px rgba(13,31,60,.07);
  --shadow-sm:  0 2px 8px rgba(13,31,60,.09);
  --shadow-md:  0 4px 18px rgba(13,31,60,.11);
  --shadow-lg:  0 8px 32px rgba(13,31,60,.14);
  --shadow-xl:  0 20px 56px rgba(13,31,60,.18);

  /* Geometry — institutional: less rounded, more formal */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;

  /* Type — serif authority */
  --font-serif: "Georgia", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Helvetica, Arial, sans-serif;
  --font-sc:    var(--font-sans); /* small caps context */
}

/* ── Global reset (scoped) ────────────────────────────────── */
.atips-platform *, .atips-auth-wrap *, .atips-locked-wrap *,
.atips-platform *::before, .atips-auth-wrap *::before, .atips-locked-wrap *::before,
.atips-platform *::after,  .atips-auth-wrap *::after,  .atips-locked-wrap *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
.atips-platform, .atips-auth-wrap, .atips-locked-wrap {
  font-family: var(--font-sans);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ================================================================
   AUTH — REGISTRATION & LOGIN
   ================================================================ */
.atips-auth-wrap,
.atips-locked-wrap {
  min-height: 100vh;
  background: var(--navy);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 79px,
      rgba(255,255,255,.025) 79px,
      rgba(255,255,255,.025) 80px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 79px,
      rgba(255,255,255,.015) 79px,
      rgba(255,255,255,.015) 80px
    );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 56px 16px 80px;
}

/* ── Institutional crest / brand ─────────────────────────── */
.atips-auth-brand,
.atips-locked-brand {
  text-align: center;
  margin-bottom: 36px;
}
.atips-maple-seal {
  font-size: 2.8em;
  display: block;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 8px rgba(204,0,0,.5));
}
.atips-brand-name {
  font-family: var(--font-serif);
  font-size: 2em;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
  margin-bottom: 6px;
}
.atips-brand-sub {
  font-size: .7em;
  color: var(--gold);
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ── Auth card — like a formal letterhead card ───────────── */
.atips-auth-card {
  background: var(--white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
  padding: 48px 52px;
  width: 100%;
  max-width: 480px;
  border-top: 5px solid var(--gold);
  position: relative;
}

/* Gold rule under title */
.atips-auth-title {
  font-family: var(--font-serif);
  font-size: 1.5em;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  letter-spacing: -.01em;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-light);
}
.atips-auth-intro {
  font-size: .87em;
  color: var(--ink-muted);
  margin-top: 12px;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ── Form ────────────────────────────────────────────────── */
.atips-form-row { margin-bottom: 18px; }
.atips-form-row label {
  display: block;
  font-size: .7em;
  font-weight: 700;
  color: var(--ink-mid);
  margin-bottom: 6px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.atips-form-row input,
.atips-form-row select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  font-size: .92em;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--parchment);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.atips-form-row input:hover,
.atips-form-row select:hover { border-color: #b0a090; }
.atips-form-row input:focus,
.atips-form-row select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(13,31,60,.1);
  background: var(--white);
}
.atips-form-check {
  margin-bottom: 20px;
  font-size: .88em;
  color: var(--ink-muted);
}
.atips-form-check label { display: inline; font-weight: 400; }

/* ── Institutional button ────────────────────────────────── */
.atips-auth-btn {
  width: 100%;
  padding: 13px;
  background: var(--navy);
  color: #fff;
  font-size: .9em;
  font-weight: 700;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .15s, box-shadow .15s;
  margin-top: 6px;
  font-family: var(--font-sans);
}
.atips-auth-btn:hover  { background: var(--navy-light); box-shadow: var(--shadow-sm); }
.atips-auth-btn:active { opacity: .9; }
.atips-auth-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Messages ────────────────────────────────────────────── */
.atips-msg {
  padding: 11px 15px;
  border-radius: var(--r-sm);
  font-size: .86em;
  margin-bottom: 18px;
  line-height: 1.5;
  border-left: 3px solid;
}
.atips-msg.success { background: var(--pass-bg); color: var(--pass); border-color: var(--pass); }
.atips-msg.error   { background: var(--fail-bg); color: #7f1d1d; border-color: var(--red); }

/* ── Auth links ──────────────────────────────────────────── */
.atips-auth-link {
  text-align: center;
  font-size: .84em;
  color: var(--ink-muted);
  margin-top: 16px;
}
.atips-auth-link a { color: var(--navy-mid); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.atips-auth-redir  { text-align: center; padding: 48px; color: var(--navy); font-size: .93em; }

/* ── Auth footer ─────────────────────────────────────────── */
.atips-auth-footer {
  margin-top: 36px;
  text-align: center;
  color: rgba(255,255,255,.3);
  font-size: .73em;
  letter-spacing: .04em;
}
.atips-canada-wordmark { height: 22px; margin-bottom: 8px; opacity: .6; }
.atips-footer-text { display: block; }

/* ── Login gate ──────────────────────────────────────────── */
.atips-gate {
  text-align: center;
  padding: 80px 20px;
  max-width: 460px;
  margin: 0 auto;
}
.atips-gate .atips-maple-seal { font-size: 2.4em; margin-bottom: 16px; }
.atips-gate h2 { font-family: var(--font-serif); font-size: 1.5em; color: var(--navy); margin-bottom: 10px; }
.atips-gate p  { color: var(--ink-soft); font-size: .92em; }
.atips-gate p a { color: var(--red); font-weight: 700; text-decoration: none; }

/* ================================================================
   LOCKED / PURCHASE SCREEN
   ================================================================ */
.atips-locked-card {
  background: var(--white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
  padding: 48px 52px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  border-top: 5px solid var(--gold);
}
.atips-locked-icon  { font-size: 2.4em; margin-bottom: 16px; display: block; }
.atips-locked-title { font-family: var(--font-serif); font-size: 1.6em; color: var(--navy); margin-bottom: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--rule-light); }
.atips-locked-sub   { color: var(--ink-soft); font-size: .9em; margin: 14px 0 28px; line-height: 1.6; }

.atips-locked-features {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
  background: var(--parchment);
  border: 1px solid var(--rule-light);
  border-radius: var(--r-sm);
  padding: 18px 22px;
  margin-bottom: 28px;
  font-size: .86em;
  color: var(--ink-mid);
}
.atips-locked-features span { display: flex; align-items: center; gap: 10px; padding: 2px 0; }
.atips-locked-meta { color: var(--navy); font-weight: 600; }
.atips-locked-price { font-family: var(--font-serif); font-size: 2.2em; font-weight: 700; color: var(--navy); margin-bottom: 22px; }
.atips-locked-buy-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--navy);
  color: #fff;
  font-size: .9em;
  font-weight: 700;
  border-radius: var(--r-sm);
  text-decoration: none;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .15s, box-shadow .15s;
  margin-bottom: 14px;
}
.atips-locked-buy-btn:hover { background: var(--navy-light); box-shadow: var(--shadow-sm); color: #fff; }
.atips-locked-already { font-size: .82em; color: var(--ink-muted); margin-top: 8px; }
.atips-locked-already a { color: var(--navy-mid); font-weight: 600; }
.atips-locked-contact { font-size: .87em; color: var(--ink-muted); margin-bottom: 14px; }
.atips-locked-contact a { color: var(--navy-mid); font-weight: 600; }

/* ================================================================
   PLATFORM SHELL
   ================================================================ */
.atips-platform {
  min-height: 100vh;
  background: var(--parchment);
}

/* ── Header — formal institutional bar ───────────────────── */
.atips-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  background: var(--navy);
  padding: 0 40px;
  height: 62px;
  position: sticky;
  top: 0;
  z-index: 300;
  border-bottom: 3px solid var(--gold);
}
.atips-header-left  { display: flex; align-items: center; gap: 14px; }
.atips-header-center { flex: 1; display: flex; justify-content: center; align-items: center; }
.atips-header-right { display: flex; align-items: center; gap: 24px; }

.atips-maple { font-size: 1.3em; }
.atips-header-brand {
  font-family: var(--font-serif);
  font-size: 1.1em;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}
/* Gold vertical divider */
.atips-header-left::after {
  content: '';
  display: block;
  width: 1px;
  height: 24px;
  background: var(--gold);
  opacity: .5;
  margin-left: 4px;
}
.atips-header-title {
  font-size: .68em;
  color: var(--gold);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
}
.atips-welcome {
  font-size: .78em;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  font-style: italic;
}

/* Language toggle — formal */
.atips-lang-bar { display: flex; align-items: center; gap: 1px; }
.atips-lang-btn {
  background: transparent;
  border: 1px solid rgba(184,150,12,.3);
  color: rgba(255,255,255,.45);
  font-size: .72em;
  font-weight: 700;
  padding: 5px 13px;
  cursor: pointer;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: all .15s;
  font-family: var(--font-sans);
}
.atips-lang-btn:first-child { border-radius: var(--r-xs) 0 0 var(--r-xs); }
.atips-lang-btn:last-child  { border-radius: 0 var(--r-xs) var(--r-xs) 0; }
.atips-lang-btn.active      { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.atips-lang-btn:not(.active):hover { color: rgba(255,255,255,.8); border-color: rgba(184,150,12,.6); }
.atips-lang-div { display: none; }

/* ── Gold rule progress bar ──────────────────────────────── */
.atips-progress-banner {
  background: var(--navy);
  border-bottom: 1px solid rgba(184,150,12,.2);
  padding: 9px 40px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.atips-progress-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.atips-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width .8s cubic-bezier(.16,1,.3,1);
}
.atips-progress-label {
  font-size: .72em;
  color: rgba(255,255,255,.45);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: .04em;
  font-weight: 600;
}
.atips-pct-badge {
  background: var(--gold-dim);
  color: var(--gold);
  font-size: .8em;
  font-weight: 700;
  padding: 2px 9px;
  border: 1px solid rgba(184,150,12,.25);
  letter-spacing: .05em;
}

/* ── Main content ────────────────────────────────────────── */
#atips-main {
  padding: 44px 48px 100px;
  max-width: 1060px;
  margin: 0 auto;
}

/* ── Dashboard ────────────────────────────────────────────── */
.atips-dash-title {
  font-family: var(--font-serif);
  font-size: 1.9em;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  letter-spacing: -.01em;
}
/* Decorative rule below title */
.atips-dashboard > .atips-dash-title + .atips-dash-sub { position: relative; }
.atips-dash-sub {
  color: var(--ink-muted);
  margin-bottom: 36px;
  font-size: .9em;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--rule-light);
  position: relative;
}
.atips-dash-sub::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--gold);
}

/* ── Track cards ─────────────────────────────────────────── */
.atips-track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.atips-track-card {
  background: var(--white);
  border: 1px solid var(--rule-light);
  border-left: 4px solid var(--track-color, var(--navy));
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow .2s, transform .2s;
  position: relative;
}
.atips-track-card::before {
  content: '';
  position: absolute;
  top: 0; left: -4px; bottom: 0;
  width: 4px;
  background: var(--track-color, var(--navy));
  transition: width .2s;
}
.atips-track-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.atips-track-card.atips-track-done {
  border-left-color: var(--pass);
  background: #fdfffe;
}
.atips-track-card.atips-track-done::before { background: var(--pass); }

.atips-track-top { display: flex; align-items: flex-start; gap: 14px; }
.atips-track-icon {
  font-size: 1.5em;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--parchment);
  border: 1px solid var(--rule-light);
}
.atips-track-title {
  font-family: var(--font-serif);
  font-size: 1em;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 4px;
}
.atips-track-sub {
  font-size: .73em;
  color: var(--ink-muted);
  line-height: 1.4;
  font-style: italic;
}

.atips-track-bar  { height: 3px; background: var(--rule-light); overflow: hidden; }
.atips-track-fill { height: 100%; background: var(--track-color, var(--navy)); transition: width .6s cubic-bezier(.16,1,.3,1); opacity: .7; }
.atips-track-meta {
  display: flex;
  justify-content: space-between;
  font-size: .72em;
  color: var(--ink-muted);
  font-weight: 500;
  letter-spacing: .02em;
}

/* ── Button system ───────────────────────────────────────── */
.atips-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  background: var(--navy);
  color: #fff;
  font-size: .8em;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
  white-space: nowrap;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.atips-btn:hover  { background: var(--navy-light); box-shadow: var(--shadow-xs); }
.atips-btn:active { opacity: .9; }
.atips-btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Open track — ghost */
.atips-open-track {
  width: 100%;
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  font-size: .76em;
}
.atips-open-track:hover { background: var(--navy); color: #fff; box-shadow: var(--shadow-xs); }

/* Back link */
.atips-btn-back {
  background: transparent;
  color: var(--ink-muted);
  font-weight: 600;
  font-size: .8em;
  border: none;
  cursor: pointer;
  padding: 0 0 24px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .15s;
  text-decoration: none;
}
.atips-btn-back:hover { color: var(--navy); }

/* Quiz / action variants */
.atips-btn-quiz {
  background: var(--red);
  border-color: var(--red-dark);
}
.atips-btn-quiz:hover { background: var(--red-dark); box-shadow: var(--shadow-sm); }

.atips-btn-retry { background: var(--ink-soft); }
.atips-btn-retry:hover { background: var(--ink-mid); }

/* Certificate ready banner */
.atips-cert-ready {
  background: var(--navy);
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
  color: rgba(255,255,255,.9);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.atips-cert-trophy { font-size: 2em; }
.atips-btn-cert {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
}
.atips-btn-cert:hover { background: var(--gold); color: var(--navy); }

/* ================================================================
   TRACK VIEW
   ================================================================ */
/* Module hero block */
.atips-mod-hero {
  background: var(--navy);
  color: #fff;
  padding: 32px 40px;
  margin-bottom: 24px;
  border-left: 4px solid var(--gold);
  position: relative;
}
.atips-mod-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.atips-mod-hero h2,
.atips-mod-hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.25;
}
.atips-mod-hero h2 { font-size: 1.5em; }
.atips-mod-hero h1 { font-size: 1.45em; }
.atips-mod-hero-track {
  font-size: .66em;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 700;
}
.atips-mod-hero-sub { font-size: .88em; color: rgba(255,255,255,.6); font-style: italic; line-height: 1.5; }

/* Module list */
.atips-module-list { display: flex; flex-direction: column; gap: 6px; }

.atips-mod-row {
  background: var(--white);
  border: 1px solid var(--rule-light);
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.atips-mod-row:hover {
  border-color: var(--rule);
  border-left-color: var(--navy);
  box-shadow: var(--shadow-xs);
  transform: translateX(2px);
}
.atips-mod-row.done {
  border-left-color: var(--pass);
  background: #fdfffe;
}

.atips-mod-status {
  font-size: 1em;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--parchment);
  border: 1px solid var(--rule-light);
  font-size: .9em;
}
.atips-mod-row.done .atips-mod-status { background: var(--pass-bg); border-color: rgba(26,92,56,.2); }

.atips-mod-info  { flex: 1; min-width: 0; }
.atips-mod-title { font-family: var(--font-serif); font-weight: 700; font-size: .93em; color: var(--navy); line-height: 1.3; }
.atips-mod-sub   { font-size: .74em; color: var(--ink-muted); margin-top: 3px; font-style: italic; }

.atips-mod-type {
  font-size: .64em;
  padding: 3px 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  flex-shrink: 0;
  border: 1px solid;
}
.atips-mod-type.module    { border-color: rgba(13,31,60,.2); color: var(--navy); background: rgba(13,31,60,.04); }
.atips-mod-type.casestudy { border-color: rgba(146,64,14,.25); color: var(--amber); background: rgba(146,64,14,.04); }
.atips-mod-type.quiz      { border-color: rgba(76,29,149,.25); color: var(--purple); background: rgba(76,29,149,.04); }

/* ================================================================
   MODULE VIEW
   ================================================================ */
/* Intro */
.atips-mod-intro {
  background: var(--gold-pale);
  border-left: 3px solid var(--gold);
  padding: 18px 22px;
  margin-bottom: 28px;
  font-size: .92em;
  color: var(--ink-mid);
  line-height: 1.7;
  font-style: italic;
}

/* Content sections — like journal articles */
.atips-mod-section {
  background: var(--white);
  border: 1px solid var(--rule-light);
  border-top: 2px solid var(--navy);
  padding: 26px 32px;
  margin-bottom: 10px;
}
.atips-mod-section:first-of-type { border-top-color: var(--gold); }
.atips-mod-section h3 {
  font-family: var(--font-serif);
  font-size: .97em;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-light);
  line-height: 1.3;
}
.atips-mod-section p {
  font-size: .91em;
  line-height: 1.8;
  color: var(--ink-mid);
  white-space: pre-line;
}

/* Key takeaways — like a legislative digest */
.atips-takeaways {
  background: var(--parchment);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--gold);
  padding: 22px 28px;
  margin-bottom: 36px;
}
.atips-takeaways h3 {
  font-size: .68em;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--amber);
  font-weight: 800;
  margin-bottom: 16px;
  font-family: var(--font-sans);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-light);
}
.atips-takeaways ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.atips-takeaways li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .88em;
  color: var(--ink-mid);
  line-height: 1.55;
}
.atips-takeaways li::before {
  content: '—';
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.atips-mod-actions { display: flex; gap: 12px; align-items: center; margin-top: 32px; flex-wrap: wrap; }

/* ================================================================
   QUIZ
   ================================================================ */
.atips-quiz-wrap { max-width: 700px; }

.atips-quiz-header {
  background: var(--navy);
  border-left: 4px solid var(--gold);
  color: #fff;
  padding: 20px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.atips-quiz-header h2 {
  font-family: var(--font-serif);
  font-size: 1.1em;
  font-weight: 700;
  letter-spacing: -.01em;
}
.atips-quiz-counter {
  font-size: .72em;
  font-weight: 700;
  background: rgba(184,150,12,.15);
  border: 1px solid rgba(184,150,12,.3);
  color: var(--gold);
  padding: 4px 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Question blocks */
.atips-question-block {
  background: var(--white);
  border: 1px solid var(--rule-light);
  border-left: 3px solid var(--rule);
  padding: 24px 28px;
  margin-bottom: 10px;
  transition: border-left-color .2s;
}
.atips-question-block.correct   { border-left-color: var(--pass); background: var(--pass-bg); }
.atips-question-block.incorrect { border-left-color: var(--red); background: var(--fail-bg); }

.atips-q-num {
  font-size: .64em;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-muted);
  margin-bottom: 10px;
  font-weight: 700;
}
.atips-q-text {
  font-family: var(--font-serif);
  font-size: .97em;
  color: var(--navy);
  margin-bottom: 18px;
  line-height: 1.55;
  font-weight: 700;
}
.atips-options { display: flex; flex-direction: column; gap: 7px; }

/* Answer options */
.atips-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 15px;
  border: 1px solid var(--rule-light);
  cursor: pointer;
  transition: border-color .12s, background .12s;
  font-size: .88em;
  line-height: 1.5;
  color: var(--ink-mid);
  background: var(--parchment);
}
.atips-opt:hover { border-color: var(--navy); background: rgba(13,31,60,.04); color: var(--navy); }
.atips-opt input[type="radio"] { flex-shrink: 0; margin-top: 2px; accent-color: var(--navy); cursor: pointer; }
.atips-opt.selected { border-color: var(--navy); background: rgba(13,31,60,.05); color: var(--navy); font-weight: 600; }
.atips-opt.correct  { border-color: var(--pass) !important; background: var(--pass-bg) !important; color: var(--pass); font-weight: 600; }
.atips-opt.wrong    { border-color: var(--red) !important; background: var(--fail-bg) !important; color: #7f1d1d; }

/* Explanation */
.atips-explanation {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--parchment);
  border-left: 3px solid var(--navy);
  font-size: .84em;
  color: var(--ink-mid);
  line-height: 1.65;
  font-style: italic;
}

/* Score display */
.atips-quiz-score-bar {
  text-align: center;
  padding: 36px 32px;
  background: var(--white);
  border: 1px solid var(--rule-light);
  border-top: 3px solid var(--navy);
  margin-bottom: 24px;
}
.atips-score-big   { font-family: var(--font-serif); font-size: 4.5em; font-weight: 700; line-height: 1; color: var(--navy); letter-spacing: -.04em; }
.atips-score-label { font-size: .84em; color: var(--ink-muted); margin-top: 6px; }
.atips-score-badge {
  display: inline-block;
  padding: 7px 22px;
  font-weight: 700;
  font-size: .82em;
  margin-top: 14px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid;
}
.atips-score-badge.pass { background: var(--pass-bg); color: var(--pass); border-color: rgba(26,92,56,.25); }
.atips-score-badge.fail { background: var(--fail-bg); color: var(--red-dark); border-color: rgba(204,0,0,.2); }
.atips-quiz-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* Final eval hero */
.atips-final-hero {
  background: var(--navy);
  border-left: 4px solid var(--gold);
  color: #fff;
  padding: 36px 40px;
  margin-bottom: 28px;
  text-align: center;
}
.atips-final-hero::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 16px auto 0;
}
.atips-tropy-big { font-size: 2.8em; display: block; margin-bottom: 12px; }
.atips-final-hero h1 { font-family: var(--font-serif); font-size: 1.8em; font-weight: 700; margin-bottom: 6px; }
.atips-final-hero p  { color: rgba(255,255,255,.65); font-size: .9em; font-style: italic; }

/* ================================================================
   CASE STUDY
   ================================================================ */
.atips-case-wrap { max-width: 780px; }

.atips-case-hero {
  background: var(--navy);
  border-left: 4px solid var(--amber);
  color: #fff;
  padding: 28px 36px;
  margin-bottom: 22px;
}
.atips-case-hero h1 { font-family: var(--font-serif); font-size: 1.3em; font-weight: 700; }
.atips-case-hero p  { margin-top: 6px; font-size: .83em; color: rgba(255,255,255,.6); font-style: italic; }

.atips-scenario {
  background: var(--white);
  border: 1px solid var(--rule-light);
  border-left: 3px solid var(--rule);
  padding: 24px 28px;
  margin-bottom: 18px;
  font-size: .91em;
  line-height: 1.8;
  color: var(--ink-mid);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.atips-case-qs {
  background: var(--parchment);
  border-left: 3px solid var(--amber);
  padding: 18px 22px;
  margin-bottom: 22px;
}
.atips-case-qs h3 {
  font-size: .66em;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--amber);
  margin-bottom: 12px;
  font-weight: 800;
}
.atips-case-qs ol { padding-left: 18px; }
.atips-case-qs li { font-size: .88em; color: var(--ink-mid); margin-bottom: 8px; line-height: 1.55; }

.atips-answer-wrap { margin-bottom: 22px; }
.atips-answer-wrap label {
  font-weight: 700;
  font-size: .68em;
  color: var(--ink-mid);
  display: block;
  margin-bottom: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.atips-answer-area {
  width: 100%;
  min-height: 180px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: var(--r-xs);
  font-family: var(--font-sans);
  font-size: .91em;
  line-height: 1.7;
  color: var(--ink);
  resize: vertical;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: var(--parchment);
}
.atips-answer-area:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(13,31,60,.08);
  background: var(--white);
}

.atips-model-answer {
  background: var(--pass-bg);
  border: 1px solid rgba(26,92,56,.2);
  border-left: 3px solid var(--pass);
  padding: 22px 26px;
  margin-top: 22px;
}
.atips-model-answer h3 {
  font-size: .66em;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--pass);
  margin-bottom: 14px;
  font-weight: 800;
}
.atips-model-answer pre { font-family: var(--font-sans); font-size: .88em; white-space: pre-wrap; line-height: 1.75; color: var(--ink-mid); }

/* ================================================================
   AI ASSISTANT — formal panel
   ================================================================ */
.atips-ai-panel {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 400;
  font-family: var(--font-sans);
}

.atips-ai-toggle {
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--gold);
  padding: 12px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .78em;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  transition: background .15s, box-shadow .15s;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.atips-ai-toggle:hover { background: var(--navy-light); box-shadow: var(--shadow-xl); }
.atips-ai-toggle-lbl { letter-spacing: .1em; }

.atips-ai-body {
  width: 340px;
  max-height: 450px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--navy);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xl);
  animation: atips-slidein .2s ease;
}
.atips-ai-header {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8em;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  flex-shrink: 0;
  border-bottom: 1px solid var(--gold);
}
.atips-ai-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.4);
  font-size: .9em;
  cursor: pointer;
  padding: 2px 6px;
  transition: color .12s;
}
.atips-ai-close:hover { color: #fff; }

.atips-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--parchment);
}
.atips-ai-messages::-webkit-scrollbar { width: 3px; }
.atips-ai-messages::-webkit-scrollbar-thumb { background: var(--rule); }

.atips-msg-ai, .atips-msg-user {
  padding: 10px 13px;
  font-size: .83em;
  line-height: 1.65;
  max-width: 90%;
  border: 1px solid;
}
.atips-msg-ai {
  background: var(--white);
  color: var(--ink-mid);
  border-color: var(--rule-light);
  align-self: flex-start;
}
.atips-msg-user {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy-mid);
  align-self: flex-end;
}
.atips-msg-thinking {
  color: var(--ink-muted);
  font-style: italic;
  font-size: .79em;
  align-self: flex-start;
  padding: 4px 0;
}

.atips-ai-input-row {
  padding: 10px 12px;
  border-top: 1px solid var(--rule-light);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  background: var(--white);
}
.atips-ai-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r-xs);
  font-size: .83em;
  font-family: var(--font-sans);
  outline: none;
  color: var(--ink);
  background: var(--parchment);
  transition: border-color .12s;
}
.atips-ai-input:focus { border-color: var(--navy); background: var(--white); }

/* ================================================================
   CERTIFICATE
   ================================================================ */
.atips-cert-section { margin-top: 60px; }
.atips-cert-heading {
  font-family: var(--font-serif);
  font-size: 1.35em;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--rule-light);
  position: relative;
}
.atips-cert-heading::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 48px; height: 2px;
  background: var(--gold);
}
.atips-cert-heading::before { content: '🎓'; font-size: 1.1em; }

.atips-certificate {
  background: var(--white);
  border: 2px solid var(--navy);
  max-width: 820px;
  overflow: hidden;
  font-family: var(--font-serif);
  box-shadow: var(--shadow-lg);
}

/* Canada flag bar */
.atips-cert-flag-bar {
  display: flex;
  height: 22px;
}
.atips-cert-flag-red   { flex: 1; background: var(--red); }
.atips-cert-flag-white {
  flex: 2;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.atips-cert-maple { font-size: 1.1em; }
.atips-cert-flag-bottom { height: 18px; }

.atips-cert-body-wrap { padding: 44px 56px 36px; }

.atips-cert-issuer-name  { text-align: center; font-size: .78em; color: var(--ink-muted); letter-spacing: .16em; text-transform: uppercase; font-family: var(--font-sans); margin-bottom: 14px; }
.atips-cert-title-line   { text-align: center; font-size: 2em; font-weight: 700; color: var(--navy); letter-spacing: .01em; margin-bottom: 6px; }
.atips-cert-program-line { text-align: center; font-size: .9em; color: var(--ink-soft); margin-bottom: 22px; font-style: italic; font-family: var(--font-serif); }
.atips-cert-divider-ornament { text-align: center; color: var(--gold); font-size: .9em; margin: 18px 0; letter-spacing: .3em; font-family: var(--font-sans); }
.atips-cert-awarded-to   { text-align: center; font-size: .82em; color: var(--ink-muted); font-family: var(--font-sans); margin-bottom: 6px; letter-spacing: .04em; }
.atips-cert-recipient-name { text-align: center; font-size: 2.5em; font-weight: 700; color: var(--navy); font-style: italic; margin-bottom: 20px; line-height: 1.15; }
.atips-cert-body-text    { text-align: justify; font-size: .86em; line-height: 1.8; color: var(--ink-soft); font-family: var(--font-sans); margin-bottom: 22px; }

.atips-cert-footer-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--rule-light); }
.atips-cert-sig-block  { flex: 1; min-width: 220px; }
.atips-cert-sig-line   { height: 1px; background: var(--navy); width: 200px; margin-bottom: 10px; opacity: .4; }
.atips-cert-sig-name   { font-size: .93em; font-weight: 700; color: var(--navy); font-family: var(--font-serif); }
.atips-cert-sig-creds  { font-size: .73em; color: var(--ink-muted); font-family: var(--font-sans); margin-top: 3px; }
.atips-cert-sig-org    { font-size: .73em; color: var(--ink-muted); font-family: var(--font-sans); }
.atips-cert-meta-block { text-align: right; }
.atips-cert-date  { font-size: .8em; color: var(--ink-soft); font-family: var(--font-sans); }
.atips-cert-code  { font-size: .72em; color: var(--ink-muted); font-family: var(--font-sans); letter-spacing: .08em; margin-top: 4px; }
.atips-cert-site  { font-size: .72em; color: var(--navy); font-family: var(--font-sans); margin-top: 2px; }

.atips-cert-actions { margin-top: 18px; }
.atips-print-btn { background: var(--navy); border-color: var(--navy); }

/* ================================================================
   SPINNER & ANIMATIONS
   ================================================================ */
.atips-spinner {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: atips-spin .6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
.atips-spinner-dark {
  border-color: rgba(13,31,60,.12);
  border-top-color: var(--navy);
}

@keyframes atips-fadein  { from { opacity: 0; } to { opacity: 1; } }
@keyframes atips-slidein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes atips-spin    { to { transform: rotate(360deg); } }

.atips-animate-in { animation: atips-slidein .25s ease; }
.atips-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ================================================================
   PRINT
   ================================================================ */
@media print {
  .atips-header, .atips-progress-banner, .atips-ai-panel,
  .atips-dashboard, .atips-track-view, .atips-module-view,
  .atips-cert-actions, .atips-btn-back, .atips-cert-heading,
  .atips-cert-ready, #atips-cert-ready {
    display: none !important;
  }
  .atips-cert-section { margin: 0; }
  .atips-certificate  { box-shadow: none; max-width: 100%; }
  body * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .atips-cert-flag-red { background: var(--red) !important; }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  #atips-main { padding: 32px 28px 80px; }
  .atips-header { padding: 0 20px; }
  .atips-progress-banner { padding: 8px 20px; }
}

@media (max-width: 768px) {
  .atips-header { padding: 0 16px; height: 54px; }
  .atips-header-center { display: none; }
  .atips-progress-banner { padding: 8px 16px; }
  #atips-main { padding: 24px 16px 80px; }
  .atips-track-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .atips-auth-card, .atips-locked-card { padding: 32px 22px; }
  .atips-mod-hero { padding: 24px 22px; }
  .atips-mod-section { padding: 18px 18px; }
  .atips-ai-body { width: calc(100vw - 36px); }
  .atips-cert-body-wrap { padding: 26px 22px; }
  .atips-cert-footer-row { flex-direction: column; align-items: flex-start; }
  .atips-cert-meta-block { text-align: left; }
  .atips-cert-title-line { font-size: 1.5em; }
  .atips-cert-recipient-name { font-size: 1.8em; }
}

@media (max-width: 480px) {
  .atips-track-grid { grid-template-columns: 1fr; }
  .atips-brand-name { font-size: 1.5em; }
  .atips-welcome { display: none; }
  .atips-ai-panel { bottom: 14px; right: 14px; }
  .atips-cert-body-wrap { padding: 18px 14px; }
  .atips-header-left::after { display: none; }
}
