/* अध्ययनसार — mobile reading experience */
.mobile-app-nav,
.mobile-nav-sheet,
.mobile-nav-backdrop,
.reading-progress { display: none; }

.linked-heading { display: inline; }
.linked-heading:hover { color: var(--blue); }
.linked-surface { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.linked-surface:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(24, 39, 78, .14); border-color: #b9c9eb; }

@media (max-width: 760px) {
  :root { --mobile-gutter: 14px; }

  html { scroll-padding-top: 82px; }
  body {
    padding-bottom: 78px;
    background: #eef2f8;
    font-size: 17px;
    line-height: 1.72;
  }
  body.nav-sheet-open { overflow: hidden; }
  .shell { width: calc(100% - 28px) !important; }

  .site-header {
    top: 0;
    border-bottom: 1px solid rgba(205, 215, 232, .86);
    box-shadow: 0 8px 28px rgba(19, 34, 72, .1);
  }
  .nav-wrap,
  .topbar {
    width: 100% !important;
    min-height: 70px !important;
    padding: 8px 14px;
  }
  .brand { gap: 10px; }
  .brand-mark { width: 46px !important; height: 46px !important; }
  .brand-copy strong { font-size: 1.48rem !important; line-height: 1.1; }
  .brand-copy small {
    display: block !important;
    margin-top: 4px;
    font-size: .72rem !important;
    letter-spacing: .03em !important;
  }
  .menu-toggle { width: 48px; height: 46px; border-radius: 14px; }
  .primary-nav.open {
    left: 10px;
    right: 10px;
    top: 66px;
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(18, 31, 69, .22);
  }
  .primary-nav.open > a,
  .primary-nav.open > .more-wrap > .more-button {
    min-height: 48px;
    padding: 13px 14px;
    font-size: 1rem !important;
    border-radius: 12px;
  }
  .more-menu-grid { grid-template-columns: 1fr !important; padding: 8px !important; }
  .more-menu-grid > div { padding: 12px !important; }
  .more-menu-grid h3 { font-size: .83rem !important; }
  .more-menu-grid a,
  .more-menu-grid button { min-height: 44px; padding: 10px 4px !important; font-size: .96rem !important; }

  .reading-progress {
    display: block;
    position: fixed;
    z-index: 80;
    left: 0;
    top: 70px;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #ffca62);
    box-shadow: 0 1px 5px rgba(245, 158, 11, .45);
    pointer-events: none;
  }

  main p,
  main li {
    font-size: 1rem !important;
    line-height: 1.78 !important;
  }
  main small {
    font-size: .82rem !important;
    line-height: 1.5 !important;
  }
  main h2 { font-size: clamp(1.62rem, 7vw, 2rem) !important; line-height: 1.3 !important; }
  main h3 { font-size: 1.1rem !important; line-height: 1.42 !important; }
  main .label,
  main .content-label,
  main .section-kicker,
  main .kicker,
  main .official-kicker,
  main .paper-code { font-size: .82rem !important; line-height: 1.48 !important; }
  main .hero-lead,
  .hero-copy > p,
  .syllabus-hero-grid > div > p { font-size: 1.05rem !important; line-height: 1.8 !important; }

  .hero { padding-top: 12px !important; padding-bottom: 52px !important; }
  .hero-main { padding: 30px 20px !important; border-radius: 26px !important; gap: 30px !important; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3.2rem) !important; line-height: 1.14 !important; }
  .pre-hero,
  .optional-hero,
  .mains-hero,
  .exam-hero,
  .history-hero,
  .ancient-hero,
  .pyq-hero,
  .topic-hero,
  .syllabus-hero { padding-top: 28px !important; padding-bottom: 68px !important; }
  .pre-hero h1,
  .optional-hero h1,
  .mains-hero h1,
  .exam-hero h1,
  .history-hero h1,
  .ancient-hero h1,
  .pyq-hero h1,
  .topic-hero h1,
  .syllabus-hero h1 {
    font-size: clamp(2.25rem, 10.6vw, 3.05rem) !important;
    line-height: 1.1 !important;
  }
  .pre-hero h1 span,
  .optional-hero h1 span,
  .mains-hero h1 span,
  .exam-hero h1 span,
  .history-hero h1 span,
  .ancient-hero h1 span,
  .pyq-hero h1 span,
  .topic-hero h1 span,
  .syllabus-hero h1 span { font-size: .54em !important; line-height: 1.45 !important; }
  .crumb,
  .breadcrumb { font-size: .82rem !important; line-height: 1.5 !important; margin-bottom: 24px !important; }
  .hero-actions { gap: 10px !important; }
  .hero-actions .button,
  .syllabus-actions .button { min-height: 52px; width: 100%; padding: 13px 16px; font-size: .98rem; }

  .quick-facts,
  .pattern-strip {
    display: flex !important;
    width: auto !important;
    margin-left: var(--mobile-gutter) !important;
    margin-right: var(--mobile-gutter) !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    border-radius: 20px !important;
  }
  .quick-facts::-webkit-scrollbar,
  .pattern-strip::-webkit-scrollbar { display: none; }
  .quick-facts > div,
  .pattern-strip > div {
    flex: 0 0 72%;
    min-width: 220px;
    min-height: 88px;
    padding: 17px !important;
    border-right: 1px solid #e7ebf2 !important;
    border-bottom: 0 !important;
    scroll-snap-align: start;
  }

  .page-layout,
  .syllabus-layout { padding-top: 34px !important; padding-bottom: 52px !important; }
  .section,
  .content-section {
    padding: 24px 19px !important;
    margin-bottom: 15px !important;
    border-radius: 21px !important;
    border-color: #dce4f1 !important;
    box-shadow: 0 10px 28px rgba(29, 43, 75, .06) !important;
  }
  .mini-card,
  .paper-card,
  .resource-card,
  .criteria article,
  .steps article,
  .answer-flow article,
  .related-card,
  .rule,
  .numbered-list li,
  .topic-columns > div,
  .ethics-grid li {
    padding: 18px !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 7px 18px rgba(29, 43, 75, .045);
  }
  .mini-card p,
  .mini-card li,
  .resource-card p,
  .criteria p,
  .steps p,
  .answer-flow p,
  .related-card small,
  .rule p,
  .faq details p,
  .faq-section details p,
  .source-box p,
  .source-disclaimer p,
  .status-note,
  .editorial-note { font-size: .96rem !important; line-height: 1.75 !important; }
  .mini-card strong,
  .mini-card h3,
  .resource-card strong,
  .steps h3,
  .answer-flow h3,
  .related-card strong,
  .rule b,
  .faq summary,
  .faq-section summary { font-size: 1.04rem !important; line-height: 1.5 !important; }
  .toc-card { overflow-x: auto; flex-wrap: nowrap !important; padding: 12px !important; border-radius: 17px !important; }
  .toc-card > span { flex: 0 0 100%; }
  .toc-card a { flex: 0 0 auto; min-height: 42px; padding: 10px 13px !important; font-size: .9rem !important; }
  .data-table,
  .marks-table,
  .matrix table { font-size: .9rem !important; }
  .data-table th,
  .data-table td,
  .marks-table th,
  .marks-table td,
  .matrix th,
  .matrix td { font-size: .88rem !important; padding: 13px !important; line-height: 1.55 !important; }

  .subject-card { min-height: 164px !important; padding: 22px !important; border-radius: 21px !important; }
  .subject-card strong { font-size: 1.35rem !important; }
  .subject-card small { font-size: .94rem !important; }
  .journey-grid article { min-height: 210px; padding: 24px; border-radius: 21px; }
  .journey-grid p { font-size: .98rem !important; }
  .news-list h3 { font-size: 1.08rem !important; }
  .news-list p { font-size: .94rem !important; }
  .answers button { min-height: 54px; padding: 13px !important; font-size: 1rem !important; }
  .resource-grid button { min-height: 190px; padding: 22px; border-radius: 20px; }
  .resource-grid strong { font-size: 1.28rem; }
  .resource-grid small { font-size: .94rem !important; }
  .optional-strip { margin-bottom: 58px !important; border-radius: 22px !important; }

  footer { padding-top: 46px; }
  .footer-main a:not(.brand),
  .footer-main button { min-height: 40px; font-size: .9rem !important; }
  .footer-brand p,
  .disclaimer { font-size: .86rem !important; }
  .toast { bottom: 88px; font-size: .94rem; }

  .mobile-app-nav {
    position: fixed;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    min-height: 66px;
    padding: 6px;
    border: 1px solid rgba(209, 218, 234, .92);
    border-radius: 21px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 16px 45px rgba(13, 27, 62, .2);
    backdrop-filter: blur(18px);
  }
  .mobile-app-nav a,
  .mobile-app-nav button {
    border: 0;
    background: transparent;
    color: #758099;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    padding: 4px 1px;
    border-radius: 15px;
    font: 760 .68rem/1.15 system-ui, sans-serif;
  }
  .mobile-app-nav svg { width: 21px; height: 21px; stroke-width: 2; }
  .mobile-app-nav a.active,
  .mobile-app-nav button.active { color: #2457d6; background: #edf3ff; }
  .mobile-app-nav button { cursor: pointer; }

  .mobile-nav-backdrop {
    position: fixed;
    z-index: 94;
    display: block;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(9, 19, 44, .54);
    opacity: 0;
    visibility: hidden;
    transition: .22s ease;
  }
  .mobile-nav-sheet {
    position: fixed;
    z-index: 95;
    display: block;
    left: 10px;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    max-height: min(76vh, 620px);
    overflow-y: auto;
    padding: 10px 16px 22px;
    border-radius: 25px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(8, 19, 46, .35);
    transform: translateY(calc(100% + 24px));
    visibility: hidden;
    transition: .25s ease;
  }
  .mobile-nav-backdrop.open { opacity: 1; visibility: visible; }
  .mobile-nav-sheet.open { transform: translateY(0); visibility: visible; }
  .sheet-handle { width: 42px; height: 5px; margin: 2px auto 14px; border-radius: 5px; background: #d7deea; }
  .mobile-nav-sheet header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
  .mobile-nav-sheet h2 { margin: 0; color: var(--navy); font: 800 1.35rem/1.3 Georgia, serif; }
  .mobile-nav-close { width: 42px; height: 42px; border: 0; border-radius: 13px; background: #eef2f8; color: var(--navy); font-size: 1.4rem; }
  .mobile-nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 17px; }
  .mobile-nav-grid a {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 15px;
    border: 1px solid #dfe6f2;
    border-radius: 17px;
    background: #f8faff;
    color: #2c3d60;
  }
  .mobile-nav-grid a strong { font-size: 1rem; }
  .mobile-nav-grid a small { color: #79859b; font-size: .79rem; line-height: 1.35; }
}

@media (min-width: 761px) {
  body { padding-bottom: 0; }
}
