/* A tirth's own page and the list of all tirths (made by tools/tirth_pages.py): pages on the
   site's colours and fonts (tokens.css, main.css), with no scene. The list's search: assets/js/tirths.js. */
.tp { background: radial-gradient(120% 60% at 50% 0%, rgba(var(--glow-rgb), 0.16), transparent 70%), var(--bg); }
.tp a { color: inherit; }
.tp-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 14px var(--gutter);
}
.tp-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--title) !important; font-family: var(--font-display); font-size: 1.25rem; text-decoration: none; }
.tp-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.tp-nav a { color: var(--text-muted); font-weight: 600; text-decoration: none; }
.tp-nav a:hover { color: var(--accent); }
.tp-main { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter) 32px; }
.tp-crumbs { margin: 6px 0 14px; color: var(--text-faint); font-size: 0.86rem; }
.tp-crumbs a { color: var(--text-muted); }
.tp-card {
  padding: 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(var(--line-rgb), 0.06);
}
.tp-cover { display: block; width: calc(100% + 40px); height: auto; margin: -20px -20px 18px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.tp h1 { margin: 0; color: var(--title); font-family: var(--font-display); font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 400; line-height: 1.25; overflow-wrap: anywhere; }
.tp h1 [lang="hi"] { display: block; margin-top: 4px; font-family: var(--font-book); font-size: 0.8em; }
.tp-card p { margin: 8px 0 0; }
.tp-kind { color: var(--accent); font-weight: 700; }
.tp-kind-hi { margin-top: 2px !important; color: var(--text-muted); font-family: var(--font-book); }
.tp-place { display: flex; align-items: flex-start; gap: 6px; color: var(--text-muted); }
.tp-place svg { flex: none; width: 18px; height: 18px; margin-top: 4px; color: var(--accent); }
.tp-note { line-height: 1.6; }
.tp-note a { color: var(--accent); }
.tp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.tp-actions .chip { text-decoration: none; }
.tp-city { color: var(--text-muted); }
.tp-h2 { margin: 28px 0 12px; color: var(--title); font-family: var(--font-display); font-size: 1.35rem; font-weight: 400; scroll-margin-top: 12px; }
.tp-near { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tp-near li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 247, 232, 0.04);
}
.tp-near a { display: grid; flex: 1; min-width: 0; gap: 2px; text-decoration: none; }
.tp-near a:hover .tp-near-name { color: var(--accent); }
.tp-near-name { font-weight: 700; overflow-wrap: anywhere; }
.tp-near-name [lang="hi"] { color: var(--text-muted); font-weight: 400; }
.tp-near-meta { color: var(--text-faint); font-size: 0.86rem; overflow-wrap: anywhere; }
.tp-near strong { flex: none; color: var(--highlight); }
.tp-none { color: var(--text-muted); }
.tp-fine { margin: 22px 0 0; color: var(--text-faint); font-size: 0.82rem; }
.tp-foot { max-width: var(--content-max); margin: 0 auto; padding: 18px var(--gutter) 36px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 0.88rem; text-align: center; }
.tp-foot a { color: var(--text-muted); }

/* Photos of a tirth (Wikimedia Commons): side by side at the same height, stacked on phones */
.tp-photos { display: flex; gap: 3px; margin: -20px -20px 8px; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.tp-photo { position: relative; flex-basis: 0; min-width: 0; margin: 0; background: rgba(var(--ink-rgb), 0.6); }
.tp-photo img { display: block; width: 100%; height: auto; }
.tp-photo figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 12px 9px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.tp-photo figcaption [lang="hi"] { margin-left: 4px; font-family: var(--font-book); font-weight: 400; opacity: 0.85; }
.tp-card .tp-credit { margin: 0 0 14px; color: var(--text-faint); font-size: 0.76rem; }
.tp-credit a, .tp-credits a { color: var(--text-muted); }
@media (max-width: 559px) {
  .tp-photos { flex-direction: column; }
  .tp-photo { flex-basis: auto; }
  .tp-photo img { max-height: 80svh; object-fit: cover; }
}

/* The list of all tirths: a picture of the chosen state's tirth, the states, then that state's tirths.
   The page takes on the chosen state's theme colours (assets/js/tirths.js). */
.tx-hero { overflow: hidden; border: 1px solid var(--glass-border); border-radius: var(--radius-lg); background: rgba(var(--line-rgb), 0.06); }
.tx-banner { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: var(--screen-bg); }
.tx-banner img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.45s ease; }
.tx-banner img.is-changing { opacity: 0; }
.tx-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(var(--shade-rgb), 0.92)); pointer-events: none; }
.tx-banner h1 { position: absolute; z-index: 1; inset: auto 20px 16px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55); }
.tx-banner-place {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 24px);
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  background: rgba(var(--shade-rgb), 0.62);
  color: var(--text) !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}
