/* reports module: #/progress, #/reports, #/parent — charts are inline SVG styled with the shared tokens. */

/* ── chart primitives ── */
.rp-chart { width: 100%; }
.rp-chart svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.rp-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.rp-scroll-x svg { max-width: none; }
.rp-axis { fill: var(--text-faint); font-size: 10px; font-family: var(--font); }
.rp-grid { stroke: var(--border); stroke-width: 1; opacity: .6; }
.rp-target { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .55; }
.rp-target-label { fill: var(--text-muted); font-size: 10px; font-weight: 700; }
.rp-line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.rp-line.rp-line-soft { stroke-dasharray: 4 3; opacity: .8; }
.rp-dot { stroke: var(--surface); stroke-width: 2; }
.rp-hit { fill: transparent; cursor: default; }
.rp-hit:hover + .rp-dot, .rp-dot:hover { r: 6; }
.rp-end-label { fill: var(--text-muted); font-size: 10.5px; font-weight: 700; }
.rp-bar { fill: var(--primary); }
.rp-bar-free { fill: var(--surface-3); }
.rp-bar-missed { fill: var(--danger); }
.rp-hit:hover { fill: color-mix(in srgb, var(--text) 6%, transparent); }

.rp-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rp-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); }
.rp-key { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.rp-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* heat-map — one hue (primary), light → strong */
.rp-heat { stroke: var(--surface); stroke-width: 0; }
.rp-heat-0 { fill: var(--surface-3); background: var(--surface-3); }
.rp-heat-1 { fill: color-mix(in srgb, var(--primary) 30%, var(--surface-3)); background: color-mix(in srgb, var(--primary) 30%, var(--surface-3)); }
.rp-heat-2 { fill: color-mix(in srgb, var(--primary) 55%, var(--surface-3)); background: color-mix(in srgb, var(--primary) 55%, var(--surface-3)); }
.rp-heat-3 { fill: color-mix(in srgb, var(--primary) 78%, var(--surface-3)); background: color-mix(in srgb, var(--primary) 78%, var(--surface-3)); }
.rp-heat-4 { fill: var(--primary); background: var(--primary); }
.rp-heat-free { fill: transparent; stroke: var(--xp); stroke-width: 1.5; stroke-dasharray: 3 2; background: transparent; border: 1.5px dashed var(--xp); box-sizing: border-box; }
.rp-heat-future { fill: transparent; stroke: var(--border); stroke-width: 1; }
.rp-heat-x { stroke: var(--danger); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.rp-swatch-missed { background: var(--surface-3); position: relative; }
.rp-swatch-missed::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--danger); font-size: 11px; font-weight: 900; }
.rp-heat-today { fill: none; stroke: var(--cyan); stroke-width: 2; pointer-events: none; }

/* band gauge */
.rp-band-none { fill: var(--surface-3); }
.rp-band-bronze { fill: #c98a52; }
.rp-band-silver { fill: #a9b4c8; }
.rp-band-gold { fill: #f5b301; }
.rp-band-jmo { fill: var(--primary); }
.rp-marker { fill: var(--text); }
.rp-marker-line { stroke: var(--text); stroke-width: 2; }

/* ── KPI row ── */
.rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--s3); }
.rp-kpi { background: var(--surface-2); border-radius: var(--radius-sm); padding: var(--s3); min-width: 0; }
.rp-kpi .kpi-value { font-size: var(--fs-xl); }
.rp-kpi .kpi-label { font-size: var(--fs-xs); }

/* ── week grid ── */
.rp-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rp-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: var(--radius-sm); background: var(--surface-2); border: 2px solid transparent; text-align: center; min-width: 0; }
.rp-day.is-today { border-color: var(--cyan); }
.rp-day-wd { font-size: var(--fs-xs); color: var(--text-muted); font-weight: 700; }
.rp-day-sym { font-size: 1.35rem; font-weight: 900; line-height: 1.2; min-height: 1.6rem; }
.rp-day-txt { font-size: 11px; font-weight: 700; }
.rp-day-meta { font-size: 10px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rp-day-done { background: var(--success-soft); } .rp-day-done .rp-day-sym { color: var(--success); }
.rp-day-partial { background: var(--warning-soft); } .rp-day-partial .rp-day-sym { color: var(--warning); }
.rp-day-missed { background: var(--danger-soft); } .rp-day-missed .rp-day-sym { color: var(--danger); }
.rp-day-free { background: transparent; border: 2px dashed color-mix(in srgb, var(--xp) 60%, transparent); } .rp-day-free .rp-day-sym { color: var(--xp); }
.rp-day-today .rp-day-sym { color: var(--cyan); }
.rp-day-upcoming { opacity: .5; }
@media (max-width: 480px) { .rp-day-meta { display: none; } .rp-day-txt { font-size: 10px; } }

/* ── mastery rows ── */
.rp-mrows { display: flex; flex-direction: column; gap: 10px; }
.rp-mrow { display: grid; grid-template-columns: minmax(90px, 210px) 1fr 44px 42px; align-items: center; gap: 10px; }
.rp-mrow-name { font-size: var(--fs-sm); }
.rp-mrow-val { text-align: right; font-size: var(--fs-sm); }
.rp-arrow { font-size: var(--fs-xs); font-weight: 800; text-align: right; }
@media (max-width: 480px) { .rp-mrow { grid-template-columns: minmax(70px, 110px) 1fr 38px 34px; gap: 6px; } }

/* ── rings ── */
.rp-rings { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: var(--s4); }
.rp-ring-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--s3) var(--s2); border-radius: var(--radius); background: var(--surface-2); text-decoration: none; color: inherit; text-align: center; transition: transform var(--dur); }
a.rp-ring-card:hover { transform: translateY(-2px); }
.rp-ring-name { font-size: var(--fs-xs); font-weight: 700; line-height: 1.25; }
.rp-ring-sub { font-size: 11px; color: var(--text-faint); }
@media (max-width: 420px) { .rp-rings { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); } }

