
:root {
    --ink: #172033;
    --muted: #5d697a;
    --paper: #f7f8fb;
    --card: #ffffff;
    --line: #e4e8ef;
    --primary: #9b2c2c;
    --primary-deep: #701f1f;
    --accent: #d7a323;
    --soft: #fff5e8;
    --shadow: 0 14px 30px rgba(24, 35, 55, .08);
    --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Noto Sans Devanagari", "Nirmala UI", "Mangal", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { min-height: 74px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { background: var(--primary); color: #fff; font: 800 13px/1 system-ui, sans-serif; letter-spacing: .06em; padding: 10px 8px; border-radius: 11px; }
.brand strong, .brand small { display: block; line-height: 1.25; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.main-nav { display: flex; align-items: center; gap: 19px; }
.main-nav a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px; }
.main-nav a:hover { color: var(--primary); }
.hero, .question-hero { background: linear-gradient(135deg, #651b24, #9b2c2c 57%, #b74a32); color: #fff; }
.hero { padding: 74px 0; }
.hero-grid { display: grid; grid-template-columns: 1.55fr .75fr; gap: 55px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .86; margin: 0 0 8px; }
.hero h1, .question-hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.15; margin: 0; max-width: 800px; }
.hero-copy { max-width: 650px; color: rgba(255,255,255,.86); font-size: 18px; margin: 18px 0 27px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { border: 0; display: inline-flex; justify-content: center; align-items: center; padding: 11px 18px; border-radius: 11px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(0,0,0,.13); }
.button-primary { background: var(--accent); color: #251700; }
.button-light { background: #fff; color: var(--primary); }
.button-outline { background: transparent; color: var(--primary); border: 1px solid #d6a9a9; padding: 8px 13px; font-size: 14px; }
.hero-stats { display: grid; grid-template-columns: repeat(3,1fr); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.19); border-radius: 18px; overflow: hidden; }
.hero-stats div { text-align: center; padding: 25px 8px; border-right: 1px solid rgba(255,255,255,.2); }
.hero-stats div:last-child { border: 0; }
.hero-stats span { display: block; font-weight: 900; font-size: 25px; }
.hero-stats small { color: rgba(255,255,255,.78); font-size: 12px; }
.section { padding: 58px 0; }
.section-heading { display: flex; justify-content: space-between; gap: 25px; align-items: end; margin-bottom: 23px; }
.section-heading h2 { margin: 0; font-size: 31px; line-height: 1.2; }
.section-heading p:last-child { max-width: 420px; color: var(--muted); margin: 0; font-size: 14px; }
.subject-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.subject-card { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 20px; cursor: pointer; color: var(--ink); min-height: 160px; box-shadow: 0 5px 14px rgba(24,35,55,.03); transition: .18s; }
.subject-card:hover, .subject-card.is-active { border-color: #a34848; box-shadow: var(--shadow); transform: translateY(-2px); }
.subject-card.is-active { background: #fff8f3; }
.subject-number { color: var(--primary); font-weight: 900; font-size: 13px; display: block; margin-bottom: 18px; }
.subject-title { display: block; font-size: 20px; font-weight: 900; line-height: 1.35; }
.subject-meta { display: block; color: var(--muted); font-size: 13px; margin-top: 10px; }
.topics-section { padding-top: 14px; }
.topic-panel { display: none; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.topic-panel.is-active { display: block; }
.topic-panel-title { display: flex; justify-content: space-between; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 19px; }
.topic-panel-title h3 { margin: 0; font-size: 21px; }
.topic-panel-title span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.topic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.topic-card { text-decoration: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 15px; border-radius: 12px; border: 1px solid #eaedf2; background: #fcfcfd; font-weight: 750; line-height: 1.36; transition: .17s; }
.topic-card:hover { border-color: #bf7171; color: var(--primary); background: #fff8f5; }
.topic-card small { font-size: 12px; color: var(--muted); white-space: nowrap; font-weight: 600; }
.question-hero { padding: 42px 0; }
.question-hero h1 { font-size: clamp(28px, 4vw, 42px); margin-top: 5px; }
.question-hero p:not(.eyebrow) { margin: 9px 0 0; color: rgba(255,255,255,.86); }
.back-link { color: rgba(255,255,255,.88); text-decoration: none; font-size: 14px; font-weight: 800; display: inline-block; margin-bottom: 22px; }
.question-layout { padding: 34px 0 62px; display: grid; grid-template-columns: 295px minmax(0,1fr); gap: 27px; align-items: start; }
.question-sidebar { position: sticky; top: 95px; }
.search-form, .sidebar-topics { border: 1px solid var(--line); background: #fff; border-radius: 15px; padding: 17px; box-shadow: 0 4px 14px rgba(24,35,55,.04); }
.search-form label { display: block; font-size: 13px; font-weight: 900; margin-bottom: 7px; }
.search-row { display: flex; gap: 7px; }
.search-row input { width: 100%; min-width: 0; border: 1px solid #d9dfe8; border-radius: 9px; padding: 9px; font: inherit; font-size: 14px; }
.search-row button { border: 0; background: var(--primary); color: #fff; border-radius: 9px; padding: 0 11px; font: inherit; font-size: 13px; font-weight: 800; }
.sidebar-topics { margin-top: 14px; max-height: calc(100vh - 220px); overflow: auto; }
.sidebar-topics h2 { font-size: 16px; margin: 0 0 10px; }
.sidebar-group { margin: 13px 0; }
.sidebar-group strong { display: block; font-size: 12px; color: var(--muted); margin: 0 0 5px; }
.sidebar-group a { display: block; text-decoration: none; font-size: 13px; padding: 7px 8px; border-radius: 8px; line-height: 1.35; }
.sidebar-group a:hover, .sidebar-group a.is-current { background: #fff1ed; color: var(--primary); font-weight: 800; }
.question-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; color: var(--muted); font-size: 13px; font-weight: 750; }
.question-list { display: grid; gap: 13px; }
.question-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 20px; box-shadow: 0 5px 15px rgba(24,35,55,.035); }
.question-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.q-number { min-width: 29px; height: 29px; border-radius: 9px; background: #fff0eb; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; }
.q-tag { color: var(--muted); font-size: 12px; border: 1px solid #e4e8ef; border-radius: 999px; padding: 3px 8px; }
.question-card h2 { font-size: 18px; line-height: 1.55; margin: 0 0 14px; }
.answer-toggle { background: #fff; border: 1px solid #c69d9d; color: var(--primary); border-radius: 9px; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 900; cursor: pointer; }
.answer-toggle:hover { background: #fff4f1; }
.answer-box { background: var(--soft); border-left: 4px solid var(--accent); padding: 13px 15px; margin-top: 13px; border-radius: 0 10px 10px 0; }
.answer-box span { display: inline-block; font-size: 12px; color: #7c5200; font-weight: 900; margin-bottom: 3px; }
.answer-box p { margin: 0; font-size: 17px; font-weight: 800; }
.answer-box small { display: block; margin-top: 9px; font-size: 12px; color: #6d737e; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 22px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.pagination a { background: var(--primary); color: #fff; padding: 7px 12px; border-radius: 8px; text-decoration: none; font-weight: 800; }
.empty-state { text-align: center; border: 1px dashed #cfd6e1; border-radius: 15px; padding: 45px 20px; background: #fff; }
.empty-state h2 { margin: 0 0 7px; }
.empty-state p { color: var(--muted); margin: 0; }
.site-footer { margin-top: 20px; border-top: 1px solid var(--line); background: #fff; padding: 28px 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 30px; }
.footer-grid p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.source-note { border-left: 3px solid var(--accent); padding-left: 14px; }
@media (max-width: 860px) {
  .hero-grid, .question-layout, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 50px 0; }
  .hero-stats { max-width: 540px; }
  .question-sidebar { position: static; }
  .sidebar-topics { max-height: none; }
}
@media (max-width: 640px) {
  .shell { width: min(100% - 26px, 1180px); }
  .main-nav { gap: 10px; }
  .main-nav a { font-size: 12px; }
  .brand small { display: none; }
  .subject-grid, .topic-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading h2 { font-size: 26px; }
  .topic-panel { padding: 16px; }
  .question-card { padding: 16px; }
  .question-card h2 { font-size: 17px; }
  .hero-actions .button { width: 100%; }
}
