/* Vedic Horā — /markets: the ±5% record.
 *
 * Draws entirely on the optical-glass tokens in styles.css :root.
 * Polarity discipline: every up/down mark is colour + SHAPE (▲/▼) + label —
 * never colour alone. Indicator "readings" are DIRECTIONS relative to a
 * baseline, so they stay in neutral ink, never in --good/--bad: a crash
 * being above a baseline is not a good thing, and the page must not be able
 * to imply it is.
 */

.mk-hero h1 { max-width: 26ch; }

.mk-answer .stat-row { margin-bottom: .6rem; }

.mk-worstbest {
  color: var(--ink-soft);
  margin: .2rem 0 1.2rem;
}

/* ── Findings: neutral direction cards ───────────────────────────────── */
.mk-findings {
  list-style: none;
  padding: 0;
  margin: 0 0 .8rem;
  display: grid;
  gap: .8rem;
}
.mk-finding {
  padding: .95rem 1.1rem;
  line-height: 1.55;
  border-left: 4px solid var(--accent);
}
.mk-finding.mk-dir-down { border-left-color: var(--ink-faint); }
.mk-finding.mk-dir-flat { border-left-color: var(--hair); }

.mk-fence { font-style: italic; }

/* ── Tables ──────────────────────────────────────────────────────────── */
/* Wide content scrolls inside its own container; the page never scrolls
   horizontally at 390px. */
.mk-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  background: var(--glass-fill);
  box-shadow: 0 10px 30px var(--shadow-far);
  border: 1px solid var(--hair);
}
.mk-scroll:focus-visible { outline: 2px solid var(--accent); }

.mk-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: .92rem;
}
.mk-table th, .mk-table td {
  text-align: left;
  vertical-align: top;
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--hair);
}
.mk-table thead th {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(8px);
  color: var(--ink);
  z-index: 1;
}
.mk-table tbody tr:last-child td { border-bottom: 0; }

/* Sort buttons: real buttons, ≥44px touch targets. */
.mk-sort {
  appearance: none;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  padding: 0 .2rem;
  text-align: left;
}
.mk-sort::after { content: ' ↕'; color: var(--ink-faint); }
.mk-sort[data-active='asc']::after { content: ' ↑'; color: var(--accent); }
.mk-sort[data-active='desc']::after { content: ' ↓'; color: var(--accent); }

.mk-date { white-space: nowrap; }
.mk-index { white-space: nowrap; }

/* Move cell: colour + shape + signed label. */
.mk-pct { font-weight: 700; white-space: nowrap; }
.mk-pct.is-down { color: var(--bad); }
.mk-pct.is-up { color: var(--good); }
.mk-shape { font-size: .8em; }

.mk-halt {
  display: inline-block;
  margin-left: .45rem;
  padding: .1rem .5rem;
  border: 1px solid var(--ink-faint);
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.mk-cause { max-width: 34ch; }
.mk-haltnote {
  margin: .35rem 0 0;
  font-size: .85em;
  color: var(--ink-soft);
}

.mk-src { margin-top: .3rem; font-size: .85em; }
.mk-src summary {
  cursor: pointer;
  color: var(--accent);
  min-height: 24px;
  display: inline-block;
  padding: .2rem 0;
}
.mk-src p { margin: .25rem 0 0; color: var(--ink-soft); }

.mk-sky { max-width: 30ch; }
.mk-skyline {
  display: block;
  color: var(--ink-soft);
  font-size: .88em;
  line-height: 1.5;
}
.mk-skyline:first-child { color: var(--ink); }

/* Indicator table: counts bold, percentages beside them, readings neutral. */
.mk-ind-name { min-width: 16ch; font-weight: 600; }
.mk-cellpct { color: var(--ink-soft); }
.mk-verdict {
  display: inline-block;
  padding: .15rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--hair);
  font-size: .85em;
  color: var(--ink);
  background: rgba(255, 255, 255, .35);
}
/* Directions are shape/label only — deliberately NOT --good/--bad. */
.mk-verdict.mk-dir-up { border-color: var(--accent); }
.mk-verdict.mk-dir-down { border-style: dashed; }
.mk-verdict.mk-dir-thin { color: var(--ink-faint); }

/* ── Method accordion ────────────────────────────────────────────────── */
.mk-method summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
}
.mk-method summary::-webkit-details-marker { display: none; }
.mk-method summary::before { content: '▸'; color: var(--accent); transition: transform .18s ease; }
.mk-method[open] summary::before { transform: rotate(90deg); }
.mk-method-h { display: inline; margin: 0; }
.mk-method p { max-width: 72ch; line-height: 1.6; color: var(--ink-soft); }

.mk-fence-foot {
  margin-top: 1.2rem;
  padding-top: .8rem;
  border-top: 1px solid var(--hair);
  color: var(--ink-faint);
  font-size: .9rem;
}

/* ── Narrow screens ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .mk-table { font-size: .88rem; }
  /* Keep the ch-based column widths: the table scrolls sideways inside
     .mk-scroll rather than wrapping every cell into a tall sliver. */
  .mk-cause { min-width: 26ch; }
  .mk-sky { min-width: 24ch; }
}
