/* ============================================================================
   Practice History — slate redesign (Claude Design handoff, 2026-05-26).
   Linked directly (NOT scanned by CSS Builder). All tokens come from
   extensions/index_new/styles.css (.theme-light / .theme-dark on .mv-root).

   Component classes mirror design_handoff_practice_history/practice-history.css
   (`ph-*`) so this file maps ~1:1 to that bundle. Everything is scoped under
   .mv-root to stay isolated from the rest of the site. Structural wrappers
   (.ph-page-bg / .ph-root / .ph-page) integrate with the app-shell offsets.

   Chart colors: per-verse palette below; Speed/Rhythm/Memorized = --brand,
   with --accent / --success as secondary series.
   ============================================================================ */

.ph-page-bg { background: var(--bg); }

/* ---------- Per-verse chart palette (theme-switching) ----------
   Handoff §4 palette, promoted to CSS variables so the per-verse line
   colors track light/dark like the rest of the slate tokens (was a
   cookie-picked PHP array — static per request, blind to a live theme
   toggle / system preference). Light values are the base default; the
   dark + system-fallback blocks mirror index_new/styles.css so they
   resolve identically to --brand / --accent etc. */
.mv-root.ph-root {
	--ph-v1: #C25E3F; --ph-v2: #3F5876; --ph-v3: #2E7A52; --ph-v4: #A67A18;
	--ph-v5: #7A3F6E; --ph-v6: #9C3E1F; --ph-v7: #0D9488; --ph-v8: #B45309;
}
.mv-root.ph-root.theme-dark,
html[data-theme='dark'] .mv-root.ph-root,
html:not([data-theme]) .mv-root.ph-root.theme-dark {
	--ph-v1: #F08B6E; --ph-v2: #8FA7C2; --ph-v3: #6FB58B; --ph-v4: #E5B45E;
	--ph-v5: #C99BD6; --ph-v6: #E08964; --ph-v7: #5EEAD4; --ph-v8: #FBBF24;
}
@media (prefers-color-scheme: dark) {
	html:not([data-theme]) .mv-root.ph-root:not(.theme-light):not(.theme-dark) {
		--ph-v1: #F08B6E; --ph-v2: #8FA7C2; --ph-v3: #6FB58B; --ph-v4: #E5B45E;
		--ph-v5: #C99BD6; --ph-v6: #E08964; --ph-v7: #5EEAD4; --ph-v8: #FBBF24;
	}
}

/* ---------- Page container ---------- */
.mv-root.ph-root > .ph-page {
	box-sizing: border-box;
	width: 100%;
	max-width: 1440px;
	margin-left: auto;
	margin-right: auto;
	padding: 40px 64px 80px;
	min-width: 0;
}
.mv-root.ph-root.ph-loggedout > .ph-page { max-width: 1240px; padding: 28px 56px 80px; }
@media (max-width: 1600px) { .mv-root.ph-root > .ph-page { padding: 40px 48px 80px; } }
@media (max-width: 1180px) { .mv-root.ph-root > .ph-page { padding: 28px 40px 72px; } }
@media (max-width: 767px)  { .mv-root.ph-root > .ph-page { padding: 20px 16px 64px; } }

/* ---------- Content column ---------- */
.mv-root .ph-content { display: flex; flex-direction: column; gap: 40px; min-width: 0; }

/* ---------- Buttons ---------- */
.mv-root .ph-btn {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 10px 16px; border-radius: var(--radius-pill);
	font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
	cursor: pointer; border: 1px solid transparent; background: transparent;
	color: var(--text-2); text-decoration: none; white-space: nowrap;
	transition: filter .15s, color .15s, border-color .15s, transform .15s;
}
.mv-root .ph-btn svg { display: block; }
.mv-root .ph-btn:hover { transform: translateY(-1px); }
.mv-root .ph-btn.ghost { border-color: var(--border-strong); color: var(--text-2); background: var(--surface); }
.mv-root .ph-btn.ghost:hover { color: var(--text-1); border-color: var(--accent); }
.mv-root .ph-btn.primary { background: var(--brand); color: var(--brand-fg); border-color: var(--brand); }
.mv-root .ph-btn.primary:hover { filter: brightness(.96); }
.mv-root .ph-btn.solid { background: var(--text-1); color: var(--bg); border-color: var(--text-1); }
.mv-root .ph-btn.solid:hover { filter: brightness(1.08); }

