/* SI Bar Exam — shared base styles. Navy professional theme. */
:root {
  --navy: #1c2b4a;
  --navy-dark: #131e35;
  --gold: #c9973a;
  --burgundy: #7a2230;
  --burgundy-dark: #571824;
  --burgundy-light: #f6e8eb;
  --green: #1f4a28; /* defined 2026-10-02 (was missing; white text passes at 10.15:1) */
  --green-dark: #16401f;
  --paper: #faf9f6;
  --ink: #232a35;
  --muted: #5b6472;
  --line: #e2e0d8;
  --card: #ffffff;
  --radius: 10px;
  --link-dark: #f6e8eb; /* inline-link color on dark surfaces (8.9:1 on burgundy-dark) */
  --head: #1c2b4a;
  --banner: #571824;
  --burgundy-border: #e3c9cf;
  --burgundy-hover: #8f2f3d;
  --card-hover: #faf5f6;
  --tab-bg: #f4f2ec;
  --info-bg: #e6f0f2;
  --info-ink: #1c2b4a;
  --note-bg: #eaf2fb;
  --note-ink: #1e4d7b;
  --note-border: #c9d9f5;
  --input-border: #c9c4b4;
  --or-text: #6e7580; /* contrast fix 2026-10-02: was #9aa3b2 (2.54:1 on card) */
  --or-line: #e2e7f0;
  --passage-bg: #fdfaf2;
  --passage-border: #e8ddc1;
  --code-bg: #f4f5f7;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
}
h1, h2, h3, .serif {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--head);
  line-height: 1.25;
}
a { color: var(--head); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Utility bar */
.util-bar { background: var(--navy-dark); color: #aab4c9; font-size: 13px; }
.util-bar .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.util-bar a { color: #d7deee; text-decoration: none; }
.util-bar a:hover { text-decoration: underline; }

/* Header */
.site-header { background: var(--navy); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 9px; background: var(--burgundy);
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-weight: bold; font-size: 21px; color: #fff;
  flex: none;
}
.brand-name { font-family: Georgia, serif; font-size: 20px; letter-spacing: 0.2px; }
.brand-sub { font-size: 12px; color: #c9d2e4; letter-spacing: 1.2px; text-transform: uppercase; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: #dbe2f0; text-decoration: none; font-size: 15px; padding: 8px 12px;
  border-radius: 6px; white-space: nowrap;
}
.nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav a.active { background: rgba(255,255,255,0.14); color: #fff; font-weight: 600; }

/* Hero */
.hero { background: var(--banner); color: #eef4ee; padding: 56px 0 48px; }
.hero h1 { color: #fff; font-size: clamp(30px, 4.5vw, 44px); margin: 0 0 12px; }
.hero p.lede { font-size: 19px; color: #cfdccf; max-width: 740px; margin: 0 0 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px; font-size: 16px;
  font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-green { background: var(--burgundy); color: #fff; }
.btn-green:hover { background: var(--burgundy-hover); }
/* .btn-gold was referenced by the auth modal but never defined (invisible submit button) — added 2026-10-02. */
.btn-gold { background: var(--gold); color: #0c1a31; }
.btn-gold:hover { background: #b3872f; color: #0c1a31; }
.btn-outline { border-color: #8ba393; color: #eef4ee; background: transparent; }
.btn-outline:hover { border-color: #fff; color: #fff; }
.edition-note {
  margin-top: 26px; font-size: 14px; color: #b9c8ba; max-width: 740px;
  border-left: 3px solid var(--burgundy); padding-left: 14px;
}

/* Link contrast on dark surfaces (2026-10-02): inline text links must meet
 * WCAG AA (4.5:1) — light high-contrast color plus a visible underline,
 * never color alone. The base link color (#1c2b4a) is 1.4:1 on burgundy-dark,
 * so these rules override it anywhere a link sits on a dark background. */
.hero a:not(.btn),
.site-footer a:not(.btn),
.util-bar a:not(.btn),
.exam-timer a:not(.btn) {
  color: var(--link-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hero a:not(.btn):hover,
.site-footer a:not(.btn):hover,
.util-bar a:not(.btn):hover,
.exam-timer a:not(.btn):hover { color: #fff; }
.nav a, .brand { text-decoration: none; }
.edition-note a { color: #eef4ee; }

/* Sections */
.section { padding: 48px 0; }
.section h2 { font-size: 30px; margin: 0 0 8px; }
.section .kicker { text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; color: var(--burgundy); font-weight: 700; margin: 0 0 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 24px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; text-decoration: none; color: inherit; display: block;
}
.card:hover { border-color: var(--burgundy); box-shadow: 0 4px 18px rgba(31,74,40,0.08); }
.card h3 { margin: 0 0 8px; font-size: 21px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card .go { color: var(--burgundy); font-weight: 700; font-size: 15px; margin-top: 12px; display: inline-block; }
.card-static:hover { border-color: var(--line); box-shadow: none; }

/* Prose content */
.prose { max-width: 820px; }
.prose p { margin: 0 0 16px; color: var(--ink); }
.prose .prose-muted { color: var(--muted); }
.prose h3 { margin: 32px 0 10px; font-size: 22px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; color: var(--ink); }
.prose li { margin-bottom: 8px; }
.prose li strong { color: var(--ink); }
.callout {
  background: var(--burgundy-light); border: 1px solid var(--burgundy-border); border-radius: var(--radius);
  padding: 18px 22px; margin: 24px 0; font-size: 15.5px; color: var(--ink);
}
.callout strong { color: var(--burgundy-dark); }
.callout p { margin: 0 0 8px; }
.callout p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 20px 0; }
table.app-table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--card); }
.app-table th, .app-table td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.app-table th { background: var(--banner); color: #fff; font-weight: 600; }
.app-table td:first-child { font-weight: 700; color: var(--head); white-space: nowrap; }

/* FAQ accordions */
.faq { max-width: 880px; margin-top: 16px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: var(--card); }
.faq-item summary {
  cursor: pointer; padding: 15px 20px; font-weight: 700; color: var(--head); font-size: 16.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--burgundy); font-size: 22px; font-weight: 400; flex: none; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item summary:hover { background: var(--card-hover); }
.faq-item > p { padding: 0 20px 18px; margin: 0; color: var(--muted); max-width: 780px; }
.faq-item > ul, .faq-item > ol { margin: 0; padding: 2px 20px 18px 42px; color: var(--muted); }
.faq-item li { margin-bottom: 6px; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #9aa5bd; padding: 36px 0; font-size: 14px; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #c9d2e4; }
.site-footer strong { color: #fff; }
.footer-nav { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section { padding: 34px 0; }
}


/* ---------- Auth (login / signup / tiers) ---------- */
.nav-auth { display: flex; gap: 8px; align-items: center; }
.btn-ghost-nav, .btn-gold-nav {
  padding: 8px 16px; font-size: 14.5px; border-radius: 7px;
}
.btn-ghost-nav {
  border: 1px solid rgba(255,255,255,0.45); color: #eef4f5; background: transparent;
}
.btn-ghost-nav:hover { border-color: #fff; color: #fff; }
.btn-gold-nav { background: var(--gold); color: var(--navy-dark); border: 1px solid var(--gold); }
.btn-gold-nav:hover { background: #c9973a; color: var(--navy-dark); }
.si-role-chip {
  font-size: 13px; font-weight: 700; text-transform: capitalize;
  background: rgba(255,255,255,0.14); color: #fff;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; padding: 5px 12px;
}
@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; }
  .nav-auth { margin-top: 8px; }
}

.si-auth-backdrop {
  position: fixed; inset: 0; background: rgba(8,49,57,0.62);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 18px;
}
.si-auth-backdrop[hidden] { display: none; }
.si-auth-modal {
  background: var(--card); color: var(--ink); border-radius: 14px;
  max-width: 420px; width: 100%; padding: 28px 28px 22px;
  position: relative; box-shadow: 0 24px 70px rgba(0,0,0,0.35);
  max-height: 92vh; overflow-y: auto;
}
.si-auth-close {
  position: absolute; top: 10px; right: 14px; border: 0; background: none;
  font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer;
}
.si-auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.si-auth-tab {
  flex: 1; padding: 10px; font-size: 16px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: var(--tab-bg); color: var(--muted);
}
.si-auth-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.si-auth-context {
  font-size: 14px; color: var(--info-ink); background: var(--info-bg);
  border-radius: 8px; padding: 10px 12px; margin: 0 0 14px;
}
.si-auth-roles { border: 0; padding: 0; margin: 0 0 14px; }
.si-auth-roles legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.si-auth-roles label {
  display: inline-flex; align-items: center; gap: 7px; margin-right: 18px;
  font-size: 15.5px; font-weight: 600; cursor: pointer;
}
.si-auth-field { display: block; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.si-auth-field input {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px;
  font-size: 16px; border: 1px solid var(--input-border); border-radius: 8px;
  font-family: inherit; background: var(--card); color: var(--ink);
}
.si-auth-submit { width: 100%; margin-top: 4px; }
.si-auth-err {
  font-size: 14px; color: #a33; background: #fbeeee;
  border-radius: 8px; padding: 9px 12px; margin: 12px 0 0;
}
.si-auth-err[hidden] { display: none; }
.si-auth-demo { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.si-auth-demo-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.7px; margin: 0 0 10px; text-align: center; }
.si-auth-demo-btns { display: flex; gap: 10px; }
.si-auth-demo-btn {
  flex: 1; border: 1px solid var(--head); color: var(--head); background: var(--card);
  padding: 10px 12px; font-size: 15px;
}
.si-auth-demo-btn:hover { background: var(--info-bg); }
.si-auth-demo-note {
  font-size: 12.5px; color: var(--muted); text-align: center; margin: 8px 0 0;
  font-weight: 700; letter-spacing: 0.3px;
}
.si-auth-fineprint { font-size: 12.5px; color: var(--muted); text-align: center; margin: 14px 0 0; }
.si-auth-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 12px; background: #fff; border: 1px solid #c9d2e0;
  border-radius: 8px; font-size: 15px; font-weight: 700; color: #1a2333;
  cursor: pointer; font-family: inherit; margin: 2px 0 0;
}
.si-auth-google:hover { background: #f4f6fa; border-color: #aeb9cc; }
.si-auth-google-g { flex: none; }
.si-auth-or { display: flex; align-items: center; gap: 10px; color: var(--or-text); font-size: 12.5px; margin: 12px 0; }
.si-auth-or::before, .si-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--or-line); }
.si-auth-note {
  font-size: 13.5px; color: var(--note-ink); background: var(--note-bg); border: 1px solid var(--note-border);
  border-radius: 8px; padding: 9px 12px; margin: 12px 0 0;
}
.si-auth-note[hidden] { display: none; }
.si-upgrade-title { margin: 0 0 8px; font-size: 24px; color: var(--head); font-family: Georgia, serif; }
.si-upgrade-label {
  font-size: 14.5px; color: var(--head); background: var(--burgundy-light);
  border-radius: 8px; padding: 10px 12px; margin: 0 0 12px;
}
.si-auth-modal p { font-size: 15px; line-height: 1.55; }
.si-auth-modal .btn-gold { display: inline-block; margin-top: 6px; }

/* Elsie widget daily-sample framing */
.elsie-sample {
  font-size: 12px; color: #9ab8c0; padding: 6px 14px 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.elsie-sample a { color: #f4ead2; font-weight: 700; }
.elsie-limit-msg { text-align: center; padding: 14px 10px; }
.elsie-limit-msg p { margin: 0 0 10px; font-size: 14.5px; }

/* ---------- Auth: trial + passcode additions ---------- */
.si-auth-optional {
  font-weight: 400; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.6px; margin-left: 6px;
}
.si-chip-upgrade {
  font-size: 13px; font-weight: 700; color: #f4ead2; white-space: nowrap;
}
.si-chip-upgrade:hover { color: #fff; }
.si-role-chip.si-chip-ended { border-color: rgba(185,138,47,0.7); color: #f4ead2; }
.si-role-chip.si-chip-trial { border-color: rgba(185,138,47,0.9); color: #ffe9b0; }
.si-upgrade-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.si-upgrade-trial {
  border: 1px solid var(--head); color: var(--head); background: var(--card);
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.si-upgrade-trial:hover { background: var(--info-bg); }

/* Pricing fine print */
.pr-fineprint { font-size: 13px; color: var(--muted); text-align: center; margin: 10px 0 0; }


/* SI Law auth overrides: the shared modal is light-themed while the site's
 * .btn-outline is styled for dark backgrounds — keep modal buttons legible. */
.si-auth-modal .btn-outline {
  border-color: #14294a; color: #14294a; background: #fff;
}
.si-auth-modal .btn-outline:hover {
  border-color: #14294a; color: #14294a; background: #e8eef6;
}
.si-auth-modal .si-auth-demo-btns .btn-gold { color: #0c1a31; }
