/* Anudina reference pages on dixith.com.
 *
 * The theme owns the page; this only styles the Anudina block inside it, and
 * it inherits the theme's own text colour so it does not fight a dark theme.
 */

.anudina {
  --an-accent: #C2410C;
  --an-line: color-mix(in srgb, currentColor 16%, transparent);
  --an-soft: color-mix(in srgb, currentColor 5%, transparent);
  --an-mute: color-mix(in srgb, currentColor 65%, transparent);
  --an-good: #15803D;
  --an-bad: #B42318;
  margin: 0 0 1.5em;
}

.anudina *, .anudina *::before, .anudina *::after { box-sizing: border-box; }

/* ---------- language bar ---------- */

.anudina .an-bar {
  display: flex; gap: 6px; margin: 0 0 16px; flex-wrap: wrap;
}
.anudina .an-lang {
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  background: transparent; color: inherit;
  border: 1px solid var(--an-line);
}
.anudina .an-lang:hover { border-color: var(--an-accent); }
.anudina .an-lang.is-on {
  background: var(--an-accent); border-color: var(--an-accent); color: #fff;
}

/* ---------- the live card ---------- */

.anudina .an-live { margin: 0 0 22px; }
.anudina .an-load { font-size: 14px; opacity: .5; padding: 10px 0; }

.anudina .an-card {
  border: 1px solid var(--an-line); border-radius: 14px;
  padding: 14px 16px 12px; background: var(--an-soft);
}
.anudina .an-card-h {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  opacity: .62; margin: 0 0 10px;
}
.anudina[lang="kn"] .an-card-h { letter-spacing: 0; text-transform: none; font-size: 12px; }
.anudina .an-rule { height: 1px; background: var(--an-line); margin: 16px 0 4px; }

/* the headline date */
.anudina .an-next { display: flex; flex-direction: column; gap: 3px; }
.anudina .an-next b { font-size: 23px; font-weight: 700; line-height: 1.2; }
.anudina .an-next span { font-size: 14px; opacity: .75; }
.anudina .an-next i { font-style: normal; font-size: 16px; font-weight: 600; color: var(--an-accent); }
.anudina .an-next em { font-style: normal; font-size: 13px; opacity: .6; margin-top: 3px; }

/* the table of later dates */
.anudina .an-tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.anudina .an-tbl td { padding: 7px 0; border-top: 1px solid var(--an-line); }
/* The rule above the table already separates it from the headline date,
   so the first row must not draw a second line under it. */
.anudina .an-tbl tr:first-child td { border-top: none; }
.anudina .an-tbl td:nth-child(2) { opacity: .65; text-align: right; white-space: nowrap; }
.anudina .an-tbl td:nth-child(3) { opacity: .8; text-align: right; padding-left: 10px; }

/* today's five limbs */
.anudina .an-dl {
  display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 0;
}
.anudina .an-dl dt {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  opacity: .55; align-self: baseline; margin: 0;
}
.anudina[lang="kn"] .an-dl dt { letter-spacing: 0; text-transform: none; font-size: 12px; }
.anudina .an-dl dd { margin: 0; font-size: 16px; font-weight: 600; }
.anudina .an-dl dt.is-on { opacity: 1; color: var(--an-accent); }
.anudina .an-dl dd.is-on { color: var(--an-accent); font-size: 19px; }
.anudina .an-dl dd em { font-style: normal; font-weight: 500; font-size: 13px; opacity: .6; }

/* a run of time windows */
.anudina .an-span {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 0; border-top: 1px solid var(--an-line); font-size: 15px;
}
.anudina .an-span:first-of-type { border-top: none; }
.anudina .an-span b { font-weight: 600; flex-grow: 1; }
.anudina .an-span span { font-variant-numeric: tabular-nums; white-space: nowrap; }
.anudina .an-span.is-good b { color: var(--an-good); }
.anudina .an-span.is-bad b { color: var(--an-bad); }
.anudina .an-span.is-past { opacity: .45; }
.anudina .an-span.is-plain { opacity: .7; font-size: 14px; }
.anudina .an-span i {
  font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; background: var(--an-accent); color: #fff;
  border-radius: 5px; padding: 3px 6px;
}

.anudina .an-note { font-size: 12px; opacity: .55; margin: 12px 0 0; }

/* ---------- the body ---------- */

