/* Charts (charts.js): paradigm tables to study, fill, race and find in. Uses app.css's tokens. */

.cx-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); margin: 4px 0 6px; }
.cx-crumbs a { color: var(--gold-ink); text-decoration: none; }
.cx-crumbs i { font-style: normal; opacity: .6; }
.cx-head h1 { font-family: var(--text); font-weight: 600; font-size: 34px; line-height: 1.1; margin: 6px 0 6px; letter-spacing: .005em; }
.cx-head h1.cx-title { font-size: 40px; }
.cx-head p { margin: 0 0 16px; color: var(--muted); max-width: 46em; }
.cx-lang { max-width: 260px; margin-bottom: 10px; }
.cx-lang a, .cx-modes a { flex: 1; display: grid; place-items: center; height: 40px; border-radius: 9px; font-size: 15px; color: var(--muted); text-decoration: none; }
.cx-lang a.on, .cx-modes a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 600; }
.cx-modes { margin: 10px 0 14px; max-width: 520px; }

/* the index */
.cx-list { display: grid; gap: 10px; }
.cx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 16px; }
.cx-row.done { box-shadow: var(--shadow), inset 3px 0 0 var(--gold); }
.cx-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; text-decoration: none; }
.cx-rt { font-family: var(--text); font-size: 24px; line-height: 1.15; }
.cx-rs { color: var(--muted); font-size: 13.5px; }
.cx-pr { display: inline-flex; }
.cx-dots { display: inline-flex; gap: 5px; align-items: center; }
.cx-dots i { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); }
.cx-dots i.on { background: var(--gold); box-shadow: none; }
.cx-parts { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.cx-row .cx-parts { margin: 0; }
.cx-chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; text-decoration: none; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line); background: var(--card); }
.cx-chip:hover { box-shadow: inset 0 0 0 1.5px var(--gold); }
.cx-chip.on { background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--gold); font-weight: 600; }
.cx-chip.done::after { content: "✓"; margin-left: 6px; color: var(--gold-ink); font-weight: 700; }
.cx-find { width: 100%; max-width: 420px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); padding: 0 14px; font: inherit; margin-bottom: 12px; }
.cx-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cx-book { display: flex; flex-direction: column; text-decoration: none; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 11px 14px; }
.cx-book b { font-family: var(--text); font-weight: 500; font-size: 18px; line-height: 1.2; }
.cx-book span { color: var(--muted); font-size: 13px; }
.cx-credit, .cx-src, .cx-note { color: var(--muted); font-size: 13px; line-height: 1.5; max-width: 52em; }
.cx-note { font-size: 14.5px; color: var(--ink); }
.cx-credit { margin-top: 28px; }
.cx-bigbtn { margin: 4px 0 6px; }
.cx-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.cx-word { display: grid; gap: 1px; text-decoration: none; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 14px; min-width: 0; }
.cx-word b { font-size: 21px; font-weight: 500; }
.cx-word span { color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-word small { color: var(--muted); font-size: 12.5px; }
.cx-lat { font-family: var(--text); }

/* the tables */
.cx-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 4px 0 12px; }
.cx-tables { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.cx-b { min-width: 0; }
.cx-bt { font: 600 13px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); margin: 0 0 7px 2px; }
.cx-box { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.cx-t { border-collapse: collapse; width: 100%; font-family: var(--text); font-size: 19px; }
.cx-t th, .cx-t td { padding: 7px 10px; text-align: center; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cx-t tr:last-child th, .cx-t tr:last-child td { border-bottom: 0; }
.cx-t thead th { font: 600 12px/1.2 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 9px 10px 7px; background: var(--bg-2); }
.cx-t tbody th { text-align: left; font-family: var(--text); font-variant: small-caps; letter-spacing: .05em; font-weight: 600; font-size: 16px; color: var(--gold-ink);
  white-space: nowrap; width: 1%; padding-left: 14px; background: color-mix(in srgb, var(--bg-2) 55%, transparent); }
.cx-t td { min-width: 5.5em; }
.cx-t td + td { border-left: 1px solid var(--line); }
.cx-t td.cx-na { color: var(--muted); }
.cx-w { display: inline-block; white-space: nowrap; }
.cx-st { color: var(--muted); }
.cx-en { font-weight: 600; color: var(--ink); }
.cx-w.given { color: var(--ink); }
.cx-or { display: block; font-size: 13px; color: var(--muted); font-style: italic; }
.cx-t td.veil { color: transparent; user-select: none; }
.cx-t td.veil * { visibility: hidden; }
.cx-t td.veil::after { content: "· · ·"; color: var(--line); font-size: 16px; }
.cx-t td.now { background: var(--hl); box-shadow: inset 0 0 0 2px var(--gold); }
.cx-chant { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0 0 12px; }
.cx-hint { color: var(--muted); font-size: 13.5px; }

/* fill and race */
.cx-play { max-width: 680px; padding-top: 18px; }
.cx-play input, .cx-play .cx-t { -webkit-user-select: text; user-select: text; }
.cx-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.cx-ttl { font-family: var(--text); font-size: 26px; line-height: 1.1; }
.cx-ttl small { display: block; font: 400 13px var(--ui); color: var(--muted); margin-top: 3px; }
.cx-clock { font: 700 22px var(--ui); font-variant-numeric: tabular-nums; color: var(--gold-ink); }
.cx-ask { color: var(--muted); margin: 6px 0 12px; font-size: 15px; }
.cx-sw { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; cursor: pointer; }
.cx-sw input { width: 18px; height: 18px; accent-color: var(--gold-ink); }
.cx-keys { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.cx-keys button { width: 40px; height: 36px; border-radius: 9px; font: 500 20px var(--text); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.cx-keys button:hover { box-shadow: inset 0 0 0 1.5px var(--gold); }
.cx-keys span { color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.cx-in { width: 100%; min-width: 0; height: 40px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
  font: 400 19px var(--text); text-align: center; padding: 0 6px; }
.cx-in:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--hl); }
.cx-in.right, .cx-in.nomark { background: rgba(70, 140, 90, .16); border-color: #4b8a5d; color: var(--ink); opacity: 1; -webkit-text-fill-color: var(--ink); }
.cx-in.nomark { background: rgba(182, 152, 105, .22); border-color: var(--gold); }
.cx-in.wrong, .cx-in.miss { background: rgba(180, 70, 50, .14); border-color: #b4513a; color: var(--ink); opacity: 1; -webkit-text-fill-color: var(--ink); }
.cx-in.marks { background: rgba(182, 152, 105, .22); border-color: var(--gold); opacity: 1; -webkit-text-fill-color: var(--ink); }
.cx-ans { display: block; font-size: 15px; color: #8c3b28; margin-top: 2px; font-weight: 600; }
.cx-ans.soft { color: var(--gold-ink); font-weight: 400; font-style: italic; }
.cx-t.fill td, .cx-t.tilegrid td, .cx-t.pick td { padding: 6px 7px; }
.cx-actions { margin: 18px 0 8px; display: flex; gap: 10px; }
.cx-done { padding-top: 14px; }
.cx-done .big { font-size: 36px; }
.cx-done .pills .cx-dots { align-self: center; }

/* ending tiles */
.cx-bank { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; padding: 10px; margin-bottom: 14px; border-radius: 14px; background: var(--bg-2); position: sticky; top: 58px; z-index: 5; max-height: 34vh; overflow-y: auto; }
.cx-tile { min-width: 46px; height: 38px; padding: 0 12px; border-radius: 9px; background: var(--card); font: 600 18px var(--text); box-shadow: inset 0 0 0 1.5px var(--line), 0 1px 2px rgba(0, 0, 0, .1); cursor: grab; }
.cx-tile.sel { background: var(--gold); color: #192648; box-shadow: none; }
.cx-slot { min-width: 2.4em; height: 34px; padding: 0 8px; border-radius: 8px; border: 1.5px dashed var(--gold); background: transparent; font: 600 19px var(--text); color: var(--ink); vertical-align: middle; }
.cx-slot.full { border-style: solid; background: var(--bg-2); }
.cx-slot.over { background: var(--hl); }
.cx-slot.right { background: rgba(70, 140, 90, .18); border: 1.5px solid #4b8a5d; }
.cx-slot.wrong { background: rgba(180, 70, 50, .14); border: 1.5px solid #b4513a; }
.cx-slot.show { color: #8c3b28; }

/* find the cell */
.cx-sent { margin: 6px 0 14px; padding: 14px 16px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font: 400 21px/1.45 var(--text); }
.cx-target { background: var(--hl); color: inherit; padding: 0 3px; border-radius: 4px; font-weight: 600; }
.cx-ph { font: 600 13px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.cx-pick { display: block; width: 100%; height: 38px; min-width: 3.6em; border-radius: 9px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); }
.cx-pick:hover:not([disabled]) { box-shadow: inset 0 0 0 1.5px var(--gold); }
.cx-pick.on { background: var(--gold); box-shadow: none; }
.cx-pick.on::after { content: "✓"; color: #192648; font-weight: 700; }
.cx-pick.right { background: rgba(70, 140, 90, .28); box-shadow: inset 0 0 0 2px #4b8a5d; }
.cx-pick.right::after { color: var(--ink); }
.cx-pick.wrong { background: rgba(180, 70, 50, .22); box-shadow: inset 0 0 0 2px #b4513a; }
.cx-pick.wrong::after { content: "×"; color: var(--ink); }
.cx-pick.missed { box-shadow: inset 0 0 0 2px #4b8a5d; background: transparent; }
.cx-pick.missed::after { content: "·"; color: #4b8a5d; font-weight: 700; font-size: 26px; line-height: 1; }
.cx-fb { padding: 12px 14px; border-radius: 12px; margin: 14px 0 6px; display: grid; gap: 2px; font-size: 15.5px; }
.cx-fb.ok { background: rgba(70, 140, 90, .14); }
.cx-fb.no { background: rgba(180, 70, 50, .10); }
.cx-fb span { color: var(--muted); }

@media (max-width: 520px) {
  .cx-head h1 { font-size: 30px; }
  .cx-head h1.cx-title { font-size: 34px; }
  .cx-t { font-size: 17.5px; }
  .cx-t th, .cx-t td { padding: 6px 6px; }
  .cx-t tbody th { padding-left: 10px; font-size: 15px; }
  .cx-t td { min-width: 4.6em; }
  .cx-tables { grid-template-columns: 1fr; }
  .cx-in { font-size: 17.5px; height: 40px; }
  .cx-row { padding: 10px 12px; }
  .cx-rt { font-size: 22px; }
  .cx-modes a { font-size: 14px; }
  .cx-bank { top: 56px; }
}
@media (prefers-reduced-motion: reduce) { .cx-chip, .cx-pick { transition: none; } }

/* the Greek keyboard rows */
.cx-keys.grc { gap: 5px; margin-bottom: 8px; }
.cx-keys.grc button { width: 36px; height: 34px; font-size: 18px; }
.cx-keys.grc.marks button { width: 44px; }
@media (max-width: 520px) { .cx-keys.grc button { width: calc((100% - 30px) / 7); min-width: 0; } .cx-keys.grc.marks button { width: calc((100% - 30px) / 7); } }
