/* ==========================================================================
   mLIFE Curriculum — University of Ottawa Faculty of Medicine
   Shared stylesheet
   ========================================================================== */

/* Palette follows the official University of Ottawa brand:
   Garnet #8F001A (primary), uOttawa Grey #80746C, Charcoal #2D2D2C,
   Grey-blue #636D77, and the Faculty of Medicine secondary yellow #FFC20E. */
:root {
  --brand-900: #6b0014;
  --brand-800: #8f001a; /* official uOttawa garnet */
  --brand-700: #9a0a1c;
  --brand-600: #a8241d;
  --brand-500: #b8362b;

  --gold: #ffc20e;      /* Faculty of Medicine secondary */
  --gold-strong: #f0b400;
  --gold-soft: #ffdc86;

  --cream: #fcf3e8;
  --cream-deep: #f9ead9;
  --paper: #ffffff;
  --grey-50: #f7f7f6;
  --grey-100: #f0f0ee;
  --grey-200: #e5e4e2;
  --grey-300: #d4d2cf;

  --ink: #2d2d2c;       /* official charcoal */
  --ink-soft: #4a4a49;
  --muted: #636d77;     /* official grey-blue */
  --navy: #2d2d2c;

  --blue: #2563eb;
  --green: #0ea35f;
  --purple: #7c3aed;
  --ochre: #c2963c;
  --scarlet: #e0362c;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(16, 20, 34, 0.06);
  --shadow: 0 4px 16px rgba(16, 20, 34, 0.08);
  --shadow-lg: 0 14px 40px rgba(16, 20, 34, 0.14);

  --nav-h: 56px;
  --maxw: 1140px;

  /* uOttawa approved typefaces */
  --font: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
  --font-serif: "Spectral", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

img { max-width: 100%; }

a { color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.18;
  font-weight: 700;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top navigation ------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: linear-gradient(100deg, var(--brand-900) 0%, var(--brand-800) 55%, #7d1a1d 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  text-decoration: none;
}

.brand span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 7px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }

.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 7px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lang-toggle:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #3a1508;
}

.lang-toggle:focus-visible,
.nav-links a:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  padding: 6px;
  cursor: pointer;
}

/* ---------- Hero ---------------------------------------------------------- */

.hero {
  position: relative;
  background:
    radial-gradient(120% 140% at 78% 40%, rgba(190, 60, 40, 0.34) 0%, rgba(190, 60, 40, 0) 62%),
    linear-gradient(110deg, var(--brand-900) 0%, var(--brand-800) 52%, #a8241d 100%);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
}

.hero-home { padding: 150px 0 170px; }
.hero-page { padding: 74px 0 76px; }

.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid rgba(201, 169, 97, 0.55);
  background: rgba(201, 169, 97, 0.1);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(34px, 5.2vw, 52px);
  font-weight: 800;
}

.hero h1 em { font-style: normal; color: var(--gold); }

.hero p {
  margin: 18px auto 0;
  max-width: 620px;
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.62;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  background: var(--gold-strong);
  color: #3a1508;
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 26px;
  border: 0;
  border-radius: 9px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 34px rgba(201, 169, 97, 0.34);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-gold:hover {
  transform: translateY(-1px);
  background: #d1ac47;
  box-shadow: 0 0 44px rgba(201, 169, 97, 0.5);
}

/* ---------- Generic section furniture ------------------------------------- */

.section { padding: 82px 0; }
.section-cream { background: var(--cream); }
.section-grey { background: var(--grey-50); }

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: #f7e9e9;
  padding: 6px 16px;
  border-radius: 999px;
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  margin-top: 18px;
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  max-width: 560px;
}

.section-head.center { text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }

/* ---------- Value cards (home) -------------------------------------------- */

.value-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.value-card {
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 26px 20px 28px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.value-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 29, 32, 0.35);
  box-shadow: var(--shadow);
}

.value-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 10px;
  background: var(--brand-700);
  color: #fff;
  display: grid;
  place-items: center;
}

.value-icon svg { width: 21px; height: 21px; }

.value-card h3 { font-size: 15px; }

.value-card p {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Journey timeline ---------------------------------------------- */

.timeline {
  position: relative;
  margin-top: 60px;
  padding: 10px 0 4px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand-800) 0%, var(--brand-600) 45%, var(--gold-strong) 100%);
}

.stage {
  position: relative;
  display: flex;
  margin-bottom: 46px;
}

