/* ==========================================================================
   Law Optional UPSC Notes page — page head, breadcrumb, sticky jump bar,
   "how to use" panel, note groups and cards, hub links, contact strip.
   Requires tokens.css + base.css. Mobile-first (360), enhanced at 640 / 960.
   (.page-head, .crumbs and .pills mirror copies.css: see pages/notes/SHARED_REQUESTS.md)
   ========================================================================== */

/* Page head ------------------------------------------------------------ */
.page-head { padding-block: var(--s-3) var(--s-4); }
.page-head__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.page-head__text { display: grid; gap: var(--s-2); min-width: 0; }
.page-head__kicker {
  font-family: var(--ff-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-red-text);
}
.page-head__title { font-size: var(--fs-h1); }
.page-head__intro { max-width: 70ch; color: var(--c-text-muted); }
.page-head__actions { min-width: 0; }

/* Breadcrumb */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0 var(--s-1); font-size: var(--fs-sm); color: var(--c-text-muted); }
.crumbs li + li::before { content: "\203A"; margin-right: var(--s-1); color: var(--c-text-muted); }
.crumbs a { color: var(--c-link-text); text-decoration: none; display: inline-flex; align-items: center; min-height: 28px; }
.crumbs a:hover { text-decoration: underline; }

@media (min-width: 960px) {
  .page-head { padding-block: var(--s-4) var(--s-5); }
  .page-head__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "crumbs crumbs" "text actions";
    column-gap: var(--s-6);
    row-gap: var(--s-3);
  }
  .page-head__inner > .crumbs { grid-area: crumbs; }
  .page-head__text { grid-area: text; }
  .page-head__actions { grid-area: actions; align-self: start; justify-self: end; width: 280px; padding-top: var(--s-1); }
  .page-head__actions .btn-row { flex-direction: column; }
  .page-head__actions .btn { width: 100%; }
}

/* Jump bar: sticky, one row of pills that scrolls inside its own box ------- */
.notes-jump {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--c-white);
  border-block: 1px solid var(--c-line);
}
.pills-wrap { min-width: 0; margin-inline: calc(-1 * var(--gutter)); }
.pills {
  display: flex;
  gap: var(--s-1);
  overflow-x: auto;
  padding-inline: var(--gutter);
  padding-block: var(--s-1);
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 var(--s-2);
  font-family: var(--ff-display);
  font-size: 1rem;
  color: var(--c-slate);
  background: var(--c-white);
  border: 1px solid var(--c-slate);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}
.pill:hover { background: var(--c-slate); color: var(--c-white); }
/* anchors land below the sticky bar */
.notes-guide, .notes-group, #keep-reading { scroll-margin-top: 72px; }

/* How to use ------------------------------------------------------------- */
.notes-how { padding-block: var(--s-4); }
.notes-how__panel {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-3);
  background: var(--c-surface);
  border-left: 4px solid var(--c-red-text);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.notes-how__title { font-size: var(--fs-h3); color: var(--c-charcoal); }
.notes-how__text p { max-width: 62ch; }
.notes-how__caption {
  font-family: var(--ff-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-slate);
  margin-bottom: var(--s-1);
}
.checks { display: grid; gap: var(--s-1); }
.checks li { display: flex; align-items: flex-start; gap: var(--s-1); }
.checks__icon { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; color: var(--c-red-text); }
@media (min-width: 960px) {
  .notes-how { padding-block: var(--s-6) var(--s-4); }
  .notes-how__panel { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-6); padding: var(--s-4); }
}

/* Note groups ------------------------------------------------------------ */
.notes-guide { padding-block: var(--s-4) var(--s-5); }
.notes-group { padding-block: var(--s-5); }
.notes-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-1) var(--s-2);
  margin-bottom: var(--s-2);
  padding-bottom: var(--s-2);
  border-bottom: 3px solid var(--c-red);
}
.notes-group__title { font-size: var(--fs-h2); }
.notes-group__meta { color: var(--c-text-muted); font-size: var(--fs-sm); white-space: nowrap; }
.notes-group__sub { color: var(--c-text-muted); max-width: 70ch; margin-bottom: var(--s-3); }
.notes-group__foot { display: flex; justify-content: flex-end; margin-top: var(--s-3); }
@media (min-width: 960px) {
  .notes-guide { padding-block: var(--s-5) var(--s-6); }
  .notes-group { padding-block: var(--s-6); }
  .notes-group__head { margin-bottom: var(--s-2); }
  .notes-group__sub { margin-bottom: var(--s-4); }
}

/* Note card ---------------------------------------------------------------- */
.note-card { gap: var(--s-1); }
.note-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-1) var(--s-2);
}
.note-card__caption {
  margin-top: var(--s-1);
  font-family: var(--ff-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.note-card__topics { display: grid; gap: 4px; color: var(--c-text); }
.note-card__topics li { display: flex; gap: var(--s-1); }
.note-card__topics li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 0.6em;
  border-radius: 50%;
  background: var(--c-red-text);
}
.note-card .card__foot { padding-top: var(--s-2); }
/* PDF + optional Watch lecture button: stacked full-width on phones, side by side from 640 */
.note-card__actions { justify-content: flex-start; gap: var(--s-1); }
.note-card__btn { min-height: var(--tap-min); }
@media (max-width: 639px) {
  .note-card__btn { flex: 1 1 100%; }
}
.note-card__icon { width: 18px; height: 18px; }
.note-card__meta { color: var(--c-text-muted); font-size: var(--fs-sm); white-space: nowrap; }

/* Guide: one wide card */
.notes-guide__grid { grid-template-columns: minmax(0, 1fr); }
.note-card--guide { border-top: 4px solid var(--c-red-text); }
@media (min-width: 640px) {
  .notes-guide__grid { grid-template-columns: minmax(0, 1fr); }
  .note-card--guide { max-width: 560px; }
}

/* Subject hubs: equal-height link tiles in one wrapping row ----------------- */
.hub-list {
  display: grid;
  gap: var(--s-2);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: stretch;
}
.hub-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-1);
  height: 100%;
  min-height: 56px;
  padding: var(--s-2);
  font-family: var(--ff-display);
  font-size: 1rem;
  color: var(--c-navy);
  background: var(--c-white);
  border: 2px solid var(--c-navy);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--ease), color var(--ease), box-shadow var(--ease);
}
.hub-link::after { content: "\2192"; flex: 0 0 auto; transition: transform var(--ease); }
.hub-link:hover { background: var(--c-navy); color: var(--c-white); box-shadow: var(--shadow-card); }
.hub-link:hover::after { transform: translateX(3px); }
@media (min-width: 960px) {
  .hub-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Contact strip ----------------------------------------------------------- */
.contact-strip {
  padding-block: var(--s-5);
  background: var(--c-surface);
  border-top: 1px solid var(--c-line);
}
.contact-strip__inner { display: grid; gap: var(--s-3); }
.contact-strip__title { font-size: var(--fs-h3); color: var(--c-charcoal); }
.contact-strip__sub { color: var(--c-text-muted); margin-top: var(--s-1); }
.btn--whatsapp { background: #1DA851; border-color: #1DA851; color: var(--c-white); }
.btn--whatsapp:hover { background: #178A42; border-color: #178A42; color: var(--c-white); }
.btn__icon { width: 20px; height: 20px; flex: 0 0 auto; }
@media (min-width: 960px) {
  .contact-strip { padding-block: var(--s-6); }
  .contact-strip__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-6); }
  .contact-strip__actions { justify-content: flex-end; }
}
