/* Shared styles for the data-mining study hub (/on-tap/).
   Layout is mostly Tailwind (CDN) utility classes in the markup.
   This file holds the reveal/collapse animation, dataset-table look,
   KaTeX sizing tweaks, the nav bar, and print rules. */

:root {
  --ink: #1e293b;        /* slate-800 */
  --muted: #64748b;      /* slate-500 */
  --line: #e2e8f0;       /* slate-200 */
  --brand: #4f46e5;      /* indigo-600 */
  --brand-soft: #eef2ff; /* indigo-50  */
  --ok: #059669;         /* emerald-600 */
}

body { font-family: 'Inter', system-ui, sans-serif; }
code, kbd, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ---- Top navigation bar (same markup on every page) ---- */
.study-nav a { transition: background-color .15s, color .15s; }
.study-nav a.active {
  background: var(--brand);
  color: #fff;
}

/* ---- Reveal / collapse panels (data-reveal toggles) ---- */
.reveal-body { display: none; }
.reveal-body.open { display: block; animation: revealFade .25s ease both; }
@keyframes revealFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.reveal-btn::before { content: '▸'; display: inline-block; margin-right: .4rem; transition: transform .2s; }
.reveal-btn.open::before { transform: rotate(90deg); }

/* ---- Calculation step: formula card → substitution reveal ---- */
.step { border-left: 3px solid var(--line); }
.step.done { border-left-color: var(--ok); }
.formula-box {
  background: #f8fafc;            /* slate-50 */
  border: 1px solid var(--line);
  border-radius: .6rem;
}
.subst-box {
  background: #ecfdf5;            /* emerald-50 */
  border: 1px dashed #6ee7b7;     /* emerald-300 */
  border-radius: .6rem;
}

/* ---- Dataset & tidset tables ---- */
table.tidset { border-collapse: collapse; width: 100%; }
table.tidset th, table.tidset td {
  border: 1px solid var(--line);
  padding: .5rem .75rem;
  text-align: left;
}
table.tidset thead th { background: #f1f5f9; font-weight: 600; }
table.tidset td.mono, table.tidset th.mono { font-family: ui-monospace, monospace; }

/* highlight chips for tids / itemsets */
.chip {
  display: inline-block; padding: 0 .45rem; border-radius: .35rem;
  font-family: ui-monospace, monospace; font-size: .8rem; font-weight: 600;
}
.chip-tid  { background: #dbeafe; color: #1d4ed8; }   /* blue   */
.chip-set  { background: #ede9fe; color: #6d28d9; }   /* violet */
.chip-sup  { background: #d1fae5; color: #047857; }   /* green  */
.chip-diff { background: #ffe4e6; color: #be123c; }   /* rose   */

/* KaTeX: keep block formulas from overflowing on mobile */
.katex-display { overflow-x: auto; overflow-y: hidden; padding: .25rem 0; }
.katex { font-size: 1.05em; }

/* ---- Print: expand everything, drop nav ---- */
@media print {
  .study-nav, .no-print { display: none !important; }
  .reveal-body { display: block !important; }
  a { color: inherit; text-decoration: none; }
}
