@charset "UTF-8";
@import url("https://unpkg.com/@primer/css@21.0.7/dist/primer.css");
/* Base styles and CSS reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Focus management */
:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Selection styles */
::selection {
  background-color: var(--primary-100);
  color: var(--primary-900);
}

/* Links */
a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* Lists */
ul,
ol {
  list-style: none;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Buttons */
button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  transition: all var(--transition-fast);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form elements */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

/* Utility classes */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top: 2px solid var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-bg);
  color: var(--color-text);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius);
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 6px;
}

/* ============================================
   MINIMAL CUSTOM STYLES
   Built on Primer CSS foundation
   ============================================ */
/* Layout Variables */
:root {
  --sidebar-width: 260px;
  --notes-sidebar-min-width: 320px;
  --content-max-width: 800px;
  --notebook-line-height: 32px;
  --notebook-line-color: #e3eef7;
  --notebook-margin-left: 60px;
  --notebook-margin-color: #ffd9dd;
  /* Color Palette - Pastel Solid Colors */
  --pastel-blue: #7c8db5;
  --pastel-blue-light: #7ec8e3;
  --pastel-pink: #e89aac;
  --pastel-green: #7dd9bd;
  --pastel-green-light: #20c997;
  --pastel-orange: #f4b183;
  --pastel-purple: #c8b5d9;
  --pastel-gray: #f8f9fa;
  --pastel-gray-dark: #f0f8ff;
  --primary-blue: #0056b3;
}

/* Global Typography - Align to notebook grid */
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li {
  line-height: var(--notebook-line-height);
}

h1 {
  margin-top: 0;
  margin-bottom: calc(var(--notebook-line-height) * 0.5);
  line-height: calc(var(--notebook-line-height) * 2);
}

h2 {
  margin-top: var(--notebook-line-height);
  margin-bottom: calc(var(--notebook-line-height) * 0.5);
}

h3 {
  margin-top: calc(var(--notebook-line-height) * 0.5);
  margin-bottom: calc(var(--notebook-line-height) * 0.25);
}

h4,
h5,
h6 {
  margin-top: calc(var(--notebook-line-height) * 0.5);
  margin-bottom: 0;
}

p {
  margin-top: 0;
  margin-bottom: calc(var(--notebook-line-height) * 0.5);
}

/* Content area lists - restore proper styling */
.content-wrapper ul,
.content-wrapper ol,
.chapter-body ul,
.chapter-body ol {
  margin-top: 0;
  margin-bottom: calc(var(--notebook-line-height) * 0.5);
  padding-left: 2rem;
  list-style: inherit;
}

.content-wrapper ul,
.chapter-body ul {
  list-style-type: disc;
}

.content-wrapper ol,
.chapter-body ol {
  list-style-type: decimal;
}

.content-wrapper ul ul,
.chapter-body ul ul {
  list-style-type: circle;
  margin-bottom: 0;
}

.content-wrapper ul ul ul,
.chapter-body ul ul ul {
  list-style-type: square;
}

.content-wrapper li,
.chapter-body li {
  margin: 0 0 0.5rem 0;
  padding-left: 0.5rem;
}

.content-wrapper li:last-child,
.chapter-body li:last-child {
  margin-bottom: 0;
}

/* Nested lists */
.content-wrapper li > ul,
.content-wrapper li > ol,
.chapter-body li > ul,
.chapter-body li > ol {
  margin-top: 0.5rem;
}

/* Tables */
.content-wrapper table,
.chapter-body table {
  width: 100%;
  border-collapse: collapse;
  margin: calc(var(--notebook-line-height) * 0.5) 0;
  font-size: 0.875rem;
  background: white;
}

.content-wrapper table th,
.chapter-body table th {
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #24292f;
}

.content-wrapper table td,
.chapter-body table td {
  border: 1px solid #d0d7de;
  padding: 8px 12px;
  vertical-align: top;
  background: white;
}

.content-wrapper table tbody tr:hover,
.chapter-body table tbody tr:hover {
  background: #f6f8fa;
}

/* Details/Summary for collapsible sections */
.content-wrapper details,
.chapter-body details {
  margin: calc(var(--notebook-line-height) * 0.5) 0;
}

.content-wrapper details summary,
.chapter-body details summary {
  cursor: pointer;
  user-select: none;
  padding: 8px 0;
}

.content-wrapper details summary:hover,
.chapter-body details summary:hover {
  color: #0969da;
}

.content-wrapper details[open] summary,
.chapter-body details[open] summary {
  margin-bottom: calc(var(--notebook-line-height) * 0.5);
}

.content-wrapper details summary h2,
.chapter-body details summary h2 {
  display: inline;
  margin: 0;
}

/* Strong and emphasis in content */
.content-wrapper strong,
.chapter-body strong {
  font-weight: 600;
  color: #24292f;
}

.content-wrapper em,
.chapter-body em {
  font-style: italic;
}

.content-wrapper code,
.chapter-body code {
  font-family: "Courier New", Courier, monospace;
  background: #f6f8fa;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Code blocks */
.content-wrapper pre,
.chapter-body pre {
  position: relative;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 12px 16px;
  margin: calc(var(--notebook-line-height) * 0.5) 0;
  overflow-x: auto;
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-wrapper pre code,
.chapter-body pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 16px;
  color: #24292f;
  flex: 1;
  min-width: 0;
}

/* Copy button for code blocks */
.code-copy-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #24292f;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.code-copy-btn:hover {
  background: #f6f8fa;
  border-color: #0969da;
}

.code-copy-btn.copied {
  background: #dafbe1;
  border-color: #1a7f37;
  color: #1a7f37;
}

/* Horizontal rules */
.content-wrapper hr,
.chapter-body hr {
  border: none;
  border-top: 2px solid #d0d7de;
  margin: var(--notebook-line-height) 0;
}

/* Notebook-style background */
body {
  background: linear-gradient(90deg, transparent calc(var(--notebook-margin-left) - 1px), var(--notebook-margin-color) calc(var(--notebook-margin-left) - 1px), var(--notebook-margin-color) var(--notebook-margin-left), transparent var(--notebook-margin-left)), repeating-linear-gradient(transparent, transparent calc(var(--notebook-line-height) - 1px), var(--notebook-line-color) calc(var(--notebook-line-height) - 1px), var(--notebook-line-color) var(--notebook-line-height));
  background-color: #fffef7 !important;
  background-attachment: fixed;
  color: #24292f !important;
  /* Force dark text on light notebook background */
}

/* Site Structure */
.site-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar - Fixed Left */
.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  background: rgba(246, 248, 250, 0.98);
  border-right: 1px solid #d0d7de;
  z-index: 100;
  transition: left 0.3s ease;
}

.sidebar.open {
  left: 0;
}

/* Sidebar Toggle Tab */
.sidebar-toggle {
  position: fixed;
  top: 20px;
  left: 0;
  width: 40px;
  height: 60px;
  background: rgba(246, 248, 250, 0.98);
  border: 1px solid #d0d7de;
  border-left: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: left 0.3s ease;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-toggle:hover {
  background: #e8ecf0;
}

.sidebar.open + .sidebar-toggle {
  left: 260px;
}

/* Main Content - Offset for Sidebar */
.main-container {
  flex: 1;
  margin-left: 0;
  margin-right: 0;
  display: flex;
}

/* When no sidebar, remove the margin */
.content-main.full-width {
  margin-left: 0;
}

.content-main {
  max-width: 1000px;
  padding: 0;
  line-height: var(--notebook-line-height);
}

.content-wrapper {
  padding-top: calc(var(--notebook-line-height) * 0.5);
  padding-bottom: calc(var(--notebook-line-height) * 2);
  padding-left: 90px;
  padding-right: 40px;
  max-width: 1000px;
  margin: 0;
}

/* Sidebar Navigation */
.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid #d0d7de;
}

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #57606a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px);
}

/* Chapter Tabs */
.chapter-tabs {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #d0d7de;
  padding: 0.5rem;
  gap: 2px;
  background: #f6f8fa;
}

.chapter-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
  width: 100%;
}

.chapter-tab:hover:not(.disabled) {
  background: #dfe2e5;
}

.chapter-tab.active {
  background: #ffffff;
  font-weight: 500;
}

.chapter-tab.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tab-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #57606a;
}

