/* Agni & Qi — Celadon & Cinnabar.
   Quiet celadon paper; each tradition signs its reading with a seal. */

:root {
  --ground: #edf2ee;
  --ground-rule: #dbe5df;
  --paper: #f7faf7;
  --ink: #22302b;
  --ink-soft: #3c4c45;
  --muted: #56665f;
  --line: #cfdcd4;
  --line-strong: #b4c7bc;
  --celadon: #8fb3a4;
  --celadon-wash: #dfe9e3;

  --warm: #c2412d;        /* cinnabar */
  --warm-2: #a3311f;
  --warm-wash: #f6e3dc;
  --cool: #4f6f8f;        /* slate ink */
  --cool-2: #3a5674;
  --cool-wash: #e1e9f1;
  --even: #7d7259;        /* warm stone */
  --even-wash: #ece8dc;

  --ramp: linear-gradient(90deg, var(--cool-2), var(--cool) 18%, var(--celadon) 40%, #e3dfd2 50%, #e8b2a2 62%, var(--warm) 84%, var(--warm-2));
  --focus: 0 0 0 3px color-mix(in srgb, var(--cool) 35%, transparent);

  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --deva: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", serif;
  --sans: "Albert Sans", "Helvetica Neue", sans-serif;

  --radius: 10px;
  --lift: 0 1px 2px rgb(34 48 43 / 0.05), 0 6px 18px -8px rgb(34 48 43 / 0.14);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --page: 1120px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #141c19;
    --ground-rule: #1b2622;
    --paper: #1b2521;
    --ink: #e4ece7;
    --ink-soft: #c5d2cb;
    --muted: #9fb0a8;
    --line: #2e3c36;
    --line-strong: #40524a;
    --celadon: #6f9686;
    --celadon-wash: #22302a;
    --warm: #e8644a;
    --warm-2: #ff4f30;
    --warm-wash: #3a2520;
    --cool: #8fb0d6;
    --cool-2: #5f8fd0;
    --cool-wash: #1f2b38;
    --even: #c8b993;
    --even-wash: #2d2a21;
    --ramp: linear-gradient(90deg, #3a5674, #4f6f8f 18%, #5f8576 40%, #6b6758 50%, #9c5a4c 62%, #c2412d 84%, #d8553f);
    --lift: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 22px -10px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}

/* ── base ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
  background-color: var(--ground);
  /* Layer 1: a celadon wash pooled at the top of the page. */
  background-image: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--celadon) 16%, transparent), transparent 70%);
  background-attachment: fixed;
  caret-color: var(--warm);
  scrollbar-color: var(--line-strong) var(--ground);
}
/* Layer 2: prescription-paper rules, fixed, fading out below the fold and kept out of the reading column. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--ground-rule) 1px, transparent 1px) 0 0 / 100% 48px;
  -webkit-mask-image: linear-gradient(#000 0, #000 30vh, transparent 75vh), linear-gradient(90deg, #000 0, transparent calc(50% - var(--page) / 2 + 40px), transparent calc(50% + var(--page) / 2 - 40px), #000 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(#000 0, #000 30vh, transparent 75vh), linear-gradient(90deg, #000 0, transparent calc(50% - var(--page) / 2 + 40px), transparent calc(50% + var(--page) / 2 - 40px), #000 100%);
  mask-composite: intersect;
}
body > * { position: relative; }
/* Below the page width there are no side margins to hold the rules, so they live in a band
   under the top bar instead and fade out before the reading text. */
@media (max-width: 1200px) {
  body::before {
    -webkit-mask-image: linear-gradient(#000 0, #000 150px, transparent 260px);
    mask-image: linear-gradient(#000 0, #000 150px, transparent 260px);
  }
}

::selection { background: color-mix(in srgb, var(--celadon) 45%, transparent); color: var(--ink); }
a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--warm) 55%, transparent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--warm); text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; text-wrap: balance; margin: 0; }
p { margin: 0; }
b { font-weight: 600; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── top bar ──────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--page); margin: 0 auto; padding: 14px 24px;
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 28px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 0.28em;
  font: 700 1.6rem/1 var(--serif); letter-spacing: -0.01em; text-decoration: none; color: var(--ink);
}
.brand-agni { color: var(--warm); }
.brand-qi { color: var(--cool); }
.brand-amp { color: var(--muted); font-weight: 500; font-size: 0.8em; }

.tabs { display: flex; gap: 2px; }
.tabs [role=tab] {
  font: 500 0.95rem var(--sans); color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 8px 12px; border-radius: 8px; position: relative;
  transition: color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
.tabs [role=tab]:hover { color: var(--ink); background: var(--celadon-wash); }
.tabs [role=tab][aria-selected="true"] { color: var(--ink); font-weight: 600; }
.tabs [role=tab][aria-selected="true"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--warm);
}

