/* Reports and progress (student/reports.js) in the navy design: one navy card a page (where he reached in the khatma,
   or the session's result), gold ayah positions, grade chips, the progress line. Cards, rows, chips and notes come from
   apply.css + student.css. */

/* ayah positions (.pos, student.css): a little smaller in rows, large where he reached */
.pos.rp-tag { height: 24px; padding: 0 9px; font-size: 13px; line-height: 1; }
.pos.rp-tag-lg { height: 46px; padding: 0 16px; border-radius: var(--radius-md); font-size: 26px; font-weight: 800; line-height: 1; box-shadow: inset 0 0 0 1px var(--gold-edge); }

/* a card's head: its title, a quiet word at the other end */
.rp-card > h2, .rp-card-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: var(--text-lg); font-weight: 700; line-height: 1.35; }
.rp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rp-card-head small, .rp-foot { font-size: 13.5px; font-weight: 500; color: var(--ink-3); }
.rp-foot { margin: 0; display: flex; align-items: center; gap: 6px; line-height: 1.5; }
.rp-foot svg { flex: none; }
.rp-count { min-width: 26px; height: 24px; padding: 0 8px; border-radius: var(--radius-pill); display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 700; }
/* a card whose rows run edge to edge */
.card.rp-flush { padding-inline: 0; padding-bottom: 6px; }
.rp-flush > h2, .rp-flush > .rp-card-head { padding-inline: 16px; }
.rp-flush .row { padding-inline: 16px; }
.rp-flush .list { margin-top: -4px; }

