/*
 * The inflection tables (InflectionPages: /conjugation/<code>/<word>, /declension/<code>/<word>
 * and the list of each).
 *
 * The library's tokens only (library.css section 1, family/tokens.css), so it turns dark with the
 * rest. A wide table scrolls inside its own box (.infl-scroll), so a phone never scrolls the page
 * sideways; the row labels stay put while it does.
 */

.infl-word { font-family: var(--serif); }
.infl-gloss { margin: 0.5rem 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 1.02rem; line-height: 1.45; }
.infl-gloss li + li { margin-top: 0.15rem; color: var(--ink-3); font-size: 0.95rem; }
.infl-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0.9rem 0 0; font-size: 0.95rem; }

.infl { min-width: 0; }

/* ── the forms that sit in no grid: infinitive, participles ── */
.infl-singles { margin: 0 0 1.5rem; padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.infl-singles__row { display: flex; flex-wrap: wrap; gap: 0.2rem 0.75rem; padding: 0.3rem 0; }
.infl-singles__row + .infl-singles__row { border-top: 1px solid var(--rule); }
.infl-singles dt { flex: 0 0 11rem; max-width: 100%; color: var(--ink-3); font-size: 0.9rem; }
.infl-singles dd { margin: 0; flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }

/* ── contents, folded ── */
.infl-jump { margin: 0 0 1.25rem; }
.infl-jump summary { cursor: pointer; color: var(--accent-ink); font-size: 0.92rem; padding: 0.2rem 0; }
.infl-jump .infl-toc { margin: 0.6rem 0 0; }
.infl-toc { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.5rem; }
.infl-toc a { padding: 0.2rem 0.6rem; border: 1px solid var(--rule); border-radius: 999px; font-size: 0.85rem; color: var(--ink-2); text-decoration: none; background: var(--surface); }
.infl-toc a:hover { border-color: var(--accent); color: var(--ink); }
.infl-toc--letters a { min-width: 2rem; text-align: center; }

/* ── one table ── */
.infl-block { margin: 0 0 1.75rem; scroll-margin-top: 1rem; }
.infl-block__title { font-size: 1.05rem; margin: 0 0 0.5rem; }
.infl-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
.infl-table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
.infl-table th, .infl-table td { padding: 0.45rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.infl-table tbody tr:last-child th, .infl-table tbody tr:last-child td { border-bottom: 0; }
.infl-table thead th { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); white-space: nowrap; }
.infl-table tbody th { font-weight: 500; color: var(--ink-3); font-size: 0.88rem; white-space: nowrap; position: sticky; left: 0; background: var(--surface); }
.infl-cell { display: block; }
.infl-cell + .infl-cell { margin-top: 0.15rem; }
.infl-form { color: var(--ink); font-weight: 600; }
.infl-roman { display: block; color: var(--ink-3); font-size: 0.85rem; font-weight: 400; }
.infl-singles .infl-roman { display: inline; }
.infl-sep { color: var(--ink-3); }
.infl-note { margin-left: 0.35rem; color: var(--ink-3); font-size: 0.8rem; }
.infl-empty { color: var(--ink-3); }

/* ── the lines from the Library ── */
.infl-examples { margin-top: 2rem; }
.infl-examples__list { list-style: none; margin: 0; padding: 0; }
.infl-example { padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.infl-example:first-child { border-top: 0; padding-top: 0.25rem; }
.infl-example__line { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.infl-example__line mark { background: var(--surface-2); color: var(--ink); padding: 0 0.15em; border-radius: 3px; font-weight: 600; }
.infl-example__en { margin: 0.2rem 0 0; color: var(--ink-2); font-size: 0.95rem; }
.infl-example__from { margin: 0.25rem 0 0; font-size: 0.88rem; }

.infl-nearby { display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 0; }
.infl-nearby a { text-decoration: none; }
.infl-nearby__prev::before { content: "\2190\00a0"; }
.infl-nearby__next { margin-left: auto; }
.infl-nearby__next::after { content: "\00a0\2192"; }

.infl-source { margin: 2rem 0 0; color: var(--ink-3); font-size: 0.85rem; line-height: 1.5; }

/* ── the list of a language's tables ── */
.infl-letter { margin: 0 0 1.25rem; scroll-margin-top: 1rem; }
.infl-letter__title { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 0.3rem; color: var(--accent-ink); }
.infl-list { list-style: none; margin: 0; padding: 0; columns: 2 16rem; column-gap: 2rem; }
.infl-list li { break-inside: avoid; padding: 0.2rem 0; line-height: 1.35; }
.infl-list__word { font-weight: 600; }
.infl-list__gloss { color: var(--ink-3); font-size: 0.9rem; }

/* ── a phone: long row names wrap, so a two-column table fits without scrolling ── */
@media (max-width: 600px) {
  .infl-table th, .infl-table td { padding: 0.4rem 0.5rem; }
  .infl-table tbody th { white-space: normal; max-width: 8.5rem; }
}
