/* ================================================================
   PAPER 6.4 — PROFESSIONAL ETHICS | KRISHNAMURTHY IYER'S ADVOCACY
   PREMIUM EDITION  |  styles.css
   Design: Oxford Legal Journal — Luxury Refined Aesthetic
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=EB+Garamond:ital,wght@0,400;0,500;0,700;0,800;1,400;1,700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* ── ROOT TOKENS ──────────────────────────────────────────────── */
:root {
  /* Page surfaces */
  --page-bg:      rgb(250, 246, 238);
  --card-bg:      rgb(255, 255, 255);
  --card-hover:   rgb(252, 250, 245);

  /* Oxford Blue family */
  --oxford:       rgb(0,   33,  71);
  --oxford-mid:   rgb(8,   50, 110);
  --oxford-light: rgb(20,  80, 160);

  /* Gold family */
  --gold-deep:    rgb(152, 108,  10);
  --gold:         rgb(180, 138,  18);
  --gold-bright:  rgb(212, 170,  40);
  --gold-pale:    rgb(252, 244, 200);
  --gold-tint:    rgb(255, 252, 235);

  /* Text */
  --ink:          rgb(12,  20,  48);
  --ink-mid:      rgb(30,  50,  90);
  --ink-light:    rgb(60,  90, 140);
  --white:        rgb(255, 255, 255);

  /* Borders */
  --border-hard:  rgb(0,   33,  71);
  --border-mid:   rgb(20,  80, 160);
  --border-soft:  rgb(190, 215, 250);
  --border-gold:  rgb(180, 138,  18);

  /* Tables */
  --tbl-head:     rgb(0,   33,  71);
  --tbl-even:     rgb(240, 248, 255);
  --tbl-odd:      rgb(252, 255, 255);

  /* Shadows */
  --sh-card:      0 2px 18px rgba(0,20,60,0.10), 0 1px 4px rgba(0,20,60,0.07);
  --sh-hover:     0 6px 32px rgba(0,20,60,0.16), 0 2px 8px rgba(0,20,60,0.10);
  --sh-header:    0 4px 24px rgba(0,15,50,0.35);

  /* Sizes */
  --radius:       10px;
  --radius-sm:    6px;
}

/* ── RESET ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── BODY ─────────────────────────────────────────────────────── */
body {
  background-color: var(--page-bg);
  background-image:
    radial-gradient(ellipse at 12% 8%, rgba(0,33,71,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 88% 92%, rgba(180,138,18,0.05) 0%, transparent 55%);
  color: var(--ink);
  font-family: 'EB Garamond', 'Libre Baskerville', Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.80;
}

/* ================================================================
   HEADER
================================================================ */
header {
  background:
    linear-gradient(162deg,
      rgb(0, 22, 55) 0%,
      rgb(0, 33, 71) 45%,
      rgb(4, 48, 98) 80%,
      rgb(0, 28, 62) 100%);
  position: relative;
  overflow: hidden;
  padding: 52px 60px 40px;
  text-align: center;
  border-bottom: 4px solid var(--gold);
  box-shadow: var(--sh-header);
}

/* Decorative gold rule lines */
header::before {
  content: '';
  position: absolute;
  top: 18px; left: 40px; right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
}
header::after {
  content: '';
  position: absolute;
  bottom: 22px; left: 40px; right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
}

/* Subtle corner ornament effect */
.header-inner { position: relative; z-index: 2; }

.hdr-course-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(212,170,40,0.5);
  color: var(--gold-bright);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 0.72em;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  padding: 7px 22px;
  border-radius: 30px;
  margin-bottom: 22px;
}
.hdr-course-tag::before,
.hdr-course-tag::after { content: '◆'; font-size: 0.7em; color: var(--gold); }

header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 2.2em;
  color: var(--white);
  letter-spacing: 0.5px;
  line-height: 1.25;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
header h1 em {
  color: var(--gold-bright);
  font-style: italic;
  font-weight: 700;
}

.hdr-divider {
  width: 120px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 14px auto;
  border-radius: 2px;
}