.chapter-tab.active .tab-number {
  color: #0969da;
}

.tab-title {
  font-size: 0.75rem;
  color: #24292f;
}

/* Chapter Content Panels */
.chapter-content-panels {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.chapter-panel {
  display: none;
  padding: 0.5rem 0;
}

.chapter-panel.active {
  display: block;
}

/* Section Links */
.nav-sections {
  list-style: none;
  padding: 0 0 0 2rem;
  margin: 0.25rem 0;
}

.section-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 1rem;
  color: #57606a;
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: all 0.15s;
}

.section-link:hover {
  background: #dfe2e5;
  color: #24292f;
  text-decoration: none;
}

.section-link.current {
  background: #ddf4ff;
  color: #0969da;
  font-weight: 500;
}

.section-link.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.section-time {
  font-size: 0.75rem;
  color: #6e7781;
}

/* Chapter Header */
.chapter-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #d0d7de;
}

.chapter-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.chapter-meta .chapter-number {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #0969da;
  color: white;
  font-weight: 600;
  border-radius: 4px;
  min-width: auto;
  height: auto;
}

.chapter-meta .section-number {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #ddf4ff;
  color: #0969da;
  font-weight: 600;
  border-radius: 4px;
}

.chapter-header .chapter-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.chapter-description {
  font-size: 1.125rem;
  color: #57606a;
}

/* Homepage Sections */
.hero-section {
  padding: 0;
  text-align: left;
  margin-bottom: calc(var(--notebook-line-height) * 2);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0;
  margin-top: 0;
  line-height: calc(var(--notebook-line-height) * 2);
}

.hero-description {
  font-size: 1.125rem;
  color: #57606a;
  max-width: 100%;
  margin-top: 0;
  margin-bottom: 0;
  line-height: var(--notebook-line-height);
}

.hero-section .section-title,
.chapter-grid .section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: var(--notebook-line-height);
  padding-bottom: 0;
  border-bottom: none;
  display: block;
  line-height: var(--notebook-line-height);
}

/* Chapter Grid */
.chapter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--notebook-line-height);
  margin-bottom: calc(var(--notebook-line-height) * 2);
}

/* Info Section - Universal styled section with background */
.info-section {
  margin-bottom: calc(var(--notebook-line-height) * 2);
  background-color: #f6f8fa;
  padding: var(--notebook-line-height);
  border-radius: 6px;
  border-left: 4px solid #0366d6;
}

.info-section h2 {
  margin-top: 0;
  margin-bottom: var(--notebook-line-height);
  font-size: 1.25rem;
  color: #24292e;
  line-height: var(--notebook-line-height);
}

.info-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0;
  line-height: var(--notebook-line-height);
}

.info-section p {
  margin-top: 0;
  margin-bottom: var(--notebook-line-height);
  color: #586069;
  line-height: var(--notebook-line-height);
}

.info-section ul {
  margin-top: 0;
  margin-bottom: var(--notebook-line-height);
  padding-left: 1.5rem;
  color: #586069;
}

.info-section ul li {
  line-height: var(--notebook-line-height);
  margin: 0;
}

.info-section-divider {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: var(--notebook-line-height);
  border-top: 1px solid #e1e4e8;
}

.info-section .disclaimer {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 0.875rem;
  color: #586069;
  line-height: var(--notebook-line-height);
}

.info-subsection {
  margin-bottom: var(--notebook-line-height);
}

.info-subsection:last-child {
  margin-bottom: 0;
}

/* Cards */
.card {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: var(--notebook-line-height);
  background: rgba(255, 255, 255, 0.8);
  transition: box-shadow 0.15s, transform 0.15s;
  line-height: var(--notebook-line-height);
}

.card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0;
  line-height: var(--notebook-line-height);
}

.card-title a {
  color: #0969da;
  text-decoration: none;
}

.card-title a:hover {
  text-decoration: underline;
}

.card-description {
  color: #57606a;
  font-size: 0.875rem;
  margin-top: 0;
  margin-bottom: 0;
  line-height: var(--notebook-line-height);
}

/* Notebook Study Elements */
/* Post-it Notes */
.post-it {
  background: #fef3c7;
  padding: calc(var(--notebook-line-height) * 0.75);
  margin: var(--notebook-line-height) 0;
  border-left: 3px solid #f59e0b;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  position: relative;
}

.post-it.blue {
  background: #dbeafe;
  border-left-color: #3b82f6;
}

.post-it.pink {
  background: #fce7f3;
  border-left-color: #ec4899;
}

.post-it.green {
  background: #d1fae5;
  border-left-color: #10b981;
}

/* Highlighter Effects */
.highlight {
  background: #fef3c7;
  padding: 0 2px;
}

.highlight.yellow {
  background: #fef3c7;
}

.highlight.green {
  background: #d1fae5;
}

.highlight.red {
  background: #fecdd3;
}

/* Underline styles for user annotations */
.underline.red {
  text-decoration: underline;
  text-decoration-color: #ef4444;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  background: transparent;
}

/* Simplified text styling */
.simplified {
  background: #dbeafe;
  padding: 0 3px;
  border-radius: 3px;
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: #3b82f6;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: background 0.2s ease;
}

.simplified:hover {
  background: #bfdbfe;
}

/* Underlined emphasis (for content styling) */
.underline-emphasis {
  text-decoration: underline;
  text-decoration-color: #3b82f6;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.underline-emphasis.red {
  text-decoration-color: #ef4444;
}

.underline-emphasis.wavy {
  text-decoration-style: wavy;
}

/* Key Terms Box */
.key-term {
  display: inline-block;
  padding: 2px 8px;
  background: #fff;
  border: 2px solid #3b82f6;
  border-radius: 4px;
  font-weight: 600;
  color: #1e40af;
}

/* Callout Boxes */
.callout {
  margin: var(--notebook-line-height) 0;
  padding: var(--notebook-line-height);
  border-radius: 6px;
  border-left: 4px solid;
}

.callout.tip {
  background: #f0f9ff;
  border-left-color: #0284c7;
}

.callout.tip::before {
  content: "💡 Tip: ";
  font-weight: 600;
  color: #0284c7;
}

.callout.warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
}

.callout.warning::before {
  content: "⚠️ Note: ";
  font-weight: 600;
  color: #f59e0b;
}

.callout.important {
  background: #fef2f2;
  border-left-color: #dc2626;
}

.callout.important::before {
  content: "❗ Important: ";
  font-weight: 600;
  color: #dc2626;
}

/* Margin Notes */
.margin-note {
  position: relative;
  padding-left: 2rem;
}

.margin-note::before {
  content: "✎";
  position: absolute;
  left: 0;
  color: #6b7280;
  font-size: 1.2rem;
}

/* Checkboxes for lists */
.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  position: relative;
  padding-left: 2rem;
}

.checklist li::before {
  content: "☐";
  position: absolute;
  left: 0;
  color: #6b7280;
  font-size: 1.2rem;
}

.checklist li.checked::before {
  content: "☑";
  color: #10b981;
}

/* Pull Quote / Important Statement */
.pull-quote {
  margin: calc(var(--notebook-line-height) * 2) 0;
  padding: var(--notebook-line-height);
  border-top: 3px double #9ca3af;
  border-bottom: 3px double #9ca3af;
  font-size: 1.125rem;
  font-style: italic;
  text-align: center;
  color: #374151;
}

/* Flash Cards Style */
.flash {
  padding: var(--notebook-line-height);
  margin: var(--notebook-line-height) 0;
  border-radius: 6px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
}

.flash-warn {
  background: #fffbeb;
  border-color: #fbbf24;
}

.flash-info {
  background: #eff6ff;
  border-color: #60a5fa;
}

.flash-success {
  background: #f0fdf4;
  border-color: #4ade80;
}

/* Notes Sidebar - Right Side (Yellow Notepad) */
.notes-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  left: min(1090px, 100% - var(--notes-sidebar-min-width));
  height: 100vh;
  background: #fff9e1;
  border-left: 4px solid #b8956f;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 90;
  display: flex;
  flex-direction: column;
}

.notes-sidebar-header {
  padding: 0.75rem 1rem;
  background: #f4e4c1;
  border-bottom: 2px solid #d4a373;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notes-sidebar-header h3 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #8b7355;
  letter-spacing: 0.05em;
}

.notes-sidebar-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: #fff9e1;
}