/* ---------- Breadcrumb (logged-out) ---------- */
.mv-root .ph-breadcrumb {
	display: inline-flex; align-items: center; gap: 8px;
	font-family: var(--font-sans); font-size: 12.5px; color: var(--text-3);
	margin-bottom: 14px;
}
.mv-root .ph-breadcrumb a { color: var(--text-3); text-decoration: none; }
.mv-root .ph-breadcrumb a:hover { color: var(--text-1); }
.mv-root .ph-breadcrumb .chev { opacity: .55; }
.mv-root .ph-breadcrumb .current { color: var(--text-1); font-weight: 600; }

/* ====================================================================
   Hero
   ==================================================================== */
.mv-root .ph-hero {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px;
	align-items: end; padding: 12px 0 18px;
	border-bottom: 1px solid var(--border);
}
.mv-root .ph-hero-eye {
	display: inline-flex; align-items: center; gap: 8px;
	font-family: var(--font-mono); font-size: 11px; font-weight: 500;
	letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand);
	margin-bottom: 14px;
}
.mv-root .ph-hero-eye .dot {
	width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
	box-shadow: 0 0 0 4px var(--brand-soft);
}
.mv-root .ph-hero h1 {
	font-family: var(--font-serif); font-size: 64px; font-weight: 600;
	letter-spacing: -0.022em; line-height: 1; margin: 0 0 12px; color: var(--text-1);
}
.mv-root .ph-hero h1 em { font-style: italic; font-weight: 500; color: var(--brand); }
.mv-root .ph-hero-sub { font-size: 15px; line-height: 1.55; color: var(--text-2); max-width: 56ch; }
.mv-root .ph-hero-actions { display: inline-flex; align-items: center; gap: 8px; }

/* Streak card (hero right — replaces handoff's sidebar streak) */
.mv-root .ph-streak-card {
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-md); padding: 14px 16px 13px;
	display: flex; flex-direction: column; gap: 12px; min-width: 232px;
}
.mv-root .ph-streak-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mv-root .ph-streak-num {
	font-family: var(--font-serif); font-size: 40px; font-weight: 600;
	letter-spacing: -0.025em; color: var(--text-1); line-height: 1;
}
.mv-root .ph-streak-label {
	font-family: var(--font-sans); font-size: 10px; font-weight: 600;
	color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase;
	line-height: 1.25; text-align: right;
}
.mv-root .ph-streak-label strong { display: block; color: var(--text-1); font-weight: 600; }
.mv-root .ph-weekdots { display: flex; gap: 6px; justify-content: space-between; }
.mv-root .ph-weekdots .day {
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	font-family: var(--font-mono); font-size: 9px; color: var(--text-3);
	font-weight: 500; letter-spacing: 0.04em;
}
.mv-root .ph-weekdots .dot {
	width: 22px; height: 22px; border-radius: 50%;
	border: 1.5px solid var(--border-strong);
	display: inline-flex; align-items: center; justify-content: center; color: transparent;
}
.mv-root .ph-weekdots .day.on .dot { background: var(--success); border-color: var(--success); color: white; }
.mv-root .ph-weekdots .day.today .dot { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); }
.mv-root .ph-weekdots .day.future .dot { border-style: dashed; }

/* ====================================================================
   KPI strip
   ==================================================================== */
.mv-root .ph-kpis {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
	border: 1px solid var(--border); border-radius: var(--radius-md);
	background: var(--surface); overflow: hidden;
}
.mv-root .ph-kpi {
	padding: 18px 22px; border-right: 1px solid var(--border);
	display: flex; flex-direction: column; gap: 4px; position: relative;
}
.mv-root .ph-kpi:last-child { border-right: 0; }
.mv-root .ph-kpi .l {
	font-family: var(--font-mono); font-size: 10px; font-weight: 500;
	letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3);
}
.mv-root .ph-kpi .v {
	font-family: var(--font-serif); font-size: 36px; font-weight: 600;
	letter-spacing: -0.022em; line-height: 1; color: var(--text-1);
	display: inline-flex; align-items: baseline; gap: 4px;
}
.mv-root .ph-kpi .v .u {
	font-family: var(--font-sans); font-size: 13px; font-weight: 500;
	color: var(--text-3); letter-spacing: 0; margin-left: 2px;
}
.mv-root .ph-kpi .trend {
	font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
	color: var(--success); display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
}
.mv-root .ph-kpi .trend.down { color: var(--text-3); }
.mv-root .ph-kpi .trend.coral { color: var(--brand); }