/* the one navy card */
.card.rp-hero { position: relative; overflow: hidden; border: 0; background: var(--grad); color: var(--on-accent); box-shadow: var(--shadow-navy); }
.rp-dots { position: absolute; top: 16px; left: 16px; width: 46px; height: 30px; opacity: .28; background-image: radial-gradient(#FFFFFF 1.3px, transparent 1.6px); background-size: 8px 8px; pointer-events: none; }
.rp-hero h2 { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.3; color: rgba(255, 255, 255, .8); }

/* where he reached in the khatma (also «إجازتي») */
.card.rp-khatma { gap: 10px; padding: 20px 18px 16px; }
.rp-where { margin: 0; }
.rp-meter { display: grid; gap: 7px; margin-top: 4px; }
.rp-track { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.rp-track i { display: block; height: 100%; border-radius: 4px; background: #E9C77D; }
.rp-meter small { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, .8); }
.rp-go-next { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .1); color: var(--on-accent); font-size: 14.5px; font-weight: 700; line-height: 1.6; text-decoration: none; transition: background-color 150ms ease-out; }
.rp-go-next > span { flex: 1; min-width: 0; }
.rp-go-next svg { flex: none; }
.rp-go-next .pos.rp-tag { height: 22px; font-size: 12.5px; vertical-align: 1px; }
.rp-go-next:active { background: rgba(255, 255, 255, .18); }

/* the summary: three numbers in one card */
.card.rp-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 14px 6px; }
.rp-sum > div { display: grid; justify-items: center; gap: 4px; padding: 2px 4px; text-align: center; }
.rp-sum > div + div { box-shadow: inset -1px 0 0 var(--line); }
.rp-sum b { font-size: 28px; font-weight: 800; line-height: 1.1; }
.rp-sum small { font-size: var(--text-sm); font-weight: 500; line-height: 1.35; color: var(--ink-3); }

/* the progress line: navy over a soft area, a recessive scale, each value on hover */
.rp-chart { display: block; width: 100%; height: auto; overflow: visible; }
.rp-chart .grid { stroke: var(--line); stroke-width: 1; }
.rp-chart .base { stroke: #D5DBE8; stroke-width: 1; }
.rp-chart .axis { fill: var(--ink-3); font-family: var(--ui); font-size: 11.5px; font-weight: 500; }
.rp-chart .area { fill: var(--navy-2); fill-opacity: .1; }
.rp-chart .line { fill: none; stroke: var(--navy-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rp-chart .dot { fill: var(--navy-2); stroke: var(--surface); stroke-width: 2; transition: r 150ms ease-out; }
.rp-chart .dot.last { fill: var(--brand-hover); }
.rp-chart .hit { fill: transparent; }
.rp-chart .val { fill: var(--ink); font-family: var(--ui); font-size: 13px; font-weight: 800; }
.rp-chart .rp-tip { opacity: 0; transition: opacity 150ms ease-out; pointer-events: none; }
.rp-chart .rp-tip rect { fill: var(--brand-hover); }
.rp-chart .rp-tip text { fill: #FFFFFF; font-family: var(--ui); font-size: 12px; font-weight: 700; }
.rp-chart .rp-pt:hover .rp-tip { opacity: 1; }
.rp-chart .rp-pt:hover .dot { r: 6; }

/* rows: the weakest items, the reports */
.rp-card .row .rp-pct { font-size: var(--text-input); font-weight: 800; color: var(--ink); }
.rp-card .row .re { gap: 8px; }
.rp-row { padding-block: 14px; transition: background-color 150ms ease-out; }
.rp-row:active { background: var(--navy-wash); }
.row .rt.rp-rep { gap: 6px; }
.rp-rep-top { display: flex; align-items: center; gap: 8px; }
.row .rp-rep-top > b:first-child { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.rp-rep-pos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--text-md); color: var(--ink-3); }
.row .rt .rp-rep-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.rp-row .re { color: #A3ABC0; }

/* the report: the session, its result and the passage */
.card.rp-head { gap: 18px; padding: 18px 18px 20px; }
.rp-head .rp-dots { top: auto; bottom: 14px; }
.rp-when { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rp-when b { display: block; font-size: 19px; font-weight: 800; line-height: 1.3; }
.rp-when small { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, .78); }
.rp-head .badge { flex: none; gap: 5px; height: 28px; padding: 0 11px; background: rgba(255, 255, 255, .14); color: var(--on-accent); font-size: 12.5px; font-weight: 700; }
.rp-head .badge svg { color: #9EE2B8; }
.rp-total { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 16px; }
.rp-ring { position: relative; width: 112px; height: 112px; }
.rp-ring svg { display: block; transform: rotate(-90deg); }   /* the arc starts at the top */
.rp-ring .track { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 9; }
.rp-ring .val { fill: none; stroke: #E9C77D; stroke-width: 9; stroke-linecap: round; }
.rp-ring-in { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; }
.rp-ring-in b { font-size: 30px; font-weight: 800; line-height: 1; }
.rp-ring-in small { height: 22px; padding: 0 9px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; background: rgba(158, 226, 184, .2); color: #B9F0CD; font-size: var(--text-xs); font-weight: 700; }
.rp-range { display: grid; gap: 8px; }
.rp-range h2 { font-size: 13.5px; font-weight: 500; }
.rp-range p { margin: 0; display: flex; align-items: center; gap: 8px; font-size: var(--text-md); color: rgba(255, 255, 255, .78); }
.rp-range span:first-child { min-width: 20px; }
.rp-range .pos.rp-tag { height: 30px; padding: 0 11px; font-size: var(--text-base); }

/* the survey by category: a bar each, opened to its items */
.rp-bars { display: flex; flex-direction: column; margin-top: -6px; }
.rp-cat + .rp-cat { border-top: 1px solid var(--line); }
.rp-cat summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; grid-template-areas: "n p c" "b b b"; align-items: center; gap: 8px 10px; min-height: 44px; padding: 14px 0; cursor: pointer; }
.rp-cat summary::-webkit-details-marker { display: none; }
.rp-cat-n { grid-area: n; font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.rp-cat-p { grid-area: p; font-size: var(--text-input); font-weight: 800; }
.rp-cat summary svg { grid-area: c; color: #A3ABC0; transform: rotate(-90deg); transition: transform 200ms var(--ease); }
.rp-cat[open] summary svg { transform: rotate(90deg); }
.rp-bar { grid-area: b; display: block; height: 7px; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
.rp-bar i { display: block; height: 100%; border-radius: 4px; background: var(--grad); }
.rp-items { list-style: none; margin: 0; padding: 0 0 14px; display: grid; gap: 6px; }
.rp-items li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: var(--radius-md); background: var(--fill); font-size: 14.5px; line-height: 1.45; }
.rp-items .chip { flex: none; }

/* the sheikh's notes, each at its ayah */
.rp-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rp-notes li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--text-base); line-height: 1.55; }
.rp-notes .pos { flex: none; margin-top: 1px; }

/* the memorisation mistakes: a mark each, the last one stops the reading */
.rp-mistakes { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.rp-mistakes b { font-size: var(--text-3xl); font-weight: 800; line-height: 1.2; }
.rp-mistakes span { font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.rp-pips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.rp-pip { display: grid; justify-items: center; gap: 6px; font-size: var(--text-xs); font-weight: 500; line-height: 1.3; color: var(--ink-3); text-align: center; }
.rp-pip i { display: block; width: 100%; height: 8px; border-radius: 4px; background: var(--fill-2); }
.rp-pip.used { color: var(--brand); font-weight: 700; }
.rp-pip.used i { background: var(--grad); }
.rp-pip.stop { color: var(--danger); }
.rp-pip.stop i { background: var(--danger-bg); box-shadow: inset 0 0 0 1.5px #EBB7B7; }
.rp-pip.stop.used i { background: var(--danger); box-shadow: none; }

/* where the next session starts, and the way to the schedule */
.note.rp-next { align-items: center; gap: 12px; padding: 0; background: none; color: var(--ink); font-size: var(--text-base); font-weight: 700; line-height: 1.7; }
.note.rp-next svg { margin: 0; }
.rp-next .pos.rp-tag { height: 26px; font-size: var(--text-md); }
a.btn.rp-soft { height: 44px; border-color: transparent; background: var(--brand-soft); box-shadow: none; color: var(--brand); font-weight: 700; }

@media (hover: hover) and (pointer: fine) {
  .rp-go-next:hover { background: rgba(255, 255, 255, .16); }
  .rp-row:hover { background: var(--navy-wash); }
  .rp-cat summary:hover .rp-cat-n { color: var(--brand); }
  a.btn.rp-soft:hover { background: #DDE3F4; }
}
@media (prefers-reduced-motion: reduce) { .rp-cat summary svg, .rp-chart .dot { transition: none; } }

/* «تسجيلات جلساتك» (reports.js recordings): a session a row, its day, time and length, its passage once approved,
   then its player (base.css .rec-player) */
.rp-rec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rp-rec { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.rp-rec:first-child { border-top: 0; padding-top: 2px; }
.rp-rec-t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rp-rec-t b { font-size: var(--text-base); }
.rp-rec-t small { font-size: var(--text-md); color: var(--ink-2); }
.rp-rec-pos { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--text-md); color: var(--ink-3); }
.rp-recs .muted-line a { color: var(--brand); font-weight: 700; }

/* a session the sheikh kept with «حضر» (sheikh/attend.js): no result, it says it was in person */
.chip.rp-here { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.rp-head .chip.rp-here { align-self: center; height: 32px; padding: 0 14px; font-size: var(--text-sm); }
