/* P2a (2026-10-22): layered explanation, unit-word chips + word card, vocabulary-miss notice.
   Colours follow P0: correct #E6F4EA/#1E7A45, wrong #FCEBEA/#B23A32; explanation teal, unit words amber. */
.p2a-layers { display: grid; gap: 12px; margin: 4px 0 14px; }
.p2a-layer { border-radius: 10px; padding: 12px 14px; background: #EAF5F4; border: 1px solid #CFE6E3; }
.p2a-layer h4 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px;
  font-size: 13px; letter-spacing: .02em; text-transform: none; color: #24524D; }
.p2a-layer p { margin: 0 0 6px; font-size: 15px; line-height: 1.6; color: #1F2A26; }
.p2a-layer p:last-child { margin-bottom: 0; }
.p2a-lead { font-weight: 600; }
.p2a-note { font-size: 13px !important; color: #55635D !important; }
.p2a-lang-toggle { font: inherit; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  border: 1px solid #9CC9C3; background: #fff; color: #24524D; cursor: pointer; }
.p2a-lang-toggle[aria-pressed="true"] { background: #24524D; color: #fff; border-color: #24524D; }
.p2a-choices { background: #F7F9F8; border-color: #DCE3DF; }
.p2a-choice-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start;
  padding: 8px 0; border-top: 1px solid #E3E8E5; }
.p2a-choice-row:first-of-type { border-top: 0; }
.p2a-choice-row p { margin: 0; font-size: 14.5px; }
.p2a-choice-badge { min-width: 38px; text-align: center; font-weight: 700; font-size: 13px; padding: 2px 8px;
  border-radius: 6px; background: #EEF1EF; color: #46534C; }
.p2a-choice-row.is-correct .p2a-choice-badge { background: #E6F4EA; color: #1E7A45; }
.p2a-choice-row.is-picked .p2a-choice-badge { background: #FCEBEA; color: #B23A32; }
.p2a-more-choices summary, .p2a-detailed summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: #46534C; padding: 6px 0; }
.p2a-detailed { background: #F7F9F8; border-color: #DCE3DF; }
.p2a-evidence { background: #FFF8E6; border-color: #F0DDAE; }
.p2a-evidence h4 { color: #7A5A12; }
.p2a-evidence-text { font-family: "Iowan Old Style", "Songti SC", Georgia, serif; font-size: 15.5px !important; }
.p2a-jump { font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid #E3C77E; background: #fff; color: #7A5A12; }
mark.p2a-evidence { background: #FFE9A8; color: inherit; border-radius: 3px; box-shadow: 0 0 0 2px #FFE9A8;
  scroll-margin: 120px; }
.p2a-word-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 8px; }
.p2a-word-tag { font-size: 12px; font-weight: 700; color: #6B5A2A; margin-right: 2px; }
.p2a-word-row.is-context .p2a-word-tag { color: #66726B; }
.p2a-word-chip { font: inherit; display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%;
  padding: 4px 10px; border-radius: 999px; cursor: pointer; border: 1px solid #EBD7A3; background: #FFF4DC; color: #1F2A26; }
.p2a-word-chip strong { font-size: 14px; }
.p2a-word-chip small { font-size: 12px; color: #6B5A2A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 9em; }
.p2a-word-chip.is-context { background: #fff; border-color: #DCE3DF; }
.p2a-word-chip.is-context small { color: #66726B; }
.p2a-word-chip.is-unfamiliar { background: #FCEBEA; border-color: #EBC1BD; }
.p2a-word-chip.is-vague { background: #FFF1D6; border-color: #EDD29A; }
.p2a-word-chip.is-inline { padding: 1px 8px; vertical-align: baseline; }
.p2a-word-chip:focus-visible, .p2a-undo:focus-visible, .p2a-jump:focus-visible { outline: 2px solid #4A6A8F; outline-offset: 2px; }
.p2a-miss-notice { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.72);
  border: 1px dashed #D9A39D; }
.p2a-miss-notice p { margin: 0 0 6px; font-size: 14px; line-height: 1.6; color: #3B2422; }
.p2a-undo { font: inherit; font-size: 13px; padding: 0; border: 0; background: none; color: #4A6A8F;
  text-decoration: underline; cursor: pointer; }
.p2a-word-card { width: min(420px, calc(100vw - 32px)); border: 0; border-radius: 14px; padding: 18px 18px 16px;
  box-shadow: 0 18px 48px rgba(16, 32, 26, .22); color: #1F2A26; }
.p2a-word-card::backdrop { background: rgba(16, 32, 26, .32); }
.p2a-word-card header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.p2a-word-card h3 { margin: 0; font-family: "Iowan Old Style", Georgia, serif; font-size: 24px; }
.p2a-card-close { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 8px; border: 1px solid #DCE3DF; background: #fff; cursor: pointer; }
.p2a-card-meta { margin: 0 0 8px; color: #66726B; font-size: 13.5px; }
.p2a-card-en { margin: 0 0 6px; font-size: 15px; line-height: 1.55; }
.p2a-card-cn { margin: 0 0 10px; font-size: 14.5px; color: #3E4B45; }
.p2a-card-example { margin: 0 0 12px; padding: 8px 10px; border-radius: 8px; background: #F7F9F8;
  font-family: "Iowan Old Style", Georgia, serif; font-size: 15px; line-height: 1.55; }
.p2a-card-actions { display: flex; justify-content: flex-end; }
.p2a-card-link { font-weight: 600; font-size: 14px; color: #1E5A44; }
.p2a-complete-words { margin: 16px 0 4px; padding: 14px 16px; border-radius: 12px; background: #FFF8F6; border: 1px solid #F0D3CF; text-align: left; }
.p2a-complete-words h3 { margin: 0 0 8px; font-size: 16px; }
.p2a-complete-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.p2a-hidden-count { font-size: 13px; color: #66726B; align-self: center; }
.p2a-go-review { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; text-decoration: none; line-height: 1.2; }
@media (max-width: 640px) {
  .p2a-layer { padding: 10px 12px; }
  .p2a-layer p { font-size: 14.5px; }
  .p2a-word-chip small { max-width: 7em; }
}