/* ====================================================================
   Slim hero + unified stat bar (logged-in above-the-fold)
   ==================================================================== */
.mv-root .ph-hero.ph-hero-slim {
	display: block; grid-template-columns: none; border-bottom: 0;
	padding: 8px 0 2px; align-items: initial;
}
.mv-root .ph-hero.ph-hero-slim h1 { font-size: 44px; margin-bottom: 10px; }
.mv-root .ph-hero.ph-hero-slim .ph-hero-sub { max-width: 64ch; }

.mv-root .ph-statbar {
	display: flex; align-items: stretch; gap: 0;
	border: 1px solid var(--border); border-radius: var(--radius-md);
	background: var(--surface); overflow: hidden;
}
.mv-root .ph-statbar-stats { flex: 1 1 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); min-width: 0; }
.mv-root .ph-statbar .ph-kpi { padding: 16px 20px; }
.mv-root .ph-statbar .ph-kpi .v { font-size: 32px; }
.mv-root .ph-statbar-cta { flex-shrink: 0; align-self: center; margin: 0 18px; }

@media (max-width: 1024px) {
	.mv-root .ph-hero.ph-hero-slim h1 { font-size: 34px; }
	.mv-root .ph-statbar { flex-direction: column; }
	.mv-root .ph-statbar-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.mv-root .ph-statbar .ph-kpi:nth-child(3n) { border-right: 0; }
	.mv-root .ph-statbar .ph-kpi:nth-child(n+4) { border-top: 1px solid var(--border); }
	.mv-root .ph-statbar-cta { margin: 14px 18px 18px; justify-content: center; }
}
@media (max-width: 560px) {
	.mv-root .ph-statbar-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mv-root .ph-statbar .ph-kpi:nth-child(3n) { border-right: 1px solid var(--border); }
	.mv-root .ph-statbar .ph-kpi:nth-child(2n) { border-right: 0; }
	.mv-root .ph-statbar .ph-kpi:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ====================================================================
   Chart cards
   ==================================================================== */
.mv-root .ph-card {
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-md); padding: 24px 26px 28px; position: relative;
}
.mv-root .ph-card-head {
	display: flex; align-items: flex-start; justify-content: space-between;
	gap: 20px; margin-bottom: 6px; flex-wrap: wrap;
}
.mv-root .ph-card-head-l { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mv-root .ph-card-head h2 {
	font-family: var(--font-serif); font-size: 26px; font-weight: 600;
	letter-spacing: -0.018em; margin: 0; line-height: 1.05; color: var(--text-1);
	display: inline-flex; align-items: center; gap: 10px;
}
.mv-root .ph-card-head h2 .ic {
	width: 28px; height: 28px; border-radius: 8px;
	background: var(--brand-soft); color: var(--brand);
	display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mv-root .ph-card-head h2 .ic.green { background: var(--success-soft); color: var(--success); }
.mv-root .ph-card-head h2 .ic.slate { background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent); }
.mv-root .ph-card-head .sub {
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
	color: var(--text-3); margin-left: 38px;
}
.mv-root .ph-card-head .sub strong { color: var(--text-2); font-weight: 600; }

/* Range tabs / method chips */
.mv-root .ph-range { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: var(--radius-pill); border: 1px solid var(--border); }
.mv-root .ph-range a {
	border: 0; background: transparent; font-family: var(--font-sans);
	font-size: 11.5px; font-weight: 500; color: var(--text-3);
	padding: 6px 12px; border-radius: var(--radius-pill); cursor: pointer; text-decoration: none;
}
.mv-root .ph-range a.active {
	background: var(--surface); color: var(--text-1); font-weight: 600;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 0 0 1px var(--border);
}
.mv-root.theme-dark .ph-range a.active { background: var(--surface-elev); }

/* Memory progress: scope toggle (Focus / Schedule / All) sits beside the range tabs */
.mv-root .ph-head-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.mv-root .ph-methods { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.mv-root .ph-method {
	display: inline-flex; align-items: center; height: 28px; padding: 0 12px;
	border-radius: var(--radius-pill); border: 1px solid var(--border);
	background: var(--surface); color: var(--text-3); font-size: 12px; font-weight: 500;
	font-family: var(--font-sans); cursor: pointer; text-decoration: none;
}
.mv-root .ph-method:hover { color: var(--text-1); }
.mv-root .ph-method.active { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); }

/* Chart stats row */
/* Slim caption strip — quiet chart context, deliberately lighter than the
   page-level KPI bar (value first, then a small mono label, dot-separated). */
.mv-root .ph-chart-stats {
	display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 6px;
	margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--border);
}
.mv-root .ph-chart-stat { display: inline-flex; align-items: baseline; gap: 6px; }
.mv-root .ph-chart-stat:not(:first-child)::before {
	content: '\00B7'; order: 0; margin: 0 14px; color: var(--text-muted); align-self: center;
}
.mv-root .ph-chart-stat .v { order: 1; }
.mv-root .ph-chart-stat .l {
	order: 2; margin-bottom: 0;
	font-family: var(--font-mono); font-size: 10px; font-weight: 500;
	letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);
}
.mv-root .ph-chart-stat .v {
	font-family: var(--font-serif); font-size: 17px; font-weight: 600;
	letter-spacing: -0.01em; line-height: 1; color: var(--text-1);
	display: inline-flex; align-items: baseline; gap: 5px;
}
.mv-root .ph-chart-stat .v .u { font-family: var(--font-sans); font-size: 11px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.mv-root .ph-chart-stat .pill {
	display: inline-flex; align-items: center; gap: 4px;
	font-family: var(--font-mono); font-size: 10px; font-weight: 600;
	color: var(--success); background: var(--success-soft);
	border-radius: var(--radius-pill); padding: 3px 8px; margin-left: 8px;
}
.mv-root .ph-chart-stat .pill.coral { color: var(--brand); background: var(--brand-soft); }
.mv-root .ph-chart-stat .pill.down { color: var(--text-3); background: var(--surface-2); }

/* Chart row: chart + side legend */
.mv-root .ph-chart-row { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; margin-top: 18px; align-items: stretch; }
.mv-root .ph-svg-wrap { position: relative; width: 100%; height: 320px; }
.mv-root .ph-svg-wrap svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mv-root .ph-cum-wrap { height: 300px; }

/* Hover crosshair tooltip (HTML overlay — no SVG stretch). JS adds .ph-tip-on. */
.mv-root .ph-svg-wrap[data-ph-tip] { cursor: crosshair; }
.mv-root .ph-tip-guide { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-strong); opacity: 0; transform: translateX(-0.5px); pointer-events: none; transition: opacity .12s ease; }
.mv-root .ph-svg-wrap.ph-tip-on .ph-tip-guide { opacity: .65; }
.mv-root .ph-tip-dots { position: absolute; inset: 0; pointer-events: none; }
.mv-root .ph-tip-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); transform: translate(-50%, -50%); opacity: 0; transition: opacity .12s ease; }
.mv-root .ph-svg-wrap.ph-tip-on .ph-tip-dot { opacity: 1; }
.mv-root .ph-tip {
	position: absolute; z-index: 6; pointer-events: none; opacity: 0; transition: opacity .12s ease;
	background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14); padding: 9px 11px; min-width: 116px; max-width: 240px;
	font-family: var(--font-sans);
}
.mv-root .ph-svg-wrap.ph-tip-on .ph-tip { opacity: 1; }
.mv-root .ph-tip-head { font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.mv-root .ph-tip-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; font-size: 12px; line-height: 1.3; }
.mv-root .ph-tip-sw { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.mv-root .ph-tip-name { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-root .ph-tip-val { margin-left: auto; padding-left: 10px; font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Empty chart state */
.mv-root .ph-chart-empty { padding: 48px 16px; text-align: center; color: var(--text-3); font-size: 13.5px; }

/* Verse legend */
.mv-root .ph-legend { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); overflow: hidden; display: flex; flex-direction: column; }
.mv-root .ph-legend-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface);
	font-family: var(--font-mono); font-size: 10px; font-weight: 500;
	letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3);
}
.mv-root .ph-legend-list { display: flex; flex-direction: column; max-height: 380px; overflow-y: auto; }
.mv-root .ph-legend-row {
	display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center;
	padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: default; transition: background .12s;
}
.mv-root .ph-legend-row:hover { background: var(--surface); }
.mv-root .ph-legend-row:last-child { border-bottom: 0; }
/* Clickable legend (Practice speed drill-down): rows are links */
.mv-root a.ph-legend-row { text-decoration: none; color: inherit; cursor: pointer; }
.mv-root a.ph-legend-row:hover { background: var(--surface); }
.mv-root .ph-legend-row.active { background: var(--surface); box-shadow: inset 3px 0 0 var(--brand); }
.mv-root .ph-legend-row.active .ph-legend-ref { color: var(--brand); }
.mv-root .ph-legend-head .hint { text-transform: none; letter-spacing: 0; color: var(--text-muted); font-weight: 400; }
.mv-root .ph-legend-sw.all { background: linear-gradient(135deg, var(--brand) 0 50%, var(--border-strong) 50% 100%); }
.mv-root .ph-legend-row.reset .ph-legend-pct .arr { color: var(--text-muted); display: inline-flex; }
.mv-root .ph-legend-row.reset.active .ph-legend-pct .arr { color: var(--brand); }
.mv-root .ph-legend-sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.mv-root .ph-legend-sw.muted { background: var(--border-strong); opacity: 0.5; }
.mv-root .ph-legend-body { display: flex; flex-direction: column; min-width: 0; }
.mv-root .ph-legend-ref {
	font-family: var(--font-serif); font-size: 14px; font-weight: 600; letter-spacing: -0.008em;
	color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mv-root .ph-legend-state {
	display: inline-flex; align-items: center; gap: 5px;
	font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
	letter-spacing: 0.08em; color: var(--text-3); text-transform: lowercase; margin-top: 1px;
}
.mv-root .ph-legend-state .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-muted); }
.mv-root .ph-legend-pct { display: flex; flex-direction: column; align-items: flex-end; }
.mv-root .ph-legend-pct .v { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; }
.mv-root .ph-legend-pct .d { font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; color: var(--success); margin-top: 1px; font-variant-numeric: tabular-nums; }
.mv-root .ph-legend-pct .d.down { color: var(--text-3); }

