/* Progress menu ("Progres kamu"): the report at /account and the history tab
 * at /account/history. Surfaces follow the shared rules (white, borderless,
 * --radius-surface); path stages use their tone from learning-path.css. */
.report-page{--kind-lesson:oklch(58% .13 152);--kind-quiz:var(--color-accent);--kind-review:oklch(70% .15 62);--flame:oklch(66% .18 45);display:grid;gap:20px;min-width:0}
.report-page h2,.report-next h2,.report-kpi h2,.report-card h2{margin:0;font-size:16px;font-weight:500;line-height:1.3}
.report-page svg,.report-next svg,.report-kpi svg,.report-card svg{fill:none;stroke:currentColor}

/* Tabs and range: the segmented control used on the path views */
.report-head,.report-filters{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.report-seg{display:flex;gap:4px;padding:4px;border-radius:14px;background:var(--color-paper-2);max-width:100%;overflow-x:auto;scrollbar-width:none}
.report-seg::-webkit-scrollbar{display:none}
.report-seg a{display:inline-flex;align-items:center;gap:8px;flex-shrink:0;min-height:40px;padding:8px 14px;border-radius:10px;font-size:13px;color:var(--color-muted);text-decoration:none;white-space:nowrap}
.report-seg a:hover{color:var(--color-ink)}
.report-seg a[aria-current=page]{background:var(--color-surface);color:var(--color-ink);font-weight:500;box-shadow:0 1px 3px var(--color-shadow)}
.report-seg svg{width:17px;height:17px;stroke-width:1.8}

/* Shiba Kuro's progress scene beside the next step. */
.report-hero{display:grid;grid-template-columns:minmax(200px,264px) minmax(0,1fr);align-items:center;gap:20px;padding:14px;border-radius:var(--radius-surface);background:var(--color-surface)}
.report-kuro{width:100%;max-width:264px;justify-self:center}
.report-hero-body{display:grid;gap:14px;min-width:0;padding-right:6px}
.report-mood{margin:0;font-size:20px;font-weight:500;line-height:1.35;text-wrap:balance}

/* Next step */
.report-next{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;padding:18px 22px;border-radius:var(--radius-surface);background:var(--color-accent-soft)}
.report-next-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--tone,var(--color-accent-solid));color:#fff;font:500 18px var(--font-japanese);box-shadow:0 3px 0 var(--tone-edge,var(--color-accent-hover))}
.report-next-icon svg{width:22px;height:22px;stroke-width:1.8}
.report-next-copy{display:grid;gap:3px;min-width:0}
.report-next-copy small{font-size:12px;color:var(--color-muted)}
.report-next-copy h2{font-size:18px;overflow-wrap:anywhere}
.report-next .btn{display:inline-flex;align-items:center;gap:8px;margin:0;white-space:nowrap}
.report-next .btn svg,.report-action svg{width:16px;height:16px;stroke-width:2}

