/* /easily-confused-characters/ — widget-scoped (every rule under .ecc). Colours
   come from the site tokens in rt-tokens.css, so dark mode follows them. */
.ecc { display: flex; flex-direction: column; gap: 18px; }
.ecc-find label { display: block; font: var(--rt-eyebrow); letter-spacing: .12em; text-transform: uppercase; color: var(--rt-ink-muted); margin-bottom: 6px; }
.ecc-find input { width: 100%; padding: 12px 14px; font-size: 17px; border: 1px solid var(--rt-hairline); border-radius: 8px; background: var(--rt-surface); color: var(--rt-ink); font-family: var(--rt-font-sans), var(--rt-font-cjk); }
.ecc-find input:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: 1px; }
.ecc-status { min-height: 1.4em; margin: 6px 0 0; font-size: 13px; color: var(--rt-ink-muted); }

.ecc-groups { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ecc-group-h { margin: 0 0 6px; font: var(--rt-eyebrow); letter-spacing: .1em; text-transform: uppercase; color: var(--rt-ink-muted); }
.ecc-group-h span { color: var(--rt-ink-soft); }
.ecc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ecc-chip { padding: 6px 10px; border: 1px solid var(--rt-hairline); border-radius: 999px; background: var(--rt-surface); color: var(--rt-ink); font-size: 16px; line-height: 1.2; cursor: pointer; font-family: var(--rt-font-cjk); }
.ecc-chip:hover { border-color: var(--rt-accent); }
.ecc-chip[aria-pressed="true"] { background: var(--rt-ink); border-color: var(--rt-ink); color: var(--rt-surface); }
.ecc-chip:focus-visible, .ecc-pairbtn:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: 2px; }

.ecc-panel { border: 1px solid var(--rt-hairline); border-radius: 14px; background: var(--rt-surface); padding: 18px; display: flex; flex-direction: column; gap: 16px; min-height: 320px; }
.ecc-msg { margin: 0; color: var(--rt-ink-muted); }
.ecc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ecc-title { margin: 0; font: 600 26px/1.2 var(--rt-font-cjk); color: var(--rt-ink); letter-spacing: .04em; }
.ecc-pill { font: var(--rt-eyebrow); letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--rt-bg-inset); color: var(--rt-ink-soft); }
.ecc-pill-shape, .ecc-pill-both { background: var(--rt-accent-soft); color: var(--rt-accent-text); }
.ecc-scope { margin: -6px 0 0; font-size: 13px; color: var(--rt-ink-muted); }

.ecc-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ecc-card { margin: 0; border: 1px solid var(--rt-hairline); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--rt-surface); }
.ecc-card.is-pair { border-color: var(--rt-ink-muted); }
.ecc-glyph { aspect-ratio: 1 / 1; width: 100%; }
.ecc-glyph svg, .ecc-ov svg { display: block; width: 100%; height: 100%; }
.ecc-nodraw { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 72px; color: var(--rt-ink-muted); border: 1px dashed var(--rt-hairline); border-radius: 6px; }
.ecc .ecc-grid { fill: none; stroke: var(--rt-accent); stroke-opacity: .35; stroke-width: 6; stroke-dasharray: 18 14; }
.ecc .ecc-s { fill: var(--rt-ink); }
.ecc .ecc-s-mark { fill: var(--rt-accent); }
.ecc figcaption { display: flex; flex-direction: column; gap: 2px; }
.ecc-ch { font: 600 20px/1.2 var(--rt-font-cjk); color: var(--rt-ink); }
.ecc-py { font-size: 15px; color: var(--rt-ink-soft); }
.ecc-gl { font-size: 13px; color: var(--rt-ink-soft); }
.ecc-sc { font: 12px/1.4 var(--rt-font-mono); color: var(--rt-ink-muted); }
.ecc-words { margin-top: 4px; font-size: 14px; color: var(--rt-ink); }

.ecc-note h4, .ecc-cmp h4 { margin: 0 0 6px; font: var(--rt-eyebrow); letter-spacing: .1em; text-transform: uppercase; color: var(--rt-ink-muted); }
.ecc-note p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--rt-ink-soft); max-width: 68ch; }

.ecc-pairs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ecc-pairbtn { padding: 5px 10px; border: 1px solid var(--rt-hairline); border-radius: 8px; background: var(--rt-surface); color: var(--rt-ink); cursor: pointer; font-size: 15px; }
.ecc-pairbtn[aria-pressed="true"] { border-color: var(--rt-ink); box-shadow: inset 0 0 0 1px var(--rt-ink); }
.ecc-ov-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ecc-ov { width: 220px; max-width: 100%; aspect-ratio: 1 / 1; }
/* First character as an outline, second as a fill: a stroke only one of them
   has shows as an empty outline or as a fill with no outline round it. */
.ecc .ecc-ov-b path { fill: var(--rt-accent); fill-opacity: .55; }
.ecc .ecc-ov-a path { fill: none; stroke: var(--rt-ink); stroke-width: 9; stroke-linejoin: round; }
.ecc-ov-side { flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; }
.ecc-legend { margin: 0; display: flex; align-items: center; gap: 6px; font: 600 18px/1 var(--rt-font-cjk); color: var(--rt-ink); }
.ecc-key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-left: 8px; }
.ecc-key:first-child { margin-left: 0; }
.ecc-key-a { border: 2px solid var(--rt-ink); }
.ecc-key-b { background: var(--rt-accent); opacity: .55; }
.ecc-verdict { margin: 0; font-size: 15px; line-height: 1.6; color: var(--rt-ink-soft); }

.ecc-map-wrap { overflow-x: auto; }
.ecc-map { border-collapse: collapse; font-size: 16px; min-width: 300px; }
.ecc-map th { text-align: left; font: var(--rt-eyebrow); letter-spacing: .1em; text-transform: uppercase; color: var(--rt-ink-muted); padding: 6px 14px 6px 0; border-bottom: 1px solid var(--rt-hairline); }
.ecc-map td { padding: 7px 14px 7px 0; border-bottom: 1px solid var(--rt-hairline); color: var(--rt-ink); white-space: nowrap; }
.ecc-map tr.is-wrong td { color: var(--rt-danger); }
.ecc-map em { font-style: normal; font-size: 12px; }

@media (max-width: 560px) {
    .ecc-panel { padding: 14px; }
    .ecc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ecc-ov { width: 100%; max-width: 260px; }
}
@media (prefers-reduced-motion: no-preference) {
    .ecc-chip, .ecc-pairbtn { transition: border-color .15s, background-color .15s; }
}