/* SVG primitives */
.mv-root .ph-grid-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 3; }
.mv-root .ph-axis-text { font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: 0.06em; fill: var(--text-muted); }
.mv-root .ph-axis-label { font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--text-muted); }
.mv-root .ph-today-marker { stroke: var(--brand); stroke-width: 1; stroke-dasharray: 2 4; opacity: 0.5; }
.mv-root .ph-today-label { font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--brand); }
.mv-root .ph-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mv-root .ph-line.dim { opacity: 0.45; stroke-width: 1.5; }
/* Many-verses scope: every verse its own thin colored line */
.mv-root .ph-line.thin { stroke-width: 1.5; opacity: 0.8; }
.mv-root .ph-line.area { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 2; }
/* Memory progress "band" mode — spread fill + dashed average line for many verses */
.mv-root .ph-band { fill: var(--brand-soft); opacity: 0.55; stroke: none; }
.mv-root .ph-avg-line { fill: none; stroke: var(--text-2); stroke-width: 2; stroke-dasharray: 5 4; stroke-linecap: round; opacity: 0.9; }
.mv-root .ph-dot { stroke-width: 0; }
.mv-root .ph-dot.ring { stroke: var(--surface); stroke-width: 2; }

/* ====================================================================
   Practice rhythm — heatmap (SVG)
   ==================================================================== */
