/* Vowels (tashkīl) practice: choose a mode, a set of sentences, the result.
   Target words are clay with a dashed underline; results carry ✓ or ✗ in
   text. Sentences have a line height of 2.3 for the marks above and below. */
.tashkil { display: flex; flex-direction: column; gap: 22px; }
.tashkil__title-ar { font-family: var(--font-arabic); font-size: .7em; color: var(--clay); }

/* Start: the modes as radio cards */
.tashkil__start { display: flex; flex-direction: column; gap: 18px; }
.tashkil__modes { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tashkil__mode { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 18px; background: var(--card);
                 border: 1.5px solid var(--line); cursor: pointer; }
.tashkil__mode:has(.tashkil__mode-input:checked) { border-color: var(--ink); }
.tashkil__mode:has(.tashkil__mode-input:focus-visible) { outline: 2px solid var(--clay); outline-offset: 2px; }
.tashkil__mode-input { position: absolute; opacity: 0; pointer-events: none; }
.tashkil__mode-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tashkil__mode-name { font-size: 18px; font-weight: 700; }
.tashkil__radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-dashed); flex-shrink: 0; }
.tashkil__mode:has(.tashkil__mode-input:checked) .tashkil__radio { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 3px var(--card); }
.tashkil__mode-sample { font-family: var(--font-arabic); font-size: 28px; line-height: 2; align-self: flex-end; }
.tashkil__mode-line { font-size: 14px; line-height: 1.45; color: var(--text-body); }
.tashkil__mode-note { display: none; font-size: 13px; line-height: 1.4; font-weight: 600; color: var(--gold-deep); }
.tashkil__mode-acc { margin-top: auto; border-top: 1px solid var(--line-soft); padding-top: 10px; font-size: 13px; color: var(--text-muted); }
.tashkil__mode-acc strong { color: var(--ink); font-size: 15px; }
.tashkil__source { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; flex-wrap: wrap; }
.tashkil__source-text { font-size: 15px; color: var(--text-body); display: flex; flex-direction: column; gap: 8px; }
.tashkil__change summary { display: inline; cursor: pointer; color: var(--clay); font-weight: 600; }
.tashkil__books { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.tashkil__book { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tashkil__go { min-height: 48px; padding: 0 26px; }

/* A set */
.tashkil__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tashkil__bar-start { display: flex; align-items: center; gap: 16px; }
.tashkil__back { display: inline-flex; align-items: center; border: 1px solid var(--ink); border-radius: var(--radius-pill); padding: 0 16px; min-height: 40px;
                 font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; }
.tashkil__mode-title { font-size: 17px; font-weight: 700; }
.tashkil__progress { display: flex; align-items: center; gap: 12px; }
.tashkil__segments { display: flex; gap: 4px; }
.tashkil__segment { width: 44px; height: 6px; border-radius: 6px; background: var(--line); }
.tashkil__segment.is-done { background: var(--green); }
.tashkil__segment.is-current { background: var(--ink); }
.tashkil__count { font-size: 15px; font-weight: 700; }
.tashkil__instruction { margin: 0; font-size: 14px; color: var(--text-muted); }
.tashkil__form { display: contents; }
.tashkil__card { padding: 40px 48px 32px; border-radius: 22px; display: flex; flex-direction: column; gap: 18px; }
.tashkil__sentence { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: flex-start; font-family: var(--font-arabic); font-size: 46px; line-height: 2.3; }
.tashkil__target-wrap { display: inline-flex; flex-direction: column; align-items: center; }
.tashkil__target { font: inherit; line-height: inherit; color: var(--clay); background: transparent; border: 0; border-bottom: 2.5px dashed var(--clay);
                   border-radius: 10px 10px 0 0; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tashkil__target.is-filled { border-bottom-style: solid; }
.tashkil__target.is-active { background: var(--mark); border-bottom-style: solid; }
.tashkil__target.is-right { color: var(--green); border-bottom: 2.5px solid var(--green); cursor: default; }
.tashkil__target.is-wrong { color: var(--clay); border-bottom: 2.5px solid var(--clay); cursor: default; }
.tashkil__slot { width: 22px; height: 30px; border: 2px dashed var(--clay); border-radius: 6px; display: inline-block; align-self: center; }
.tashkil__gap-label { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; height: 54px; border: 2px dashed var(--clay); border-radius: 12px;
                      font-family: var(--font-sans, inherit); font-size: 18px; font-weight: 700; }
.tashkil__result { margin-top: -6px; border-radius: var(--radius-pill); padding: 3px 12px; font-family: var(--font-sans, inherit); font-size: 14px; line-height: 1.4;
                   font-weight: 700; white-space: nowrap; }
.tashkil__result.is-right { background: var(--green-soft); color: var(--green); }
.tashkil__result.is-wrong { background: var(--clay-soft); color: var(--clay); }
.tashkil__result-mark { font-family: "Noto Naskh Arabic", var(--font-arabic); font-size: 22px; line-height: 1; font-weight: 400; }

.tashkil__picker { border-top: 1px solid var(--line); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.tashkil__picker[hidden] { display: none; }
.tashkil__picker-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; font-weight: 600; }
.tashkil__picker-word { font-family: var(--font-arabic); font-size: 24px; color: var(--clay); }
.tashkil__picker-keys { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.tashkil__marks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.tashkil__mark { background: #fff; border: 1.5px solid var(--line-strong); border-radius: 16px; min-height: 104px; display: flex; flex-direction: column; align-items: center;
                 justify-content: center; gap: 2px; color: var(--ink); cursor: pointer; }
.tashkil__mark:hover, .tashkil__mark:focus-visible { border-color: var(--ink); }
.tashkil__mark-glyph { font-family: "Noto Naskh Arabic", var(--font-arabic); font-size: 46px; line-height: 1.5; }
.tashkil__mark-name { font-size: 13px; color: var(--text-body); }

.tashkil__gaps { border-top: 1px solid var(--line); padding-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.tashkil__gap-group { margin: 0; display: flex; flex-direction: column; gap: 10px; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.tashkil__gap-group.is-active, .tashkil__gap-group:focus-within { border-color: var(--ink); }
.tashkil__gap-group legend { padding: 0 4px; font-size: 14px; font-weight: 700; }
.tashkil__choices { display: flex; gap: 10px; flex-wrap: wrap; }
.tashkil__choice { position: relative; }
.tashkil__choice input { position: absolute; opacity: 0; }
.tashkil__choice span { display: inline-flex; align-items: center; background: #fff; border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 0 20px; min-height: 64px;
                        font-family: var(--font-arabic); font-size: 32px; line-height: 2; cursor: pointer; }
.tashkil__choice input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tashkil__choice input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: 2px; }

.tashkil__plain { margin: 0; font-family: var(--font-arabic); font-size: 40px; line-height: 2.2; color: var(--ink-line, var(--ink-line)); }
.tashkil__type { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; }
.tashkil__textarea { background: #fff; border: 1.5px solid var(--green); border-radius: 14px; padding: 12px 20px; min-height: 96px; font-family: var(--font-arabic);
                     font-size: 40px; line-height: 2.2; resize: vertical; }
.tashkil__keys { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tashkil__keys-label { font-size: 13px; color: var(--text-muted); margin-right: 6px; }
.tashkil__key { width: 52px; height: 52px; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; font-family: "Noto Naskh Arabic", var(--font-arabic);
                font-size: 30px; line-height: 1; color: var(--ink); cursor: pointer; }

.tashkil__checked { border-top: 1px solid var(--line); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.tashkil__checked p { margin: 0; }
.tashkil__score { font-size: 17px; font-weight: 700; }
.tashkil__misses { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--font-arabic); font-size: 24px; }
.tashkil__right { color: var(--green); }
.tashkil__answer { background: var(--paper); border-radius: 16px; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.tashkil__play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--clay); color: var(--text-on-accent); font-size: 16px; flex-shrink: 0; cursor: pointer; }
.tashkil__answer-text { flex: 1; font-family: var(--font-arabic); font-size: 32px; line-height: 2.1; }
.tashkil__from { font-size: 13px; color: var(--text-muted); }
.tashkil__from a { font-weight: 600; }
.tashkil__why { background: var(--paper); border-radius: 14px; padding: 14px 18px; font-size: 15px; line-height: 1.6; white-space: pre-line; }
.tashkil__actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tashkil__foot { font-size: 14px; color: var(--text-muted); }
.tashkil__cta { min-height: 50px; padding: 0 28px; }
.tashkil__cta:disabled { background: var(--line); color: var(--text-body); border-color: var(--line); cursor: not-allowed; }
.tashkil__ask { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; }
.tashkil__ask-mark { font-family: var(--font-arabic); font-size: 18px; color: var(--clay); }
.tashkil__next-form { margin-left: auto; }

/* Result */
.tashkil__done-head { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.tashkil__done-head .page-title { font-size: 64px; line-height: 1; }
.tashkil__review-title { margin: 8px 0 0; font-size: 15px; font-weight: 700; }
.tashkil__review { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tashkil__review-item { padding: 18px 24px; border-radius: 18px; display: flex; align-items: center; gap: 24px; }
.tashkil__review-meta { display: flex; flex-direction: column; gap: 6px; width: 280px; flex-shrink: 0; font-size: 14px; }
.tashkil__again { color: var(--clay); font-weight: 600; text-decoration: none; padding: 0; }
.tashkil__review-text { flex: 1; margin: 0; font-family: var(--font-arabic); font-size: 30px; line-height: 2.1; }
.tashkil__review-text mark { background: var(--mark); color: var(--clay); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 10px; }
.tashkil__done-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.tashkil__done-actions .btn { min-height: 50px; padding: 0 26px; }

/* Today's card */
.today__vowels { position: relative; display: flex; gap: 20px; align-items: center; padding: 22px 64px 22px 24px; border-radius: 18px; }
.today__vowels-sample { width: 92px; height: 92px; border-radius: 16px; background: var(--sand); display: flex; align-items: center; justify-content: center;
                        font-family: var(--font-arabic); font-size: 34px; line-height: 2; color: var(--clay); flex-shrink: 0; }
.today__vowels-text { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.today__vowels-title { font-family: var(--font-serif); font-size: 27px; line-height: 1.15; }
.today__vowels-sub { font-size: 14px; color: var(--text-body); }
.today__vowels-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; font-size: 22px;
                       color: var(--text-muted); cursor: pointer; }
.today__vowels .btn { align-self: flex-start; margin-top: 6px; }

@media (max-width: 760px) {
  .tashkil__modes { grid-template-columns: 1fr; }
  .tashkil__mode { flex-direction: row; flex-wrap: wrap; padding: 14px 16px; gap: 4px 12px; }
  .tashkil__mode-sample { display: none; }
  .tashkil__mode-head { width: 100%; }
  .tashkil__mode-acc { border: 0; padding: 0; margin: 0; }
  .tashkil__mode--full { background: var(--sand); }
  .tashkil__mode--full .tashkil__mode-name { color: var(--text-muted); }
  .tashkil__mode--full .tashkil__mode-note { display: block; }
  .tashkil__mode--full .tashkil__mode-input { pointer-events: none; }
  .tashkil__go { width: 100%; }
  .tashkil__segment { width: auto; flex: 1; }
  .tashkil__progress { flex: 1; }
  .tashkil__segments { flex: 1; }
  .tashkil__card { padding: 16px 16px 12px; border-radius: 18px; }
  .tashkil__sentence { font-size: 31px; gap: 0 10px; }
  .tashkil__target { padding: 0 5px; min-height: 44px; }
  .tashkil__gap-label { min-width: 72px; height: 40px; font-size: 15px; }
  .tashkil__result { font-size: 12px; padding: 1px 9px; }
  .tashkil__picker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line-strong); border-radius: 22px 22px 0 0;
                     box-shadow: 0 -14px 30px -16px rgba(28, 35, 33, .45); padding: 12px 16px 20px; }
  .tashkil__picker-keys { display: none; }
  .tashkil__marks { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .tashkil__mark { min-height: 72px; background: var(--paper); border-color: var(--line); }
  .tashkil__mark-glyph { font-size: 36px; line-height: 1.4; }
  .tashkil__mark-name { font-size: 11px; }
  .tashkil__answer-text { font-size: 22px; }
  .tashkil__actions { gap: 8px; }
  .tashkil__actions .btn, .tashkil__next-form { flex: 1; }
  .tashkil__next-form .btn { width: 100%; }
  .tashkil__done-head .page-title { font-size: 44px; }
  .tashkil__review-item { flex-direction: column-reverse; align-items: stretch; gap: 4px; padding: 12px 14px; }
  .tashkil__review-meta { width: auto; }
  .tashkil__review-text { font-size: 22px; }
  .tashkil__done-actions { flex-direction: column; }
  .today__vowels { flex-direction: column; align-items: stretch; padding: 20px; }
  .today__vowels .btn { align-self: stretch; }
}
/* Arabic quoted in the assistant's answer (arabic_text.js). */
.tashkil__why-ar { font-size: 1.35em; line-height: 1.8; unicode-bidi: isolate; }
