/* assets/phonics.css — shared by phonics.html and phonics-lesson.html (2026-10-07): sound buttons,
   the lesson-script pieces from assets/phonics-ui.js, and the lesson cards. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Sound buttons: a dot under a one-letter sound, a bar under a two- or three-letter sound,
   an arc joining the two halves of a split digraph (drawn by PhonicsUI.drawArcs). */
.sbw { display: inline-block; vertical-align: bottom; }
.sbw-letters { position: relative; display: inline-flex; gap: 3px; padding: 0 2px 14px; font: 600 1em/1 var(--font-ui); color: var(--ink-deep); }
.sb { position: relative; display: inline-block; }
.sb::after { content: ""; position: absolute; bottom: -11px; }
.sb-dot::after { left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--ink-deep); }
.sb-bar::after { left: 1px; right: 1px; height: 4px; border-radius: 2px; background: var(--ember); }
.sb-split-start, .sb-split-end { color: var(--ember-deep); }
.sb-arc { position: absolute; bottom: 1px; height: 12px; border: 3.5px solid var(--ember); border-top: 0; border-radius: 0 0 18px 18px; pointer-events: none; }

/* Pieces of the lesson script */
.ph-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.ph-chip { display: inline-flex; align-items: baseline; gap: 6px; background: var(--surface-warm); border: 1px solid var(--sand-300); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--ink-soft); }
.ph-chip b { font: 600 18px/1 var(--font-ui); color: var(--ink-deep); }
.ph-chip i { font-style: normal; color: var(--ink-mute); }
.ph-chip--oral { font: 600 17px/1 var(--font-ui); color: var(--ink-deep); letter-spacing: 0.04em; }
.ph-words { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 6px; font-size: 28px; }
.ph-words .sbw { background: var(--surface); border: 1.5px solid var(--sand-300); border-radius: 14px; padding: 10px 14px 4px; }
.ph-say { background: var(--surface-warm); border-left: 4px solid var(--terra); border-radius: 0 12px 12px 0; padding: 10px 14px; margin: 10px 0; color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.ph-say b { display: block; font: 700 11px/1.2 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--terra-ink); margin-bottom: 3px; }
.ph-tricky { display: inline-block; background: #fbeae0; color: #8f3412; border: 1.5px solid var(--ember); border-radius: 10px; padding: 3px 10px; font: 600 18px/1.2 var(--font-ui); margin-right: 4px; }
.ph-sentence { font: 500 24px/1.35 var(--font-ui); color: var(--ink-deep); background: var(--surface-warm); border-radius: 12px; padding: 12px 16px; margin: 8px 0 0; }

/* Lesson cards (the phonics hub) */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.ph-card { position: relative; background: var(--card); border-radius: var(--r-4); box-shadow: var(--shadow-1); padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 6px; transition: transform .15s ease, box-shadow .15s ease; }
.ph-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.ph-card .art { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; padding: 14px; }
.ph-card .art img { width: 100%; height: 100%; }
.ph-card .g { font: 600 26px/1 var(--font-ui); color: var(--ink-deep); padding: 0 6px; letter-spacing: -0.01em; }
.ph-card .g small { font: 600 14px/1 var(--font-ui); color: var(--terra-ink); margin-left: 4px; letter-spacing: 0; }
.ph-card .w { font-size: 13px; color: var(--ink-mute); padding: 0 6px; }
.ph-card .num { position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 2px 8px; font: 700 11px/1.4 var(--font-ui); color: var(--ink-soft); }
.ph-card .open { color: inherit; text-decoration: none; }
.ph-card .open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ph-card .open:focus-visible { outline: none; }
.ph-card:focus-within { outline: 3px solid var(--ember-deep); outline-offset: 2px; }
.ph-card .dl { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; background: var(--ink-deep); color: #fff; border-radius: 999px; padding: 5px 9px; font: 700 11px/1 var(--font-ui); text-decoration: none; }
.ph-card .dl:hover { background: var(--oak-700); }
.ph-card .dl svg { width: 12px; height: 12px; }