.stage:last-child { margin-bottom: 0; }

.stage-node {
  position: absolute;
  left: 50%;
  top: 26px;
  width: 17px;
  height: 17px;
  margin-left: -8.5px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--brand-600);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  z-index: 2;
}

.stage.is-active .stage-node {
  background: var(--gold-strong);
  border-color: var(--gold-strong);
  transform: scale(1.28);
}

.stage-card {
  width: calc(50% - 34px);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
  box-shadow: var(--shadow);
}

.stage-right { justify-content: flex-end; }
.stage-left { justify-content: flex-start; }
.stage-left .stage-card { text-align: right; }

.stage-num {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-700);
}

.stage-card h3 { font-size: 19px; margin-top: 5px; }

.stage-card p {
  margin-top: 9px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.58;
}

.chips {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stage-left .chips { justify-content: flex-end; }

.chip {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-700);
  background: #fbe9e9;
  padding: 4px 11px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ---------- Year tabs (home + curriculum) --------------------------------- */

.year-tabs {
  margin: 34px auto 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.year-tab {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--grey-300);
  border-radius: 999px;
  padding: 8px 22px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.year-tab:hover { border-color: var(--brand-600); color: var(--brand-700); }

.year-tab.active {
  background: var(--brand-800);
  border-color: var(--brand-800);
  color: #fff;
}

.year-panel { display: none; margin-top: 30px; }
.year-panel.active { display: block; }

.lecture-preview {
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
}

.tag-pf { color: var(--brand-700); background: #f7e2e2; }
.tag-pm { color: #8a6b1f; background: #f2e9d2; }

.lecture-preview h3 { font-size: 17px; margin-top: 12px; }

.lecture-preview p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

.link-arrow {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-700);
  text-decoration: none;
}

.link-arrow:hover { text-decoration: underline; }

/* ---------- Dive deeper --------------------------------------------------- */

.deeper {
  background:
    radial-gradient(120% 150% at 80% 45%, rgba(190, 60, 40, 0.32) 0%, rgba(190, 60, 40, 0) 64%),
    linear-gradient(110deg, var(--brand-900) 0%, var(--brand-800) 54%, #a8241d 100%);
  color: #fff;
  text-align: center;
  padding: 76px 0 84px;
}

.deeper .eyebrow { margin-bottom: 22px; }
.deeper h2 { font-size: clamp(26px, 3.6vw, 36px); }

.deeper > .wrap > p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14.5px;
}

.deeper-grid {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.deeper-card {
  text-align: left;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 24px 24px 26px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.deeper-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.3);
}

.deeper-num {
  font-size: 29px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.deeper-card h3 { font-size: 16.5px; margin-top: 12px; }

.deeper-card p {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.55;
}

/* ---------- Footer -------------------------------------------------------- */

.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.66);
  text-align: center;
  padding: 34px 0 38px;
  font-size: 13px;
}

.footer a { color: var(--gold); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .tagline { margin-top: 7px; font-size: 12.5px; color: rgba(255, 255, 255, 0.5); }

/* ---------- Sub navigation (curriculum + resources) ----------------------- */

.subnav {
  position: sticky;
  top: var(--nav-h);
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--grey-200);
}

.subnav-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav-inner::-webkit-scrollbar { display: none; }

.subnav button {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 15px 16px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.subnav button:hover { color: var(--brand-700); }

.subnav button.active {
  color: var(--brand-700);
  font-weight: 600;
  border-bottom-color: var(--brand-700);
}

/* ---------- Curriculum ---------------------------------------------------- */

.year-block { padding: 62px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
.year-block:last-of-type { border-bottom: 0; }

.year-head { display: flex; align-items: flex-start; gap: 18px; }

.year-index {
  font-size: 34px;
  font-weight: 800;
  color: #e8d5c8;
  line-height: 1;
  letter-spacing: -0.03em;
}

.year-head h2 { font-size: 25px; }

.year-head p {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted);
}

.lecture {
  position: relative;
  margin-top: 20px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.lecture::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-700);
}

.lecture.pm::before { background: var(--gold-strong); }

.lecture-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: none;
  border: 0;
  font-family: inherit;
  text-align: left;
  padding: 20px 22px 20px 26px;
  cursor: pointer;
}

.lecture-head h3 { font-size: 16.5px; margin-top: 9px; }

.acc-toggle {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--grey-100);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  transition: transform 0.2s ease, background 0.2s ease;
}

