/* ============================================================================
   v24-reference.css — the REFERENCE ENTRY archetype: 92 routes.
   74 prasādam preparations and 18 temples.
   ----------------------------------------------------------------------------
   TWO EDITORIAL ARCHETYPES, ONE PAGE SHAPE

   The derived register files these under different archetypes — a prasādam is
   Family Action, a temple is Ceremony Guidance — and they share one stylesheet
   because they are the same object: a reference entry. A title, a one-line
   summary, provenance flags, a body, and a rail of facts that stays in view
   while the body scrolls.

   This is the same finding Gate 3a produced for the document routes, at four
   times the size, and it is why the register groups by stylesheet set rather
   than by archetype: an archetype is who the page answers to, a stylesheet set
   is what it looks like, and the two do not have to coincide.

   WHAT WAS ACTUALLY IN THE SHEET THIS REPLACES

   assets/css/shared-d8e38aa3f923.css was 23KB and 220 selectors. Measured
   against the markup of all 92 routes, SIXTY-SIX of those classes appear on
   none of them: the catalogue grid, the search box, the filter chips, the
   mantra blocks, the deity table, the two-column guide rail, the disclosure
   panels. They belong to pages that moved to their own sheets or were
   retired, and they have been downloaded by every one of these 92 routes ever
   since. The live vocabulary is the thirty classes below.

   PROVENANCE IS THE POINT OF THIS ARCHETYPE

   A prasādam entry's most important element is not its recipe, it is the flag
   saying how the entry is known: officially documented, historical, or
   reported and not temple-confirmed. The site does not publish a temple's
   working formula — the dittam — and it does not present a secondary source
   as a temple's practice. So the flags are a component with a fixed
   vocabulary, each one spelled out in words inside the badge, and the colour
   is the second signal rather than the only one.
   ============================================================================ */

/* --- the entry head --------------------------------------------------------
   .sp-head is the system's; the rule beneath it is this archetype's, because
   a reference entry's head is a masthead — everything below it is the record,
   and the line says where the record starts. Scoped under .ref rather than
   written over .sp-head, which rule 1 of verify_component_governance.py would
   refuse. */
.ref .sp-head {
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--sp-line);
}

/* --- the provenance and category flags -------------------------------------
   Six values, and the full set is here rather than scattered over 92 pages:

     documented   Officially documented          the temple publishes it
     daily        Daily naivedyam                offered every day
     festival     Festival offering              offered on named days
     gi           GI-protected                   a geographical indication
     historical   Historical                     attested, not current practice
     reported     Reported — not temple-confirmed

   `reported` is dashed on purpose. It is the one flag that says the site is
   not sure, and a dashed edge reads as provisional in a way no colour does —
   which matters because this flag is the difference between a record and a
   claim. */
.sp-tag[data-flag="documented"] { color: var(--sp-bronze); border-color: var(--sp-bronze-soft); }
.sp-tag[data-flag="historical"] { color: var(--sp-ink-3); }
.sp-tag[data-flag="reported"] {
  color: var(--sp-caution);
  border-color: var(--sp-caution);
  border-style: dashed;
}
.sp-tag-solid[data-flag="daily"]    { background: var(--sp-good);   border-color: var(--sp-good); }
.sp-tag-solid[data-flag="festival"] { background: var(--sp-accent); border-color: var(--sp-accent); }
.sp-tag-solid[data-flag="gi"]       { background: var(--sp-bronze); border-color: var(--sp-bronze); }

/* --- the two columns -------------------------------------------------------
   The rail is sticky on a wide screen and static below it. `top` is offset by
   the chrome's measured height rather than a guessed one: the header wraps at
   narrow widths and a stylesheet that guessed 84px put the rail under it. */
.ref-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: var(--sp-sec-tight) var(--sp-8);
  align-items: start;
}
.ref-main { max-width: var(--sp-measure); }
/* The in-prose h2. v24-layout.css sets it on .sp-wrap-text, which is the
   container whose purpose is prose; this page uses the wide container because
   of the rail, and .ref-main is its prose column. Same reasoning, same step:
   48px over 40px is two titles rather than a hierarchy, and a reference entry
   has eight sections to scroll past. */
.ref-main h2 { font-size: var(--sp-t-xl); }
.ref-side {
  position: sticky;
  top: calc(var(--sp-chrome-h, 64px) + var(--sp-5));
}
@media (max-width: 60rem) {
  .ref-cols { grid-template-columns: 1fr; }
  .ref-main { max-width: none; }
  /* A sticky rail in a single column follows the reader down the page and
     covers the thing they scrolled to. */
  .ref-side { position: static; }
}

