* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #f8f9fa; color: #202122; line-height: 1.6; font-size: 16px; }

.wrapper { display: flex; max-width: 1400px; margin: 0 auto; min-height: 100vh; }

/* Sidebar */
.sidebar { width: 280px; min-width: 280px; background: #fff; border-right: 1px solid #a2a9b1; padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-logo { padding: 0 16px 16px; border-bottom: 1px solid #eaecf0; margin-bottom: 12px; }
.sidebar-logo h1 { font-size: 18px; color: #3366cc; }
.sidebar-logo h1 a { color: #3366cc; text-decoration: none; }
.sidebar-logo p { font-size: 11px; color: #54595d; }
.sidebar nav ul { list-style: none; padding: 0 8px; }
.sidebar nav ul li { margin: 0; }
.sidebar nav ul li a { display: block; padding: 6px 12px; font-size: 13px; color: #3366cc; text-decoration: none; border-radius: 4px; }
.sidebar nav ul li a:hover { background: #eaecf0; text-decoration: underline; }
.sidebar nav ul li.active a { background: #eaf3ff; color: #1a1a1a; font-weight: 600; }
.sidebar .nav-title { padding: 8px 12px 4px; font-size: 11px; font-weight: 600; color: #54595d; text-transform: uppercase; letter-spacing: 1px; }

/* Content */
.content { flex: 1; padding: 24px 32px 60px; max-width: 960px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin: 0 auto; }
.content h1 { font-size: 28px; font-weight: 400; border-bottom: 1px solid #a2a9b1; padding-bottom: 8px; margin-bottom: 20px; font-family: 'Georgia', serif; }
.content h2 { font-size: 22px; font-weight: 400; border-bottom: 1px solid #eaecf0; padding-bottom: 4px; margin: 28px 0 14px; font-family: 'Georgia', serif; }
.content h3 { font-size: 18px; font-weight: 600; margin: 22px 0 10px; }
.content p { margin: 0 0 12px; text-align: justify; }
.content ul, .content ol { margin: 0 0 12px 32px; }
.content li { margin-bottom: 4px; }
.content a { color: #3366cc; text-decoration: none; }
.content a:hover { text-decoration: underline; }
.content blockquote { background: #f8f9fa; border-left: 4px solid #3366cc; padding: 12px 20px; margin: 16px 0; font-style: italic; color: #54595d; }
.content table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.content th, .content td { border: 1px solid #a2a9b1; padding: 8px 12px; text-align: left; }
.content th { background: #eaecf0; font-weight: 600; }
.content img { max-width: 100%; height: auto; border: 1px solid #eaecf0; border-radius: 4px; margin: 16px 0; }
.content .img-caption { font-size: 13px; color: #54595d; text-align: center; margin-top: -12px; margin-bottom: 16px; }

/* Infobox */
.infobox { float: right; width: 280px; background: #f8f9fa; border: 1px solid #a2a9b1; border-collapse: collapse; margin: 0 0 16px 20px; font-size: 13px; }
.infobox th { background: #eaecf0; text-align: center; font-size: 16px; padding: 10px; }
.infobox td { padding: 6px 10px; vertical-align: top; }
.infobox td:first-child { font-weight: 600; width: 100px; }

/* TOC */
.toc { background: #f8f9fa; border: 1px solid #a2a9b1; padding: 14px 20px; margin: 16px 0 24px; display: inline-block; min-width: 260px; }
.toc-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; text-align: center; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc ul li { padding: 2px 0; font-size: 13px; }
.toc ul li a { color: #3366cc; }
.toc ul ul { padding-left: 20px; }

/* References */
.references { font-size: 13px; color: #54595d; border-top: 1px solid #a2a9b1; margin-top: 40px; padding-top: 16px; }
.references ol { margin-left: 24px; }

/* Breadcrumb */
.breadcrumb { font-size: 12px; color: #54595d; margin-bottom: 16px; }
.breadcrumb a { color: #3366cc; }
.breadcrumb span { color: #54595d; }

/* Search */
.search-box { padding: 8px 16px 12px; }
.search-box input { width: 100%; padding: 6px 10px; border: 1px solid #a2a9b1; border-radius: 4px; font-size: 13px; outline: none; }
.search-box input:focus { border-color: #3366cc; }

/* Nav buttons at bottom */
.nav-buttons { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 16px; border-top: 1px solid #eaecf0; }
.nav-buttons a { padding: 8px 16px; background: #f8f9fa; border: 1px solid #a2a9b1; border-radius: 4px; color: #3366cc; text-decoration: none; font-size: 13px; }
.nav-buttons a:hover { background: #eaecf0; }

/* Term highlight */
.term { color: #3366cc; cursor: help; border-bottom: 1px dashed #3366cc; }

/* Footer */
.footer { text-align: center; padding: 16px 0; font-size: 12px; color: #54595d; border-top: 1px solid #eaecf0; margin-top: 40px; }

.answer-capsule { background: #f0f5ff; border-left: 4px solid #3366cc; padding: 12px 16px; margin: 8px 0 16px; font-size: 15px; line-height: 1.5; border-radius: 0 6px 6px 0; }
@media (max-width: 860px) {
  .wrapper { flex-direction: column; }
  .sidebar { width: 100%; min-width: auto; height: auto; position: relative; border-right: none; border-bottom: 1px solid #a2a9b1; padding: 12px 0; }
  .content { padding: 16px; }
  .infobox { float: none; width: 100%; margin: 16px 0; }
}