.tx-banner-place span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-banner-place svg { flex: none; width: 15px; height: 15px; color: var(--accent); }
.tx-banner-place:hover { background: rgba(var(--shade-rgb), 0.85); }
.tx-hero-body { padding: 18px 20px 20px; }
.tx-lead { max-width: 68ch; margin: 0; font-size: 1.05rem; line-height: 1.65; }
.tx-lead-hi { margin: 10px 0 0; color: var(--highlight); font-family: var(--font-book); font-size: 1.05rem; line-height: 1.6; }
.tx-plan { margin: 12px 0 0; color: var(--text-muted); font-size: 0.9rem; }
.tx-plan a { color: var(--accent); }
.tx-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 18px;
  padding: 0 16px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.55);
}
.tx-search[hidden] { display: none; }
.tx-search:focus-within { box-shadow: var(--focus-ring); }
.tx-search svg { flex: none; width: 20px; height: 20px; color: var(--text-faint); }
.tx-search input { flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 1rem; }
.tx-search input::placeholder { color: var(--text-faint); }

.tx-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tx-state {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 247, 232, 0.04);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.tx-state:hover { border-color: rgba(var(--accent-rgb), 0.55); }
.tx-state[aria-current="true"] { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.16); box-shadow: inset 0 0 0 1px var(--accent); }
.tx-state-name { font-weight: 700; line-height: 1.25; }
.tx-state[aria-current="true"] .tx-state-name { color: var(--title); }
.tx-state-hi { color: var(--text-muted); font-family: var(--font-book); font-size: 0.9rem; }
.tx-state-n { margin-top: 4px; color: var(--text-faint); font-size: 0.8rem; font-weight: 600; }
.tx-state[aria-current="true"] .tx-state-n { color: var(--accent); }
@media (max-width: 559px) {
  /* two rows that scroll sideways, so the tirths start near the top */
  .tx-states {
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto);
    grid-template-columns: none;
    grid-auto-columns: 42%;
    margin: 0 calc(-1 * var(--gutter));
    padding: 2px var(--gutter) 4px;
    overflow-x: auto;
    scroll-padding-inline: var(--gutter);
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .tx-states::-webkit-scrollbar { display: none; }
  .tx-state { scroll-snap-align: start; }
  .tx-banner { aspect-ratio: 16 / 10; }
  .tx-banner h1 { inset: auto 16px 12px; }
  .tx-hero-body { padding: 16px; }
  .tx-lead, .tx-lead-hi { font-size: 0.97rem; }
}

.tx-empty { margin: 24px 0 0; padding: 22px; border: 1px dashed var(--glass-border); border-radius: var(--radius-md); color: var(--text-muted); text-align: center; }
.tx-group { margin-top: 28px; scroll-margin-top: 12px; }
.tx-group[hidden] { display: none; }
.tx-group-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 12px; color: var(--title); font-family: var(--font-display); font-size: 1.35rem; font-weight: 400; }
.tx-group-h [lang="hi"] { color: var(--text-muted); font-family: var(--font-book); font-size: 0.85em; }
.tx-group-n { margin-left: auto; color: var(--text-faint); font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; }
.tx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .tx-cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.tx-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 247, 232, 0.04);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.tx-card a:hover { border-color: rgba(var(--accent-rgb), 0.55); background: rgba(var(--accent-rgb), 0.07); }
.tx-card a:hover .tx-card-name { color: var(--accent); }
.tx-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(var(--accent-rgb), 0.24), transparent 68%), rgba(var(--ink-rgb), 0.55);
}
.tx-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tx-thumb svg { width: 44%; height: 44%; fill: var(--accent); opacity: 0.6; }
.tx-card-body { display: grid; gap: 2px; padding: 10px 12px 12px; }
.tx-card-name { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tx-card-hi { color: var(--text-muted); font-family: var(--font-book); font-size: 0.92rem; }
.tx-card-kind { margin-top: 6px; color: var(--accent); font-size: 0.8rem; font-weight: 700; }
.tx-card-place { overflow: hidden; color: var(--text-faint); font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.tp-credits { margin: 18px 0 0; color: var(--text-faint); font-size: 0.8rem; }
.tp-credits summary { cursor: pointer; }
.tp-credits ul { margin: 6px 0 0; padding-left: 18px; columns: 2 260px; }