/* --- the facts rail -------------------------------------------------------- */
.ref-sideh {
  font-family: var(--sp-sc);
  font-size: var(--sp-t-eyebrow);
  letter-spacing: var(--sp-track-eyebrow);
  text-transform: uppercase;
  color: var(--sp-ink-3);
  margin: var(--sp-6) 0 var(--sp-3);
}
.ref-sideh:first-child { margin-top: 0; }
.ref-facts {
  background: var(--sp-raised);
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-r);
  padding: var(--sp-2) var(--sp-5) var(--sp-4);
}
.ref-facts dl { margin: 0; }
.ref-facts dt {
  font-family: var(--sp-sc);
  font-size: var(--sp-t-eyebrow);
  letter-spacing: var(--sp-track-eyebrow);
  text-transform: uppercase;
  color: var(--sp-ink-3);
  margin: var(--sp-3) 0 var(--sp-1);
}
.ref-facts dd {
  margin: 0;
  font-size: var(--sp-t-sm);
  color: var(--sp-ink);
  line-height: 1.55;
}

/* --- what a temple offers --------------------------------------------------
   Grouped by occasion, each row a name and when it is offered. Two columns on
   a wide screen, one below — and the timing moves from right-aligned to
   left-aligned when it does, because a right-aligned fragment under its own
   label reads as a different column that is not there. */
.ref-offers { margin: var(--sp-4) 0 var(--sp-2); border-top: 1px solid var(--sp-line); }
.ref-ogrp { padding: var(--sp-4) 0 var(--sp-1); border-bottom: 1px solid var(--sp-line); }
.ref-ogrp:last-child { border-bottom: 0; }
.ref-oh {
  font-family: var(--sp-sc);
  font-size: var(--sp-t-eyebrow);
  letter-spacing: var(--sp-track-eyebrow);
  text-transform: uppercase;
  color: var(--sp-accent);
  margin: 0 0 var(--sp-2);
}
.ref-orow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-2) var(--sp-4);
  align-items: baseline;
  padding: var(--sp-2) 0;
}
.ref-orow + .ref-orow { border-top: 1px solid var(--sp-line); }
.ref-on { font-family: var(--sp-display); font-size: var(--sp-t-lg); color: var(--sp-ink); line-height: var(--sp-lh-snug); }
.ref-om { display: block; font-size: var(--sp-t-sm); color: var(--sp-ink-3); margin-top: var(--sp-1); }
.ref-ot { font-size: var(--sp-t-sm); color: var(--sp-ink-3); text-align: right; }
@media (max-width: 34rem) {
  .ref-orow { grid-template-columns: 1fr; }
  .ref-ot { text-align: left; }
}

/* --- what goes into it -----------------------------------------------------
   A diamond rather than a disc: these are ingredients in a temple
   preparation, not steps, and a numbered list would imply an order the site
   does not know. The legacy sheet carried a counter variant for ordered
   steps; no page on the estate uses it, so it is not carried over. */
.ref-ing { list-style: none; margin: var(--sp-4) 0 var(--sp-5); padding: 0; }
.ref-ing > li {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: baseline;
  padding: var(--sp-1) 0;
  margin: 0;
}
.ref-ing > li::before {
  content: "\25C6";
  font-size: 0.5rem;
  color: var(--sp-bronze-soft);
}
.ref-ing p { margin: 0 0 var(--sp-2); font-size: var(--sp-t-sm); }
.ref-ing p:last-child { margin-bottom: 0; }

/* --- where the record comes from ------------------------------------------- */
.ref-srcs {
  font-size: var(--sp-t-sm);
  color: var(--sp-ink-3);
  margin: var(--sp-3) 0 0;
  list-style: none;
  padding: 0;
}
.ref-srcs li { padding: var(--sp-2) 0; border-top: 1px solid var(--sp-line); margin: 0; }
.ref-srcs li:first-child { border-top: 0; }
/* A citation may be a long URL with no spaces in it, and a long URL that
   cannot break is a page that scrolls sideways on a phone. */
.ref-srcs a { word-break: break-word; }

/* --- related entries -------------------------------------------------------
   A hairline grid rather than separate cards: these are neighbours in one
   reference, and gaps between boxes would make them read as choices. */
.ref-rel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: 1px;
  background: var(--sp-line);
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-r);
  overflow: hidden;
}
.ref-rel a {
  background: var(--sp-ground);
  padding: var(--sp-3) var(--sp-4);
  text-decoration: none;
  color: inherit;
}
.ref-rel a:hover { background: var(--sp-raised); }
.ref-rel b {
  display: block;
  font-family: var(--sp-display);
  font-weight: 400;
  font-size: var(--sp-t-lg);
  color: var(--sp-ink);
  line-height: var(--sp-lh-snug);
}
.ref-rel a:hover b { color: var(--sp-accent-deep); }
.ref-rel span { font-size: var(--sp-t-xs); color: var(--sp-ink-3); }

@media print {
  .ref-cols { display: block; }
  .ref-rel { display: none; }
  .ref-facts { border-color: #999; background: transparent; }
}
