/* Integration layer: only Rhythm layout; shared chrome lives in platform-shell.css. */
.rhythm-page .mk-platform-fallback{display:flex;flex-wrap:wrap;gap:16px;padding:16px;background:#fff;border-bottom:1px solid #dce8e4}
.rhythm-dashboard .sidebar{top:var(--platform-shell-height,100px);height:calc(100dvh - var(--platform-shell-height,100px));overflow-y:auto}
.rhythm-dashboard .main{max-width:none;min-width:0}
.rhythm-dashboard .top-actions{flex-wrap:wrap;justify-content:flex-end}
.rhythm-dashboard .nav-btn[aria-label]{min-height:44px}
.rhythm-dashboard .nav-btn svg{flex-shrink:0}
.rhythm-dashboard #studySyncStatus{position:relative!important;top:auto!important;z-index:21!important;font-size:14px!important}
.rhythm-dashboard #studySyncStatus button{width:auto;min-height:44px;border:1px solid #b99d42;border-radius:8px;padding:6px 12px;background:#fff;color:#453b19;font:inherit;cursor:pointer}
.rhythm-dashboard .main>*{min-width:0}
@media(max-width:760px){
 .rhythm-dashboard .sidebar{position:relative;inset:auto;width:100%;height:auto;padding:10px 12px;overflow:visible;border-left:0;border-bottom:1px solid #dce8e4;z-index:3}
 .rhythm-dashboard .sidebar>.brand,.rhythm-dashboard .sidebar>.nav-label,.rhythm-dashboard .sidebar>.side-bottom{display:none}
 .rhythm-dashboard .sidebar>.nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .rhythm-dashboard .nav-btn{display:flex;flex-direction:column;gap:5px;padding:9px 4px;min-width:0;font-size:12px;line-height:1.5;text-align:center}
 .rhythm-dashboard .nav-btn>span:not(.nav-badge){display:block;white-space:normal}
 .rhythm-dashboard .nav-btn>.nav-badge{display:none}
 .rhythm-dashboard .main{margin-right:0;padding:16px 12px 110px;width:100%}
 .rhythm-dashboard .topbar{align-items:flex-start;gap:10px;flex-wrap:wrap}
 .rhythm-dashboard .top-actions{justify-content:flex-start;gap:8px;max-width:100%}
 .rhythm-dashboard .top-actions .btn{white-space:normal}
 .rhythm-dashboard .content-grid,.rhythm-dashboard .lower-grid{grid-template-columns:minmax(0,1fr)}
 .rhythm-dashboard .calendar-toolbar{flex-wrap:wrap}
 .rhythm-dashboard .panel,.rhythm-dashboard .stat{min-width:0}
 .rhythm-dashboard .calendar-event{max-width:100%}
 .rhythm-dashboard .bottom-bar{max-width:calc(100vw - 24px);left:12px;right:auto}
}

.rhythm-dashboard #studySyncStatus[data-state="saved"],.rhythm-dashboard #studySyncStatus[data-state="received"]{background:#edf8f2!important;color:#175b3d!important;border-color:#a9d6bc!important}
.rhythm-dashboard #studySyncStatus[data-state="error"],.rhythm-dashboard #studySyncStatus[data-state="conflict"]{background:#fff0ed!important;color:#7e2c21!important;border-color:#e4aaa0!important}

/* Rhythm's calm workspace: a clear next action, then supporting evidence. */
.rhythm-dashboard{--line:#e3ebe7;--bg:#f5f8f6;--muted:#66766f;--ink:#203b34;--shadow:0 5px 18px #173c3808;background:var(--bg)}
.rhythm-dashboard .main{padding:28px 32px 60px;max-width:1680px;margin-inline-start:245px;margin-inline-end:auto}
.rhythm-dashboard .sidebar{background:#fff;padding:24px 17px;border-color:#e3ebe7}
.rhythm-dashboard .sidebar>.brand{padding-bottom:24px}
.rhythm-dashboard .nav-label{color:#687c73;font-size:11px}
.rhythm-dashboard .nav-btn{border-radius:12px;color:#52685e;padding:12px;min-height:44px}
.rhythm-dashboard .nav-btn.active{background:#e9f5ef;color:#087963}
.rhythm-dashboard .topbar{margin-bottom:22px}
.rhythm-dashboard .crumb{font-size:12px}
.rhythm-dashboard .rhythm-welcome{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:27px 29px;border:1px solid #dbeae1;border-radius:20px;background:linear-gradient(115deg,#f0f8f3,#eaf5ee);margin-bottom:20px;position:relative;overflow:hidden}
.rhythm-dashboard .rhythm-welcome .page-title{font-size:27px;line-height:1.7;letter-spacing:0;color:#173f32}
.rhythm-dashboard .rhythm-welcome .eyebrow{font-size:12px;color:#167b5d}
.rhythm-dashboard .rhythm-welcome .welcome-sub{font-size:13px;line-height:1.9;color:#526b5e;margin-top:5px;max-width:560px}
.rhythm-dashboard .rhythm-welcome-meta{flex-shrink:0;border-inline-start:1px solid #cddfd2;padding-inline-start:24px;max-width:240px;line-height:1.9}
.rhythm-dashboard .rhythm-date-label{font-weight:700;font-size:13px;color:#285743}
.rhythm-dashboard .rhythm-exam-label{font-size:12px;color:#61756b;margin-top:5px}
.rhythm-dashboard .panel,.rhythm-dashboard .stat{border:1px solid #e3ebe7;border-radius:17px;box-shadow:0 3px 14px #173c3803;background:#fff}
.rhythm-dashboard .panel{padding:22px}
.rhythm-dashboard .panel-title{font-size:14px;font-weight:750;color:#254b3b}
.rhythm-dashboard .panel-head{gap:14px;margin-bottom:18px}
.rhythm-dashboard .rhythm-today{margin-bottom:20px;border-inline-start:3px solid #009c83}
.rhythm-dashboard #todaySummary{font-size:12px;color:#61756b;line-height:1.8}
.rhythm-dashboard .today-plan-list{display:grid;gap:9px;margin:14px 0}
.rhythm-dashboard .today-plan-row{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#f7faf8;border:1px solid #e7eeea;border-radius:11px;padding:12px 14px;line-height:1.8}
.rhythm-dashboard .today-plan-row strong{display:block;font-size:13px}
.rhythm-dashboard .today-plan-row small{color:#61756b;font-size:11px}
.rhythm-dashboard .today-plan-list:empty{display:none}
.rhythm-dashboard .rhythm-overview-grid{gap:16px;margin-bottom:22px}
.rhythm-dashboard .stat{padding:19px;min-height:132px}
.rhythm-dashboard .stat-head{color:#61756b;font-size:12px}
.rhythm-dashboard .stat-value{font-size:27px;line-height:1.65;margin-top:12px}
.rhythm-dashboard .stat-foot{font-size:11px;line-height:1.8;color:#61756b}
.rhythm-dashboard .stat-icon{width:33px;height:33px;border-radius:10px}
.rhythm-dashboard .btn{min-height:42px;border-radius:10px;font-size:12px;padding:10px 14px}
.rhythm-dashboard .btn-primary{box-shadow:none}
.rhythm-dashboard .content-grid,.rhythm-dashboard .lower-grid{gap:20px}
.rhythm-dashboard #rhythmReportPeriod{font-size:11px;color:#61756b;line-height:1.8}
@media(min-width:761px) and (max-width:1100px){.rhythm-dashboard .main{padding:24px 22px}.rhythm-dashboard .rhythm-welcome{padding:23px;gap:16px}.rhythm-dashboard .rhythm-welcome .page-title{font-size:23px}.rhythm-dashboard .rhythm-welcome-meta{padding-inline-start:16px;max-width:170px}.rhythm-dashboard .rhythm-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
 .rhythm-dashboard .main{margin:0;padding:20px 14px 110px;width:100%}
 .rhythm-dashboard .sidebar{padding:9px 12px}
 .rhythm-dashboard .nav-btn{padding:9px 4px;color:#52685e;min-height:58px}
 .rhythm-dashboard .topbar{margin-bottom:17px}
 .rhythm-dashboard .rhythm-welcome{padding:20px;gap:14px;align-items:flex-start;flex-direction:column;border-radius:16px;margin-bottom:16px}
 .rhythm-dashboard .rhythm-welcome .page-title{font-size:23px}
 .rhythm-dashboard .rhythm-welcome .welcome-sub{font-size:12px}
 .rhythm-dashboard .rhythm-welcome-meta{border-inline-start:0;border-top:1px solid #d5e5d9;padding:12px 0 0;width:100%;max-width:none;display:flex;flex-wrap:wrap;gap:6px 16px}
 .rhythm-dashboard .rhythm-exam-label{margin:0}
 .rhythm-dashboard .panel{padding:17px;border-radius:15px}
 .rhythm-dashboard .rhythm-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}
 .rhythm-dashboard .stat{padding:14px;min-height:125px;border-radius:14px}
 .rhythm-dashboard .stat-head{font-size:11px;gap:5px}
 .rhythm-dashboard .stat-value{font-size:24px}
 .rhythm-dashboard .stat-icon{width:27px;height:27px}
 .rhythm-dashboard .today-plan-row{align-items:flex-start;padding:11px;flex-wrap:wrap}
 .rhythm-dashboard .rhythm-today .panel-head{align-items:flex-start;flex-wrap:wrap}
 .rhythm-dashboard .rhythm-today .btn{white-space:normal}
}
@media(prefers-reduced-motion:reduce){.rhythm-dashboard .btn,.rhythm-dashboard .nav-btn{transition:none}.rhythm-dashboard .btn:hover{transform:none}}
/* Supporting labels stay readable and separate from the main welcome copy. */
.rhythm-dashboard .rhythm-welcome-meta{display:grid;gap:5px;width:220px}
.rhythm-dashboard .rhythm-welcome-meta>*{display:block;min-width:0;white-space:normal;line-height:1.9}
.rhythm-dashboard .rhythm-welcome-meta small{font-size:11px;color:#61756b}
.rhythm-dashboard .rhythm-section-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 18px;margin:22px 0 12px}
.rhythm-dashboard .rhythm-section-heading h2{font-size:15px;line-height:1.8;margin:0;color:#254b3b}
.rhythm-dashboard .rhythm-section-heading #rhythmReportPeriod{margin:0}
@media(min-width:761px) and (max-width:1100px){.rhythm-dashboard .rhythm-welcome-meta{width:175px}}
@media(max-width:760px){.rhythm-dashboard .rhythm-welcome-meta{width:100%;grid-template-columns:minmax(0,1fr);gap:3px}.rhythm-dashboard .rhythm-section-heading{margin-top:18px;gap:4px 12px}}

/* All study forms stay reachable when optional details expand. */
.rhythm-dashboard .modal-backdrop{padding:20px;overflow-y:auto;overscroll-behavior:contain}
.rhythm-dashboard .modal-backdrop>.modal{max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain;min-width:0}
.rhythm-dashboard .session-meta{display:block;color:#627970;margin-top:5px;font-size:11px}
@media(max-width:760px){.rhythm-dashboard .modal-backdrop{padding:12px}.rhythm-dashboard .modal-backdrop>.modal{max-height:calc(100dvh - 24px)}}

/* v13: the sidebar follows the visible header, rather than its original height. */
@media(min-width:761px){.rhythm-dashboard .sidebar{position:fixed;top:var(--platform-shell-height,0px);bottom:0;height:auto;max-height:calc(100dvh - var(--platform-shell-height,0px));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cadcd4 transparent;scrollbar-gutter:stable;padding:20px 14px}.rhythm-dashboard .sidebar>.brand{flex-shrink:0;padding-bottom:18px}.rhythm-dashboard .sidebar>.nav{flex-shrink:0;gap:4px}.rhythm-dashboard .sidebar>.side-bottom{flex-shrink:0;padding-top:20px}.rhythm-dashboard .sidebar .nav-btn{padding:10px 12px}.rhythm-dashboard .main{overflow:visible}}
.rhythm-dashboard #studySyncStatus[hidden]{display:none!important}
.rhythm-dashboard #studySyncStatus .sync-message{flex:1;min-width:180px}
.rhythm-dashboard #studySyncStatus.is-collapsed{position:fixed!important;top:auto!important;bottom:12px;right:12px;z-index:40!important;max-width:min(400px,calc(100vw - 24px));border:1px solid #dac887;border-radius:12px;box-shadow:0 4px 18px #173c3812}
.rhythm-dashboard #studySyncStatus button{min-height:34px;font-size:11px;flex-shrink:0}
.rhythm-dashboard .library-collection{border:1px solid #dce8e2;background:#fff;border-radius:14px;margin:12px 0;padding:10px}
.rhythm-dashboard .library-collection>summary{cursor:pointer;font-weight:700;padding:10px;color:#176653}
@media(max-width:760px){.rhythm-dashboard #studySyncStatus .sync-message{min-width:100%;font-size:11px}.rhythm-dashboard #studySyncStatus.is-collapsed{bottom:86px}.rhythm-dashboard .sidebar{scrollbar-gutter:auto}}

.rhythm-dashboard #studySyncStatus{font-size:12px!important}
