/* Learn pages (learn.html, egyptian-arabic-*.html). Built by tools/gen_learn_pages.py.
   Uses the tokens in style.css only. */

.lp h2 { margin-top: 40px; }
.lp h2:first-child { margin-top: 0; }

/* style.css gives every .prose list item a gold dot and a 24px indent; these lists draw their own rows. */
.prose ul.lp-list > li, .prose ul.lp-pairs > li, .prose ul.lp-hub > li { padding-left: 0; }
.prose ul.lp-list > li::before, .prose ul.lp-pairs > li::before, .prose ul.lp-hub > li::before { content: none; }

/* One phrase per row: speaker · English · transliteration · Arabic */
.lp-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column;
  border-top: 1px solid var(--line); }
.lp-row { display: grid; grid-template-columns: 44px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.lp-en { color: var(--ink); font-weight: 600; min-width: 0; }
.lp-tr { color: var(--muted); font-style: italic; min-width: 0; }
.lp-ar { font-family: var(--f-ar); font-size: 1.25rem; line-height: 1.6; color: var(--navy);
  text-align: end; min-width: 0; }

.lp-play { width: 40px; height: 40px; border-radius: 50%; border: 0; display: inline-grid; place-items: center;
  background: var(--yolk); color: var(--navy); cursor: pointer; flex: none;
  transition: transform .15s ease, background .15s ease; }
.lp-play:hover { background: var(--yolk-dk); transform: scale(1.06); }
.lp-play:focus-visible { outline: 3px solid var(--lapis); outline-offset: 2px; }
.lp-play[data-state="playing"] { background: var(--navy); color: var(--yolk); }
.lp-play[data-state="error"] { background: var(--sand); color: var(--muted); cursor: default; }
.lp-noaudio { background: transparent; cursor: default; }
.lp-play .ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 640px) {
  .lp-row { grid-template-columns: 44px minmax(0, 1fr); }
  .lp-row .lp-play { grid-row: span 3; align-self: start; }
  .lp-ar { text-align: start; }
}

/* Textbook vs Egyptian pairs */
.lp-pairs { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 12px; }
.lp-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 16px;
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin: 0; }
.lp-pair > .lp-en { grid-column: 1 / -1; }
.lp-msa, .lp-eg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.lp-msa [lang="ar"] { font-family: var(--f-ar); font-size: 1.15rem; color: var(--muted);
  text-decoration: line-through; text-decoration-thickness: 1px; }
.lp-eg [lang="ar"] { font-family: var(--f-ar); font-size: 1.3rem; color: var(--navy); font-weight: 700; }
.lp-eg .lp-tr { flex-basis: 100%; }
.lp-tag { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--sand); color: var(--muted); }
.lp-tag-eg { background: var(--lemon); color: var(--gold-text); }
@media (max-width: 640px) { .lp-pair { grid-template-columns: minmax(0, 1fr); } }

/* Hub */
.lp-hub { list-style: none; padding: 0; margin: 0 0 24px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.lp-hub li { margin: 0; }
.lp-hub a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-soft); transition: transform .15s ease, border-color .15s ease; }
.lp-hub a:hover { transform: translateY(-2px); border-color: var(--yolk-dk); }
.lp-hub strong { font-family: var(--f-head); font-size: 1.1rem; color: var(--navy); }
.lp-hub span { color: var(--muted); font-size: .95rem; }

/* "When to use it" note under a phrase */
.lp-note { grid-column: 2 / -1; font-size: .9rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 640px) { .lp-note { grid-column: 2; } }

/* Dialogues */
.lp-dlg { margin-top: 40px; }
.lp-dlg-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.lp-dlg-head h2 { margin: 0; }
.lp-dlg-meta { margin: 6px 0 0; font-size: .92rem; }
.lp-playall { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  font: 700 .95rem var(--f-head); padding: 9px 16px; border-radius: 999px;
  background: var(--navy); color: var(--yolk); }
.lp-playall .ic { fill: currentColor; stroke: none; }
.lp-playall:hover { background: var(--navy-dk); }
.lp-playall:focus-visible { outline: 3px solid var(--lapis); outline-offset: 2px; }
.lp-playall[data-state="playing"] { background: var(--yolk); color: var(--navy); }
.lp-playall[data-state="playing"] span::after { content: " (tap to stop)"; font-weight: 600; }
.lp-spk { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 1px 8px; border-radius: 999px; margin-inline-end: 6px; vertical-align: 1px; }
.lp-spk-a { background: var(--mist); color: var(--lapis-text); }
.lp-spk-b { background: var(--blush); color: var(--terra-text); }

/* Real app screenshots */
.lp-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 36px 0 8px; }
.lp-shot { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lp-shot img { width: 100%; height: auto; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.lp-shot figcaption { font-size: .9rem; color: var(--muted); text-align: center; }
@media (max-width: 640px) { .lp-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lp-shot:nth-child(3) { display: none; } }

.lp-cta h2 { margin-bottom: 8px; }
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 10px; }
.lp-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lp-more .chip { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .lp-play, .lp-hub a { transition: none; }
}