/* ── goal trackers ── */
.rp-road { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rp-road-step { display: grid; grid-template-columns: 72px 1fr; gap: 8px; font-size: var(--fs-sm); padding: 6px 8px; border-radius: var(--radius-xs); }
.rp-road-step.is-past { opacity: .6; }
.rp-road-step.is-current { background: color-mix(in srgb, #f5b301 18%, transparent); font-weight: 700; }
.rp-road-month { font-weight: 800; color: var(--text-muted); }
.rp-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 14px; margin-top: 8px; }
.rp-theme { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rp-details summary { cursor: pointer; font-weight: 700; font-size: var(--fs-sm); padding: 4px 0; }
.rp-ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rp-rung { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.rp-rung-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: var(--fs-xs); background: var(--surface-3); flex: none; }
.rp-rung-met .rp-rung-n { background: var(--success); color: #fff; }
.rp-rung-partial .rp-rung-n { background: var(--warning); color: #1b1300; }

/* ── reports page ── */
.rp-split { display: grid; grid-template-columns: 280px 1fr; gap: var(--s5); align-items: start; }
.rp-list { position: sticky; top: calc(var(--topbar-h) + 12px); max-height: calc(100vh - var(--topbar-h) - 40px); overflow: auto; }
.rp-report-item.is-active { background: var(--accent-soft); outline: 2px solid var(--primary); outline-offset: -2px; }
.rp-detail { min-width: 0; }
.rp-narrative { font-size: var(--fs-md); line-height: 1.6; }
.rp-plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); }
.rp-table td, .rp-table th { font-size: var(--fs-sm); }
.rp-table td:last-child, .rp-table th:last-child { text-align: right; white-space: nowrap; }
@media (max-width: 900px) {
  .rp-split { grid-template-columns: 1fr; }
  .rp-list { position: static; max-height: 260px; }
}

/* ── parent dashboard ── */
.rp-status-hero { display: grid; grid-template-columns: auto 1fr; gap: var(--s5); align-items: center; }
.rp-status-big { font-size: 2.6rem; line-height: 1; }
@media (max-width: 520px) { .rp-status-hero { grid-template-columns: 1fr; gap: var(--s3); } }
.rp-tasks { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.rp-tasks li { display: flex; gap: 8px; align-items: baseline; }
.rp-chat { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; padding: 4px; }
.rp-msg { padding: 10px 12px; border-radius: var(--radius-sm); max-width: 88%; font-size: var(--fs-sm); }
.rp-msg-user { align-self: flex-end; background: var(--accent-soft); }
.rp-msg-assistant { align-self: flex-start; background: var(--surface-2); }
.rp-msg-meta { font-size: 10px; color: var(--text-faint); margin-bottom: 2px; font-weight: 700; }
.rp-settings-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rp-settings-days .field { gap: 4px; min-width: 0; }
.rp-settings-days .input { padding-left: 6px; padding-right: 4px; text-align: center; }
@media (max-width: 560px) { .rp-settings-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rp-toggles { display: flex; flex-direction: column; gap: 8px; }
.rp-iframe { width: 100%; height: 60vh; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.rp-panel-note { font-size: var(--fs-xs); color: var(--text-faint); }
.rp-event-form { display: grid; grid-template-columns: 140px 130px 1fr; gap: 8px; align-items: end; }
.rp-event-form .rp-ev-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .rp-event-form { grid-template-columns: 1fr 1fr; } .rp-event-form .rp-ev-title { grid-column: 1 / -1; } }
.rp-bests { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.rp-best { background: var(--surface-2); border-radius: var(--radius-sm); padding: var(--s3); display: flex; flex-direction: column; gap: 2px; }
.rp-best-icon { font-size: 1.5rem; }
.rp-best-value { font-size: var(--fs-lg); font-weight: 900; }
.rp-best-label { font-size: var(--fs-xs); color: var(--text-muted); }
