/* ── My Progress page (my-progress.html) ─────────────────────────
   "Monitor" design (2026-09-26): a dark bedside-monitor panel (accuracy
   traces on a grid + a vitals rail, same slate as the home cards and the
   broadcast display) over light cards for activity, today's review, topics
   and quizzes. Trace colours: rhythm = the ECG mint, 12-lead = sky (dashed,
   so it never relies on hue), quizzes = the sidebar amber. */

.pg-main {
    margin-left: 230px; padding-top: 62px; min-height: 100vh;
    background:
        radial-gradient(1100px 560px at 82% -12%, rgba(95,179,201,.12), transparent 60%),
        radial-gradient(820px 480px at -5% -5%, rgba(38,64,139,.08), transparent 55%),
        #f4f7fc;
}
.pg-wrap { max-width: 1180px; margin: 0 auto; padding: 34px 36px 64px; display: flex; flex-direction: column; gap: 22px; }

/* ── Header + range ──────────────────────────────────────────── */
.pg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pg-head-text { display: flex; flex-direction: column; gap: 6px; }
.pg-title { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; color: #10141a; }
.pg-sub { margin: 0; font-size: 14.5px; color: #5d6670; }
.pg-range { display: flex; padding: 3px; border-radius: 999px; background: #e7ebf1; }
.pg-range-btn {
    all: unset; box-sizing: border-box; cursor: pointer; height: 32px; padding: 0 16px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; color: #404750; display: flex; align-items: center;
}
.pg-range-btn:hover { color: #10141a; }
.pg-range-btn.on { background: #10141a; color: #fff; }
.pg-range-btn:focus-visible { outline: 3px solid #26408b; outline-offset: 2px; }

/* ── The monitor ─────────────────────────────────────────────── */
.pg-monitor {
    display: grid; grid-template-columns: minmax(0, 1fr) 316px;
    border-radius: 22px; overflow: hidden; background: #1b2430;
    box-shadow: 0 24px 48px -24px rgba(15, 23, 42, 0.55);
}
.pg-mon-chart {
    position: relative; min-width: 0; padding: 22px 26px 16px;
    display: flex; flex-direction: column; gap: 8px;
    background-color: #1d2733;
    background-image:
        linear-gradient(rgba(166,207,213,.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(166,207,213,.07) 1px, transparent 1px),
        linear-gradient(rgba(166,207,213,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(166,207,213,.035) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}
.pg-mon-head { display: flex; align-items: baseline; gap: 12px; }
.pg-mon-title { margin: 0; font-size: 16px; font-weight: 700; color: #fff; }
.pg-mon-unit { font-size: 12.5px; color: #8e9bab; }
.pg-acc { position: relative; min-height: 290px; }
.pg-acc svg { display: block; width: 100%; height: 290px; overflow: visible; }
.pg-mon-empty { margin: 90px 0; text-align: center; font-size: 14px; color: #b8c3cf; }
.pg-mon-empty a { color: #c2e7d9; }

.pg-rail {
    background: #161e28; border-left: 1px solid rgba(255,255,255,.06);
    padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 18px;
}
.pg-streak { display: flex; flex-direction: column; gap: 10px; }
.pg-streak-k { font-size: 12.5px; font-weight: 600; color: #F3BD5C; }
.pg-streak-v { display: flex; align-items: baseline; gap: 8px; }
.pg-streak-v > span:first-child { font-size: 76px; line-height: .85; font-weight: 800; letter-spacing: -0.05em; color: #F3BD5C; }
.pg-streak-u { font-size: 15px; font-weight: 600; color: #e6d3ad; }
.pg-streak-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
.pg-streak-strip span { height: 22px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.16); }
.pg-streak-strip span.act { background: rgba(243,189,92,.28); box-shadow: none; }
.pg-streak-strip span.run { background: #F3BD5C; box-shadow: none; }
.pg-streak-strip span.today { outline: 2px solid rgba(255,255,255,.55); outline-offset: 1px; }
.pg-streak-ends { display: flex; justify-content: space-between; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: #7d8a99; }
.pg-rail-rule { height: 1px; background: rgba(255,255,255,.07); }
.pg-vitals { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.pg-vital { display: flex; flex-direction: column; gap: 2px; }
.pg-vital dt { font-size: 12px; color: #8e9bab; }
.pg-vital dd { margin: 0; }
.pg-vital-v { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; color: #fff; line-height: 1.15; }
.pg-vital-v.pg-mint { color: #c2e7d9; }
.pg-vital-s { font-size: 11.5px; color: #8391a1; }

/* ── Light cards ─────────────────────────────────────────────── */
.pg-row { display: grid; gap: 22px; }
.pg-row-a { grid-template-columns: minmax(0, 1fr) 360px; }
.pg-row-b { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-card {
    position: relative; min-width: 0; background: #fff; border: 1px solid #e3e8ef; border-radius: 18px;
    padding: 22px 24px; display: flex; flex-direction: column; gap: 14px;
}
.pg-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pg-card-title-row { display: flex; align-items: baseline; gap: 12px; }
.pg-card-title { margin: 0; font-size: 16px; font-weight: 700; color: #10141a; }
.pg-card-meta { font-size: 12.5px; color: #707882; }
.pg-emptymsg { margin: 18px 0; font-size: 13.5px; color: #707882; }
.pg-emptymsg a { color: #26408b; font-weight: 600; }

/* activity: stacked bars, flashcards below, quiz answers above */
.pg-key { display: flex; gap: 16px; font-size: 12.5px; color: #404750; }
.pg-key-i { display: flex; align-items: center; gap: 6px; }
.pg-key-sw { width: 10px; height: 10px; border-radius: 3px; }
.pg-sw-fc { background: #26408b; }
.pg-sw-qz { background: #6a8fd6; }
.pg-bars { display: flex; flex-direction: column; gap: 6px; }
.pg-bars-cols { display: grid; gap: 10px; align-items: end; height: 196px; border-bottom: 1px solid #e3e8ef; }
.pg-bars-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; }
.pg-bars-n { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: #8a929c; }
.pg-bars-col.cur .pg-bars-n { color: #26408b; font-weight: 600; }
.pg-bars-stack { width: 100%; max-width: 34px; display: flex; flex-direction: column; border-radius: 6px 6px 0 0; overflow: hidden; }
.pg-bars-col.cur .pg-bars-stack { outline: 2px solid #F3BD5C; outline-offset: 2px; }
.pg-bars-q { background: #6a8fd6; }
.pg-bars-f { background: #26408b; }
.pg-bars-q + .pg-bars-f { border-top: 2px solid #fff; }
.pg-bars-rest { width: 100%; max-width: 34px; height: 3px; border-radius: 2px; background: #dde4f0; }
.pg-bars-ticks { display: grid; gap: 10px; }
.pg-bars-tick { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.pg-bars-tick .wk { font-size: 10.5px; color: #8a929c; }
.pg-bars-tick .dt { font-size: 12px; font-weight: 500; color: #404750; white-space: nowrap; }
.pg-bars-tick.cur .dt { font-weight: 700; color: #10141a; }

/* today's review */
.pg-today-body { display: flex; align-items: center; gap: 22px; }
.pg-ring { position: relative; width: 148px; height: 148px; flex: none; }
.pg-ring svg { width: 148px; height: 148px; display: block; }
.pg-ring-track { fill: none; stroke: #e8edf5; stroke-width: 13; }
.pg-ring-fill { fill: none; stroke: #26408b; stroke-width: 13; stroke-linecap: round; stroke-dasharray: 0 389.6; transition: stroke-dasharray .8s cubic-bezier(.3,.1,.2,1); }
.pg-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pg-ring-n { font-size: 40px; font-weight: 800; letter-spacing: -0.04em; color: #10141a; line-height: 1; }
.pg-ring-of { font-size: 12px; color: #5d6670; }
.pg-today-text { display: flex; flex-direction: column; gap: 6px; }
.pg-today-big { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: #10141a; }
.pg-today-line { font-size: 13px; line-height: 1.45; color: #5d6670; }
.pg-cta {
    height: 44px; border-radius: 12px; background: #26408b; color: #fff; text-decoration: none;
    font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.pg-cta:hover { background: #1f3574; }
.pg-cta:focus-visible { outline: 3px solid #F3BD5C; outline-offset: 2px; }
.pg-today-foot { font-size: 12px; color: #707882; text-align: center; }

/* topics */
.pg-topics { display: flex; flex-direction: column; gap: 18px; }
.pg-topic { display: flex; flex-direction: column; gap: 8px; }
.pg-topic-top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.pg-topic-name { font-size: 14px; font-weight: 600; color: #181c1f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-topic-tag { font-size: 12px; font-weight: 600; white-space: nowrap; }
.pg-topic-tag.best { color: #1f7a4d; }
.pg-topic-tag.work { color: #9a5b00; }
.pg-topic-n { margin-left: auto; font-size: 12px; color: #707882; white-space: nowrap; }
.pg-topic-v { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: #10141a; width: 52px; text-align: right; flex: none; }
.pg-cells { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 3px; }
.pg-cells span { height: 12px; border-radius: 3px; background: #e7ecf3; }
.pg-cells span.on { background: #26408b; }
.pg-todo { display: flex; flex-direction: column; gap: 10px; }
.pg-todo:empty { display: none; }
.pg-todo-row {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px;
    border: 1px dashed #c9d2de; background: #f8fafd;
}
.pg-todo-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pg-todo-name { font-size: 14px; font-weight: 600; color: #181c1f; }
.pg-todo-sub { font-size: 12.5px; color: #5d6670; }
.pg-todo-row a { font-size: 13px; font-weight: 700; color: #26408b; text-decoration: none; white-space: nowrap; }
.pg-todo-row a:hover { text-decoration: underline; }

/* recent quizzes: score bar with a mark at the pass score */
.pg-quizzes { display: flex; flex-direction: column; }
.pg-q {
    display: grid; grid-template-columns: minmax(0, 1fr) 150px 56px 54px; align-items: center; gap: 14px;
    min-height: 46px; border-top: 1px solid #eef1f5;
}
.pg-q-name { display: flex; flex-direction: column; min-width: 0; }
.pg-q-title { font-size: 13.5px; font-weight: 600; color: #181c1f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-q-date { font-size: 11.5px; color: #707882; }
.pg-q-bar { position: relative; height: 8px; border-radius: 99px; background: #edf0f5; }
.pg-q-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: #26408b; }
.pg-q-fill.miss { background: #c9a15a; }
.pg-q-mark { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; border-radius: 1px; background: #10141a; }
.pg-q-score { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600; color: #181c1f; text-align: right; }
.pg-pill { justify-self: end; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11px; font-weight: 700; display: flex; align-items: center; }
.pg-pill.pass { background: #e3f3ea; color: #1d6b44; }
.pg-pill.miss { background: #fbf0dc; color: #80520a; }

/* free-tier veil (dark over the monitor, light over cards) */
.pg-veil {
    position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center;
    background: rgba(247,250,254,.72); backdrop-filter: blur(3px); border-radius: inherit;
}
.pg-mon-chart .pg-veil { background: rgba(22,30,40,.72); }

/* tooltip */
.pg-tooltip {
    position: fixed; z-index: 60; pointer-events: none; background: #171c28; color: #eef1f6;
    border-radius: 10px; padding: 8px 11px; font-size: 12px; line-height: 1.45;
    box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.pg-tooltip .tt-h { font-weight: 700; color: #fff; margin-bottom: 2px; }
.pg-tooltip .tt-r { display: flex; align-items: center; gap: 6px; }
.pg-tooltip .tt-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

/* ── Narrower windows ────────────────────────────────────────── */
@media (max-width: 1240px) {
    .pg-row-a { grid-template-columns: minmax(0, 1fr); }
    .pg-today-body { justify-content: flex-start; }
}
@media (max-width: 1100px) {
    .pg-monitor { grid-template-columns: minmax(0, 1fr); }
    .pg-rail { border-left: 0; border-top: 1px solid rgba(255,255,255,.06); }
    .pg-row-b { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .pg-ring-fill { transition: none; } }