.lecture.open .acc-toggle { transform: rotate(180deg); }

.lecture-body { display: none; padding: 0 26px 26px; }
.lecture.open .lecture-body { display: block; }

.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-700);
}

.objectives { list-style: none; margin: 14px 0 0; padding: 0; }

.objectives li {
  position: relative;
  padding: 11px 0 11px 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--grey-100);
  line-height: 1.55;
}

.objectives li:last-child { border-bottom: 0; }

.objectives li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-strong);
}

.lecture-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary { background: var(--brand-700); color: #fff; }
.btn-primary:hover { background: var(--brand-800); }

.btn-ghost { background: var(--grey-100); color: var(--ink-soft); border-color: var(--grey-200); }
.btn-ghost:hover { background: var(--grey-200); }

.related {
  margin-top: 22px;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  padding: 18px 20px 20px;
}

.related .label { color: var(--ink-soft); }

.chip-links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 9px; }

.chip-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--paper);
  border: 1px solid var(--grey-200);
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.chip-link:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

.coming-soon {
  margin-top: 22px;
  border: 2px dashed var(--grey-300);
  border-radius: var(--radius);
  background: var(--grey-50);
  text-align: center;
  padding: 46px 24px 50px;
}

.coming-soon .emoji { font-size: 26px; }
.coming-soon h4 { font-size: 16px; margin-top: 10px; }

.coming-soon p {
  margin: 8px auto 0;
  max-width: 380px;
  font-size: 13px;
  color: var(--muted);
}

.online-only { background: var(--paper); padding: 72px 0 84px; }

