/* progress.css — the progress page (site/progress.html): one sky, four cards, one link to the whole map.
   Ported 2026-09-25 from 1_ACTIVE/progress_reporting_CLAUDE/css/style.css. Every class is pr- prefixed
   because the book's CSS already owns .card, .hero, .bar, .chip, .toast. Paper, ink, lines and the three
   type families are the book's tokens, so the Design lab's paper and fonts apply here too. Gold is the one
   colour that means "yours"; the canvas reads the --star-* tokens from .pr-sky. */
.pr {
  --pr-gold: #b97a00;
  --pr-gold-dim: rgba(185, 122, 0, 0.45);
  --pr-blue: var(--vel);
  --pr-rose: #d4405e;
  --pr-green: var(--good);
  --pr-cta-bg: #f3c54f;
  --pr-cta-ink: #2a1d00;
  --pr-maxw: 660px;
  font-family: var(--f-ui);
  color: var(--ink);
}
.pr .phys { font-family: var(--f-body); }

/* ---- the sky: full width under the top bar ------------------------------------ */
.pr-sky {
  --star-mastered: 214, 148, 10;
  --star-fading: 214, 148, 10;
  --star-practised: 37, 99, 235;
  --star-stuck: 212, 64, 94;
  --star-read: 110, 118, 136;
  --star-untouched: 120, 128, 146;
  --star-untouched-a: 0.32;
  --star-line: 214, 148, 10;
  --star-label: 78, 85, 102;
  --star-thread: 60, 70, 100;
  position: relative; width: 100vw; margin: 0 calc(50% - 50vw);
  height: min(74vh, 700px); min-height: 460px;
  background: radial-gradient(120% 90% at 50% 110%, var(--accent-soft-2) 0%, transparent 62%);
  touch-action: none; user-select: none;
}
.pr-sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.pr-sky.dragging canvas { cursor: grabbing; }
.pr-hero {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 70px var(--gutter) 26px;
  pointer-events: none;
  background: linear-gradient(to top, var(--paper) 38%, transparent 100%);
}
.pr-hero__in { max-width: var(--pr-maxw); margin: 0 auto; }
.pr-hero__hi { color: var(--ink-2); font-size: 15px; margin: 0 0 6px; }
.pr-hero__hi small { color: var(--ink-3); font-size: 13px; margin-left: 8px; }
.pr-hero h1 {
  font-family: var(--f-display); font-weight: 500; font-size: clamp(36px, 8vw, 62px);
  line-height: 1.02; margin: 0 0 12px; letter-spacing: -0.01em;
}
.pr-hero h1 b { color: var(--pr-gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.pr-hero__line { margin: 0; color: var(--ink-2); font-size: clamp(16px, 2.6vw, 19px); max-width: 34em; }
.pr-hero__hint { margin: 14px 0 0; font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.pr-tip {
  position: absolute; z-index: 6; pointer-events: none; display: none;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 8px 12px; font-size: 13px; max-width: 240px; line-height: 1.35;
  box-shadow: 0 8px 30px rgba(20, 24, 40, 0.18);
}
.pr-tip.on { display: block; }
.pr-tip__t { color: var(--ink); font-weight: 600; }
.pr-tip__c { color: var(--ink-3); font-size: 12px; }
.pr-tip__s { margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.pr-tip__s[data-s="mastered"] { color: var(--pr-gold); }
.pr-tip__s[data-s="fading"] { color: var(--pr-gold-dim); }
.pr-tip__s[data-s="practised"] { color: var(--pr-blue); }
.pr-tip__s[data-s="stuck"] { color: var(--pr-rose); }

/* ---- the cards ------------------------------------------------------------------ */
.pr-cards { max-width: var(--pr-maxw); margin: 0 auto; padding: 8px 0 36px; display: grid; gap: 14px; }
.pr-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1);
  padding: 22px 22px 18px; position: relative; animation: pr-rise 0.7s ease both;
}
.pr-card:nth-child(2) { animation-delay: 0.12s; }
.pr-card:nth-child(3) { animation-delay: 0.24s; }
.pr-card:nth-child(4) { animation-delay: 0.36s; }
@keyframes pr-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pr-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.pr-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--pr-gold); display: inline-block; }
.pr-card--today .pr-eyebrow i { background: var(--pr-blue); box-shadow: 0 0 0 4px var(--accent-soft-2); }
.pr-card--slip .pr-eyebrow i { background: var(--pr-gold-dim); }
.pr-card--insight .pr-eyebrow i { background: var(--pr-green); }
.pr-big { font-family: var(--f-display); font-weight: 500; font-size: clamp(23px, 4.6vw, 30px); line-height: 1.18; margin: 0 0 10px; letter-spacing: -0.005em; }
.pr-big.phys { font-family: var(--f-body); font-weight: 400; }
.pr-big b { color: var(--pr-gold); font-weight: 600; }
.pr-sub { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.pr-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }
.pr-meta b { color: var(--ink-2); font-weight: 500; }
.pr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.pr-chip { display: inline-flex; align-items: center; gap: 9px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px 7px 8px; font-size: 14px; }
.pr-chip svg { width: 22px; height: 22px; flex: none; }
.pr-chip small { color: var(--ink-3); font-size: 12px; margin-left: 2px; }
.pr-rows { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pr-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; font-size: 15px; }
.pr-row > :first-child { grid-column: 1; grid-row: 1; }
.pr-row__c { grid-column: 1; grid-row: 2; color: var(--ink-3); font-size: 12px; }
.pr-meter { grid-column: 2; grid-row: 1 / span 2; width: 74px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; align-self: center; }
.pr-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--pr-gold-dim), var(--pr-gold)); border-radius: 3px; }
.pr-cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  background: var(--pr-cta-bg); color: var(--pr-cta-ink); border: 0; border-radius: 999px;
  padding: 11px 20px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
  box-shadow: 0 6px 20px rgba(185, 122, 0, 0.22);
}
.pr-cta:hover { filter: brightness(1.05); }
.pr-cta svg { width: 16px; height: 16px; }
.pr-where { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }
.pr-go { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.pr-go:hover { color: var(--accent); border-bottom-color: currentColor; }
.pr-more-btn { margin-top: 14px; background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--ink-3); font: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.pr-more-btn:hover { color: var(--ink-2); }
.pr-more-btn svg { width: 12px; height: 12px; transition: transform 0.25s; }
.pr-card.open .pr-more-btn svg { transform: rotate(180deg); }
.pr-more { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: 14px; color: var(--ink-2); }
.pr-card.open .pr-more { display: block; }
.pr-more h4 { margin: 10px 0 6px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.pr-more h4:first-child { margin-top: 0; }
.pr-more ul { margin: 0; padding-left: 18px; }
.pr-more li { margin: 2px 0; }
.pr-more small { color: var(--ink-3); }
.pr-dots { display: grid; grid-template-columns: repeat(28, 1fr); gap: 3px; margin-top: 6px; max-width: 360px; }
.pr-dots i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--line); }
.pr-dots i.on { background: var(--pr-green); }
.pr-dots i.today { outline: 1px solid var(--ink-2); outline-offset: 1px; }