.field {
  display: flex; align-items: stretch; min-width: 0;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.field:focus-within { border-color: var(--cool); box-shadow: var(--focus); }
.field input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: 400 0.98rem var(--sans); padding: 11px 14px;
}
.field input::placeholder { color: var(--muted); }
.field input:focus-visible { box-shadow: none; }
.field button, .button {
  font: 600 0.95rem var(--sans); color: var(--paper); background: var(--ink); border: 0; cursor: pointer;
  padding: 0 20px; border-radius: 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0; white-space: nowrap;
  transition: background-color 0.2s var(--ease-out);
}
.field button:hover, .button:hover { background: var(--ink-soft); }
.button { border-radius: var(--radius); padding: 11px 20px; }

/* ── page ─────────────────────────────────────────────────────────────── */
.page { flex: 1; width: 100%; max-width: var(--page); margin: 0 auto; padding: 40px 24px 24px; }

.welcome { max-width: 62ch; padding: 24px 0 8px; }
.welcome-recipe {
  max-width: none; display: grid; grid-template-columns: minmax(0, 62ch) 1fr; column-gap: 40px;
}
.welcome-recipe > :not(.welcome-seals) { grid-column: 1; }
.welcome h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.15; letter-spacing: -0.015em; }
.lede { margin-top: 16px; font-size: 1.08rem; color: var(--ink-soft); }
.examples { margin-top: 22px; color: var(--muted); }
.examples a, .link-button { font: inherit; color: var(--ink); }
.link-button {
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--warm) 55%, transparent);
  text-underline-offset: 0.2em; text-decoration-thickness: 1px;
}
.link-button:hover { color: var(--warm); text-decoration-color: currentColor; }
.welcome-seals {
  grid-column: 2; grid-row: 1 / span 3; justify-self: end; align-self: start;
  display: flex; align-items: flex-start; gap: 18px; padding-top: 12px;
}
.welcome-seals .seal:nth-child(2) { transform: rotate(5deg); margin-top: 40px; }

/* loading: dim the old content gently while a request runs */
.loadable { position: relative; }
.loading { display: none; color: var(--muted); font-style: italic; margin-top: 12px; }
.loadable.htmx-request > div { opacity: 0.45; filter: blur(1px); transition: opacity 0.3s, filter 0.3s; }
.loadable.htmx-request > .loading { display: block; }

/* ── results ──────────────────────────────────────────────────────────── */
.result-head { margin-bottom: 22px; }
.result-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1.2; letter-spacing: -0.01em; }
.meta { margin-top: 6px; color: var(--muted); font-size: 0.93rem; overflow-wrap: anywhere; }

.slips { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; position: relative; isolation: isolate; }
.slips::before {
  content: ""; position: absolute; inset: -60px -80px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--celadon) 22%, transparent), transparent);
}
.slip {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; column-gap: 16px; row-gap: 14px; align-items: start; align-content: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px 20px; box-shadow: var(--lift);
}
.slip h3 { font: 600 0.98rem var(--sans); color: var(--ink); }
.slip-measure { font-weight: 400; color: var(--muted); margin-left: 4px; }
.verdict { font: 700 clamp(1.7rem, 3vw, 2.15rem)/1.15 var(--serif); margin-top: 6px; letter-spacing: -0.01em; }
.slip-wide { grid-column: 1 / -1; }
.drivers { margin-top: 12px; color: var(--ink-soft); font-size: 0.95rem; }

/* the seal: a square of seal ink, slightly rotated, impressed into the slip */
.seal {
  --seal: var(--even);
  display: inline-grid; grid-template-rows: 1fr auto; place-items: center;
  width: 92px; height: 92px; padding: 8px 6px 6px;
  color: var(--seal); border: 2.5px solid currentColor; border-radius: 9px;
  background: color-mix(in srgb, var(--seal) 7%, transparent);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px color-mix(in srgb, currentColor 55%, transparent);
  transform: rotate(-4deg);
  user-select: none;
}
.seal-warm { --seal: var(--warm); }
.seal-cool { --seal: var(--cool); }
.seal-even { --seal: var(--even); }
.seal-filled {
  color: var(--paper); background: var(--seal); border-color: var(--seal);
  box-shadow: inset 0 0 0 3px var(--seal), inset 0 0 0 4px color-mix(in srgb, var(--paper) 55%, transparent);
}
.seal-glyph { font: 700 2.1rem/1 var(--serif); }
.seal-deva .seal-glyph { font: 400 1.75rem/1.1 var(--deva); padding-top: 4px; }
.seal-word { font: 600 0.72rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.slip-tcm .seal { transform: rotate(3deg); }

.scale { position: relative; height: 8px; border-radius: 999px; background: var(--ramp); margin-top: 4px; }
.scale::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--ink); opacity: 0.25; }
.scale-pin {
  position: absolute; top: 50%; left: var(--at); width: 3px; height: 22px; border-radius: 2px;
  transform: translate(-50%, -50%); background: var(--ink);
  box-shadow: 0 0 0 2px var(--paper);
}
.scale-ends { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.8rem; color: var(--muted); }

