/* ==========================================================
   Home page book picker: books -> chapters -> verses
   ========================================================== */
.pick {
  --line: rgba(var(--ink), 0.14);
  padding: 72px var(--pad);
  border-top: 1px solid var(--line);
  scroll-margin-top: 0;
}

.pick__inner { max-width: 1120px; margin: 0 auto; }

.pick__intro { max-width: 62ch; margin-bottom: 36px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.pick__intro p + p { margin-top: 8px; }
[data-lang-mode="en"] .pick__intro [lang="ta"],
[data-lang-mode="ta"] .pick__intro p:not([lang="ta"]) { display: none; }

.pick__title {
  margin-top: 14px;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  outline: none;
}

.pick__title :lang(ta) { letter-spacing: 0; }

.pick__crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.pick__crumbs:empty { display: none; }

.pick__crumbs button {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.pick__crumbs > * + *::before { content: "›"; margin-right: 8px; color: var(--muted); display: inline-block; }

.pick__group {
  margin: 32px 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.pick__books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.pick__book,
.pick__num {
  border: 1px solid var(--line);
  background: none;
  color: var(--fg);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pick__book {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  position: relative;
  left: var(--shift, 0);
  min-height: 60px;
  padding: 10px 14px;
  border-radius: 14px;
  text-align: left;
}

.pick__name { font-size: 15px; line-height: 1.3; }
.pick__alt { font-size: 12.5px; color: var(--muted); }

.pick__nums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px;
  margin-top: 28px;
}

.pick__num {
  display: grid;
  place-items: center;
  height: 52px;
  border-radius: 14px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .pick__book:hover,
  .pick__num:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
  .pick__book:hover .pick__alt { color: inherit; }
}

.pick__book:focus-visible,
.pick__num:focus-visible,
.pick__crumbs button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

@media (min-width: 640px) {
  .pick { padding-top: 96px; padding-bottom: 96px; }
}

/* Tablet portrait and open foldables: the hero button spans the row so it can centre */
@media (min-width: 600px) and (min-height: 700px) and (max-aspect-ratio: 1/1) and (max-width: 1279px) {
  .content > .actions { grid-column: 1 / -1; flex-direction: row; justify-content: center; }
}

.noscript { padding: 14px var(--pad); background: var(--fg); color: var(--bg); font-size: 14px; line-height: 1.5; }
.noscript a { color: inherit; }

/* Burger menu */
.header__actions { position: relative; }
.menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 210px;
  padding: 8px;
  border: 1px solid rgba(var(--ink), 0.16);
  border-radius: 16px;
  background: var(--sheet);
  box-shadow: 0 12px 40px var(--shadow);
}
.menu[hidden] { display: none; }
.menu a { padding: 13px 14px; border-radius: 10px; color: var(--fg); font-size: 15px; text-decoration: none; }
.menu a:hover { background: rgba(var(--ink), 0.07); }

/* Keep the section from widening the page on landscape phones */
.pick { overflow-x: clip; }

/* Section headings sit in the centre */
.pick__intro { margin-left: auto; margin-right: auto; text-align: center; }
.pick__eyebrow,
.pick__title,
.pick__group { text-align: center; }
.pick__crumbs { justify-content: center; }

/* Find a verse: heading block in the centre */
.finder__intro { text-align: center; }
.finder__lede { margin-left: auto; margin-right: auto; }

/* Desktop: heading across the page, popular verses centred beneath it */
@media (min-width: 1024px) and (min-height: 600px) and (min-aspect-ratio: 1/1), (min-width: 1280px) {
  .finder {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "popular" "stage";
    row-gap: 28px;
  }
  .popular { justify-self: center; }
  .popular__label { text-align: center; }
  .popular__row { justify-content: center; }
}

/* Very narrow phones: everything in the top bar has to fit on one row */
@media (max-width: 359px) {
  .header__actions { gap: 2px; }
  .header .langmenu__btn { padding: 0 9px; font-size: 11px; letter-spacing: 0.02em; }
  .header .langmenu__chev { display: none; }
  .header .theme-toggle { width: 34px; }
}

/* One menu at every size: the eight links live behind the three lines */
.nav { display: none !important; }
.burger { display: grid !important; }
