/* Aarush Study — shared theme
   Compact, calm, Class 7 friendly. Used across all subjects/chapters. */

* { box-sizing: border-box; }
body {
  font-family: Georgia, "Times New Roman", serif;
  background: #f9f6f0;
  color: #2c2c2c;
  margin: 0;
  padding: 22px;
  font-size: 14px;
  line-height: 1.55;
}
.wrap { max-width: 800px; margin: 0 auto; }

/* Headings */
h1 { color: #1565C0; font-size: 26px; margin: 0 0 4px; }
h2 { color: #1565C0; font-size: 17px; margin: 0 0 8px; border-bottom: 2px solid #e3f2fd; padding-bottom: 4px; }
h3 { color: #1976d2; font-size: 15px; margin: 10px 0 6px; }
.subtitle { color: #666; font-style: italic; margin-bottom: 22px; font-size: 13px; }

/* Cards */
.card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
  padding: 18px 22px;
}
.link-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.10); }
.link-card .icon { font-size: 32px; min-width: 44px; text-align: center; }
.link-card .info h3 { margin: 0 0 4px; color: #1565C0; font-size: 17px; }
.link-card .info p { margin: 0; color: #555; font-size: 13px; }
.link-card.disabled { opacity: 0.45; pointer-events: none; }
.link-card.disabled .info h3 { color: #999; }

/* Highlights */
.summary { background: #fff3e0; border-left: 4px solid #f57c00; padding: 12px 16px; border-radius: 6px; margin: 14px 0; font-size: 13px; }
.summary b { color: #e65100; }
.key { background: #E8F5E9; border-left: 4px solid #2e7d32; padding: 8px 14px; border-radius: 4px; margin: 8px 0; font-size: 13px; }
.warn { background: #ffebee; border-left: 4px solid #c62828; padding: 8px 14px; border-radius: 4px; margin: 8px 0; font-size: 13px; }
.formula { background: #f3e5f5; border: 2px dashed #7b1fa2; padding: 12px; border-radius: 8px; text-align: center; font-weight: bold; color: #4a148c; font-size: 16px; margin: 8px 0; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
th, td { border: 1px solid #ddd; padding: 6px 10px; text-align: left; }
th { background: #e3f2fd; color: #1565C0; }
tr:nth-child(even) td { background: #fafafa; }

/* Lists */
ul, ol { margin: 4px 0 8px; padding-left: 20px; }
li { margin-bottom: 3px; }

/* Q&A blocks */
.qa { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed #e0e0e0; }
.qa:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.q { color: #1565C0; font-weight: bold; margin-bottom: 4px; }
.a { background: #E8F5E9; border-left: 3px solid #2e7d32; padding: 6px 12px; border-radius: 4px; }
.a b { color: #1b5e20; }

/* Practice MCQ options */
.opts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 4px; font-size: 13px; }
.opts span { flex: 1 1 45%; }
details { background: #E8F5E9; border-left: 3px solid #2e7d32; padding: 4px 12px; border-radius: 4px; margin: 6px 0 10px; font-size: 13px; }
details summary { cursor: pointer; color: #1b5e20; font-weight: bold; padding: 4px 0; }
details[open] { padding-bottom: 8px; }

/* Fill-blanks + true/false */
.fb { font-size: 13px; line-height: 1.9; }
.fb b { color: #1565C0; }
.tf { font-size: 13px; line-height: 1.9; }

/* Quick-revision pills */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.pill { background: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.pill h3 { margin: 0 0 6px; font-size: 14px; }
.pill ul { margin: 0; padding-left: 18px; font-size: 13px; }
.pill.acid h3 { color: #c62828; }
.pill.base h3 { color: #1565C0; }
.pill.neutral h3 { color: #6a6a6a; }
.keyword { background: #E8F5E9; padding: 2px 8px; border-radius: 4px; font-weight: bold; color: #1b5e20; display: inline-block; margin: 2px; font-size: 12.5px; }

/* Navigation */
.nav { text-align: center; margin: 18px 0; }
.nav a {
  color: #1565C0; text-decoration: none;
  padding: 6px 14px; background: #fff;
  border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin: 0 4px; font-size: 13px;
  display: inline-block;
}
.nav a:hover { background: #e3f2fd; }

/* Breadcrumb */
.crumb { font-size: 12px; color: #888; margin-bottom: 14px; }
.crumb a { color: #1565C0; text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* Footer */
footer {
  text-align: center; color: #999; font-size: 12px;
  margin-top: 28px; padding-top: 14px;
  border-top: 1px solid #eee;
}

/* Print button — fixed top-right on every page */
.print-btn {
  position: fixed; top: 14px; right: 14px;
  background: #1565C0; color: #fff;
  border: none; padding: 7px 14px;
  border-radius: 20px;
  font-family: Georgia, serif; font-size: 13px;
  cursor: pointer; z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.15s, transform 0.15s;
}
.print-btn:hover { background: #0d47a1; transform: translateY(-1px); }
.print-btn:active { transform: translateY(0); }

/* ===== Print styles — clean, ink-friendly ===== */
@media print {
  @page { margin: 14mm; }

  body {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
    font-size: 11pt;
    line-height: 1.4;
  }
  .wrap { max-width: 100% !important; }

  /* Hide interactive/navigation elements */
  .print-btn,
  .crumb,
  .nav,
  .link-card,
  footer { display: none !important; }

  /* Headings in black */
  h1, h2, h3 { color: #000 !important; }
  h1 { font-size: 20pt; margin-top: 0; }
  h2 { font-size: 14pt; border-bottom: 1pt solid #000 !important; }
  h3 { font-size: 12pt; }

  /* Cards lose shadow/colour, just use thin borders */
  .card, .pill {
    box-shadow: none !important;
    border: 1pt solid #999 !important;
    background: #fff !important;
    page-break-inside: avoid;
    margin-bottom: 8pt;
  }

  /* Coloured boxes → simple border/text */
  .summary, .key, .warn, .formula {
    background: #fff !important;
    border: 1pt solid #666 !important;
    color: #000 !important;
    padding: 6pt 10pt !important;
  }
  .summary b, .warn b, .key b, .formula { color: #000 !important; }

  /* Force open all <details> (answers visible when printed) */
  details {
    background: #fff !important;
    border-left: 2pt solid #000 !important;
    padding: 3pt 8pt !important;
    margin: 4pt 0 !important;
  }
  details summary {
    list-style: none;
    color: #000 !important;
    font-weight: bold;
  }
  details summary::-webkit-details-marker,
  details summary::marker { display: none; }
  details > summary::before { content: "✓ "; }

  /* Tables keep borders for readability */
  table { border-collapse: collapse; page-break-inside: avoid; }
  th { background: #eee !important; color: #000 !important; }
  th, td { border: 0.5pt solid #000 !important; }

  /* Q&A blocks: question bold, answer indented */
  .q { color: #000 !important; }
  .a { background: #fff !important; border-left: 2pt solid #000 !important; color: #000 !important; }

  /* Keywords become simple text */
  .keyword { background: #fff !important; border: 0.5pt solid #000; color: #000 !important; }

  /* Avoid breaking mid Q&A block */
  .qa { page-break-inside: avoid; }

  /* Show link destinations for any remaining external links */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt; color: #666;
  }
}