.note {
  margin-top: 18px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--celadon-wash); color: var(--ink); max-width: 75ch;
}
.note-quiet { background: var(--even-wash); }
.note-error { background: var(--warm-wash); margin-top: 0; }
.notes { margin-top: 18px; color: var(--ink-soft); max-width: 72ch; font-style: italic; }

.aside-row { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 20px 0 6px; font-size: 0.93rem; }
.aside-label { font-weight: 600; color: var(--ink); margin-right: 10px; }
.doshas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); }
.method { color: var(--muted); }
.dosha { white-space: nowrap; padding: 2px 10px; border-radius: 999px; background: var(--even-wash); color: var(--ink-soft); font-size: 0.88rem; }
.dosha-up { background: var(--warm-wash); }
.dosha-down { background: var(--cool-wash); }

/* ingredient ledger */
.ledger {
  margin-top: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 22px 16px; overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th {
  text-align: left; font: 600 0.8rem var(--sans); color: var(--muted);
  padding: 14px 10px 10px 0; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
td { padding: 11px 10px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color 0.15s; }
tbody tr:hover { background: color-mix(in srgb, var(--celadon-wash) 60%, transparent); }
td.raw { color: var(--ink-soft); }
table { table-layout: fixed; }
.c-raw { width: 38%; } .c-as { width: 30%; } .c-ay { width: 12%; } .c-tcm { width: 13%; } .c-w { width: 7%; }
.more > summary {
  cursor: pointer; width: fit-content; margin-top: 10px; padding: 6px 0; color: var(--ink-soft); font-weight: 500; border-radius: 6px;
}
.more > summary:hover { color: var(--ink); }
.more[open] > summary { margin-bottom: 4px; }
.more table tbody tr:first-child td { border-top: 1px solid var(--line); }
.num { text-align: right; padding-right: 0; }
.flag {
  display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 5px;
  font-size: 0.76rem; color: var(--muted); border: 1px solid var(--line-strong); cursor: help;
}
.flag-differs { color: var(--ink-soft); background: var(--even-wash); border-color: transparent; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; color: var(--ink); text-transform: capitalize;
}
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--even)); transform: rotate(45deg); }
.chip-warm { --c: var(--warm); }
.chip-warm2 { --c: var(--warm-2); }
.chip-warm2::before { box-shadow: 0 0 0 2px var(--warm-wash); }
.chip-cool { --c: var(--cool); }
.chip-cool2 { --c: var(--cool-2); }
.chip-cool2::before { box-shadow: 0 0 0 2px var(--cool-wash); }
.chip-even { --c: var(--even); }

.hint { margin-top: 12px; color: var(--muted); font-size: 0.86rem; max-width: 75ch; }

/* body search */
.body-index { margin-top: 28px; display: grid; gap: 22px; }
.body-group h2 { font: 600 0.82rem var(--sans); color: var(--muted); margin-bottom: 10px; }
.body-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.body-chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line-strong); color: var(--ink); text-decoration: none;
  font: 500 0.95rem var(--sans); transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
.body-chip span { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.body-chip:hover { border-color: var(--ink-soft); background: var(--celadon-wash); color: var(--ink); }
.slips-single { grid-template-columns: 1fr; }
.slip-foods { grid-template-columns: 1fr; }
.slip-foods .hint { margin-top: 2px; }
.food-group + .food-group { margin-top: 16px; }
.empty-note { color: var(--ink-soft); font-style: italic; max-width: 52ch; }
.food-group h4 { font: 600 0.82rem var(--sans); color: var(--ink-soft); margin: 0 0 8px; }
.food-group h4 span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.foods { display: flex; flex-wrap: wrap; gap: 6px 8px; }
a.food {
  padding: 3px 11px 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--ground);
  text-decoration: none; text-transform: none; font-size: 0.9rem;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
a.food:hover { border-color: var(--ink-soft); background: var(--paper); color: var(--ink); }
a.dosha { text-decoration: none; color: var(--ink-soft); }
a.dosha:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.facts dd a { text-transform: none; }

/* ingredient facts */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 4px 0 0; font-size: 0.94rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-transform: capitalize; }
.facts dd.doshas { text-transform: none; }
.conf { color: var(--muted); }