.anudina .an-body[hidden] { display: none; }
.anudina .an-body h2 { margin: 1.6em 0 .5em; }
.anudina .an-body h3 { margin: 1.3em 0 .4em; }
.anudina .an-body p, .anudina .an-body li { line-height: 1.65; }

/* ---------- the footer ---------- */

.anudina .an-foot { margin-top: 26px; }
.anudina .an-cta {
  display: flex; flex-direction: column; gap: 3px;
  border: 1px solid color-mix(in srgb, var(--an-accent) 40%, var(--an-line));
  border-radius: 10px; padding: 13px 16px; text-decoration: none; color: inherit;
}
.anudina .an-cta:hover { border-color: var(--an-accent); }
.anudina .an-cta b { font-size: 16px; font-weight: 700; color: var(--an-accent); }
.anudina .an-cta span { font-size: 13px; opacity: .72; line-height: 1.5; }

@media (max-width: 480px) {
  .anudina .an-next b { font-size: 20px; }
  .anudina .an-dl { grid-template-columns: 1fr; gap: 2px 0; }
  .anudina .an-dl dd { margin-bottom: 8px; }
}

/* the way on to more days, under a short run */
.anudina .an-more { margin: 12px 0 0; font-size: 14px; }
.anudina .an-more a { color: var(--an-accent); font-weight: 700; text-decoration: none; }
.anudina .an-more a:hover { text-decoration: underline; }

/* ---------- the numbered lists (v50) ----------
   The sixty samvatsaras, the months, the nakshatras and the other full
   lists of a reference page: <ol class="an-list"> is one column with a note
   under each name; with "an-cols" it is columns of names. The browser's own
   numbers are kept, so a list that starts at 25 says 25. */
.anudina .an-body ol.an-list {
  list-style: decimal outside; margin: 1em 0 1.7em; padding: 8px 18px 8px 16px;
  border: 1px solid var(--an-line); border-radius: 14px; background: var(--an-soft);
}
.anudina .an-body ol.an-list > li {
  margin: 0 0 0 2.3em; padding: 9px 0 9px 4px; line-height: 1.45;
  border-top: 1px solid var(--an-line); break-inside: avoid;
}
.anudina .an-body ol.an-list > li:first-child { border-top: none; }
.anudina .an-body ol.an-list > li::marker {
  color: var(--an-accent); font-weight: 700; font-variant-numeric: tabular-nums;
}
.anudina .an-list b { font-weight: 700; font-size: 1.06em; }
.anudina .an-list small { display: block; font-size: .86em; line-height: 1.5; opacity: .78; margin-top: 2px; }
.anudina .an-list a { color: inherit; text-decoration-color: var(--an-accent); text-underline-offset: 3px; }
.anudina .an-list a:hover b { color: var(--an-accent); }
.anudina .an-body ol.an-cols { columns: 3 8.6em; column-gap: 22px; column-rule: 1px solid var(--an-line); }
.anudina .an-body ol.an-cols > li { border-top: none; padding-top: 6px; padding-bottom: 6px; }

/* ---------- v51: the sankalpa before sunrise ----------
   The live card's three ways, one under another, and the comparison table
   of the page that explains them. The table's cells wrap on a phone; should a
   very narrow screen still be too small, the table scrolls inside its own
   box and the page never does. */
.anudina .an-way-h { font-size: 13px; opacity: .7; margin: 0 0 4px; }
.anudina .an-way { display: flex; flex-direction: column; gap: 1px; padding: 9px 0; border-top: 1px solid var(--an-line); }
.anudina .an-way b { font-size: 13px; font-weight: 600; opacity: .7; }
.anudina .an-way span { font-size: 16px; font-weight: 600; }
.anudina .an-scroll { overflow-x: auto; margin: 1em 0; border: 1px solid var(--an-line); border-radius: 14px; background: var(--an-soft); }
.anudina .an-body table.an-table { width: 100%; min-width: 17em; border-collapse: collapse; margin: 0; font-size: .9em; line-height: 1.45; }
.anudina .an-table th, .anudina .an-table td { padding: 9px 10px; text-align: left; vertical-align: top; border: 0; border-top: 1px solid var(--an-line); overflow-wrap: break-word; }
.anudina .an-table thead th { border-top: 0; font-size: .82em; font-weight: 700; opacity: .7; }
.anudina .an-table td:first-child strong { color: var(--an-accent); }
.anudina .an-body h3 { margin: 1.4em 0 .4em; }

