@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&display=swap');

:root {
  --bg-page: #F7F8FA;
  --bg-paper: #FDFCFB;
  --bg-subtle: #EEF1F6;
  --navy-deep: #0B2948;
  --navy-primary: #13294B;
  --royal-blue: #1D4ED8;
  --gold-accent: #D4AF37;
  --gold-soft: #FDF8E7;
  --text-main: #182230;
  --text-muted: #5E6B7E;
  --border-soft: #E3E7EE;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

.font-editorial {
  font-family: 'Instrument Serif', Georgia, serif;
}

.font-passage {
  font-family: 'Newsreader', Georgia, Cambria, serif;
  font-size: 1.08rem;
  line-height: 1.8;
  color: #1A202C;
}

/* Eye-friendly calm cards */
.editorial-card {
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.025);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.editorial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(11, 41, 72, 0.06);
  border-color: #CBD5E1;
}

/* Subtle custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Bluebook Test Interface Styles */
.bb-dashed-top {
  border-top: 2px dashed #94A3B8;
}
.bb-dashed-bottom {
  border-bottom: 2px dashed #94A3B8;
}

.option-card {
  transition: all 0.16s ease;
  cursor: pointer;
  background: #FFFFFF;
}
.option-card:hover:not(.eliminated) {
  background-color: #F8FAFC;
  border-color: #94A3B8;
}
.option-card.selected {
  border-color: #1D4ED8 !important;
  background-color: #EFF6FF !important;
  box-shadow: 0 0 0 1px #1D4ED8;
}
.option-card.selected .opt-badge {
  background-color: #1D4ED8 !important;
  color: #FFFFFF !important;
  border-color: #1D4ED8 !important;
}
.option-card.eliminated {
  opacity: 0.42;
  position: relative;
}
.option-card.eliminated::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 2px;
  background: #475569;
  pointer-events: none;
}

/* Highlight and Annotation Styles */
.sat-selectable {
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text;
}
.sat-selectable ::selection {
  background-color: rgba(250, 204, 21, 0.45);
}

.bb-highlight {
  border-radius: 3px;
  padding: 1px 2px;
  cursor: pointer;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.bb-highlight:hover {
  filter: brightness(0.93);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.25);
}
.bb-hl-yellow {
  background-color: #FEF08A;
  border-bottom: 2px solid #EAB308;
}
.bb-hl-pink {
  background-color: #FBCFE8;
  border-bottom: 2px solid #EC4899;
}
.bb-hl-green {
  background-color: #BBF7D0;
  border-bottom: 2px solid #22C55E;
}
.bb-hl-underline {
  background-color: transparent;
  border-bottom: 2.5px wavy #2563EB;
}
.bb-hl-has-note::after {
  content: '💬';
  font-size: 11px;
  margin-left: 2px;
  vertical-align: super;
}

/* Math & Content Formatting */
.question-html p {
  margin-bottom: 0.8rem;
}
.question-html p:last-child {
  margin-bottom: 0;
}
.question-html table {
  border-collapse: collapse;
  margin: 1rem 0;
  width: auto;
  min-width: 55%;
  font-size: 0.92rem;
}
.question-html th,
.question-html td {
  border: 1px solid #CBD5E1;
  padding: 0.5rem 0.85rem;
  text-align: center;
}
.question-html th {
  background-color: #F8FAFC;
  font-weight: 600;
}
.question-html img {
  max-width: 100%;
  height: auto;
  margin: 0.75rem auto;
  display: block;
  border-radius: 8px;
}
.question-html ul, .question-html ol {
  padding-left: 1.5rem;
  margin: 0.65rem 0;
}
.question-html li {
  margin-bottom: 0.35rem;
}

/* AI Markdown & LaTeX Chat Typography */
.ai-markdown {
  word-break: break-word;
}
.ai-markdown h1,
.ai-markdown h2,
.ai-markdown h3,
.ai-markdown h4 {
  font-weight: 700;
  color: #0B2948;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}
.ai-markdown h1 { font-size: 1.05rem; }
.ai-markdown h2 { font-size: 0.98rem; }
.ai-markdown h3 { font-size: 0.90rem; }
.ai-markdown h4 { font-size: 0.85rem; }
.ai-markdown p {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.ai-markdown p:last-child {
  margin-bottom: 0;
}
.ai-markdown ul {
  list-style-type: disc;
  padding-left: 1.25rem;
  margin: 0.4rem 0;
}
.ai-markdown ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
  margin: 0.4rem 0;
}
.ai-markdown li {
  margin-bottom: 0.25rem;
  line-height: 1.5;
}
.ai-markdown blockquote {
  border-left: 3px solid #0B2948;
  background: rgba(241, 245, 249, 0.75);
  padding: 0.45rem 0.75rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 0.5rem 0;
  color: #334155;
  font-style: italic;
}
.ai-markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  background-color: #E2E8F0;
  color: #0F172A;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
}
.ai-markdown pre {
  background: #0B2948;
  color: #F8FAFC;
  padding: 0.75rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 0.5rem 0;
}
.ai-markdown pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.ai-markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 0.75rem;
}
.ai-markdown th,
.ai-markdown td {
  border: 1px solid #CBD5E1;
  padding: 0.35rem 0.5rem;
  text-align: left;
}
.ai-markdown th {
  background-color: #F1F5F9;
  font-weight: 600;
}
.ai-markdown .MathJax {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 1.05em !important;
}