/* disclosure: an authored chevron instead of the browser triangle */
details > summary { list-style: none; display: flex; align-items: center; gap: 8px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3.5 10.5 8 6 12.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3.5 10.5 8 6 12.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.25s var(--ease-out);
}
details[open] > summary::before { transform: rotate(90deg); }

/* paste fallback */
.paste { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 18px; }
.paste summary { cursor: pointer; color: var(--ink-soft); font-weight: 500; width: fit-content; border-radius: 6px; }
.paste summary:hover { color: var(--ink); }
.paste form { margin-top: 18px; max-width: 720px; }
.paste label { display: block; font-weight: 600; font-size: 0.93rem; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
textarea {
  width: 100%; font: 400 0.96rem/1.55 var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 11px 14px; margin-bottom: 16px; resize: vertical;
}
textarea::placeholder { color: var(--muted); }
textarea:focus-visible { border-color: var(--cool); }

.footer {
  max-width: var(--page); width: 100%; margin: 0 auto; padding: 36px 24px 44px;
  color: var(--muted); font-size: 0.84rem;
}
.footer p { max-width: 80ch; border-top: 1px solid var(--line); padding-top: 18px; }

/* ── motion: one load sequence, one seal impression ───────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .topbar { animation: settle 0.7s var(--ease-out) both; }
  .page > section > * , .footer { animation: rise 0.8s var(--ease-out) both; }
  .page > section > *:nth-child(2) { animation-delay: 0.12s; }
  .footer { animation-delay: 0.22s; }
  .welcome h1 { animation: rise 0.9s var(--ease-out) 0.08s both; }
  .welcome .lede { animation: rise 0.9s var(--ease-out) 0.18s both; }
  .welcome .examples { animation: rise 0.9s var(--ease-out) 0.28s both; }
  .welcome-seals .seal { animation: press 0.9s var(--ease-out) 0.45s both; }
  .welcome-seals .seal:nth-child(2) { animation-delay: 0.65s; }

  /* when a reading lands: slips rise, then each tradition presses its seal */
  .result .result-head { animation: rise 0.6s var(--ease-out) both; }
  .result .slip { animation: rise 0.7s var(--ease-out) both; }
  .result .slip + .slip { animation-delay: 0.08s; }
  .result .slip .seal { animation: press 0.85s var(--ease-out) 0.3s both; }
  .result .slip + .slip .seal { animation-delay: 0.48s; }
  .result .slip .scale-pin { animation: slide 1s var(--ease-out) 0.2s both; }
  .result .ledger, .result .aside-row, .result .note { animation: rise 0.7s var(--ease-out) 0.18s both; }
}
@keyframes settle { from { opacity: 0; transform: translateY(-8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } }
@keyframes press {
  0% { opacity: 0; transform: rotate(-12deg) scale(1.35); filter: blur(4px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; }
}
@keyframes slide { from { left: 50%; } }

/* ── narrow screens ───────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .topbar-inner { grid-template-columns: auto 1fr; gap: 12px 16px; padding: 12px 16px; }
  .tabs { justify-self: end; }
  .field { grid-column: 1 / -1; }
  .page { padding: 28px 16px 16px; }
  .footer { padding: 28px 16px 36px; }
  .slips { grid-template-columns: 1fr; }
  .slips::before { inset: -40px 0; }
  .welcome-recipe { grid-template-columns: 1fr; }
  .welcome-seals { grid-column: 1; grid-row: auto; order: -1; justify-self: start; padding-top: 0; margin-bottom: 18px; }
  .welcome-seals .seal { width: 64px; height: 64px; }
  .welcome-seals .seal-glyph { font-size: 1.4rem; }
  .welcome-seals .seal-deva .seal-glyph { font-size: 1.2rem; }
  .welcome-seals .seal:nth-child(2) { margin-top: 18px; }
}
@media (max-width: 560px) {
  .brand { font-size: 1.35rem; }
  .slip-measure { display: block; margin-left: 0; font-size: 0.88rem; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dt { margin-top: 10px; font-size: 0.85rem; }
  .facts dt:first-child { margin-top: 0; }
  .facts dd.doshas { margin-top: 4px; }
  table { table-layout: auto; }
  colgroup { display: none; }
  .seal { width: 76px; height: 76px; }
  .seal-glyph { font-size: 1.7rem; }
  .seal-deva .seal-glyph { font-size: 1.4rem; }
  .ledger { padding: 4px 14px 14px; }
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { border: 0; padding: 0; }
  td.raw, td:nth-child(2) { grid-column: 1 / -1; }
  td.num { display: none; }
  td:nth-child(3)::before { content: "Ayurveda "; color: var(--muted); font-size: 0.8rem; }
  td:nth-child(4)::before { content: "TCM "; color: var(--muted); font-size: 0.8rem; }
}