.mv-root .ph-hm-wrap { margin-top: 18px; width: 100%; overflow-x: auto; padding-bottom: 4px; }
.mv-root .ph-hm-svg { display: block; width: 100%; height: auto; }
.mv-root .ph-hm-svg rect.cell { transition: opacity .15s ease; }
.mv-root .ph-hm-svg rect.cell:hover { opacity: 1 !important; stroke: var(--text-1); stroke-width: 0.8; }
.mv-root .ph-hm-foot {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
	margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border);
	font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3);
}
.mv-root .ph-hm-scale { display: inline-flex; align-items: center; gap: 6px; }
.mv-root .ph-hm-scale .sw { width: 13px; height: 13px; border-radius: 3px; border: 1px solid var(--border); }

/* ====================================================================
   Recently practiced verses
   ==================================================================== */
.mv-root .ph-recent-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.mv-root .ph-recent-day {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--font-serif); font-size: 19px; font-weight: 600;
	letter-spacing: -0.012em; color: var(--text-1); margin: 22px 0 14px;
}
.mv-root .ph-recent-day .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); flex-shrink: 0; }
.mv-root .ph-recent-day .meta { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; color: var(--text-3); }
.mv-root .ph-recent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mv-root .ph-verse-card {
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
	padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; position: relative;
	transition: border-color .15s, transform .15s; cursor: pointer; text-decoration: none;
	min-width: 0; /* grid item: shrink to the track so .coll can ellipsis instead of overflowing */
}
.mv-root .ph-verse-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.mv-root .ph-verse-card.featured {
	border-color: color-mix(in oklab, var(--brand) 35%, var(--border));
	background: linear-gradient(135deg, var(--brand-soft) 0%, transparent 60%), var(--surface);
}
.mv-root .ph-vc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mv-root .ph-vc-refwrap { display: inline-flex; align-items: center; min-width: 0; }
.mv-root .ph-vc-ref { font-family: var(--font-serif); font-size: 17px; font-weight: 600; letter-spacing: -0.012em; color: var(--text-1); }
.mv-root .ph-vc-trans {
	font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em;
	color: var(--text-3); border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; margin-left: 6px; flex-shrink: 0;
}
.mv-root .ph-vc-pct { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-3); flex-shrink: 0; }
.mv-root .ph-vc-pct.full { color: var(--success); background: var(--success-soft); padding: 3px 8px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 4px; }
.mv-root .ph-vc-pct.partial { color: var(--brand); }
.mv-root .ph-vc-text {
	font-family: var(--font-serif); font-size: 13.5px; line-height: 1.5; color: var(--text-2);
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
	overflow-wrap: anywhere; /* guard: a single very long token can't push card width */
}
.mv-root .ph-vc-foot {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em;
	color: var(--text-3); padding-top: 8px; border-top: 1px dashed var(--border); margin-top: 4px;
}
.mv-root .ph-vc-foot .coll { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-root .ph-vc-foot .time { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); flex-shrink: 0; }

