/* Shared spacing is applied after the earlier theme styles on every page. */
:root {
  --section-space: 56px;
  --heading-space: 28px;
  --grid-space: 20px;
}
.section { padding-block: var(--section-space); }
.section.section-topless { padding-top: 0; }
.photo-hero + .section.section-topless,
.photo-hero + .study-section { padding-top: var(--section-space); }
.section-heading { gap: 16px; margin-bottom: var(--heading-space); }
.section-heading h2 { line-height: 1.18; }
.section-heading .section-intro { margin-top: 12px; line-height: 1.65; }
.section-heading > .button { margin: 0; }
.why-card h3 { min-height: 2.8em; line-height: 1.4; }
.why-icon { margin-bottom: 16px; }
:is(.area-grid, .course-grid, .collection-grid, .updates-grid,
  .notes-download-grid, .sample-pdf-grid, .curriculum-exam-grid) { gap: var(--grid-space); }
.curriculum-navigation-section { padding-bottom: 32px; }
.curriculum-resource-nav { margin-top: 16px; }
.curriculum-resource-nav:first-child { margin-top: 0; }
.curriculum-video-group-title { margin-top: 24px; }
.curriculum-video-group-title:first-child { margin-top: 0; }
.collection-link .collection-icon { margin-bottom: 16px; }
.notes-download-card h3 { margin-bottom: 16px; }
.notes-download-links { align-content: start; }
.sample-download-file { flex-direction: row; align-items: center; gap: 16px; }
.sample-download-file > .sample-download-actions { flex: 0 0 auto; }
@supports (grid-template-rows: subgrid) {
  .notes-download-card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
}
.faq-grid { align-items: start; gap: 40px; }
.faq-list details { padding-block: 16px; }
.faq-list summary { min-height: 44px; }
.faq-list summary > span { display: grid; place-items: center; flex: 0 0 24px; height: 24px; margin-inline: 6px; line-height: 1; }
.faq-list details:last-child p { margin-bottom: 0; }
body[data-page-path="/admin/"] :is(.button, .editor-toolbar button) { min-height: 44px; }
.help-support-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 32px; }
.help-support-grid .support-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  padding: 28px;
  border-radius: 18px;
  scroll-margin-top: 112px;
}
.help-support-grid .support-card h2 { margin: 0; font-size: 2rem; line-height: 1.2; }
.help-support-grid .support-card p { margin: 0; line-height: 1.65; }
.help-support-grid .support-card .button { margin: 0; }
.domain-access-section { background: #fff; }
.domain-access {
  --banner-accent: #245e50;
  --banner-tint: #eff7f3;
  --banner-line: #d5e6de;
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
  padding: 32px 40px;
  border: 1px solid var(--banner-line);
  border-radius: 28px;
  background: var(--banner-tint);
  box-shadow: 0 12px 32px #1b4f3d08;
}
.domain-access[data-area="school"] { --banner-accent: #2b638c; --banner-tint: #f0f7fc; --banner-line: #d7e7f2; }
.domain-access[data-area="nursing"] { --banner-accent: #72588c; --banner-tint: #f6f2fb; --banner-line: #e5dbef; }
.domain-access[data-area="mbbs"] { --banner-accent: #986044; --banner-tint: #fbf4ec; --banner-line: #eedfce; }
.domain-access-copy { min-width: 0; text-align: left; }
.domain-access-copy .eyebrow { color: var(--banner-accent); }
.domain-access h2 { margin-block: 12px 16px; font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1.18; }
.domain-access p { margin: 0; }
.domain-access-actions { justify-content: flex-start; margin-top: 24px; }
.app-preview { min-width: 0; width: 100%; max-width: 440px; margin-inline: auto; }
.app-preview-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 5px;
  gap: 5px;
  border: 1px solid var(--banner-line);
  border-radius: 999px;
  background: #ffffffb3;
}
.app-preview-tabs[hidden], .app-preview-panel[hidden] { display: none; }
.app-preview-tabs button {
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #34564c;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s;
}
.app-preview-tabs button[aria-selected="true"] { background: var(--banner-accent); color: #fff; }
.app-preview-tabs button:hover { background: #fff; border-color: var(--banner-accent); color: #000; }
.app-preview-tabs button:focus-visible, .app-preview-panel:focus-visible {
  outline: 3px solid var(--banner-accent);
  outline-offset: 3px;
}
.app-preview-panel { border-radius: 18px; }
.app-preview-art { display: block; width: 100%; height: auto; margin: 8px auto 0; transition: transform .25s ease; }
.app-preview:hover .app-preview-art { transform: translateY(-4px); }
.domain-access .app-preview-caption { color: var(--banner-accent); font-size: .85rem; font-weight: 600; text-align: center; line-height: 1.5; }

/* Distinct device cards with a clear download action and a shared footer edge. */
.app-access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.app-access-grid > .platform-card {
  --platform-bg: #143f3c;
  --platform-accent: #b8efd6;
  --platform-muted: #dcebe5;
  --platform-detail-bg: #e1f0eb;
  --platform-detail-ink: #143f3c;
  --platform-detail-muted: #355b55;
  --platform-detail-border: #bedcd0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 30px;
  background: var(--platform-bg);
  color: #fff;
  border: 1px solid #2d625c;
  border-radius: 26px;
  text-align: left;
  box-shadow: 0 14px 32px #17393214;
}
.app-access-grid > .platform-card.ios {
  --platform-bg: #352f50;
  --platform-accent: #ddd0fa;
  --platform-muted: #e7e1f1;
  --platform-detail-bg: #eae4f3;
  --platform-detail-ink: #352f50;
  --platform-detail-muted: #5b4e73;
  --platform-detail-border: #cdbfe0;
  border-color: #5e517a;
}
.app-access-grid > .platform-card:hover { background: var(--platform-bg); border-color: var(--platform-accent); filter: none; }
.platform-topline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.platform-label { display: flex; align-items: center; gap: 10px; }
.platform-card .eyebrow { margin: 0; color: var(--platform-accent); }
.platform-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #ffffff14; color: var(--platform-accent); }
.platform-card .platform-status { display: inline-flex; align-items: center; margin: 0; padding: 7px 11px; border: 1px solid #ffffff30; border-radius: 999px; background: #ffffff0d; color: var(--platform-accent); font-size: .75rem; font-weight: 700; line-height: 1.4; }
.platform-overview { display: grid; grid-template-columns: minmax(0, 1fr) 175px; gap: 16px; align-items: start; flex: 1; }
.platform-overview > div { min-width: 0; }
.app-access-grid .platform-card h2 { margin: 0 0 16px; color: #fff; font-size: clamp(1.75rem, 2.4vw, 2.2rem); line-height: 1.2; }
.platform-card .platform-overview p { margin: 0; color: var(--platform-muted); line-height: 1.65; }
.platform-art { display: block; align-self: center; width: 100%; height: auto; }
.platform-actions { display: flex; }
.app-access-grid .platform-card .button { margin: 0; border: 1px solid #ffffff66; background: #ffffff14; color: #fff; min-height: 48px; }
.app-access-grid .platform-card .button:is(:hover, :focus-visible) { background: #fff; border-color: #fff; color: #000; }
.app-access-grid .platform-detail { display: flex; align-items: center; gap: 18px; flex-wrap: nowrap; min-height: 150px; margin: auto 0 0; padding: 18px; border: 1px solid var(--platform-detail-border); border-radius: 18px; background: var(--platform-detail-bg); color: var(--platform-detail-ink); }
.app-access-grid .qr-row img { width: 112px; height: 112px; padding: 4px; border: 0; border-radius: 12px; }
.app-access-grid .qr-row > div { min-width: 0; }
.platform-detail strong { color: var(--platform-detail-ink); }
.platform-card .platform-detail p { margin: 8px 0 0; color: var(--platform-detail-muted); font-size: .88rem; line-height: 1.6; }
.platform-unavailable { margin: 8px 0 0; color: var(--platform-muted); font-size: .88rem; line-height: 1.6; }
.platform-build-icon { display: grid; place-items: center; flex: 0 0 56px; height: 56px; border-radius: 16px; background: #ded4ed; color: var(--platform-detail-ink); }

/* Practical resources use native accordions and download-only PDF rows. */
.practical-notes-section { scroll-margin-top: 112px; }
.practical-resources, .practical-subject-group, .practical-activity-list { display: grid; gap: 20px; }
.practical-file { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; border: 1px solid #cfe2da; border-radius: 16px; background: #f5faf7; }
.practical-file > div { min-width: 0; }
.practical-file-label { margin: 0; font-size: .78rem; font-weight: 700; color: #376c59; line-height: 1.5; }
.practical-file h3 { margin: 6px 0; font-size: 1.08rem; line-height: 1.45; overflow-wrap: anywhere; }
.practical-file-size { margin: 0; font-size: .8rem; color: #526962; line-height: 1.5; }
.practical-file .button { flex: 0 0 auto; min-height: 44px; margin: 0; padding: 10px 16px; font-size: .82rem; }
.practical-resources .button:is(:hover, :focus-visible) { background: #fff; border-color: #173f35; color: #000; }
.practical-list { border: 1px solid #d5e3df; border-radius: 16px; background: #fff; }
.practical-list > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 18px 24px; cursor: pointer; list-style: none; }
.practical-list > summary::-webkit-details-marker { display: none; }
.practical-list > summary::after { content: '+'; flex: 0 0 auto; font-size: 1.3rem; color: #376c59; }
.practical-list[open] > summary::after { content: '−'; }
.practical-list > summary strong { flex: 1; min-width: 0; font-size: 1rem; line-height: 1.5; }
.practical-list > summary > span { flex: 0 0 auto; padding: 5px 10px; border-radius: 999px; background: #edf6f1; color: #376c59; font-size: .75rem; line-height: 1.5; }
.practical-list > summary:focus-visible { outline: 3px solid #376c59; outline-offset: 3px; border-radius: 16px; }
.practical-list-body { display: grid; gap: 12px; padding: 0 20px 20px; }
.practical-list-body .practical-file { padding: 18px 20px; border-color: #e0e9e5; background: #fff; }
.practical-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.practical-overview-card { --practical-accent: #327d6b; --practical-tint: #f0f8f4; display: grid; grid-template-rows: auto 1fr auto; gap: 14px; padding: 24px; border: 1px solid #d9e4de; border-top: 3px solid var(--practical-accent); border-radius: 18px; background: var(--practical-tint); }
.practical-overview-card:nth-child(2) { --practical-accent: #347ca4; --practical-tint: #f0f7fc; }
.practical-overview-card:nth-child(3) { --practical-accent: #805dae; --practical-tint: #f6f2fb; }
.practical-overview-card:nth-child(4) { --practical-accent: #bf7553; --practical-tint: #fcf4ed; }
.practical-overview-card:nth-child(5) { --practical-accent: #b35480; --practical-tint: #fcf2f7; }
.practical-overview-card:nth-child(6) { --practical-accent: #958036; --practical-tint: #fbf8ed; }
.practical-overview-card .practical-file-label { color: var(--practical-accent); }
.practical-overview-card h3 { margin: 0; font-size: 1.12rem; line-height: 1.45; }
.practical-overview-actions { display: grid; gap: 12px; }
.practical-overview-actions > div { display: grid; gap: 10px; }
.practical-overview-actions .button { margin: 0; min-height: 44px; font-size: .82rem; }
.practical-manual-meta { font-size: .8rem; line-height: 1.5; color: #53675f; }

.prose h2 { margin-top: 32px; margin-bottom: 16px; line-height: 1.25; }
.prose h2:first-child { margin-top: 0; }
.prose .button { margin-top: 20px; }
.content-section + .content-section { margin-top: 32px; }
.article-body h2, .pharmacy-reading h2 { margin-top: 32px; margin-bottom: 16px; }
.article-body > h2:first-child, .pharmacy-reading > :first-child { margin-top: 0; }
.site-footer { padding-top: 48px; }
.site-footer .footer-top { align-items: start; gap: 32px; }
.footer-bottom { margin-top: 32px; padding-top: 24px; }
.site-footer [data-privacy-settings] { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #e4f0f0; font: inherit; text-align: left; text-decoration: none; }
.site-footer [data-privacy-settings]:is(:hover, :focus-visible) { background: transparent; color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* Editorial cards have a clear title area and a consistent footer baseline. */
.updates-grid > .update-card {
  --update-accent: #146555;
  --update-tint: #e9f5ef;
  min-width: 0;
  min-height: 256px;
  padding: 24px;
  border: 1px solid #dbe5e5;
  border-top: 4px solid var(--update-accent);
  border-radius: 18px;
  background: #fff;
  text-align: left;
  box-shadow: 0 8px 24px #183c3208;
  transition: border-color .18s, box-shadow .18s;
}
.updates-grid > .update-card[data-area="nursing"] { --update-accent: #245a8a; --update-tint: #eaf2fc; }
.updates-grid > .update-card[data-area="mbbs"] { --update-accent: #70508d; --update-tint: #f3ecf9; }
.updates-grid > .update-card[data-area="school"] { --update-accent: #995939; --update-tint: #fbf0e5; }
.updates-grid > .update-card:hover {
  background: #fff;
  border-color: var(--update-accent);
  box-shadow: 0 12px 28px #183c3212;
  filter: none;
}
.update-card .update-card-top { gap: 12px; }
.update-card .editorial-tag {
  align-self: flex-start;
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--update-accent);
  background: var(--update-tint);
}
.update-card .update-card-top > .quiet { color: #536668; font-size: .8rem; }
.update-card h3 {
  margin: 20px 0 24px;
  font-size: 1.35rem;
  line-height: 1.35;
  text-align: left;
}
.update-card .update-card-bottom {
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #e4eceb;
}
.update-card .card-link {
  align-self: auto;
  min-height: 44px;
  margin: 0;
  padding: 10px 16px;
  border-color: var(--update-accent);
  background: var(--update-accent);
  color: #fff;
  line-height: 1.45;
  text-decoration: none;
}
.update-card .card-link:is(:hover, :focus-visible) { background: #fff; color: #000; }
.update-card .deadline { margin-top: 16px; padding-top: 12px; }

/* Whole cards fit exactly into three, two or one columns in the carousel. */
.section.testimonials-section { padding-block: 40px; }
.testimonials-section .section-heading { margin-bottom: 24px; }
.reviews-carousel { container-type: inline-size; --review-width: calc((100cqw - 40px) / 3); }
.reviews-viewport { gap: 20px; padding: 4px 0 12px; scroll-snap-type: x mandatory; }
.reviews-track { gap: 20px; }
.testimonial-card {
  display: grid;
  grid-template-rows: 24px 24px minmax(72px, 1fr) auto;
  gap: 8px;
  min-height: 288px;
  padding: 24px;
  scroll-snap-align: start;
  border-radius: 18px;
}
.quote-mark { height: 24px; font-size: 3.1rem; }
.testimonial-rating { margin: 0; line-height: 24px; }
.testimonial-card blockquote { margin: 8px 0 16px; font-size: .95rem; line-height: 1.65; }
.testimonial-card figcaption { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; }
.testimonial-avatar { width: 48px; height: 48px; }
.testimonial-card cite { line-height: 1.45; overflow-wrap: anywhere; }
.testimonial-card figcaption span:not(.testimonial-avatar) { font-size: .8rem; line-height: 1.5; margin-top: 4px; }
.testimonial-card figcaption .testimonial-source { font-size: .75rem; }
.reviews-toolbar { gap: 16px; margin-top: 8px; padding: 0; }
.reviews-controls { gap: 8px; }

/* Keep the download controls on one axis and the phone / QR on another. */
.section.app-download-section { padding-block: 48px 56px; }
.app-download {
  grid-template-columns: minmax(0, 1.05fr) minmax(392px, 1fr);
  gap: 32px;
  padding: 40px;
  border-radius: 26px;
}
.app-download-copy { display: grid; gap: 16px; }
.app-download-copy .eyebrow { margin: 0; }
.app-download h2 { margin: 0; font-size: clamp(2.2rem, 3.4vw, 3.15rem); line-height: 1.15; }
.download-intro { margin: 0; line-height: 1.65; }
.download-device-switch, .download-panel { width: min(100%, 365px); max-width: 365px; margin: 4px 0 0; }
.download-device-switch label { min-height: 56px; padding-block: 10px; }
.download-panel h3 { margin-bottom: 12px; line-height: 1.5; }
.download-store-link { min-height: 64px; padding: 12px 18px; }
.download-panel p { margin-top: 12px; line-height: 1.65; }
.download-setup-link.button { margin-top: 16px; }
.app-download-visual {
  grid-template-columns: 224px 152px;
  justify-content: center;
  align-items: center;
  gap: 16px;
  min-height: 416px;
}
.app-download-visual::before { width: 300px; height: 300px; }
.app-download-visual > * { position: relative; }
.download-phone { width: 224px; height: 392px; margin: 0; transform: rotate(-5deg); }
.app-download:hover .download-phone { transform: rotate(-5deg); }
.download-phone-screen { padding: 30px 14px 14px; }
.download-phone-screen > img { width: 110px; }
.phone-title { font-size: 20px; margin: 18px 0 14px; }
.phone-study-grid { gap: 8px; }
.phone-study-grid img { height: 42px; }
.download-qr { position: relative; inset: auto; width: 152px; padding: 14px 12px; }
.download-qr img { width: 112px; height: 112px; }

@media (max-width: 980px) {
  .practical-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-access-grid { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
  .help-support-grid { grid-template-columns: minmax(0, 1fr); }
  .domain-access { grid-template-columns: minmax(0, 1fr); padding: 32px; }
  .domain-access-copy { text-align: center; }
  .domain-access-copy p { margin-inline: auto; }
  .domain-access-actions { justify-content: center; }
  .app-preview { max-width: 360px; }
  .app-download { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 32px; }
  .app-download-copy { text-align: center; justify-items: center; }
  .download-intro { margin-inline: auto; }
  .download-panel { margin-inline: auto; }
  .app-download-visual { width: 100%; max-width: 420px; margin-inline: auto; }
}
@media (max-width: 900px) {
  .reviews-carousel { --review-width: calc((100cqw - 20px) / 2); }
}
@media (max-width: 760px) {
  :root { --section-space: 40px; --heading-space: 24px; --grid-space: 16px; }
  .curriculum-navigation-section { padding-bottom: 24px; }
  .section.testimonials-section { padding-block: 32px; }
  .section.app-download-section { padding-block: 40px; }
  .faq-grid { gap: 24px; }
  .help-support-grid .support-card { padding: 24px; }
  .domain-access { gap: 24px; }
  .site-footer { padding-top: 40px; }
  .site-footer .footer-top { gap: 28px; }
  .footer-bottom { margin-top: 28px; }
  .updates-grid > .update-card { padding: 20px; }
}
@media (max-width: 600px) {
  .practical-overview-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .practical-file { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; }
  .practical-list > summary { gap: 10px; padding: 16px 18px; }
  .practical-list > summary > span { padding-inline: 8px; }
  .practical-list-body { padding: 0 12px 12px; }
  .practical-list-body .practical-file { padding: 16px; }
  .practical-file .button { width: 100%; }
  .app-access-grid > .platform-card { padding: 24px; gap: 20px; border-radius: 22px; }
  .platform-overview { grid-template-columns: minmax(0, 1fr); }
  .platform-art { width: 180px; justify-self: center; }
  .app-access-grid .platform-detail { padding: 14px; gap: 14px; }
  .app-access-grid .qr-row img { width: 96px; height: 96px; }
  .app-access-grid .platform-card .button { width: 100%; }
  .domain-access { padding: 28px 20px; border-radius: 22px; }
  .domain-access h2 { font-size: clamp(1.8rem, 7vw, 2.2rem); }
  .domain-access-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .app-preview-tabs { gap: 2px; padding: 4px; }
  .app-preview-tabs button { min-height: 44px; padding-inline: 12px; font-size: .8rem; }
  .domain-access .app-preview-caption { min-height: 3em; }
  .sample-download-file { flex-direction: column; align-items: flex-start; gap: 12px; }
  .updates-grid { grid-template-columns: minmax(0, 1fr); }
  .updates-grid > .update-card { min-height: 0; }
  .update-card h3 { font-size: 1.22rem; margin-block: 16px 20px; }
  .reviews-carousel { --review-width: 100cqw; }
  .testimonial-card { padding: 22px; min-height: 272px; }
  .reviews-toolbar { gap: 12px; }
  .app-download { gap: 24px; padding: 28px 24px; border-radius: 22px; }
  .app-download h2 { font-size: clamp(1.9rem, 7.5vw, 2.4rem); }
  .download-device-switch label { padding-inline: 6px; }
  .app-download-visual { grid-template-columns: 210px; min-height: 392px; }
  .download-phone { width: 210px; height: 370px; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .updates-grid > .update-card { transition: none; }
  .app-preview-tabs button, .app-preview-art { transition: none; }
  .app-preview:hover .app-preview-art { transform: none; }
}