header h2 {
  font-family: 'EB Garamond', serif;
  font-weight: 500;
  font-size: 1.05em;
  color: rgba(220,235,255,0.88);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

header p.hdr-sub {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.9em;
  color: rgba(200,218,255,0.65);
  margin-top: 8px;
}

/* PRINT BUTTON */
.btn-print {
  position: absolute;
  top: 24px; right: 32px;
  z-index: 10;
  display: flex; align-items: center; gap: 8px;
  background: transparent;
  border: 2px solid var(--gold-bright);
  color: var(--gold-bright);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 0.82em;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.28s ease;
}
.btn-print:hover {
  background: var(--gold);
  color: var(--oxford);
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(180,138,18,0.45);
  transform: translateY(-1px);
}
.btn-print svg { width: 15px; height: 15px; fill: currentColor; }

/* ================================================================
   DISCLAIMER
================================================================ */
.disclaimer-strip {
  background: var(--gold-tint);
  border-top: none;
  border-bottom: 3px solid var(--gold);
  border-left: 8px solid var(--gold-deep);
  padding: 16px 50px;
  display: flex; align-items: flex-start; gap: 16px;
}
.disclaimer-strip .disc-icon {
  font-size: 1.5em; flex-shrink: 0; margin-top: 2px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}
.disclaimer-strip p {
  font-family: 'EB Garamond', serif;
  font-size: 0.88em;
  font-weight: 700;
  color: rgb(60, 40, 0);
  line-height: 1.6;
}
.disclaimer-strip strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.08em;
  font-weight: 700;
  color: var(--gold-deep);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ================================================================
   NAVIGATION BAR
================================================================ */
nav#main-nav {
  background: var(--oxford);
  border-bottom: 3px solid var(--gold-deep);
  padding: 12px 50px;
  position: sticky; top: 0; z-index: 900;
  box-shadow: 0 3px 14px rgba(0,15,50,0.40);
}
.nav-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.65em;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(212,170,40,0.8);
  margin-bottom: 8px;
}
.nav-btns { display: flex; flex-wrap: wrap; gap: 6px; }

.nav-btn {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(90,130,200,0.45);
  color: rgb(195, 218, 255);
  font-family: 'EB Garamond', serif;
  font-weight: 700;
  font-size: 0.80em;
  padding: 7px 14px;
  border-radius: 5px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all 0.22s ease;
  white-space: nowrap;
}
.nav-btn:hover, .nav-btn.active {
  background: var(--gold);
  color: var(--oxford);
  border-color: var(--gold);
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(180,138,18,0.35);
}

/* ================================================================
   MAIN WRAPPER
================================================================ */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 48px 80px;
}

/* ================================================================
   SECTION CARD
================================================================ */
.sec-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border-soft);
  border-top: 4px solid var(--oxford);
  border-radius: var(--radius);
  padding: 36px 38px;
  margin-bottom: 30px;
  box-shadow: var(--sh-card);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.sec-card:hover {
  box-shadow: var(--sh-hover);
  border-color: var(--border-mid);
}

/* Section heading bar */
.sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gold-tint);
  position: relative;
}
.sec-head::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 80px; height: 2px;
  background: var(--gold);
}

.sec-num {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--oxford);
  color: var(--gold-bright);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.1em;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,20,60,0.22);
}

.sec-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.45em;
  color: var(--oxford);
  letter-spacing: 0.2px;
  line-height: 1.2;
}
.sec-head .sec-icon { font-size: 1.4em; }

/* ================================================================
   INTRO CALLOUT
================================================================ */
.intro-callout {
  background: linear-gradient(135deg, rgb(245, 250, 255), rgb(235, 245, 255));
  border-left: 5px solid var(--oxford-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 24px;
  margin-bottom: 24px;
  font-style: italic;
  font-size: 1em;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.82;
}
.intro-callout strong {
  font-style: normal;
  font-weight: 800;
  color: var(--oxford);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.04em;
}

/* ================================================================
   SUBSECTION
================================================================ */
.subsec {
  margin-bottom: 26px;
}
.subsec-head {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--oxford), var(--oxford-mid));
  color: var(--white);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 0.96em;
  letter-spacing: 0.4px;
  padding: 10px 18px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-left: 5px solid var(--gold);
}
.subsec-body {
  background: rgb(250, 253, 255);
  border: 1.5px solid var(--border-soft);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 18px 20px 14px;
}

