/* Sutor edition: the word index (decision record 0030). The site's tokens from styles.css; no colours of its own.
   Merged 2026-09-25 from concordance/prototype/concordance.css; the sheet now takes the page image's column on wide
   screens (and docks to the image's bar), and its views are a tablist. */

/* ---------- the block in the word card ---------- */
.cc:empty { display: none; }
.cc { margin-top: 0.6rem; padding-top: 0.1rem; border-top: 1px solid var(--rule); }
.cc .wc-bib-label { margin-top: 0.55rem; }
.cc-sum { margin: 0; }
.cc-sum b { font: 600 1.02rem/1.3 var(--la); }
.cc-forms { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.35rem 0 0; }
.cc-chip { display: inline-flex; align-items: baseline; gap: 0.3em; padding: 0.1rem 0.5rem; border: 1px solid var(--rule); border-radius: 999px;
  font: 0.95rem/1.35 var(--la); background: var(--paper); color: var(--ink); }
.cc-chip b { font: 600 0.72rem/1 var(--ui); color: var(--muted); }
.cc-chip.here { border-color: var(--rubric); background: var(--rubric-soft); }
button.cc-chip { cursor: pointer; min-height: 1.75rem; }
button.cc-chip:hover { border-color: var(--edge); }
.cc-more { font-size: 0.78rem; color: var(--muted); align-self: center; }
.cc-row { margin: 0.35rem 0 0; }
.cc-k { font: 600 0.68rem/1.2 var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 0.25rem; }
.cc-link { border: 0; background: none; padding: 0.15rem 0; font: inherit; color: var(--rubric); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 0.2em; }
.cc-link:hover { text-decoration-style: solid; }
.cc-provtag, .cc-prov { font: italic 0.78rem/1.35 var(--ui); color: var(--amber); }
.cc-prov { margin: 0.2rem 0 0.4rem; }
.cc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; margin: 0.6rem 0 0; }
.cc-open { font: 600 0.84rem/1 var(--ui); padding: 0.55rem 0.8rem; border-radius: 6px; border: 1px solid var(--rubric); background: var(--rubric); color: var(--card); cursor: pointer; }
.cc-open:hover { filter: brightness(1.08); }
.cc-open:focus-visible, .cc-link:focus-visible, .cc-chip:focus-visible { outline: 2px solid var(--rubric); outline-offset: 2px; }

/* ---------- the words of the open lemma, and the word gone to ---------- */
.w.cc-hit { background: var(--hl); box-shadow: inset 0 -2px 0 var(--amber); }
@keyframes cc-flash { from { background: var(--rubric-soft); box-shadow: 0 0 0 3px var(--rubric); } to { box-shadow: 0 0 0 0 transparent; } }
.w.cc-flash { animation: cc-flash 1.6s ease-out 1; }
@media (prefers-reduced-motion: reduce) { .w.cc-flash { animation: none; box-shadow: 0 0 0 2px var(--rubric); } }

/* ---------- the sheet: the page image's column on wide screens, a bottom sheet on phones ---------- */
.cc-panel {
  display: flex; flex-direction: column; background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: var(--shadow); font: 0.88rem/1.45 var(--ui); min-width: 0;
}
.cc-panel:focus { outline: none; }
@media (min-width: 961px) {
  .cc-panel { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--bar-h) + 1rem); align-self: start; margin-top: 2.4rem;
    height: calc(100vh - var(--bar-h) - 3.4rem); box-shadow: none; }
  body.cc-sheet-open .page-panel { display: none; }
  /* with the image off, the layout makes room for the sheet the same way it does for the image */
  body.cc-sheet-open.no-img .layout { grid-template-columns: minmax(0, 1fr) clamp(300px, 31vw, 520px); max-width: 1680px; }
}
.cc-head { position: relative; display: flex; align-items: flex-start; gap: 0.4rem; padding: 0.85rem 0.8rem 0.3rem 1rem; }
.cc-head h2 { flex: 1; min-width: 0; margin: 0; font: 600 1.35rem/1.2 var(--la); overflow-wrap: anywhere; }
.cc-head h2:focus { outline: none; }
.cc-head h2:focus-visible { outline: 2px solid var(--rubric); outline-offset: 2px; }
.cc-n { display: block; font: 500 0.78rem/1.3 var(--ui); color: var(--muted); margin-top: 0.15rem; }
.cc-head .icon-btn { flex: none; }
body.no-img .cc-dockbtn { display: none; }  /* nothing to show instead: only close */
.cc-tabs { display: flex; gap: 0.2rem; margin: 0.35rem 1rem 0.5rem; border-bottom: 1px solid var(--rule); }
.cc-tabs [role="tab"] { border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; padding: 0.5rem 0.7rem; cursor: pointer;
  font: 500 0.86rem/1.2 var(--ui); color: var(--ink-2); }