.online-only .pill { color: #8a6b1f; background: #f4ecd8; }
.online-only h2 { font-size: 25px; margin-top: 16px; }
.online-only > .wrap > p { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

/* ---------- Cases --------------------------------------------------------- */

.event-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.event-copy h2 { font-size: 25px; }

.event-copy p {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.cacms {
  display: inline-block;
  margin-top: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-700);
  background: #fbeceb;
  border: 1px solid #f2d7d5;
  padding: 8px 15px;
  border-radius: 7px;
}

.howto h3 { font-size: 17px; margin-bottom: 6px; }

.howto ol { list-style: none; margin: 0; padding: 0; }

.howto li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--grey-100);
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.howto li:last-child { border-bottom: 0; }

.step-num {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--brand-700);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.obj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.obj-card {
  background: var(--paper);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 22px 24px 24px;
}

.obj-card h3 { font-size: 15px; color: var(--brand-700); }

.obj-card ol {
  margin: 14px 0 0;
  padding-left: 18px;
  font-size: 12.8px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.obj-card li { margin-bottom: 9px; }
.obj-card li:last-child { margin-bottom: 0; }

.case-picker {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.case-btn {
  font-family: inherit;
  background: var(--paper);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 18px 14px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.case-btn:hover { border-color: var(--brand-600); transform: translateY(-2px); }

.case-btn.active {
  border-color: var(--brand-700);
  border-width: 2px;
  background: #fff9f8;
  box-shadow: var(--shadow);
}

.case-btn .num {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-700);
  letter-spacing: -0.02em;
}

.case-btn .title { font-size: 13.5px; font-weight: 700; margin-top: 8px; }
.case-btn .sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.case-panel { display: none; margin-top: 30px; }
.case-panel.active { display: block; }

.case-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.case-header {
  background: linear-gradient(100deg, var(--brand-900), var(--brand-700));
  color: #fff;
  padding: 24px 30px 26px;
}

.case-header .tag-gold {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(201, 169, 97, 0.18);
  padding: 5px 12px;
  border-radius: 6px;
}

.case-header h3 { font-size: 21px; margin-top: 12px; }

.case-body { padding: 26px 30px 30px; }

.scenario {
  background: var(--cream);
  border-left: 4px solid var(--gold-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px 20px;
}

.scenario .label { color: var(--gold-strong); }

.scenario p {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.66;
}

.qa { margin-top: 26px; }

.q {
  margin-bottom: 12px;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: background 0.15s ease;
}

.q.open { background: var(--grey-50); }

.q-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  padding: 16px 16px 16px 18px;
  cursor: pointer;
}

.q-sign {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #f6e3e3;
  color: var(--brand-700);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
}

.q.open .q-sign { background: var(--brand-700); color: #fff; }

.q-body { display: none; padding: 0 18px 18px; }
.q.open .q-body { display: block; }

.q-body textarea {
  width: 100%;
  min-height: 66px;
  resize: vertical;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.q-body textarea::placeholder { color: #9aa0b0; }

.q-body textarea:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(165, 45, 34, 0.12);
}

.reveal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f7a45;
  background: #e6f6ed;
  border: 1px solid #c8ead8;
  border-radius: 7px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.reveal:hover { background: #d8f0e4; }
.reveal svg { width: 13px; height: 13px; }

.insight {
  display: none;
  margin-top: 12px;
  background: #f2fbf6;
  border: 1px solid #cdeadb;
  border-left: 4px solid #17a05c;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 15px 18px 16px;
}

.insight.shown { display: block; }
.insight .label { color: #0f7a45; }

.insight p {
  margin-top: 8px;
  font-size: 13.3px;
  color: var(--ink-soft);
  line-height: 1.62;
}

.case-related {
  margin-top: 24px;
  background: #f2f6fd;
  border: 1px solid #d9e5f8;
  border-radius: var(--radius-sm);
  padding: 18px 20px 20px;
}

.case-related .label { color: #1f4fa8; }

.case-related .chip-link {
  color: #1f4fa8;
  border-color: #cfdff7;
}

.case-related .chip-link:hover { background: #1f4fa8; border-color: #1f4fa8; color: #fff; }

/* ---------- Resources ----------------------------------------------------- */

.search-bar { background: var(--cream); padding: 26px 0; }

.search-field {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.search-field svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--grey-200);
  border-radius: 999px;
  padding: 13px 20px 13px 44px;
}

.search-field input::placeholder { color: #9aa0b0; }

.search-field input:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(165, 45, 34, 0.1);
}

.res-section { padding: 62px 0 66px; }
.res-section:nth-of-type(odd) { background: var(--cream); }
.res-section:nth-of-type(even) { background: var(--paper); }

.res-head { display: flex; align-items: center; gap: 16px; }

.res-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}

.res-icon svg { width: 19px; height: 19px; }

.res-head h2 { font-size: 22px; }

.res-head p { margin-top: 2px; font-size: 13px; color: var(--muted); }

.res-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.res-card {
  background: var(--paper);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  transition: all 0.16s ease;
}

.res-section:nth-of-type(even) .res-card { background: var(--grey-50); }

.res-card:hover {
  border-color: var(--brand-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  background: var(--paper);
}

.res-card.flash {
  border-color: var(--brand-700);
  box-shadow: 0 0 0 4px rgba(165, 45, 34, 0.16);
}

.res-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f7eaea;
  color: var(--brand-700);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.res-card-icon svg { width: 16px; height: 16px; }

.res-card h3 { font-size: 15.5px; }

.res-card p {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.kind {
  display: inline-block;
  margin-top: 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: #f9e9e9;
  padding: 4px 9px;
  border-radius: 5px;
}

.no-results {
  display: none;
  text-align: center;
  padding: 70px 0 90px;
  color: var(--muted);
  font-size: 14.5px;
}

.no-results.shown { display: block; }

/* ---------- Responsive ---------------------------------------------------- */

@media (max-width: 980px) {
  .value-grid { grid-template-columns: repeat(3, 1fr); }
  .deeper-grid { grid-template-columns: 1fr; max-width: 460px; }
  .event-grid { grid-template-columns: 1fr; gap: 40px; }
  .obj-grid { grid-template-columns: 1fr; }
  .case-picker { grid-template-columns: repeat(2, 1fr); }
  .res-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--brand-800);
    padding: 8px 16px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    display: none;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; border-radius: 8px; }

  .hero-home { padding: 92px 0 100px; }
  .section { padding: 58px 0; }
  .value-grid { grid-template-columns: 1fr 1fr; }

  .timeline::before { left: 9px; margin-left: 0; }
  .stage { margin-bottom: 26px; }
  .stage-node { left: 9px; margin-left: -8.5px; top: 24px; }
  .stage-card { width: 100%; margin-left: 34px; text-align: left !important; }
  .stage-left .chips { justify-content: flex-start; }

  .case-picker { grid-template-columns: 1fr; }
  .res-grid { grid-template-columns: 1fr; }
  .case-body, .case-header { padding-left: 20px; padding-right: 20px; }
  .year-index { font-size: 27px; }
}