/* ================================================================
   BULLET LISTS  —  Crystal-Clear High-Contrast
================================================================ */
.blist {
  list-style: none;
  padding: 0;
}
.blist li {
  position: relative;
  padding: 10px 10px 10px 40px;
  font-family: 'EB Garamond', serif;
  font-weight: 500;
  font-size: 1em;
  color: var(--ink);
  line-height: 1.75;
  border-bottom: 1px solid rgb(228, 238, 252);
}
.blist li:last-child { border-bottom: none; }
.blist li::before {
  position: absolute;
  left: 6px; top: 10px;
  font-size: 0.95em;
}
.blist.bl-gavel li::before  { content: "⚖️"; }
.blist.bl-arrow li::before  { content: "▶"; color: var(--oxford-light); font-size: 0.75em; top: 14px; }
.blist.bl-check li::before  { content: "✅"; }
.blist.bl-star  li::before  { content: "★"; color: var(--gold-deep); font-size: 1.1em; top: 9px; }
.blist.bl-warn  li::before  { content: "⚠️"; }
.blist.bl-book  li::before  { content: "📖"; }
.blist.bl-dot   li::before  { content: "◆"; color: var(--oxford-light); font-size: 0.65em; top: 15px; }

/* STRONG within bullets */
.blist li strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.04em;
  color: var(--oxford);
  margin-bottom: 2px;
}

/* ================================================================
   TABLES  —  Razor-Sharp, High-Contrast
================================================================ */
.tbl-scroll {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 12px rgba(0,20,60,0.10);
  margin: 6px 0 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'EB Garamond', serif;
  font-size: 0.93em;
}
thead tr { background: var(--oxford); }
thead th {
  padding: 14px 18px;
  text-align: left;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 0.93em;
  letter-spacing: 0.6px;
  color: var(--gold-bright);
  border-right: 1px solid rgba(255,255,255,0.12);
}
thead th:last-child { border-right: none; }

tbody tr:nth-child(odd)  { background: var(--tbl-odd); }
tbody tr:nth-child(even) { background: var(--tbl-even); }
tbody tr {
  transition: background 0.18s ease;
  border-bottom: 1px solid rgb(210, 228, 248);
}
tbody tr:hover { background: rgb(220, 238, 255); }
tbody td {
  padding: 12px 18px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.65;
  vertical-align: top;
  border-right: 1px solid rgb(215, 232, 250);
}
tbody td:last-child { border-right: none; }
tbody td:first-child {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 0.97em;
  color: var(--oxford);
  background: rgb(240, 248, 255);
}
tbody tr:nth-child(even) td:first-child { background: rgb(228, 242, 255); }

/* ================================================================
   QUOTE / HIGHLIGHT BOX
================================================================ */
.quote-box {
  position: relative;
  background: var(--oxford);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 22px 28px 22px 46px;
  margin: 20px 0;
  border-left: 5px solid var(--gold);
  font-style: italic;
  font-size: 1em;
  font-weight: 500;
  line-height: 1.80;
}
.quote-box::before {
  content: '"';
  position: absolute;
  left: 14px; top: 8px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5em;
  color: var(--gold);
  line-height: 1;
  opacity: 0.7;
}
.quote-box strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: normal;
  color: var(--gold-bright);
  margin-bottom: 6px;
  font-size: 1.04em;
  letter-spacing: 0.3px;
}
.quote-box em { font-style: normal; color: rgba(220,235,255,0.88); }

/* ================================================================
   DIAGRAM CARDS
================================================================ */
.diag-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border-soft);
  border-top: 4px solid var(--gold-deep);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin-bottom: 30px;
  box-shadow: var(--sh-card);
}

.diag-head {
  text-align: center;
  margin-bottom: 28px;
}
.diag-head h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.35em;
  color: var(--oxford);
  letter-spacing: 0.5px;
  line-height: 1.25;
}
.diag-head .diag-rule {
  width: 100px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 10px auto 0;
  border-radius: 2px;
}
.diag-head p {
  font-size: 0.82em;
  font-style: italic;
  color: var(--ink-light);
  margin-top: 6px;
  font-weight: 500;
}