/* Sort pill */
.mv-root .ph-sort { position: relative; }
.mv-root .ph-sort-pill {
	display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px;
	border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface);
	font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--text-2); cursor: pointer;
}
.mv-root .ph-sort-pill:hover { border-color: var(--border-strong); color: var(--text-1); }
.mv-root .ph-sort-pill .arr { transition: transform .15s; }
.mv-root .ph-sort.open .ph-sort-pill .arr { transform: rotate(180deg); }
.mv-root .ph-sort-menu {
	position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
	min-width: 180px; background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 6px; display: none;
}
.mv-root .ph-sort.open .ph-sort-menu { display: block; }
.mv-root .ph-sort-menu a {
	display: block; padding: 9px 12px; border-radius: var(--radius-sm, 8px);
	font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--text-2); text-decoration: none;
}
.mv-root .ph-sort-menu a:hover { background: var(--surface-2); color: var(--text-1); }
.mv-root .ph-sort-menu a.active { color: var(--brand); }

/* ====================================================================
   Full Collection Practices
   ==================================================================== */
.mv-root .ph-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 4px; flex-wrap: wrap; }
.mv-root .ph-section-head h2 {
	font-family: var(--font-serif); font-size: 24px; font-weight: 600; letter-spacing: -0.018em;
	margin: 0; display: inline-flex; align-items: center; gap: 10px; color: var(--text-1);
}
.mv-root .ph-section-head .ic {
	width: 26px; height: 26px; border-radius: 7px; background: var(--success-soft); color: var(--success);
	display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mv-root .ph-section-head .sub { font-size: 13px; color: var(--text-3); }
.mv-root .ph-coll-day {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--font-serif); font-size: 18px; font-weight: 600; letter-spacing: -0.012em;
	color: var(--text-1); margin: 22px 0 14px;
}
.mv-root .ph-coll-day .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); flex-shrink: 0; }
.mv-root .ph-coll-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mv-root .ph-coll-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mv-root .ph-coll-top { display: flex; align-items: center; gap: 12px; }
.mv-root .ph-coll-check { width: 36px; height: 36px; border-radius: 9px; background: var(--success); color: white; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.mv-root .ph-coll-check img { width: 100%; height: 100%; object-fit: cover; }
.mv-root .ph-coll-info { flex: 1; min-width: 0; }
.mv-root .ph-coll-name { font-family: var(--font-serif); font-size: 16px; font-weight: 600; letter-spacing: -0.008em; color: var(--text-1); }
.mv-root .ph-coll-meta { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: var(--text-3); letter-spacing: 0.04em; }
.mv-root .ph-coll-verses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.mv-root .ph-coll-vrow { display: flex; flex-direction: column; font-size: 12px; color: var(--text-2); line-height: 1.3; min-width: 0; }
.mv-root .ph-coll-vrow .ref { font-family: var(--font-serif); font-weight: 600; font-size: 13px; color: var(--text-1); letter-spacing: -0.005em; }
.mv-root .ph-coll-vrow .txt { color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ====================================================================
   Empty state
   ==================================================================== */
.mv-root .ph-empty {
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
	padding: 28px; text-align: center;
}
.mv-root .ph-empty h3 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--text-1); margin: 0 0 8px; }
.mv-root .ph-empty p { font-size: 14px; line-height: 1.5; color: var(--text-2); max-width: 52ch; margin: 0 auto 16px; }
.mv-root .ph-dim { opacity: 0.5; pointer-events: none; }

