/* ── Monthly muhūrta — the day bars ───────────────────────────────────
   Vedic Horā वैदिक होरा — layout for the one-bar-per-day month view in
   views/muhurta-monthly.ejs. /muhurta-monthly.css still owns the verdict
   marks, the legend, and everything INSIDE the expanded panel (.mm-limbs,
   .mm-windows, .mm-acts, .mm-focus, .mm-why …); this sheet owns only the
   bar, its summary row, and their phone/print behaviour.

   Optical-glass tokens from styles.css only — no new colour, no new type
   scale. POLARITY IS ALWAYS COLOUR + SHAPE + LABEL: the strip on each summary
   is built from the same .mm-mark spans (disc / slashed ring / ring / barred
   ring, each with its word), so removing every colour from this file leaves
   the month fully readable.

   CONTRAST FLOOR (same as the companion sheet): raw --ink-faint is 3.62:1 on
   a card — below AA for small text — so small text uses the pair
   var(--ink-soft) then color-mix(in srgb, var(--ink-faint) 70%, var(--ink)). */

/* The hero's tool links — the deeper surfaces this landing page fronts. */
.mm-tools { margin-top: 14px; }

/* ── The stack ──────────────────────────────────────────────────────── */
.mm-bars { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* One day. The <details> is the card; the summary is the whole bar. */
.mm-bar { padding: 0; margin: 0; }
.mm-bar > .mm-sum {
  /* The row IS the target: >=44px tall, full width, keyboard-native. */
  display: grid;
  grid-template-columns: 8.6rem 1fr auto 1.2rem;
  align-items: baseline;
  gap: 6px 14px;
  min-height: 44px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
}
.mm-bar > .mm-sum::-webkit-details-marker { display: none; }
.mm-bar > .mm-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.mm-sum-date { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.mm-sum-date .mm-num {
  font-size: 1.25rem; font-weight: 650; color: var(--ink); line-height: 1;
  font-variant-numeric: tabular-nums; min-width: 1.6ch; text-align: right;
}
.mm-sum-date .mm-wd { font-size: .84rem; color: var(--ink-soft); font-weight: 600; }

.mm-sum-brief { font-size: .86rem; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.mm-sum-adhika {
  display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px;
  font-size: .66rem; font-weight: 600; letter-spacing: .04em; color: var(--ink);
  border: 1px solid var(--hair); background: rgba(255,255,255,.5);
  vertical-align: 1px;
}

/* The verdict strip: .mm-mark spans (shape + word from the shared sheet),
   here also carrying the count when no undertaking is focused. */
.mm-sum-strip {
  display: flex; align-items: baseline; gap: 5px 13px; flex-wrap: wrap;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}
.mm-sum-strip .mm-mark { font-size: .66rem; }

/* The disclosure glyph — same +/− idiom as .mm-why, no colour meaning. */
.mm-sum-x { justify-self: end; align-self: center; }
.mm-sum-x::before {
  content: "+"; font-size: 1.1rem; line-height: 1;
  color: var(--ink-soft);
  color: color-mix(in srgb, var(--ink-faint) 70%, var(--ink));
}
.mm-bar[open] > .mm-sum .mm-sum-x::before { content: "\2212"; }
.mm-bar[open] > .mm-sum { border-bottom: 1px solid var(--hair); }

/* The expanded panel: the full day the old card carried, unchanged classes. */
.mm-body { padding: 14px 18px 16px; }
.mm-iso-line {
  margin: 0 0 10px; font-size: .74rem; font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  color: color-mix(in srgb, var(--ink-faint) 70%, var(--ink));
}

/* ── Phone. No horizontal PAGE scroll at 390: the strip drops under the
      brief line, nothing keeps a nowrap wider than the column. ─────────── */
@media (max-width: 700px) {
  .mm-bar > .mm-sum {
    grid-template-columns: 1fr 1.2rem;
    grid-template-areas: "date x" "brief x" "strip x";
    row-gap: 4px;
    padding: 11px 14px;
  }
  .mm-sum-date  { grid-area: date; }
  .mm-sum-brief { grid-area: brief; }
  .mm-sum-strip { grid-area: strip; justify-content: flex-start; }
  .mm-sum-x     { grid-area: x; }
  .mm-sum-date { white-space: normal; }
  .mm-body { padding: 12px 14px 14px; }
}

/* ── Print — a real almanac sheet: every bar open, black on white. The UA
      hides a closed <details> on the ::details-content pseudo-element
      (content-visibility), so THAT is what is overridden; the child rule
      stays for engines that hid by display, and the page script also sets
      `open` on beforeprint for engines that expose neither. ─────────────── */
@media print {
  .mm-tools { display: none !important; }
  .mm-bars { gap: 8px; }
  .mm-bar {
    background: #fff !important; box-shadow: none !important;
    border: .5pt solid #999 !important; break-inside: avoid;
  }
  .mm-bar::before, .mm-bar::after { display: none !important; }
  .mm-bar > .mm-sum { min-height: 0; padding: 6px 10px; }
  .mm-sum-x::before { content: "" !important; }
  .mm-bar:not([open])::details-content {
    content-visibility: visible !important;
    display: block !important;
  }
  .mm-bar > .mm-body { display: block !important; padding: 4px 10px 8px; }
  .mm-sum-date .mm-num, .mm-sum-brief { color: #111 !important; }
  .mm-sum-date .mm-wd, .mm-iso-line { color: #333 !important; }
}