.svg-wrap { overflow-x: auto; overflow-y: hidden; }
svg { display: block; }

/* ================================================================
   ROADMAP — CSS TIMELINE
================================================================ */
.rm-outer {
  position: relative;
  padding: 16px 0 16px;
}
.rm-spine {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--oxford), var(--oxford-mid), var(--oxford));
  border-radius: 2px;
}
.rm-row {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 46px);
  margin-bottom: 36px;
  position: relative;
  align-items: flex-start;
}
.rm-row.right {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 46px);
}
.rm-dot {
  position: absolute;
  left: 50%; top: 20px;
  transform: translateX(-50%);
  width: 22px; height: 22px;
  background: var(--gold);
  border: 4px solid var(--oxford);
  border-radius: 50%;
  z-index: 3;
  box-shadow: 0 0 0 3px rgba(180,138,18,0.28), 0 2px 8px rgba(0,0,0,0.22);
}
.rm-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border-soft);
  border-top: 3px solid var(--oxford);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  max-width: 440px;
  box-shadow: var(--sh-card);
  transition: box-shadow 0.25s ease;
}
.rm-card:hover { box-shadow: var(--sh-hover); }
.rm-stage {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 0.65em;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 5px;
}
.rm-card h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.10em;
  color: var(--oxford);
  margin-bottom: 8px;
  line-height: 1.28;
}
.rm-card p {
  font-family: 'EB Garamond', serif;
  font-size: 0.90em;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.70;
}
.rm-tag {
  display: inline-block;
  background: var(--oxford);
  color: var(--gold-bright);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 0.65em;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 10px;
}
.rm-dest .rm-card {
  border-top-color: var(--gold-deep);
  background: linear-gradient(135deg, var(--oxford), var(--oxford-mid));
}
.rm-dest .rm-stage { color: var(--gold-bright); }
.rm-dest .rm-card h4 { color: var(--gold-bright); }
.rm-dest .rm-card p  { color: rgba(210,228,255,0.90); }

/* ================================================================
   FOOTER
================================================================ */
footer {
  background: var(--oxford);
  color: rgba(200, 218, 255, 0.80);
  text-align: center;
  padding: 28px 24px;
  border-top: 4px solid var(--gold-deep);
  font-family: 'EB Garamond', serif;
  font-size: 0.90em;
  font-weight: 500;
}
footer .ft-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.08em;
  color: var(--gold-bright);
  letter-spacing: 0.5px;
  margin-bottom: 7px;
}
footer .ft-disc {
  margin-top: 9px;
  font-style: italic;
  color: rgba(180,200,240,0.55);
  font-size: 0.86em;
}
footer .ft-rule {
  width: 80px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 12px auto;
}

/* ================================================================
   PRINT STYLES
================================================================ */
@media print {
  nav#main-nav, .btn-print { display: none !important; }
  body { background: #fff; font-size: 11pt; color: #000; }
  header { background: #002147 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sec-card, .diag-card { box-shadow: none; border: 1pt solid #aaa; break-inside: avoid; page-break-inside: avoid; margin-bottom: 14pt; }
  .subsec-head, thead tr, .quote-box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rm-spine { background: #002147; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  tbody tr:nth-child(even) { background: #eaf2ff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .disclaimer-strip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  svg { max-width: 100% !important; }
  .svg-wrap { overflow: visible; }
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 860px) {
  header { padding: 28px 20px 28px; }
  header h1 { font-size: 1.5em; }
  .btn-print { position: static; display: block; width: fit-content; margin: 16px auto 0; }
  main { padding: 20px 16px 60px; }
  nav#main-nav { padding: 10px 16px; }
  .sec-card, .diag-card { padding: 20px 18px; }
  .disclaimer-strip { padding: 14px 18px; }
  .rm-spine, .rm-dot { display: none; }
  .rm-row, .rm-row.right { padding: 0; justify-content: center; margin-bottom: 18px; }
  .rm-card { max-width: 100%; }
}