/* ---- foot ----------------------------------------------------------------------- */
.pr-foot { max-width: var(--pr-maxw); margin: 0 auto; padding: 0 0 40px; text-align: center; color: var(--ink-3); font-size: 13px; line-height: 1.6; }
.pr-map-btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 11px 20px; cursor: pointer; color: var(--ink-2); font: inherit; font-size: 15px; margin-bottom: 18px; box-shadow: var(--sh-1);
}
.pr-map-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.pr-foot a { color: var(--ink-2); }
.pr-samples { margin-top: 10px; }
.pr-samples a { color: var(--ink-3); text-decoration: none; margin: 0 6px; }
.pr-samples a.on { color: var(--pr-gold); }

/* ---- the whole map (a full-screen sheet) ------------------------------------------ */
.pr-map {
  position: fixed; inset: 0; z-index: 60; background: var(--paper);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); visibility: hidden;
}
.pr-map.on { transform: none; visibility: visible; }
.pr-map__head {
  position: sticky; top: 0; z-index: 2; background: var(--paper);
  display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.pr-map__head h2 { font-family: var(--f-display); font-weight: 500; font-size: 22px; margin: 0; }
.pr-map__head button { background: var(--card); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; cursor: pointer; font: inherit; font-size: 13px; color: var(--ink); }
.pr-map__body { max-width: var(--pr-maxw); margin: 0 auto; padding: 10px var(--gutter) 60px; }
.pr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-3); margin: 8px 0 18px; }
.pr-legend .pr-dot { margin-right: 5px; vertical-align: -1px; }
.pr-summary { font-size: 15px; color: var(--ink-2); margin: 0 0 6px; }
.pr-summary b { color: var(--pr-gold); }
.pr-map__body h3 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin: 26px 0 8px; }
/* ui.css styles every <details> as a boxed solution panel with a round +; the map's chapters undo that */
.pr-ch { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; margin: 0; overflow: visible; }
.pr-ch summary { list-style: none; cursor: pointer; padding: 12px 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-weight: 400; font-size: inherit; color: var(--ink); }
.pr-ch summary::before { content: none; display: none; }
.pr-ch summary::-webkit-details-marker { display: none; }
.pr-ch__t { font-size: 15px; }
.pr-ch__n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pr-ch__seg { grid-column: 1 / -1; display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--line); }
.pr-ch__seg i { display: block; height: 100%; }
.pr-ch.is-untouched summary { opacity: 0.5; }
.pr-ch ul { margin: 0 0 12px; padding: 0; list-style: none; }
.pr-ch li { display: flex; align-items: baseline; gap: 10px; padding: 5px 0 5px 4px; font-size: 14px; color: var(--ink-2); }
.pr-ch li small { margin-left: auto; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.pr-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; position: relative; top: -1px; background: var(--line-2); }
.pr-dot[data-s="mastered"] { background: var(--pr-gold); }
.pr-dot[data-s="fading"] { background: var(--pr-gold-dim); }
.pr-dot[data-s="practised"] { background: var(--pr-blue); }
.pr-dot[data-s="stuck"] { background: var(--pr-rose); }
.pr-dot[data-s="read"] { background: var(--ink-3); }
.pr-error { max-width: var(--pr-maxw); margin: 40px auto; color: var(--pr-rose); }

@media (max-width: 480px) {
  .pr-card { padding: 18px 16px 14px; }
  .pr-sky { height: min(70vh, 620px); }
}
@media (prefers-reduced-motion: reduce) {
  .pr-card { animation: none; }
  .pr-map { transition: none; }
}