.notepad-textarea {
  width: 100%;
  height: 100%;
  padding: 1.5rem 1rem 1rem 1rem;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  line-height: 32px;
  color: #2c2c2c;
}

.notepad-textarea::placeholder {
  color: #a89f91;
  font-style: italic;
}

.notepad-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.notepad-line {
  height: 1.8em;
  border-bottom: 1px solid #e8dcc4;
}

.notepad-status {
  font-size: 0.65rem;
  color: #8b7355;
  font-style: italic;
}

/* Custom Context Menu */
.custom-context-menu {
  position: fixed;
  background: white;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 0.25rem;
  z-index: 9999;
  min-width: 180px;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.875rem;
  transition: background 0.1s;
}

.context-menu-item:hover {
  background: #f6f8fa;
}

.context-menu-item.danger:hover {
  background: #fff5f5;
  color: #dc2626;
}

.context-menu-divider {
  height: 1px;
  background: #e1e4e8;
  margin: 0.25rem 0;
}

.context-menu-icon {
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
}

/* Highlight Colors */
.user-highlight {
  cursor: pointer;
  position: relative;
}

.user-highlight:hover::after {
  content: "Double-click to remove";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #24292f;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
}

/* Responsive */
@media (max-width: 1200px) {
  .notes-sidebar {
    transform: translateX(100%);
    transition: transform 0.3s;
  }
  .notes-sidebar.open {
    transform: translateX(0);
  }
  .main-container {
    margin-right: 0;
  }
  .notes-toggle-btn {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0969da;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
  }
  .notes-toggle-btn:hover {
    background: #0550ae;
  }
}
/* Universal Button Styles */
.btn,
.nav-button,
a[class*=button],
button[type=submit],
input[type=submit] {
  display: inline-block;
  padding: 12px 24px;
  background-color: #0969da;
  color: white !important;
  text-decoration: none !important;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.5;
}

.btn:hover,
.nav-button:hover,
a[class*=button]:hover,
button[type=submit]:hover,
input[type=submit]:hover {
  background-color: #0550ae;
  color: white !important;
  text-decoration: none !important;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .main-container {
    margin-left: 0;
    margin-right: 0;
  }
  .chapter-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2rem;
  }
  .notes-sidebar {
    width: 100%;
  }
}
/* Feedback Toast Notification */
.feedback-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: white;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
  max-width: 300px;
}

.feedback-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.feedback-toast.success {
  border-left: 4px solid #10b981;
  color: #065f46;
}

.feedback-toast.error {
  border-left: 4px solid #ef4444;
  color: #991b1b;
}

