/* The work ledger shares the home palette, with filters and details kept quiet. */
.study-workspace { --work-gap: clamp(16px,2vw,24px); min-width: 0; }
.work-controls { padding: clamp(18px,2.5vw,26px); background: var(--surface); border: 1px solid var(--outline); border-radius: 28px; }
.work-controls .study-analysis-heading { margin: 0; flex-wrap: wrap; }
.work-controls h2 { font-size: 1rem; }
.study-workspace .study-segmented { padding: 4px; background: var(--paper); }
.study-workspace .study-segmented button { min-height: 44px; padding: 10px 15px; }
.work-controls .study-filter-details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.work-controls summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; }
.work-controls summary::-webkit-details-marker { display: none; }
.work-controls summary > span { display: flex; align-items: center; gap: 9px; min-width: 0; }
.work-controls summary svg { width: 18px; height: 18px; flex: 0 0 auto; }
.work-controls .work-filter-state { color: var(--muted); font-size: .75rem; }
.work-controls .study-filter-details[open] .work-filter-state > svg { transform: rotate(180deg); }
.work-controls .study-filter-actions { margin-bottom: 0; }
.study-workspace .study-totals { grid-template-columns: repeat(auto-fit,minmax(min(100%,170px),1fr)); gap: 14px; padding: 0; border: 0; margin: var(--work-gap) 0 0; }
.work-total { min-width: 0; border: 0; border-radius: 26px; padding: clamp(18px,2.5vw,26px); background: var(--mint); }
.work-total-minutes { background: var(--sky); }
.work-total-topics { background: var(--lilac); }
.work-total-label { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.work-total-label svg { width: 21px; height: 21px; flex: 0 0 auto; }
.study-workspace .work-total-label span { color: var(--ink); font-size: .875rem; font-weight: 600; }
.work-total-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.study-workspace .work-total-value strong { font-size: clamp(2rem,3.7vw,2.8rem); font-weight: 550; line-height: 1.1; letter-spacing: -.03em; }
.study-workspace .work-total-value span { color: var(--ink); font-size: .875rem; }
.study-workspace > .study-caption { margin-block: 12px 24px; }
.study-workspace .study-chart-grid { gap: var(--work-gap); margin: var(--work-gap) 0; align-items: stretch; }
.study-workspace .study-chart { border-color: var(--outline); border-radius: 28px; padding: clamp(20px,2.5vw,28px); }
.study-workspace .study-trend { display: flex; flex-direction: column; }
.study-workspace .study-chart-heading { flex-wrap: wrap; }
.study-workspace .study-chart-heading h2 { margin-bottom: 8px; }
.study-workspace .study-trend-total { margin-top: 28px; }
.study-workspace .study-trend-total strong { font-size: 2.5rem; font-weight: 550; }
.study-workspace .study-trend-plot { margin-block: auto 0; padding-top: 28px; }
.study-workspace .study-trend-column { grid-template-rows: 22px 148px 22px 17px; }
.study-workspace .study-trend-lane { height: 148px; width: min(100%,38px); border-radius: 12px; background: var(--paper); }
.study-workspace .study-trend-lane > span { background: #a6c99a; border-radius: 10px 10px 0 0; }
.study-workspace .study-trend-lane > .is-latest { background: var(--ink); }
.study-workspace .study-trend > .study-caption { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.study-workspace .study-distribution { background: var(--lilac); border-color: transparent; }
.study-workspace .study-distribution > .study-caption { color: #54445f; }
.study-workspace .study-distribution h3 { border-color: #cbb7d6; margin-top: 24px; }
.study-workspace .study-distribution .study-track { background: #ffffff80; height: 12px; }
.study-workspace .study-distribution .study-bar-fill { background: #735283; }
.study-workspace .study-distribution .tone-1 { background: var(--ink); }
.study-workspace .study-kind-list { display: flex; flex-wrap: wrap; gap: 8px; }
.study-workspace .study-kind-list > div { gap: 16px; padding: 10px 13px; border-radius: 16px; background: #ffffff80; color: #44364e; }
.study-workspace .study-kind-list dd { font-weight: 650; }
.study-workspace .study-section { border: 0; padding: 0; margin-top: 16px; }
.study-workspace .study-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; border: 1px solid var(--outline); background: white; border-radius: 24px; padding: 20px 24px; }
.study-workspace .study-section > summary::-webkit-details-marker { display: none; }
.study-workspace .study-section > summary > span { display: flex; align-items: center; gap: 10px; min-width: 0; }
.study-workspace .study-section > summary svg { width: 19px; height: 19px; flex: 0 0 auto; }
.study-workspace .study-section .work-detail-count { flex: 0 0 auto; margin: 0; font-size: .75rem; font-weight: 500; }
.study-workspace .study-section[open] > summary { background: var(--sky); }
.study-workspace .study-section[open] > summary > svg,.study-workspace .study-section[open] .work-detail-count svg { transform: rotate(180deg); }
.study-workspace .study-history { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); gap: 16px; margin-top: 16px; }
.study-workspace .study-history-row { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; min-width: 0; gap: 20px; border: 1px solid var(--line); border-radius: 24px; background: white; padding: 22px; }
.work-record-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: .75rem; color: var(--muted); }
.study-workspace .study-exam-tag { padding: 8px 12px; border-radius: 18px; font-size: .75rem; }
.work-kind-label { font-size: .75rem; color: var(--muted); }
.study-workspace .work-record-copy h3 { font-size: 1.05rem; margin: 6px 0 9px; }
.study-workspace .work-record-copy .study-record-note { color: var(--ink); margin-top: 12px; }
.work-record-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.work-record-amounts { display: flex; flex-wrap: wrap; gap: 7px; }
.work-record-amounts > span { background: var(--paper); color: var(--ink); border-radius: 14px; padding: 8px 11px; font-size: .75rem; font-variant-numeric: tabular-nums; }
.work-record-footer .text-button { gap: 8px; }
.work-plan-label { font-size: .75rem; color: var(--muted); }
.study-workspace .work-course-details > .study-bars { margin-top: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: white; }
.study-workspace .study-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-block: 24px; padding: clamp(24px,3vw,36px); border: 1px solid var(--outline); border-radius: 28px; background: white; }
.work-empty-symbol { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 18px; background: var(--mint); }
.work-empty-symbol svg { width: 24px; height: 24px; }
.study-workspace .study-empty h2,.study-workspace .study-empty p { margin: 0; }
.study-workspace .study-empty p { max-width: 60ch; font-size: .875rem; }
.study-workspace .work-unmapped { padding: 18px 22px; border-radius: 22px; background: var(--butter); color: #594b26; }
.study-workspace .work-unmapped .text-button { color: inherit; }
.study-workspace .study-resume { margin-top: 0; }
.study-workspace summary:focus-visible,.study-workspace button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
/* Three totals stay parallel on tablets; on small phones they become compact rows. */
@media(max-width:600px) {
 .work-controls .study-analysis-heading { flex-direction: row; align-items: center; }
 .work-controls .study-segmented { flex-wrap: wrap; max-width: 100%; }
 .work-controls .study-segmented button { padding-inline: 12px; }
 .work-controls .work-filter-state:not(.is-active) { font-size: 0; gap: 0; }
 .work-controls .work-filter-state.is-active { font-size: .6875rem; gap: 6px; }
 .study-workspace .study-totals { grid-template-columns: 1fr; gap: 10px; }
 .work-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-radius: 22px; }
 .work-total-label { flex-direction: row-reverse; justify-content: flex-end; gap: 12px; }
 .study-workspace .work-total-label span { font-size: .8125rem; }
 .work-total-value { margin: 0; flex-wrap: nowrap; gap: 7px; }
 .study-workspace .work-total-value strong { font-size: 1.8rem; }
 .study-workspace .work-total-value span { font-size: .75rem; }
 .study-workspace .study-section > summary { padding: 18px; font-size: .875rem; }
 .study-workspace .study-section .work-detail-count { font-size: .6875rem; gap: 6px; }
 .study-workspace .study-history-row { padding: 20px; }
}
@media(max-width:340px) {
 .work-total { padding: 16px; gap: 10px; }
 .work-total-label svg { display: none; }
 .study-workspace .work-total-label span { font-size: .75rem; }
 .study-workspace .study-section > summary > span:first-child > svg { display: none; }
}
