/*
 * مؤشر تكلفة البناء في الكويت (/kuwait-building-cost-index/). Loaded on that page only and only once the owner has
 * entered a month (inc/costindex.php), after the bundle. V28 roles (--ui-*), tokens only. The figures (.tw:num and
 * .ci-table bdi) take the secondary face from tokens.source.json → thmanyah.figures.
 */

/* The change vs the previous month: red = up, green = down, muted = flat (the words are in the screen-reader text). */
.ci-delta { display: inline-block; font-size: var(--fs-sm); font-weight: 700; line-height: var(--leading-snug); white-space: nowrap; }
.ci-delta--up { color: var(--danger); }
.ci-delta--down { color: var(--success); }
.ci-delta--flat { color: var(--ui-muted); }

/* The monthly history: one white card; scrolls inside itself on narrow screens rather than the page (position: relative
   keeps the screen-reader words, which are absolutely positioned, inside the scroller too). */
.ci-table-wrap { position: relative; min-inline-size: 0; max-inline-size: 100%; overflow-x: auto; }
.ci-table-wrap:focus-visible { outline: 2px solid var(--ui-gold); outline-offset: 2px; }
.ci-table { inline-size: 100%; min-inline-size: 40rem; border-collapse: collapse; color: var(--ui-ink); font-size: var(--fs-ui); line-height: var(--leading-ui); }
.ci-table th,
.ci-table td { padding: var(--space-3) var(--space-4); text-align: start; vertical-align: baseline; }
.ci-table thead th { background: var(--ui-bg); color: var(--ui-muted); font-size: var(--fs-sm); font-weight: 700; }
.ci-table thead small { font-size: var(--fs-sm); font-weight: 400; }
.ci-table tbody tr { border-block-start: 1px solid var(--ui-line); }
.ci-table tbody th { font-weight: 700; white-space: nowrap; }
.ci-table td bdi { font-weight: 600; white-space: nowrap; }
.ci-table .ci-note { color: var(--ui-muted); font-size: var(--fs-sm); }

/* The methodology card: reading text. */
.ci-method { color: var(--ui-ink); font-size: var(--fs-body); line-height: var(--leading-read); }
.ci-method p { margin: 0; }
.ci-method ul { margin: var(--space-4) 0; padding-inline-start: var(--space-5); }
.ci-method li + li { margin-block-start: var(--space-2); }