@media (max-width: 768px) {
  .feedback-toast {
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}
/* ============================================
   REUSABLE COMPONENT STYLES
   Standard styled containers for consistency
   ============================================ */
/* Container Backgrounds - No Gradients */
.styled-container,
.comparison-container,
.info-container {
  background: var(--pastel-gray);
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

/* Stat Cards - Holdings, Metrics, etc. */
.stat-card {
  background: var(--pastel-blue);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card.pink {
  background: var(--pastel-pink);
}

.stat-card.blue {
  background: var(--pastel-blue-light);
}

.stat-card.green {
  background: var(--pastel-green);
}

.stat-card.orange {
  background: var(--pastel-orange);
}

.stat-card.purple {
  background: var(--pastel-purple);
  color: #333;
}

/* Section Headers - No Gradients */
.section-header,
.card-header-styled {
  background: var(--primary-blue);
  color: white;
  padding: 12px 20px;
  border-radius: 6px 6px 0 0;
  font-weight: 700;
}

/* Info Boxes - Warning, Tip, Important */
.info-box {
  padding: 1rem 1.5rem;
  border-radius: 6px;
  margin: 1rem 0;
  border-left: 4px solid;
}

.info-box.warning {
  background: #fff3cd;
  border-left-color: #ffc107;
}

.info-box.tip {
  background: #d1ecf1;
  border-left-color: #0c5460;
}

.info-box.important {
  background: #f8d7da;
  border-left-color: #dc3545;
}

.info-box.note {
  background: #e7f3ff;
  border-left-color: #007bff;
}

/* Example Blocks - Consistent Styling */
.example-block {
  background: #f0f8ff;
  border: 2px solid #007bff;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.example-block h3,
.example-block h4 {
  margin-top: 0;
  color: #0056b3;
}

/* Tables - Risk, Comparison, Data */
.risk-table,
.comparison-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
}

.risk-table th,
.comparison-table th,
.data-table th {
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

.risk-table td,
.comparison-table td,
.data-table td {
  border: 1px solid #d0d7de;
  padding: 12px;
  background: white;
}

.risk-table td:not(:first-child) {
  text-align: right;
}

/* Maturity Badges - for JGB type displays */
.maturity-badge {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 2px;
  white-space: nowrap;
}

.maturity-cell {
  min-width: 120px;
}

/* Cash Flow Examples */
.cashflow-example {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.cashflow-example h4 {
  margin-top: 0;
  color: #212529;
  font-size: 1.1rem;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.risk-table tbody tr:hover,
.comparison-table tbody tr:hover,
.data-table tbody tr:hover {
  background: #f6f8fa;
}

/* Grid Layouts */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .two-col-grid {
    grid-template-columns: 1fr;
  }
}
/* ============================================
   COMPONENT STYLES - Consolidated from markdown files
   Custom components used throughout the chapters
   ============================================ */
/* ========== 01-what-are-jgbs.md ========== */
.formula-box {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.formula-box h4 {
  margin-top: 0;
}

.formula-box p {
  margin-bottom: 0.25rem;
}

.flow-box {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.flow-box h4 {
  margin-top: 0;
  text-align: center;
}

.flow-box ol {
  padding-left: 25px;
  list-style-type: decimal;
}

.flow-box li {
  padding-bottom: 10px;
  position: relative;
}

.flow-box li:not(:last-child) {
  padding-bottom: 20px;
}

.flow-box li:not(:last-child)::after {
  content: "↓";
  position: absolute;
  bottom: 0px;
  left: 40%;
  font-size: 1.2rem;
  font-weight: bold;
  color: #555;
}

.flow-box strong {
  font-size: 1.05em;
}

/* ========== 02-key-characteristics.md ========== */
.char-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.char-table th,
.char-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
}

.char-table th {
  background-color: #f9f9f9;
  font-weight: 600;
  width: 35%;
}

.maturity-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.maturity-table th,
.maturity-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.maturity-table th {
  background-color: #f9f9f9;
  font-weight: 600;
}

.cashflow-example {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.cashflow-example h4 {
  margin-top: 0;
  color: #212529;
  font-size: 1.1rem;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.cashflow-chart-container {
  position: relative;
  padding: 60px 40px 40px 60px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.cashflow-chart {
  position: relative;
  height: 300px;
}

/* Y-Axis */
.cf-y-axis {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 100%;
  background: #495057;
}

.cf-y-axis-label {
  position: absolute;
  left: -50px;
  top: -25px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
  transform: rotate(-90deg);
  transform-origin: left top;
  white-space: nowrap;
}

.cf-y-tick {
  position: absolute;
  left: -8px;
  width: 8px;
  height: 2px;
  background: #495057;
}

.cf-y-tick-label {
  position: absolute;
  right: 15px;
  font-size: 0.75rem;
  color: #6c757d;
  transform: translateY(-50%);
}

/* X-Axis */
.cf-x-axis {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #495057;
}

.cf-x-axis-label {
  position: absolute;
  right: -20px;
  bottom: -30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
}

.cf-x-tick {
  position: absolute;
  bottom: -8px;
  width: 2px;
  height: 8px;
  background: #495057;
}

.cf-x-tick-label {
  position: absolute;
  bottom: -25px;
  font-size: 0.75rem;
  color: #6c757d;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* Cash flow bars */
.cf-bar {
  position: absolute;
  bottom: 0;
  width: 20px;
  background: #60a5fa;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cf-bar:hover {
  opacity: 0.8;
}

.cf-bar.final {
  background: #86efac;
}

.cf-bar-label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  margin-bottom: 5px;
}

.cf-bar:hover .cf-bar-label {
  opacity: 1;
}

@media (max-width: 768px) {
  .cashflow-chart-container {
    padding: 40px 20px 40px 50px;
  }
  .cashflow-chart {
    height: 250px;
  }
}
.maturity-badge {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 2px;
  white-space: nowrap;
}

.maturity-cell {
  min-width: 120px;
}

/* ========== 01-who-issues-jgbs.md ========== */
.issuance-flow-container {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.issuance-flow-step {
  background: white;
  border: 1px solid #dee2e6;
  border-left: 5px solid #007bff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  transition: all 0.3s ease;
}

.issuance-flow-step:hover {
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
  transform: translateX(5px);
}

.issuance-flow-step:nth-child(1) {
  border-left-color: #007bff;
}

.issuance-flow-step:nth-child(2) {
  border-left-color: #6610f2;
}

.issuance-flow-step:nth-child(3) {
  border-left-color: #e83e8c;
}

.issuance-flow-step:nth-child(4) {
  border-left-color: #fd7e14;
}

.issuance-flow-step:nth-child(5) {
  border-left-color: #28a745;
}

.issuance-step-number {
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background: white;
  border: 3px solid;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.issuance-flow-step:nth-child(1) .issuance-step-number {
  border-color: #007bff;
  color: #007bff;
}

.issuance-flow-step:nth-child(2) .issuance-step-number {
  border-color: #6610f2;
  color: #6610f2;
}

.issuance-flow-step:nth-child(3) .issuance-step-number {
  border-color: #e83e8c;
  color: #e83e8c;
}

.issuance-flow-step:nth-child(4) .issuance-step-number {
  border-color: #fd7e14;
  color: #fd7e14;
}

.issuance-flow-step:nth-child(5) .issuance-step-number {
  border-color: #28a745;
  color: #28a745;
}

.issuance-step-actor {
  font-weight: 700;
  font-size: 1.1rem;
  color: #212529;
  margin-bottom: 0.5rem;
  padding-left: 20px;
}

.issuance-step-description {
  color: #495057;
  font-size: 0.95rem;
  line-height: 1.6;
  padding-left: 20px;
}

.issuance-step-badge {
  display: inline-block;
  background: #e7f3ff;
  color: #004085;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
  margin-left: 20px;
}

.issuance-flow-connector {
  text-align: center;
  color: #6c757d;
  font-size: 1.5rem;
  margin: -0.5rem 0;
  font-weight: 700;
}

/* ========== 04-issuance-strategy.md ========== */
.calendar-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.calendar-table th,
.calendar-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.calendar-table th {
  background-color: #f9f9f9;
  font-weight: 600;
  width: 25%;
}

.info-callout {
  background: #e3f2fd;
  border-left: 5px solid #1976d2;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.info-callout h3 {
  margin-top: 0;
  color: #1565c0;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-callout p {
  margin: 0.8rem 0;
  line-height: 1.7;
  color: #424242;
}

.info-callout blockquote {
  margin: 1rem 0;
  padding: 1rem;
  background: white;
  border-left: 3px solid #1976d2;
  border-radius: 4px;
  font-style: italic;
  color: #616161;
}

.info-callout .source-link {
  font-size: 0.9rem;
  color: #1976d2;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
}

.info-callout .source-link:hover {
  text-decoration: underline;
}

.issuance-breakdown-container {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.issuance-visual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

.issuance-chart {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
}

.issuance-stacked-bar {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

.issuance-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.issuance-segment:hover {
  filter: brightness(1.1);
  transform: scaleY(1.05);
}

.issuance-segment.refunding {
  background: #60a5fa;
  width: 0%;
}

.issuance-segment.deficit {
  background: #f87171;
  width: 0%;
}

.issuance-segment.filp {
  background: #fbbf24;
  width: 0%;
}

.issuance-details {
  margin-top: 25px;
}

.issuance-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.issuance-detail-item:hover {
  background: #e9ecef;
}

.issuance-color-box {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex-shrink: 0;
}

.issuance-detail-content {
  flex: 1;
}

.issuance-detail-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #212529;
  margin-bottom: 3px;
}

.issuance-detail-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: #495057;
}

.issuance-detail-percent {
  font-size: 0.85rem;
  color: #6c757d;
  margin-left: 8px;
}

.issuance-total {
  margin-top: 20px;
  padding: 15px;
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  text-align: center;
}

.issuance-total-label {
  font-size: 0.9rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 5px;
}

.issuance-total-amount {
  font-size: 1.8rem;
  font-weight: 700;
  color: #212529;
}

@media (max-width: 768px) {
  .issuance-visual-grid {
    grid-template-columns: 1fr;
  }
}
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.breakdown-table thead {
  background: #334155;
  color: white;
}

.breakdown-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
}

.breakdown-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.breakdown-table tbody tr:hover {
  background: #f8f9fa;
}

.breakdown-table tbody tr:last-child td {
  border-bottom: none;
}

.bond-type-cell {
  font-weight: 600;
  color: #2c3e50;
}

.amount-cell {
  text-align: right;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1976d2;
}

.percent-cell {
  text-align: right;
  color: #616161;
}

.purpose-cell {
  font-size: 0.9rem;
  color: #616161;
}

.total-row {
  background: #f5f5f5;
  font-weight: 700;
  border-top: 3px solid #2c3e50;
}

.total-row .amount-cell {
  color: #2c3e50;
  font-size: 1.15rem;
}

.timeline-container {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  margin: 2rem 0;
}

.timeline-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1rem;
}

.timeline-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 2.5rem;
}

/* Month ruler at top */
.month-ruler {
  position: relative;
  height: 60px;
  margin-bottom: 2rem;
  border-bottom: 3px solid #dee2e6;
}

.month-marker {
  position: absolute;
  width: 8.33%;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
}

.month-marker::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 2px;
  height: 10px;
  background: #6c757d;
}

.month-label {
  display: block;
  margin-bottom: 0.3rem;
}

.month-number {
  display: block;
  font-size: 0.65rem;
  color: #999;
}

/* Process rows */
.timeline-process {
  position: relative;
  margin-bottom: 3rem;
  min-height: 100px;
}

/* Process bars with arrows */
.process-bar {
  position: absolute;
  height: 40px;
  background: var(--bar-color-start, #60a5fa);
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  top: 0;
  transition: transform 0.2s ease;
}

.process-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Arrow tips */
.process-bar::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid var(--bar-color-end);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

/* Milestone dots */
.milestone-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border: 4px solid var(--dot-color);
  border-radius: 50%;
  top: 10px;
  z-index: 2;
  cursor: pointer;
  transition: all 0.2s ease;
}

.milestone-dot:hover {
  transform: scale(1.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Process content boxes */
.process-content {
  background: white;
  border: 2px solid #dee2e6;
  border-left: 5px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem;
  margin-top: 60px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.process-content h4 {
  margin: 0 0 0.8rem 0;
  font-size: 1.05rem;
  color: #212529;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.process-content p {
  margin: 0 0 0.8rem 0;
  color: #495057;
  line-height: 1.6;
  font-size: 0.95rem;
}

.process-actors {
  background: #f8f9fa;
  padding: 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.8rem;
}

.process-actors strong {
  color: #495057;
}

@media (max-width: 768px) {
  .process-bar {
    font-size: 0.7rem;
    height: 30px;
  }
  .month-marker {
    font-size: 0.65rem;
  }
}
/* New simplified vertical timeline for issuance process */
.issuance-process-timeline {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  margin: 2rem 0;
}

.process-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 3px solid #dee2e6;
}

.process-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #212529;
}

.process-header p {
  margin: 0;
  font-size: 0.95rem;
  color: #6c757d;
}

.process-step {
  margin-bottom: 1.5rem;
}

.step-content {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f8f9fa;
}

.step-header h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #212529;
}

.step-quarter {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c757d;
  white-space: nowrap;
}

.step-content p {
  margin: 0 0 1rem 0;
  line-height: 1.6;
  color: #495057;
  font-size: 0.95rem;
}

.step-actors {
  background: #f8f9fa;
  padding: 0.9rem 1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  color: #6c757d;
  border-left: 3px solid #dee2e6;
}

.step-actors strong {
  color: #495057;
  font-weight: 600;
}

/* Color-coded borders for each step */
.step-1 .step-content {
  border-left: 4px solid #007bff;
}

.step-2 .step-content {
  border-left: 4px solid #28a745;
}

.step-3 .step-content {
  border-left: 4px solid #ffc107;
}

.step-4 .step-content {
  border-left: 4px solid #dc3545;
}

.step-final .step-content {
  border-left: 4px solid #6c757d;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .issuance-process-timeline {
    padding: 1.5rem 1rem;
  }
  .step-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  .step-header h4 {
    font-size: 1.05rem;
  }
  .step-quarter {
    font-size: 0.8rem;
  }
  .step-content {
    padding: 1.2rem;
  }
}
/* ========== 12-history-monetary-policy.md ========== */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.history-table {
  width: 100%;
  min-width: 1200px;
  /* Force scroll on smaller screens */
  border-collapse: collapse;
  font-size: 0.85rem;
  /* Adjusted font size for new columns */
}

.history-table th,
.history-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.history-table th {
  background-color: #f9f9f9;
  font-weight: 600;
  min-width: 90px;
}

.history-table td:first-child {
  font-weight: 600;
  width: 12%;
}

.history-table td ul {
  padding-left: 20px;
  margin-top: 0;
  margin-bottom: 0;
}

.timeline-container {
  position: relative;
  padding: 40px 20px;
  margin: 2rem 0;
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
}

.timeline-axis {
  position: relative;
  height: 4px;
  background: #6c757d;
  margin: 80px 40px 60px 40px;
}

.timeline-event {
  position: absolute;
  transform: translateX(-50%);
  cursor: pointer;
  transition: all 0.3s;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  border: 3px solid;
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.timeline-event:hover .timeline-dot {
  transform: translateX(-50%) scale(1.3);
}

.timeline-label {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 2px solid;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.timeline-year {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: #6c757d;
  font-weight: 600;
  white-space: nowrap;
}

.timeline-target {
  position: absolute;
  top: -90px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: #495057;
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  font-weight: 600;
}

/* Color coding by policy type */
.policy-hike {
  border-color: #dc3545;
  background-color: #dc3545;
}

.policy-zirp {
  border-color: #007bff;
  background-color: #007bff;
}

.policy-qe {
  border-color: #17a2b8;
  background-color: #17a2b8;
}

.policy-nirp {
  border-color: #6f42c1;
  background-color: #6f42c1;
}

.policy-ycc {
  border-color: #fd7e14;
  background-color: #fd7e14;
}

.policy-normalization {
  border-color: #28a745;
  background-color: #28a745;
}

.timeline-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.timeline-detail {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none;
}

.timeline-detail.active {
  display: block;
}

.timeline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.timeline-overlay.active {
  display: block;
}

.detail-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.detail-close:hover {
  background: #495057;
}

.detail-grid {
  display: grid;
  gap: 15px;
  margin-top: 15px;
}

.detail-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  border-left: 4px solid #007bff;
}

.detail-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 5px;
}

.detail-value {
  color: #212529;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .timeline-axis {
    margin: 100px 20px 80px 20px;
  }
  .timeline-label {
    font-size: 0.65rem;
    padding: 4px 8px;
  }
  .timeline-target {
    font-size: 0.6rem;
  }
}
/* ========== 14-shape-of-yield-curve.md ========== */
.curve-shapes-container {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.curve-selector {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.curve-btn {
  background: white;
  border: 2px solid #dee2e6;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  color: #495057;
}

.curve-btn:hover {
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.curve-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.curve-canvas-wrapper {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 1.5rem;
}

.curve-canvas {
  width: 100%;
  height: 300px;
  position: relative;
}

.curve-info {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
}

.curve-info h4 {
  margin-top: 0;
  color: #212529;
  font-size: 1.2rem;
}

.curve-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
}

.curve-info-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
}

.curve-info-label {
  font-weight: 600;
  color: #495057;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.curve-info-value {
  font-size: 1rem;
  color: #212529;
}

@media (max-width: 768px) {
  .curve-info-grid {
    grid-template-columns: 1fr;
  }
}
/* ========== 01-bojnet.md ========== */
.bojnet-container {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.bojnet-section {
  background: white;
  border-left: 4px solid #28a745;
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.bojnet-section:last-child {
  margin-bottom: 0;
}

.bojnet-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.75rem;
}

.system-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.flow-step {
  background: #f0f8ff;
  border: 2px solid #007bff;
  border-radius: 6px;
  padding: 15px;
  text-align: center;
  position: relative;
}

.flow-number {
  display: inline-block;
  background: #007bff;
  color: white;
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 50%;
  font-weight: 700;
  margin-bottom: 10px;
}

.flow-label {
  font-weight: 600;
  color: #212529;
  font-size: 0.95rem;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.results-table th,
.results-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.results-table th {
  background-color: #f9f9f9;
  font-weight: 600;
  width: 30%;
}

/* ========== 02-auction-process.md ========== */
.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.results-table th,
.results-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.results-table th {
  background-color: #f9f9f9;
  font-weight: 600;
  width: 30%;
}

.auction-comparison {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.auction-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 1.5rem;
}

.auction-type-card {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
}

.auction-type-card.jgb {
  border-left: 5px solid #dc3545;
}

.auction-type-card.ust {
  border-left: 5px solid #28a745;
}

.auction-type-header {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.auction-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.badge-jgb {
  background: #f8d7da;
  color: #721c24;
}

.badge-ust {
  background: #d4edda;
  color: #155724;
}

@media (max-width: 768px) {
  .auction-type-grid {
    grid-template-columns: 1fr;
  }
}
.auction-format-container {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.format-card {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.format-card:last-child {
  margin-bottom: 0;
}

.format-header {
  background: #f8f9fa;
  color: white;
  padding: 12px 20px;
  border-radius: 6px 6px 0 0;
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.example-auction {
  background: #f0f8ff;
  border: 2px solid #007bff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.bid-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.bid-table th,
.bid-table td {
  border: 1px solid #dee2e6;
  padding: 10px 12px;
  text-align: left;
}

.bid-table th {
  background-color: #007bff;
  color: white;
  font-weight: 600;
}

.bid-accepted {
  background-color: #d4edda;
  font-weight: 600;
}

.bid-rejected {
  background-color: #f8d7da;
  opacity: 0.7;
}

.calc-highlight {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 12px;
  margin: 12px 0;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
}

.actual-results-container {
  background: #f8f9fa;
  border: 2px solid #007bff;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.results-header {
  background: #f8f9fa;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  margin: -2rem -2rem 1.5rem -2rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

.live-data-badge {
  display: inline-block;
  background: #ffc107;
  color: #212529;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-left: 10px;
}

/* ========== 03-issuance-schedules.md ========== */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.schedule-table th,
.schedule-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.schedule-table th {
  background-color: #f9f9f9;
  font-weight: 600;
  width: 25%;
}

.reopening-container {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.issue-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 1.5rem;
}

.issue-card {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
}

.issue-card.new {
  border-left: 5px solid #007bff;
}

.issue-card.reopening {
  border-left: 5px solid #28a745;
}

.issue-header {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .issue-comparison {
    grid-template-columns: 1fr;
  }
}
/* ========== 04-buybacks.md ========== */
.buyback-container {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.buyback-type {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.buyback-type:last-child {
  margin-bottom: 0;
}

.buyback-header {
  background: #f8f9fa;
  color: white;
  padding: 12px 20px;
  border-radius: 6px 6px 0 0;
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.example-box {
  background: #f0f8ff;
  border: 2px solid #007bff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.calc-step {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 10px 15px;
  margin: 10px 0;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

/* ========== 05-market-participants.md ========== */
.participants-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.participants-table th,
.participants-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.participants-table th {
  background-color: #f9f9f9;
  font-weight: 600;
  width: 20%;
}

.dealer-container {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.dealer-category {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.dealer-category:last-child {
  margin-bottom: 0;
}

.dealer-header {
  background: #f8f9fa;
  color: white;
  padding: 12px 20px;
  border-radius: 6px 6px 0 0;
  margin: -1.5rem -1.5rem 1rem -1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.dealer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.dealer-item {
  background: #f8f9fa;
  padding: 10px 15px;
  border-left: 3px solid #007bff;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* ========== 06-futures.md ========== */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.specs-table th,
.specs-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.specs-table th {
  background-color: #f9f9f9;
  font-weight: 600;
  width: 30%;
}

.contracts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 2rem 0;
}

.contract-card {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.contract-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.contract-card.benchmark {
  border-left: 5px solid #28a745;
}

.contract-card.mini {
  border-left: 5px solid #007bff;
}

.contract-card.medium {
  border-left: 5px solid #ffc107;
}

.contract-card.long {
  border-left: 5px solid #e74c3c;
}

.contract-header {
  font-size: 1.2rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.5rem;
}

.contract-ticker {
  display: inline-block;
  background: #f8f9fa;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.contract-specs {
  font-size: 0.9rem;
  line-height: 1.8;
}

.contract-specs li {
  margin-bottom: 8px;
}

.contract-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 10px;
}

.badge-benchmark {
  background: #d4edda;
  color: #155724;
}

.badge-retail {
  background: #d1ecf1;
  color: #0c5460;
}

.badge-institutional {
  background: #f8d7da;
  color: #721c24;
}

.notional-explainer {
  background: #f8f9fa;
  border: 2px solid #f0ad4e;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.explainer-section {
  background: white;
  border-left: 4px solid #f0ad4e;
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.explainer-section:last-child {
  margin-bottom: 0;
}

.explainer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.75rem;
}

/* ========== 07-ctd.md ========== */
.settlement-comparison {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.settlement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 1.5rem;
}

.settlement-card {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.settlement-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.settlement-card.cash {
  border-left: 5px solid #3498db;
}

.settlement-card.physical {
  border-left: 5px solid #e74c3c;
}

.settlement-header {
  font-size: 1.3rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1rem;
}

.settlement-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.settlement-label.cash {
  background: #e7f3ff;
  color: #004085;
}

.settlement-label.physical {
  background: #f8d7da;
  color: #721c24;
}

.settlement-feature {
  padding: 10px 0;
  border-bottom: 1px solid #e9ecef;
}

.settlement-feature:last-child {
  border-bottom: none;
}

.settlement-feature-label {
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.settlement-feature-value {
  color: #212529;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .settlement-grid {
    grid-template-columns: 1fr;
  }
}
.basket-rationale {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
}

.rationale-item {
  background: white;
  border-left: 4px solid #007bff;
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.rationale-item:last-child {
  margin-bottom: 0;
}

.rationale-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.75rem;
}

.rationale-content {
  color: #495057;
  font-size: 0.95rem;
  line-height: 1.6;
}

.rationale-example {
  background: #e7f3ff;
  border-left: 3px solid #007bff;
  padding: 10px 15px;
  margin-top: 10px;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* ========== 12-auction-theory.md ========== */
.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.results-table th,
.results-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.results-table th {
  background-color: #f9f9f9;
  font-weight: 600;
}

.formula-box {
  background: #f0f8ff;
  border-left: 4px solid #1976d2;
  padding: 1rem;
  margin: 1rem 0;
}

/* ========== 01-macaulay-duration.md ========== */
.risk-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.risk-table th,
.risk-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.risk-table th {
  background-color: #f9f9f9;
  font-weight: 600;
}

.risk-table td:not(:first-child) {
  text-align: right;
}

/* ========== 07-liquidity-risk.md ========== */
.liquidity-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.liquidity-table th,
.liquidity-table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.liquidity-table th {
  background-color: #f9f9f9;
  font-weight: 600;
}

.callout-liquidity {
  background: #f8f9fa;
  border-left: 4px solid #1976d2;
  padding: 1.2rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

/* Mathematical Content Styles */
/* Math Display */
.math-display {
  margin: var(--space-6) 0;
  padding: var(--space-4);
  background: var(--color-math-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-math);
}

/* MathJax Styling */
.MathJax {
  outline: none;
  background: #ffffff !important;
  padding: 3px 6px !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid #e5e7eb !important;
}

.MathJax_Display {
  margin: var(--space-6) 0 !important;
  text-align: center;
  background: #ffffff !important;
  padding: var(--space-6);
  border-radius: var(--radius);
  border: 1px solid #e5e7eb;
}

.MathJax_CHTML {
  color: #24292f !important;
}

.MathJax_Display * {
  color: #24292f !important;
}

/* MathJax container elements */
mjx-container {
  background: #ffffff !important;
  padding: 3px 6px !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid #e5e7eb !important;
}

mjx-container[display=true] {
  padding: var(--space-4) !important;
  margin: var(--space-6) auto !important;
  border: 1px solid #e5e7eb !important;
  display: block;
  text-align: center;
}

/* Increase spacing between rows in aligned equations */
mjx-mtable mjx-mtr + mjx-mtr {
  margin-top: 1em;
}

/* Inline Math */
.math-inline,
code.language-math,
span.math.inline,
.katex {
  background: #ffffff;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  color: #24292f !important;
  border: 1px solid #e5e7eb;
}

/* Ensure inline math content is dark */
.math-inline *,
code.language-math *,
span.math.inline *,
.katex * {
  color: #24292f !important;
}

/* Formula Boxes */
.formula-box {
  background: #ffffff !important;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: var(--space-6);
  margin: var(--space-6) 0;
  position: relative;
  color: #24292f !important;
}

/* Force dark text for all math content */
.formula-box *,
.formula-box .katex,
.formula-box .katex *,
.formula-box .katex-display,
.formula-box .katex-html,
.formula-box strong,
.formula-box span,
.MathJax_Display .katex,
.MathJax_Display .katex *,
.MathJax_Display .katex-display,
.MathJax_Display .katex-html,
.katex,
.katex *,
.katex-display,
.katex-display *,
.katex-html,
.katex-html * {
  color: #24292f !important;
}

.formula-title {
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.formula-description {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-style: italic;
}

/* Variable Definitions */
.variable-definitions {
  background: var(--color-bg-secondary);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

.variable-definitions h4 {
  margin-bottom: var(--space-3);
  font-size: var(--text-lg);
  color: var(--color-text);
}

.variable-list {
  display: grid;
  gap: var(--space-2);
}

.variable-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: baseline;
}

.variable-symbol {
  font-family: var(--font-family-mono);
  font-weight: var(--font-semibold);
  color: var(--color-math);
  background: var(--color-math-bg);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.variable-meaning {
  color: var(--color-text-secondary);
}

/* Mathematical Examples */
.math-example {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
  overflow: hidden;
}

.example-header {
  background: var(--primary-50);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.example-title {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--primary-700);
}

.example-body {
  padding: var(--space-6);
}

.example-step {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
}

.example-step:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--primary-600);
  color: white;
  border-radius: 50%;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin-right: var(--space-3);
}

.step-title {
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.step-content {
  margin-left: calc(24px + var(--space-3));
}

/* Calculation Tables */
.calculation-table {
  width: 100%;
  margin: var(--space-4) 0;
  border-collapse: collapse;
  font-family: var(--font-family-mono);
  font-size: var(--text-sm);
}

.calculation-table th,
.calculation-table td {
  padding: var(--space-2) var(--space-3);
  text-align: right;
  border: 1px solid var(--color-border);
}

.calculation-table th {
  background: var(--color-bg-tertiary);
  font-weight: var(--font-semibold);
  color: var(--color-text);
}

.calculation-table .formula-cell {
  font-style: italic;
  color: var(--color-math);
}

.calculation-table .result-cell {
  background: var(--primary-50);
  font-weight: var(--font-semibold);
  color: var(--primary-700);
}

/* Mathematical Notation */
.fraction {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
}

.numerator,
.denominator {
  display: block;
  text-align: center;
}

.fraction-line {
  width: 100%;
  height: 1px;
  background: var(--color-text);
  margin: 2px 0;
}

/* Superscript and Subscript */
.math-sup {
  vertical-align: super;
  font-size: 0.8em;
}

.math-sub {
  vertical-align: sub;
  font-size: 0.8em;
}

/* Mathematical Symbols */
.math-symbol {
  font-family: "Times New Roman", serif;
  font-weight: normal;
  font-style: normal;
}

.sigma {
  font-size: 1.2em;
}

.integral {
  font-size: 1.3em;
}

.greek {
  font-style: italic;
}

/* Equation Numbering */
.equation-number {
  float: right;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

/* Mathematical Proofs */
.proof {
  background: var(--color-bg-secondary);
  border-left: 4px solid var(--color-accent);
  padding: var(--space-4);
  margin: var(--space-6) 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.proof-title {
  font-weight: var(--font-semibold);
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.qed {
  float: right;
  font-weight: var(--font-bold);
  color: var(--color-accent);
}

/* Interactive Math */
.interactive-math {
  background: var(--color-bg-secondary);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-6) 0;
  text-align: center;
}

.math-input {
  font-family: var(--font-family-mono);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  text-align: center;
  width: 100px;
  margin: 0 var(--space-2);
}

.math-result {
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: var(--font-semibold);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  margin-top: var(--space-4);
  display: inline-block;
}

/* Dark Theme Math Adjustments */
[data-theme=dark] .formula-box {
  border-color: var(--primary-400);
}

[data-theme=dark] .formula-box::before {
  background: var(--primary-400);
}

[data-theme=dark] .variable-symbol {
  background: var(--color-bg-tertiary);
  color: var(--primary-400);
}

[data-theme=dark] .example-header {
  background: var(--primary-900);
}

[data-theme=dark] .example-title {
  color: var(--primary-300);
}

[data-theme=dark] .step-number {
  background: var(--primary-500);
}

[data-theme=dark] .calculation-table .result-cell {
  background: var(--primary-900);
  color: var(--primary-300);
}

[data-theme=dark] .math-result {
  background: var(--primary-900);
  color: var(--primary-300);
}

/* Print Styles for Math */
@media print {
  .formula-box,
  .math-example,
  .variable-definitions {
    border: 1px solid #000 !important;
    background: white !important;
    color: black !important;
  }
  .formula-box::before {
    background: black !important;
    color: white !important;
  }
  .MathJax_CHTML {
    color: black !important;
  }
  .interactive-math {
    display: none;
  }
}
/* Search Styles */
/* Search Overlay - Main container that covers the entire screen */
.search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal);
  backdrop-filter: blur(2px);
}

.search-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-16) var(--space-4);
  overflow-y: auto;
}

.search-container {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  transform: translateY(-50px);
  transition: transform 0.2s ease;
}

.search-overlay.active .search-container {
  transform: translateY(0);
}

/* Search Header */
.search-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.search-input-wrapper {
  flex: 1;
  position: relative;
}

.searchInput {
  width: 100%;
  padding: var(--space-3) var(--space-10) var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  background: var(--color-bg);
  color: var(--color-text);
}

.searchInput:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.search-icon {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

.search-close {
  background: none;
  border: none;
  padding: var(--space-2);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-close:hover {
  background: var(--color-bg-secondary);
  color: var(--color-text);
}

/* Search Content */
.search-content {
  padding: var(--space-4);
  max-height: 60vh;
  overflow-y: auto;
}

/* Search Modal */
.search-modal-content {
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.search-form {
  margin-bottom: var(--space-4);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

#search-input {
  width: 100%;
  padding: var(--space-4) var(--space-12) var(--space-4) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-lg);
  background: var(--color-bg);
  color: var(--color-text);
  transition: all 0.2s ease;
}

#search-input:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.search-input-icon {
  position: absolute;
  right: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-xl);
  pointer-events: none;
}

/* Search Trigger Button */
.search-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.search-trigger:hover {
  color: var(--color-text);
  border-color: var(--primary-600);
}

.search-shortcut {
  background: var(--color-bg-tertiary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-family: var(--font-family-mono);
}

/* Search Results */
.search-results {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
  margin-bottom: var(--space-4);
}

.search-results-header {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-3);
}

.search-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-medium);
}

/* Search Result Items */
.search-result {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
  transition: all 0.2s ease;
  cursor: pointer;
}

.search-result:hover,
.search-result.focused {
  border-color: var(--primary-600);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.search-result-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.search-icon {
  font-size: var(--text-lg);
  margin-top: 2px;
}

.search-title {
  flex: 1;
  margin: 0;
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
}

.search-title a {
  color: var(--color-text);
  text-decoration: none;
}

.search-title a:hover {
  color: var(--primary-600);
}

.search-badge {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  white-space: nowrap;
}

.chapter-badge {
  background: var(--primary-100);
  color: var(--primary-700);
}

.page-badge {
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
}

.search-excerpt {
  margin: 0 0 var(--space-3) calc(var(--text-lg) + var(--space-3));
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.search-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-left: calc(var(--text-lg) + var(--space-3));
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Search Highlighting */
mark {
  background: var(--primary-200);
  color: var(--primary-800);
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: var(--font-medium);
}

/* Search Loading and Empty States */
.search-loading {
  text-align: center;
  padding: var(--space-8);
  color: var(--color-text-secondary);
}

.search-no-results {
  text-align: center;
  padding: var(--space-8);
}

.search-no-results p:first-child {
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

/* Search Help */
.search-help {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  padding: var(--space-4);
  background: var(--color-bg-secondary);
  border-radius: var(--radius);
  border-top: 1px solid var(--color-border);
}

.search-tips h4 {
  margin: 0 0 var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.search-tips ul {
  margin: 0;
  padding-left: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.search-tips li {
  margin-bottom: var(--space-1);
}

.search-shortcuts {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-family-mono);
  font-size: var(--text-xs);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive Search */
@media (max-width: 768px) {
  .search-modal-content {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }
  #search-input {
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-10) var(--space-3) var(--space-3);
  }
  .search-help {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .search-shortcuts {
    justify-content: center;
  }
  .search-trigger .search-text {
    display: none;
  }
  .search-trigger .search-shortcut {
    display: none;
  }
  .search-result-header {
    flex-wrap: wrap;
  }
  .search-badge {
    order: -1;
    width: fit-content;
  }
  .search-meta {
    margin-left: 0;
  }
}
/* Dark Theme Search */
[data-theme=dark] .search-trigger {
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

[data-theme=dark] .search-trigger:hover {
  border-color: var(--primary-500);
  color: var(--color-text);
}

[data-theme=dark] #search-input {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

[data-theme=dark] #search-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-900);
}

[data-theme=dark] .search-result:hover,
[data-theme=dark] .search-result.focused {
  border-color: var(--primary-500);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme=dark] .chapter-badge {
  background: var(--primary-900);
  color: var(--primary-300);
}

[data-theme=dark] mark {
  background: var(--primary-800);
  color: var(--primary-200);
}

[data-theme=dark] kbd {
  background: var(--color-bg-tertiary);
  border-color: var(--color-border);
  color: var(--color-text);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .search-result {
    border-width: 2px;
  }
  .search-result:hover,
  .search-result.focused {
    border-width: 2px;
    border-color: var(--primary-600);
  }
  mark {
    background: yellow;
    color: black;
  }
}
/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .search-result {
    transition: none;
  }
  .search-result:hover,
  .search-result.focused {
    transform: none;
  }
}
/* Print Styles */
@media print {
  .search-modal,
  .search-trigger {
    display: none !important;
  }
}
/* CSS Variables and Theme Definitions */
:root {
  /* Color palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  /* Semantic colors */
  --color-bg: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #f1f5f9;
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  /* Interactive colors */
  --color-link: var(--primary-600);
  --color-link-hover: var(--primary-700);
  --color-accent: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-success: #10b981;
  /* Math colors */
  --color-math: #7c3aed;
  --color-math-bg: #f3f4f6;
  --color-formula: #1f2937;
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  /* Border radius */
  --radius-sm: 0.25rem;
  --radius: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  /* Typography */
  --font-family-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-family-mono: "SF Mono", "Monaco", "Inconsolata", "Roboto Mono", monospace;
  /* Font sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  /* Line heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  /* Font weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  /* Layout */
  --sidebar-width: 280px;
  --header-height: 4rem;
  --container-max-width: 1200px;
  --content-max-width: 800px;
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;
  /* Z-index layers */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* Dark theme variables */
[data-theme=dark] {
  --color-bg: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-tertiary: #334155;
  --color-text: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-border: #334155;
  --color-border-light: #475569;
  --color-math-bg: #1e293b;
  --color-formula: #f8fafc;
  /* Adjust shadows for dark theme */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

/* Auto theme detection */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --color-bg: #0f172a;
    --color-bg-secondary: #1e293b;
    --color-bg-tertiary: #334155;
    --color-text: #f8fafc;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-border: #334155;
    --color-border-light: #475569;
    --color-math-bg: #1e293b;
    --color-formula: #f8fafc;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  }
}
/* Reading mode adjustments */
.reading-mode {
  --color-bg: #fffef7;
  --color-text: #2d2d2d;
  --font-family-sans: "Georgia", "Times New Roman", serif;
  --text-base: 1.125rem;
  --leading-normal: 1.6;
}

/* Print Styles */
@media print {
  /* Reset and Base */
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  /* Page Setup */
  @page {
    margin: 1in;
    size: A4;
  }
  /* Body and Layout */
  body {
    font-size: 12pt;
    line-height: 1.4;
    font-family: "Times New Roman", serif;
  }
  .container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  /* Hide Interactive Elements */
  .nav,
  .sidebar,
  .header,
  .footer,
  .btn,
  .modal,
  .tooltip,
  .interactive-math,
  .calculator,
  .progress-tracker,
  .search-box,
  .theme-toggle,
  .login-btn,
  .hidden-print {
    display: none !important;
  }
  /* Show Print-Only Elements */
  .visible-print {
    display: block !important;
  }
  /* Content Area */
  .content-wrapper {
    display: block;
    grid-template-columns: none;
    gap: 0;
  }
  .main-content {
    margin: 0;
    padding: 0;
    width: 100%;
  }
  .chapter-content {
    max-width: none;
    padding: 0;
    margin: 0;
  }
  /* Typography */
  h1 {
    font-size: 24pt;
    margin-top: 0;
    margin-bottom: 12pt;
    page-break-after: avoid;
  }
  h2 {
    font-size: 20pt;
    margin-top: 24pt;
    margin-bottom: 10pt;
    page-break-after: avoid;
  }
  h3 {
    font-size: 16pt;
    margin-top: 18pt;
    margin-bottom: 8pt;
    page-break-after: avoid;
  }
  h4 {
    font-size: 14pt;
    margin-top: 14pt;
    margin-bottom: 6pt;
    page-break-after: avoid;
  }
  h5,
  h6 {
    font-size: 12pt;
    margin-top: 12pt;
    margin-bottom: 6pt;
    page-break-after: avoid;
  }
  p {
    margin-bottom: 8pt;
    text-align: justify;
    orphans: 3;
    widows: 3;
  }
  /* Lists */
  ul,
  ol {
    margin-bottom: 8pt;
    padding-left: 18pt;
  }
  li {
    margin-bottom: 3pt;
  }
  /* Links */
  a {
    color: black !important;
    text-decoration: underline;
  }
  a[href^=http]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }
  a[href^="#"]:after {
    content: "";
  }
  /* Tables */
  table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 12pt;
    page-break-inside: avoid;
  }
  th,
  td {
    border: 1px solid black;
    padding: 4pt 6pt;
    text-align: left;
    vertical-align: top;
  }
  th {
    background: #f0f0f0 !important;
    font-weight: bold;
  }
  .calculation-table {
    font-size: 10pt;
  }
  /* Mathematical Content */
  .formula-box {
    border: 2px solid black !important;
    margin: 12pt 0;
    padding: 8pt;
    page-break-inside: avoid;
  }
  .formula-box::before {
    background: black !important;
    color: white !important;
  }
  .math-example {
    border: 1px solid black !important;
    margin: 12pt 0;
    page-break-inside: avoid;
  }
  .example-header {
    background: #f0f0f0 !important;
    border-bottom: 1px solid black !important;
  }
  .variable-definitions {
    border: 1px solid black !important;
    background: #f8f8f8 !important;
    margin: 8pt 0;
    padding: 6pt;
  }
  .MathJax_CHTML {
    color: black !important;
  }
  /* Code Blocks */
  pre,
  code {
    font-family: "Courier New", monospace;
    font-size: 10pt;
    background: #f5f5f5 !important;
    border: 1px solid black;
    padding: 4pt;
  }
  pre {
    page-break-inside: avoid;
    margin: 8pt 0;
    white-space: pre-wrap;
  }
  /* Blockquotes */
  blockquote {
    border-left: 3px solid black;
    margin: 8pt 0;
    padding-left: 12pt;
    font-style: italic;
    page-break-inside: avoid;
  }
  /* Cards (Convert to Simple Boxes) */
  .card {
    border: 1px solid black !important;
    margin-bottom: 12pt;
    padding: 8pt;
    page-break-inside: avoid;
  }
  .card-title {
    font-weight: bold;
    margin-bottom: 6pt;
  }
  /* Alerts */
  .alert {
    border: 2px solid black !important;
    margin: 8pt 0;
    padding: 6pt;
    page-break-inside: avoid;
  }
  .alert::before {
    content: "⚠ ";
    font-weight: bold;
  }
  .alert-info::before {
    content: "ℹ ";
  }
  .alert-success::before {
    content: "✓ ";
  }
  .alert-danger::before {
    content: "⚠ ";
  }
  /* Page Breaks */
  .page-break-before {
    page-break-before: always;
  }
  .page-break-after {
    page-break-after: always;
  }
  .page-break-inside-avoid {
    page-break-inside: avoid;
  }
  /* Chapter Breaks */
  .chapter {
    page-break-before: always;
  }
  .chapter:first-child {
    page-break-before: auto;
  }
  /* Header and Footer for Print */
  .print-header {
    display: block !important;
    text-align: center;
    font-size: 10pt;
    margin-bottom: 12pt;
    border-bottom: 1px solid black;
    padding-bottom: 6pt;
  }
  .print-footer {
    display: block !important;
    text-align: center;
    font-size: 10pt;
    margin-top: 12pt;
    border-top: 1px solid black;
    padding-top: 6pt;
  }
  /* Print Utilities */
  .print-only {
    display: block !important;
  }
  .no-print {
    display: none !important;
  }
  /* Chapter TOC for Print */
  .print-toc {
    display: block !important;
    margin-bottom: 24pt;
    page-break-after: always;
  }
  .print-toc h2 {
    margin-top: 0;
  }
  .print-toc ul {
    list-style-type: none;
    padding-left: 0;
  }
  .print-toc li {
    margin-bottom: 6pt;
  }
  .print-toc a {
    text-decoration: none;
    display: flex;
    justify-content: space-between;
  }
  .print-toc a::after {
    content: target-counter(attr(href), page);
    font-weight: normal;
  }
  /* Footnotes */
  .footnote {
    font-size: 10pt;
    vertical-align: super;
  }
  .footnotes {
    border-top: 1px solid black;
    margin-top: 24pt;
    padding-top: 12pt;
    font-size: 10pt;
  }
  /* Images */
  img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
  }
  .figure {
    text-align: center;
    margin: 12pt 0;
    page-break-inside: avoid;
  }
  .figure-caption {
    font-size: 10pt;
    font-style: italic;
    margin-top: 6pt;
  }
  /* Specific JGB Content */
  .bond-calculation {
    page-break-inside: avoid;
    border: 1px solid black;
    padding: 8pt;
    margin: 12pt 0;
  }
  .yield-table {
    font-size: 10pt;
    page-break-inside: avoid;
  }
  .risk-metrics {
    border: 1px solid black;
    padding: 6pt;
    margin: 8pt 0;
    background: #f8f8f8 !important;
  }
  /* Progress Indicators (Hide but Show Info) */
  .progress-info {
    display: block !important;
    font-size: 10pt;
    margin-bottom: 6pt;
    font-style: italic;
  }
  /* Exercise Solutions */
  .solution {
    border: 1px dashed black;
    padding: 8pt;
    margin: 12pt 0;
    page-break-inside: avoid;
  }
  .solution::before {
    content: "Solution: ";
    font-weight: bold;
  }
  /* Economic Data Tables */
  .data-table {
    font-size: 9pt;
    width: 100%;
    border: 1px solid black;
  }
  .data-table th {
    background: #e0e0e0 !important;
    font-size: 9pt;
  }
  /* Optimize for Black and White Printing */
  .primary-color,
  .accent-color,
  .success-color,
  .warning-color,
  .danger-color {
    color: black !important;
  }
  /* Ensure Readability */
  .light-text {
    color: #333 !important;
  }
  .muted-text {
    color: #666 !important;
  }
  /* Chapter Summary Boxes */
  .chapter-summary {
    border: 2px solid black !important;
    background: #f0f0f0 !important;
    padding: 12pt;
    margin: 18pt 0;
    page-break-inside: avoid;
  }
  .chapter-summary::before {
    content: "Chapter Summary";
    display: block;
    font-weight: bold;
    font-size: 14pt;
    margin-bottom: 8pt;
    text-align: center;
  }
}

/*# sourceMappingURL=main.css.map */