.cc-tabs [role="tab"]:hover { color: var(--ink); }
.cc-tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--rubric); font-weight: 600; }
.cc-tabs [role="tab"][aria-disabled="true"] { opacity: 0.45; cursor: default; }
.cc-body { flex: 1; overflow: auto; padding: 0.1rem 1rem 1rem; overscroll-behavior: contain; }
.cc-body:focus-visible { outline: 2px solid var(--rubric); outline-offset: -2px; }
.cc-gloss { margin: 0 0 0.3rem; font: 0.9rem/1.45 var(--en); color: var(--ink-2); }
.cc-gloss:empty { display: none; }
.cc-sub { margin: 0.8rem 0 0.25rem; font: 600 0.68rem/1.2 var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cc-ens { margin: 0; font: 0.88rem/1.5 var(--en); }
.cc-ens b { font: 600 0.72rem var(--ui); color: var(--muted); }
.cc-note { margin: 0.6rem 0 0; font-size: 0.76rem; color: var(--muted); }

.cc-dist { display: flex; align-items: flex-end; gap: 1px; height: 1.4rem; margin: 0.1rem 0 0.4rem; }
.cc-dist span { flex: 1; min-width: 2px; height: 3px; background: var(--rule); border-radius: 1px; }
.cc-dist span.on { height: calc(0.45rem + var(--h) * 0.95rem); background: var(--rubric); }

.cc-list { list-style: none; margin: 0; padding: 0; }
.cc-list li { border-top: 1px solid var(--rule); }
.cc-list a { display: grid; grid-template-columns: 4.4rem minmax(0, 1fr); gap: 0.1rem 0.6rem; padding: 0.5rem 0.2rem; color: inherit; text-decoration: none; border-radius: 4px; }
.cc-list a:hover { background: var(--paper); }
.cc-list a:focus-visible { outline: 2px solid var(--rubric); outline-offset: -2px; }
.cc-loc { grid-row: span 2; font: 600 0.8rem/1.3 var(--ui); color: var(--rubric); }
.cc-fol { display: block; font-weight: 400; color: var(--muted); }
.cc-kw { font: 1rem/1.4 var(--la); overflow-wrap: anywhere; }
.cc-kw mark, .kw-la mark { background: var(--rubric-soft); color: inherit; padding: 0 0.1em; border-radius: 2px; font-weight: 600; }
.cc-en { font: italic 0.84rem/1.35 var(--en); color: var(--ink-2); }
.cc-none { font-style: normal; color: var(--muted); font-size: 0.74rem; }

.cc-dom h3, .cc-par h3 { margin: 0.8rem 0 0.1rem; font: 600 0.98rem/1.3 var(--ui); }
.cc-mem { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; }
.cc-mem li { white-space: nowrap; }
.cc-mem button { border: 0; background: none; padding: 0.1rem 0; font: 1rem/1.4 var(--la); color: var(--rubric); cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.cc-mem button[aria-current] { color: var(--ink); text-decoration: none; font-weight: 600; }
.cc-mem b { font: 600 0.72rem var(--ui); color: var(--muted); }
.cc-p { color: var(--amber); font-weight: 600; }
.cc-pm { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.cc-pm li { padding: 0.45rem 0; border-top: 1px solid var(--rule); }
.cc-pm li.here { box-shadow: inset 3px 0 0 var(--rubric); padding-left: 0.5rem; }
.cc-pla { font: 600 1rem/1.35 var(--la); }
.cc-pen { font: italic 0.86rem/1.35 var(--en); color: var(--ink-2); }
.cc-pocc { display: flex; flex-wrap: wrap; gap: 0.1rem 0.7rem; margin-top: 0.15rem; font-size: 0.8rem; }
.cc-pocc a { padding: 0.15rem 0; }
.cc-contrast .cc-pla { font-weight: 400; color: var(--ink-2); }

.basis { display: inline-block; padding: 0 0.3rem; border-radius: 3px; font: 600 0.62rem/1.4 var(--ui); vertical-align: 0.12em; border: 1px solid currentColor; white-space: nowrap; }
.b-G, .b-D { color: var(--green); }
.b-H, .b-V, .b-W { color: var(--amber); }

/* ---------- the dock: the sheet waiting while the page image shows ---------- */
.cc-dock { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.2rem; max-width: 14rem; padding: 0 0.75rem; border-radius: 999px;
  border: 1px solid var(--rubric); background: var(--card); color: var(--ink); font: 500 0.8rem/1.2 var(--ui); cursor: pointer; white-space: nowrap; overflow: hidden; }
.cc-dock b { font: 600 0.95rem/1.2 var(--la); overflow: hidden; text-overflow: ellipsis; }
.cc-dock-k { color: var(--rubric); }
.cc-dock:hover { background: var(--rubric-soft); }
.cc-dock.floating { position: fixed; z-index: 44; right: 16px; box-shadow: var(--shadow); }

@media (max-width: 960px) {
  .cc-panel { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; max-height: 82vh; border-radius: 12px 12px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); }
  .cc-head::before { content: ""; position: absolute; left: 50%; top: 0.35rem; width: 2.5rem; height: 4px; margin-left: -1.25rem; border-radius: 2px; background: var(--edge); }
  .cc-dockbtn { display: none; }  /* phones: going to a place docks the sheet; × closes it */
  .cc-list a { grid-template-columns: 3.6rem minmax(0, 1fr); }
}
@media print { .cc-panel, .cc-dock { display: none !important; } }

/* ---------- the word index page (/lexicon/) ---------- */
.ix { max-width: 52rem; margin: 0 auto; padding: 1.5rem clamp(16px, 3vw, 40px) 4rem; }
.ix h1 { font: 500 2rem/1.15 var(--la); margin: 0.2rem 0 0.8rem; }
.ix-sub { font: 500 1rem var(--ui); color: var(--muted); }
.ix h2 { font: 600 1.15rem/1.3 var(--ui); margin: 2.2rem 0 0.5rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); }
.ix h3 { font: 600 1rem/1.3 var(--ui); margin: 1.4rem 0 0.2rem; }
.ix-desc { color: var(--ink-2); font-size: 0.92rem; margin: 0.2rem 0 0.5rem; }
.ix-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font: 500 0.9rem var(--ui); }
.ix-nav a { padding: 0.2rem 0; }
.ix .tbl { overflow-x: auto; }
.ix table { border-collapse: collapse; width: 100%; font: 0.86rem/1.4 var(--ui); }
.ix th, .ix td { text-align: left; vertical-align: top; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--rule); }
.ix th { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ix td[lang="la"] { font: 1rem/1.35 var(--la); }
.ix .num { text-align: right; font-variant-numeric: tabular-nums; }
.ix td.occ { font-size: 0.8rem; }
.ix td.occ a { margin-right: 0.15rem; }
.ix tr.contrast td { color: var(--ink-2); }
.dom-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.dom-list a { font: 1.02rem/1.4 var(--la); }
.ix-n { font: 600 0.72rem var(--ui); color: var(--muted); margin: 0 0.25rem; }
.ix-tools { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.6rem 0; background: var(--paper); border-bottom: 1px solid var(--rule); }
.ix-tools label[for="ix-q"] { font: 600 0.8rem var(--ui); }
.ix-tools input[type="search"] { flex: 1 1 14rem; min-width: 0; font: 1rem var(--la); padding: 0.45rem 0.6rem; border: 1px solid var(--edge); border-radius: 6px; background: var(--card); color: var(--ink); }
.ix-tools input[type="search"]::placeholder { color: var(--muted); opacity: 1; } /* the browser grey was 3.4:1 in dark (2026-11-18) */
.ix-fnt { font: 0.82rem var(--ui); display: inline-flex; align-items: center; gap: 0.3rem; min-height: 1.75rem; }
.ix-count { width: 100%; margin: 0; font: 0.78rem var(--ui); color: var(--muted); }
.ix-lemma { border-bottom: 1px solid var(--rule); scroll-margin-top: 9rem; }  /* below the sticky search bar */
.ix-lemma summary { cursor: pointer; padding: 0.45rem 0.1rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.4rem; }
.ix-h { font: 600 1.08rem/1.3 var(--la); }
.ix-g { flex-basis: 100%; font: 0.84rem/1.35 var(--en); color: var(--ink-2); padding-left: 1rem; }
.ix-body { padding: 0 0 0.8rem 1rem; }
.ix-forms { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.chip { display: inline-flex; gap: 0.3em; align-items: baseline; padding: 0.05rem 0.45rem; border: 1px solid var(--rule); border-radius: 999px; font: 0.95rem/1.35 var(--la); }
.chip b { font: 600 0.7rem var(--ui); color: var(--muted); }
.ix-meta a { font: 500 0.8rem var(--ui); margin-right: 0.6rem; }
.ix-en { font: 0.86rem/1.5 var(--en); color: var(--ink-2); }
.ix-en .lbl { font: 600 0.68rem var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 0.3rem; }
.kwic { list-style: none; margin: 0.3rem 0 0; padding: 0; }
.kwic li { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 0 0.7rem; padding: 0.35rem 0; border-top: 1px dotted var(--rule); }
.kw-ref { grid-row: span 2; font: 600 0.8rem/1.3 var(--ui); text-decoration: none; }
.kw-fol { display: block; font-weight: 400; color: var(--muted); }
.kw-la { font: 1rem/1.4 var(--la); overflow-wrap: anywhere; }
.kw-en { font: italic 0.84rem/1.35 var(--en); color: var(--ink-2); }
.kw-none { font-style: normal; color: var(--muted); font-size: 0.74rem; }
.ix-fn { font-size: 0.84rem; }
.ix-fn a { margin-right: 0.25rem; }
.ix-lemma[hidden] { display: none; }
.seg button[data-order] { min-height: 1.75rem; }
@media (max-width: 560px) { .kwic li { grid-template-columns: 3.8rem minmax(0, 1fr); } }

/* Sutor's words (data/sutor-words.tsv, 2026-09-25) */
.sw-list { list-style: none; margin: 0.8rem 0 0; padding: 0; }
.sw-list li { padding: 0.55rem 0 0.6rem; border-top: 1px solid var(--rule); break-inside: avoid; }
.sw-list p { margin: 0; }
.sw-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.55rem; }
.sw-form { font: 600 1.08rem/1.3 var(--la); }
.sw-kind { font: 0.78rem/1.3 var(--ui); color: var(--muted); letter-spacing: 0.02em; }
.sw-gloss { margin-top: 0.15rem !important; font-size: 0.95rem; }
.sw-note { display: block; color: var(--ink-2); font-size: 0.88rem; }
.sw-meta { margin-top: 0.2rem !important; font-size: 0.84rem; color: var(--ink-2); }
.sw-k { font: 600 0.68rem/1 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-right: 0.2rem; }
@media (min-width: 1100px) { .sw-list { columns: 2; column-gap: 2.4rem; } }

/* the word card on the word index page (2026-09-25): a dotted underline means "opens a card" (ADR 0014) */
.lexicon-page .ix-h, .lexicon-page .ixw { cursor: pointer; text-decoration: underline dotted var(--edge); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.lexicon-page .ix-forms .chip[data-w], .lexicon-page .kwic mark[data-w] { cursor: pointer; }
.lexicon-page .ix-forms .chip[data-w]:hover, .lexicon-page .ixw:hover, .lexicon-page .ix-h:hover { background: var(--hl); }
.lexicon-page .kwic mark[data-w]:hover { box-shadow: 0 0 0 1px var(--rubric); }
.lexicon-page .active { box-shadow: 0 0 0 1px var(--rubric); border-radius: 2px; }
/* Sutor's words: the expected form beside his (2026-09-25) */
.sw-exp { font-size: 0.95em; color: var(--ink); margin-left: 0.3em; }
.sw-exp .sw-k { font: 0.78rem/1.3 var(--ui); color: var(--muted); margin-right: 0.15em; }