/* ====================================================================
   Logged-out marketing CTA
   ==================================================================== */
.mv-root .ph-cta {
	margin-top: 16px;
	background: linear-gradient(135deg, var(--brand-soft) 0%, transparent 60%), var(--surface);
	border: 1px solid color-mix(in oklab, var(--brand) 25%, var(--border));
	border-radius: var(--radius-lg); padding: 36px 44px;
	display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center;
	position: relative; overflow: hidden;
}
.mv-root .ph-cta::before {
	content: ""; position: absolute; inset: 0;
	background: radial-gradient(circle at 100% 0%, var(--brand-soft), transparent 55%); pointer-events: none;
}
.mv-root .ph-cta-body { position: relative; }
.mv-root .ph-cta-eye {
	display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
	font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--brand); margin-bottom: 12px;
}
.mv-root .ph-cta h2 { font-family: var(--font-serif); font-size: 36px; font-weight: 600; letter-spacing: -0.022em; line-height: 1.05; margin: 0 0 12px; color: var(--text-1); }
.mv-root .ph-cta h2 em { font-style: italic; font-weight: 500; color: var(--brand); }
.mv-root .ph-cta p { font-size: 15px; line-height: 1.55; color: var(--text-2); max-width: 56ch; margin: 0 0 18px; }
.mv-root .ph-cta-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mv-root .ph-cta-side { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; }
.mv-root .ph-cta-side .l { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.mv-root .ph-cta-side .row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); padding: 7px 0; border-bottom: 1px dashed var(--border); }
.mv-root .ph-cta-side .row:last-child { border-bottom: 0; }
.mv-root .ph-cta-side .row .ic { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--brand); flex-shrink: 0; }
.mv-root .ph-cta-side .row strong { color: var(--text-1); font-weight: 600; }

/* ====================================================================
   Responsive
   ==================================================================== */
@media (max-width: 1180px) {
	.mv-root .ph-hero { grid-template-columns: 1fr; }
	.mv-root .ph-streak-card { min-width: 0; }
	.mv-root .ph-chart-row { grid-template-columns: 1fr; }
	.mv-root .ph-recent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mv-root .ph-coll-grid { grid-template-columns: 1fr; }
	.mv-root .ph-cta { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
	.mv-root .ph-hero h1 { font-size: 50px; }
	.mv-root .ph-recent-grid { grid-template-columns: 1fr; }
	.mv-root .ph-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mv-root .ph-kpi:nth-child(2) { border-right: 0; }
	.mv-root .ph-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
	.mv-root .ph-cta { padding: 24px; }
	.mv-root .ph-cta h2 { font-size: 28px; }
}
@media (max-width: 520px) {
	.mv-root .ph-hero h1 { font-size: 40px; }
	.mv-root .ph-coll-verses { grid-template-columns: 1fr; }
}