/* Headline numbers */
.report-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.report-kpis.is-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.report-sub .report-link{margin-left:0}
.report-kpi{display:flex;flex-direction:column;gap:10px;padding:20px 22px;border-radius:var(--radius-surface);background:var(--color-surface);min-width:0}
.report-kpi h2{font-size:13px;color:var(--color-muted);font-weight:500}
.report-kpi h2::first-letter{text-transform:uppercase}
.report-big{display:flex;align-items:baseline;gap:4px;margin:0;font-size:32px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums;color:var(--color-ink)}
.report-big.is-accent{color:var(--color-accent)}
.report-big small{font-size:14px;font-weight:400;color:var(--color-muted);margin-right:6px}
.report-sub{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:auto 0 0;font-size:12px;color:var(--color-muted)}
.report-flame{width:26px;height:26px;align-self:center;margin-right:2px;color:var(--color-paper-3);fill:currentColor;stroke:none}
.report-streak.is-lit .report-flame{color:var(--flame)}
.report-week{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin:0;padding:0;list-style:none}
.report-week li{display:grid;place-items:center;height:26px;border-radius:8px;background:var(--color-paper-2);font-size:10px;color:var(--color-muted)}
.report-week li.is-active{background:var(--flame);color:#fff;font-weight:600}
.report-week li.is-today{box-shadow:inset 0 0 0 2px var(--color-ink)}
.report-spark{width:100%;height:40px}
.report-spark rect{fill:var(--color-accent);opacity:.35;stroke:none}
.report-spark rect.is-today{opacity:1}
.report-spark rect.is-empty{fill:var(--color-paper-3);opacity:1}
.report-goal-body{display:flex;align-items:center;gap:14px}
.report-ring{width:56px;height:56px;flex-shrink:0}
.report-ring circle{fill:none;stroke-width:8;stroke-linecap:round}
.report-ring-track{stroke:var(--color-paper-2)}
.report-ring-value{stroke:var(--color-accent)}
.report-ring.is-done .report-ring-value{stroke:var(--kind-lesson)}
.report-edit{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:8px;color:var(--color-muted)}
.report-edit:hover{background:var(--color-paper-2);color:var(--color-ink)}
.report-edit svg{width:14px;height:14px;stroke-width:1.8}
.report-meter{width:100%;height:8px;accent-color:var(--color-accent)}
.report-meter::-webkit-progress-bar{background:var(--color-paper-2);border-radius:99px}
.report-meter::-webkit-progress-value{background:var(--color-accent);border-radius:99px}
.report-meter::-moz-progress-bar{background:var(--color-accent);border-radius:99px}
.report-delta{padding:2px 8px;border-radius:99px;background:var(--color-success-soft);color:var(--color-success);font-weight:600}
.report-delta.is-down{background:color-mix(in oklch,var(--color-error) 10%,var(--color-surface));color:var(--color-error)}

/* Cards */
.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.report-grid-wide{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
.report-card{display:flex;flex-direction:column;gap:16px;margin:0;padding:22px;border-radius:var(--radius-surface);background:var(--color-surface);min-width:0}
.report-card-head{display:flex;align-items:baseline;gap:6px 12px;flex-wrap:wrap}
.report-card-head small{font-size:12px;color:var(--color-muted)}
.report-link{display:inline-flex;align-items:center;gap:4px;margin-left:auto;font-size:13px;white-space:nowrap}
.report-link svg{width:14px;height:14px;stroke-width:2}
.report-empty{margin:0;padding:18px;border-radius:var(--radius-control);background:var(--color-paper-2);font-size:13px;color:var(--color-muted)}

/* Activity calendar */
.report-calendar{width:100%;height:auto;max-height:220px}
.report-cal-month,.report-cal-day{font:500 9px var(--font-body);fill:var(--color-muted);stroke:none}
.report-cal-cell{stroke:none}
.level-0{fill:var(--color-paper-2);background:var(--color-paper-2)}
.level-1{fill:color-mix(in oklch,oklch(89% .055 274),oklch(36% .08 274) var(--dark-mix));background:color-mix(in oklch,oklch(89% .055 274),oklch(36% .08 274) var(--dark-mix))}
.level-2{fill:color-mix(in oklch,oklch(77% .11 274),oklch(48% .13 274) var(--dark-mix));background:color-mix(in oklch,oklch(77% .11 274),oklch(48% .13 274) var(--dark-mix))}
.level-3{fill:color-mix(in oklch,oklch(63% .17 274),oklch(60% .16 274) var(--dark-mix));background:color-mix(in oklch,oklch(63% .17 274),oklch(60% .16 274) var(--dark-mix))}
.level-4{fill:var(--color-accent-hover);background:var(--color-accent-hover)}
.report-cal-legend{display:flex;align-items:center;justify-content:flex-end;gap:4px;font-size:11px;color:var(--color-muted)}
.report-cal-legend i{width:12px;height:12px;border-radius:3px}
.report-cal-legend span:first-child{margin-right:2px}
.report-cal-legend span:last-child{margin-left:2px}

/* Period summary */
.report-period{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0}
.report-period div,.report-stats div{display:grid;gap:3px;min-width:0}
.report-period dt,.report-stats dt{font-size:12px;color:var(--color-muted)}
.report-period dt::first-letter,.report-sub::first-letter{text-transform:uppercase}
.report-period dd,.report-stats dd{margin:0;font-size:20px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.15}
.report-period dd small,.report-stats dd small{font-size:13px;font-weight:400;color:var(--color-muted);margin-left:3px}
.report-mix{width:100%;height:10px;border-radius:99px;overflow:hidden}
.report-mix rect{stroke:none}
.is-lesson{--kind:var(--kind-lesson)}.is-quiz{--kind:var(--kind-quiz)}.is-review{--kind:var(--kind-review)}
.report-mix .is-lesson,.report-stack .is-lesson{fill:var(--kind-lesson)}
.report-mix .is-quiz,.report-stack .is-quiz{fill:var(--kind-quiz)}
.report-mix .is-review,.report-stack .is-review{fill:var(--kind-review)}
.report-mix .is-empty{fill:var(--color-paper-2)}
.report-legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin:0;padding:0;list-style:none;font-size:12px;color:var(--color-muted)}
.report-legend li{display:inline-flex;align-items:center;gap:6px}
.report-legend li::before{content:"";width:10px;height:10px;border-radius:3px;background:var(--kind)}
.report-legend b{color:var(--color-ink);font-weight:600}

/* Daily charts */
.report-bars{width:100%;height:150px}
.report-bars rect{fill:var(--color-accent);stroke:none}
.report-bars rect.is-empty{fill:var(--color-paper-3)}
.report-bars g:hover rect:not(.is-empty),.report-bars rect:not(.is-empty):hover{opacity:.8}
.report-axis{display:flex;justify-content:space-between;margin-top:-8px;font-size:11px;color:var(--color-muted)}

/* Learning path stages */
.report-stages{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;margin:0;padding:0;list-style:none}
.report-stage{display:grid;gap:10px;padding:14px;border-radius:var(--radius-control);background:var(--color-paper-2)}
.report-stage.is-current{background:var(--tone-soft);box-shadow:inset 0 0 0 2px var(--tone)}
.report-stage a{display:flex;align-items:center;gap:10px;color:var(--color-ink);text-decoration:none;min-width:0}
.report-stage a:hover strong{text-decoration:underline}
.report-glyph{display:grid;place-items:center;flex-shrink:0;width:40px;height:40px;border-radius:12px;background:var(--tone,var(--color-accent-solid));color:#fff;font:600 15px var(--font-japanese);box-shadow:0 3px 0 var(--tone-edge,var(--color-accent-hover))}
.report-glyph.small{width:30px;height:30px;border-radius:9px;font-size:12px;box-shadow:0 2px 0 var(--tone-edge)}
.report-glyph.plain{background:var(--color-paper-2);color:var(--color-ink);box-shadow:none}
.report-glyph svg{width:18px;height:18px;stroke-width:1.8}
.report-stage-name{display:grid;gap:1px;min-width:0;flex:1}
.report-stage-name strong{font-size:14px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.report-stage-name small{font-size:12px;color:var(--color-muted);font-variant-numeric:tabular-nums}
.report-stage progress{width:100%;height:6px;accent-color:var(--tone)}
.report-stage progress::-webkit-progress-bar{background:var(--color-surface);border-radius:99px}
.report-stage progress::-webkit-progress-value{background:var(--tone);border-radius:99px}
.report-stage progress::-moz-progress-bar{background:var(--tone);border-radius:99px}
.report-lock{width:16px;height:16px;flex-shrink:0;color:var(--color-muted);stroke-width:1.8}

/* Flashcards and tests */
.report-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}
.report-stats .is-due dd{color:var(--color-accent)}
.report-decks{display:grid;gap:4px;margin:0;padding:0;list-style:none}
.report-decks a{display:flex;align-items:center;gap:10px;min-height:44px;padding:6px 8px;border-radius:10px;color:var(--color-ink);font-size:13px;text-decoration:none}
.report-decks a:hover{background:var(--color-paper-2)}
.report-decks a>span:not(.report-glyph){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.report-decks em{font-style:normal;padding:2px 8px;border-radius:99px;background:var(--tone-soft);color:var(--tone-text,var(--tone-edge));font-size:11px;font-weight:600;white-space:nowrap}
.report-decks b{min-width:38px;text-align:right;font-weight:600;font-variant-numeric:tabular-nums;color:var(--color-muted)}
.report-action{display:flex;align-items:center;justify-content:center;gap:8px;margin:0}
.report-trend{margin:0;display:grid;gap:6px}
.report-trend figcaption{font-size:12px;color:var(--color-muted)}
.report-trend svg{width:100%;height:110px;overflow:visible}
.report-trend-rules{stroke:var(--color-rule);stroke-width:1;stroke-dasharray:4 6;vector-effect:non-scaling-stroke}
.report-trend polyline{stroke:var(--color-accent);stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.report-trend circle{fill:var(--color-surface);stroke:var(--color-accent);stroke-width:2.5;vector-effect:non-scaling-stroke}
.report-results{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.report-results li{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:var(--radius-control);background:var(--color-paper-2)}
.report-result-copy{display:grid;gap:2px;flex:1;min-width:0}
.report-result-copy strong{font-size:14px;font-weight:500;overflow-wrap:anywhere}
.report-result-copy small{font-size:12px;color:var(--color-muted)}
.report-results form{margin:0}
.report-results .btn{margin:0}
.report-score{flex-shrink:0;min-width:48px;padding:4px 8px;border-radius:10px;background:var(--color-accent-soft);color:var(--color-accent);font-size:13px;font-weight:600;text-align:center;font-variant-numeric:tabular-nums}
.report-score.is-good{background:var(--color-success-soft);color:var(--color-success)}
.report-score.is-low{background:color-mix(in oklch,var(--color-error) 10%,var(--color-surface));color:var(--color-error)}

/* Studied packages */
.report-packages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;list-style:none}
.report-packages a,.report-packages li>div{display:flex;align-items:center;gap:12px;min-height:60px;padding:10px 12px;border-radius:var(--radius-control);background:var(--color-paper-2);color:var(--color-ink);text-decoration:none}
.report-packages a:hover{background:var(--color-paper-3)}
.report-packages .report-glyph.plain{background:var(--color-surface)}
.report-package-copy{display:grid;gap:3px;flex:1;min-width:0}
.report-package-copy strong{font-size:14px;font-weight:500;overflow-wrap:anywhere}
.report-package-copy small{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:12px;color:var(--color-muted)}
.report-arrow{width:16px;height:16px;flex-shrink:0;color:var(--color-muted);stroke-width:2}

/* Activity rows (recent activity and the history tab) */
.report-events{display:grid;gap:2px;margin:0;padding:0;list-style:none}
.report-event>a,.report-event>div{display:flex;align-items:center;gap:12px;min-height:56px;padding:8px 10px;border-radius:var(--radius-control);color:var(--color-ink);text-decoration:none}
.report-event>a:hover{background:var(--color-paper-2)}
.report-event-icon{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border-radius:10px;background:color-mix(in oklch,var(--kind) 14%,var(--color-surface));color:var(--kind)}
.report-event-icon svg{width:18px;height:18px;stroke-width:1.8}
.report-event-copy{display:grid;gap:2px;flex:1;min-width:0}
.report-event-copy strong{font-size:14px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.report-event-copy small{font-size:12px;color:var(--color-muted)}
.report-history{gap:6px}
.report-day{padding:14px 10px 6px;font-size:13px!important;color:var(--color-muted);font-variant-numeric:tabular-nums}
.report-day:first-child{padding-top:0}
.report-count{margin:0;font-size:13px;color:var(--color-muted);width:100%}
.report-pager{display:flex;align-items:center;justify-content:center;gap:12px;font-size:13px;color:var(--color-muted)}
.report-pager .btn{margin:0}
.report-blank{align-items:center;text-align:center;padding:40px 22px}
.report-blank>svg{width:32px;height:32px;color:var(--color-muted);stroke-width:1.6}
.report-blank .btn{display:inline-flex;align-items:center;gap:8px;margin:0}
.report-blank .btn svg{width:16px;height:16px;stroke-width:2}

@media(max-width:1100px){
  .report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .report-grid-wide{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:767px){
  .report-page{gap:12px}
  .report-head{gap:8px}
  .report-head .report-seg{flex:1 1 100%}
  .report-head .report-seg a{flex:1;justify-content:center}
  .report-hero{grid-template-columns:minmax(0,1fr);gap:14px;padding:10px 10px 12px}
  .report-kuro{max-width:min(68vw,252px)}
  .report-hero-body{gap:12px;padding:0}
  .report-mood{padding:0 6px;font-size:17px}
  .report-next{grid-template-columns:auto minmax(0,1fr);padding:16px}
  .report-next .btn{grid-column:1/-1;justify-content:center}
  .report-kpis{gap:12px}
  .report-page .report-kpi:nth-child(-n+2){grid-column:1/-1}
  .report-page .report-kpi:nth-child(2){display:grid;grid-template-columns:auto minmax(0,1fr);align-items:end;column-gap:20px}
  .report-page .report-kpi:nth-child(2) h2,.report-page .report-kpi:nth-child(2) .report-sub{grid-column:1/-1}
  .report-kpis.is-three{grid-template-columns:repeat(2,minmax(0,1fr))}
  .report-kpis.is-three .report-kpi:last-child{grid-column:1/-1}
  .report-kpi{padding:16px}
  .report-big{font-size:26px}
  .report-grid{grid-template-columns:minmax(0,1fr);gap:12px}
  .report-card{padding:16px;gap:14px}
  .report-packages{grid-template-columns:minmax(0,1fr)}
  .report-stages{grid-template-columns:repeat(2,minmax(0,1fr))}
  .report-stats dd,.report-period dd{font-size:18px}
  .report-bars{height:120px}
}
@media(max-width:380px){.report-kpis{grid-template-columns:minmax(0,1fr)}}
