/* Canonical Tutor Home layout. Runtime owns content; this file owns geometry. */
.tutor-home-page{
  --home-surface:var(--dodeca-shell-surface,var(--panel));
  --home-raised:var(--dodeca-shell-surface-raised,var(--panel));
  --home-soft:var(--dodeca-shell-soft,var(--accent));
  --home-text:var(--dodeca-shell-text,var(--text));
  --home-muted:var(--dodeca-shell-muted,var(--muted));
  --home-line:var(--dodeca-shell-line,var(--line));
  --home-accent:#bd426c;
  --home-radius-lg:24px;
  --home-radius-md:18px;
  background:transparent!important;
}
.tutor-home-page .page-content{gap:18px;padding:24px clamp(16px,2.4vw,34px) 36px;max-width:1600px;margin-inline:auto}
/* The shell scrolls this flex column. Keep every workspace section at its
   intrinsic height or the browser can shrink the main grid down to 0px. */
.tutor-home-page .page-content>*{flex:0 0 auto}

/* Hero: identity and controls remain separate, so neither crushes the other. */
.home-hero{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:24px;overflow:hidden;padding:28px 30px;border:1px solid var(--home-line);border-radius:var(--home-radius-lg);background:linear-gradient(145deg,var(--home-surface),var(--home-raised));box-shadow:0 18px 50px rgba(43,27,56,.09)}
.home-hero::before{content:"";position:absolute;z-index:-1;right:-70px;top:-120px;width:340px;height:340px;border-radius:50%;background:radial-gradient(circle,rgba(255,143,171,.22),transparent 67%)}
.home-hero::after{content:"";position:absolute;z-index:-1;right:13%;bottom:-110px;width:260px;height:180px;background:radial-gradient(ellipse,rgba(123,108,246,.10),transparent 68%)}
.home-eyebrow{margin-bottom:9px;color:var(--home-accent);font-size:10px;font-weight:900;letter-spacing:.14em;text-transform:uppercase}
.home-hero .ops-title{margin:0;color:var(--home-text)!important;font-size:clamp(27px,3vw,40px)!important;line-height:1.08;letter-spacing:-.045em}
.home-hero .ops-date{margin:9px 0 0;color:var(--home-muted)!important;font-size:13px}
.home-hero .tutor-runtime-mode{margin-top:14px}.home-hero .tutor-runtime-mode[data-state="live"]::before{background:#36b89d}.home-hero .tutor-runtime-mode[data-state="partial"]::before{background:#f2b134}.home-hero .tutor-runtime-mode[data-state="error"]::before{background:#e05b6f}
.home-hero-controls{display:grid;justify-items:end;gap:14px}.home-hero-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.tutor-home-page .btn{display:inline-flex;align-items:center;justify-content:center;min-height:41px;padding:9px 15px;border:1px solid var(--home-line);border-radius:12px;background:var(--home-surface);color:var(--home-accent);text-decoration:none;font-size:12px;font-weight:850;box-shadow:0 7px 18px rgba(43,27,56,.06)}
.tutor-home-page .btn:hover{background:var(--home-soft);border-color:rgba(189,66,108,.40)}
.tutor-home-page .btn.primary{background:linear-gradient(135deg,#a43861,#d45f85)!important;border-color:transparent!important;color:#fff!important}
.tutor-theme-switch{display:inline-flex;gap:3px;padding:4px;border:1px solid var(--home-line);border-radius:12px;background:var(--home-soft)}
.tutor-theme-switch button{min-height:32px;padding:6px 11px;border:0;border-radius:9px;background:transparent;color:var(--home-muted);font:inherit;font-size:10px;font-weight:850;cursor:pointer}
.tutor-theme-switch button[aria-pressed="true"]{background:var(--home-surface);color:var(--home-text);box-shadow:0 5px 14px rgba(34,22,44,.10)}
.tutor-theme-switch button:disabled{opacity:.62;cursor:wait}

/* KPIs are independent cards, not a colored strip embedded in the hero. */
.home-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.home-kpi-grid .ops-kpi{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:13px;min-width:0;min-height:94px;padding:16px 18px!important;border:1px solid var(--home-line)!important;border-radius:var(--home-radius-md)!important;background:var(--home-surface)!important;text-align:left!important;box-shadow:0 9px 26px rgba(43,27,56,.055)}
.home-kpi-icon{display:grid;width:44px;height:44px;place-items:center;border-radius:14px;background:var(--home-soft);color:var(--home-accent);font-size:18px;font-weight:900}
.home-kpi-grid .ops-kpi.kpi-warn .home-kpi-icon{background:color-mix(in srgb,#f2b134 15%,var(--home-surface));color:#b17300}.home-kpi-grid .ops-kpi.kpi-alert .home-kpi-icon{background:color-mix(in srgb,#ff8d8d 15%,var(--home-surface));color:#c1465b}
.home-kpi-grid .ops-kv{color:var(--home-text)!important;font-size:27px!important;line-height:1}.home-kpi-grid .ops-kl{margin-top:7px;color:var(--home-muted)!important;font-size:9px!important}

/* Operations consume the governed clock + announcement callable. */
.home-operations{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr);gap:12px}
.home-operation-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:13px;min-width:0;padding:15px 16px;border:1px solid var(--home-line);border-radius:var(--home-radius-md);background:var(--home-surface);color:var(--home-text);text-decoration:none;box-shadow:0 8px 24px rgba(43,27,56,.05)}
.home-operation-icon{display:grid;width:42px;height:42px;place-items:center;border-radius:13px;background:var(--home-soft);color:var(--home-accent);font-size:17px;font-weight:900}.home-clock-card.is-active .home-operation-icon{background:rgba(79,209,197,.15);color:#248e7f;box-shadow:0 0 0 4px rgba(79,209,197,.07)}
.home-operation-copy{min-width:0}.home-operation-copy span,.home-operation-copy strong,.home-operation-copy small{display:block;overflow:hidden;text-overflow:ellipsis}.home-operation-copy span{color:var(--home-muted);font-size:9px;font-weight:900;letter-spacing:.09em;text-transform:uppercase}.home-operation-copy strong{margin-top:5px;color:var(--home-text);font-size:12px;white-space:nowrap}.home-operation-copy small{margin-top:4px;color:var(--home-muted);font-size:10px;white-space:nowrap}
.home-operation-action{min-height:35px;padding:7px 12px;border:1px solid var(--home-line);border-radius:10px;background:var(--home-soft);color:var(--home-accent);font:inherit;font-size:10px;font-weight:900;cursor:pointer}.home-operation-action:hover:not(:disabled){border-color:rgba(189,66,108,.42)}.home-operation-action:disabled{opacity:.58;cursor:wait}.home-clock-card.is-active .home-operation-action{background:rgba(255,141,141,.11);color:#d04d63}
.home-operation-arrow{color:var(--home-accent);font-size:18px}.home-announcement-card:hover{border-color:rgba(189,66,108,.38);background:var(--home-raised)}

/* Shortcuts have a label and a bounded horizontal rail. */
.home-quick-actions{padding:16px 17px;border:1px solid var(--home-line);border-radius:var(--home-radius-md);background:var(--home-surface);box-shadow:0 8px 24px rgba(43,27,56,.045)}
.home-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:12px}.home-section-heading span{display:block;color:var(--home-muted);font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.home-section-heading h2{margin:4px 0 0;color:var(--home-text);font-size:15px}.home-section-heading>a{color:var(--home-accent);font-size:11px;font-weight:800;text-decoration:none}
.tutor-home-page .action-bar{display:flex;gap:8px;overflow-x:auto;padding:1px 0 3px;scrollbar-width:none}.tutor-home-page .action-bar::-webkit-scrollbar{display:none}
.tutor-home-page .act-chip{display:inline-flex;align-items:center;min-height:36px;padding:8px 13px;border:1px solid var(--home-line);border-radius:999px;background:var(--home-raised)!important;color:var(--home-accent)!important;text-decoration:none;white-space:nowrap;font-size:11px;font-weight:850}
.tutor-home-page .act-chip:hover{background:var(--home-soft)!important;border-color:rgba(189,66,108,.38)!important}.tutor-home-page .act-chip.act-primary{background:linear-gradient(135deg,#a43861,#d45f85)!important;border-color:transparent!important;color:#fff!important}

/* Priority lane is intentionally quieter than KPIs. */
.home-focus{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.home-focus-card{display:grid;grid-template-columns:38px minmax(0,1fr);gap:11px;align-items:center;min-height:78px;padding:13px 15px;border:1px solid var(--home-line);border-radius:16px;background:var(--home-raised)}
.home-focus-icon{display:grid;width:38px;height:38px;place-items:center;border-radius:12px;background:var(--home-soft);color:var(--home-accent);font-size:16px}.home-focus-card strong,.home-focus-card span{display:block}.home-focus-card strong{color:var(--home-text);font-size:11px}.home-focus-card span{margin-top:4px;color:var(--home-muted);font-size:10px;line-height:1.4}

/* Work surface: stable two-column geometry and aligned panel rhythm. */
.tutor-home-page .tutor-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.72fr);align-items:start;gap:18px;min-height:auto}.tutor-home-page .tutor-main,.tutor-home-page .tutor-side{display:grid;gap:16px;min-width:0}.tutor-home-page .tutor-side{position:sticky;top:calc(var(--topbar-h,76px) + 18px)}
.tutor-home-page .t-panel{overflow:hidden;border:1px solid var(--home-line)!important;border-radius:var(--home-radius-md)!important;background:var(--home-surface)!important;box-shadow:0 10px 30px rgba(43,27,56,.055)}
.tutor-home-page .t-panel-head{display:flex;align-items:center;justify-content:space-between;min-height:55px;padding:14px 17px;border-bottom:1px solid var(--home-line)!important}.tutor-home-page .t-panel-head h2{margin:0;color:var(--home-text)!important;font-size:13px}.tutor-home-page .t-panel-head a{color:var(--home-accent);font-size:10px;font-weight:850;text-decoration:none}
.tutor-home-page :is(.session-card,.followup-row,.report-item,.qtool-row){border-bottom:1px solid var(--home-line)!important}.tutor-home-page :is(.session-card,.followup-row,.report-item,.qtool-row):last-child{border-bottom:0!important}.tutor-home-page :is(.session-card,.followup-row,.report-item,.qtool-row):hover{background:var(--home-soft)!important}
.tutor-home-page .session-card{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:start;gap:12px;padding:15px 16px}.tutor-home-page .sc-time{color:var(--home-accent)!important;font-size:11px;font-weight:900}.tutor-home-page .sc-body{min-width:0}.tutor-home-page .sc-title{color:var(--home-text)!important;font-size:13px}.tutor-home-page .sc-meta{margin-top:4px;color:var(--home-muted)!important;font-size:10px}.tutor-home-page .sc-actions{margin-top:9px}.tutor-home-page .sc-status{justify-self:end}
.tutor-home-page .followup-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:14px 16px}.tutor-home-page .report-item{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:start;gap:10px;padding:13px 15px}
.tutor-home-page .qtool-row{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:10px;padding:11px 14px;color:var(--home-text);text-decoration:none}.tutor-home-page .qtool-icon{display:grid;width:32px;height:32px;place-items:center;border-radius:10px;background:var(--home-soft)!important;font-size:14px}
.tutor-home-page :is(.fr-name,.ri-title,.qtool-label){color:var(--home-text)!important}.tutor-home-page :is(.fr-meta,.ri-meta,.tutor-live-empty){color:var(--home-muted)!important}.tutor-home-page .sc-btn{background:var(--home-soft)!important;border-color:var(--home-line)!important;color:var(--home-accent)!important}
.tutor-home-page .tutor-live-empty{min-height:116px;justify-content:center}.tutor-home-page .tutor-live-empty a{color:var(--home-accent)!important}

/* Runtime loading treatment. Content stays legible if a remote module stalls. */
.tutor-home-page[data-home-runtime="loading"] :is(.ops-kv,.home-operation-copy strong,.home-focus-card span){border-radius:6px;opacity:.7}
@keyframes home-runtime-shimmer{0%{background-position:140% 0}100%{background-position:-140% 0}}

:root[data-theme="light"] .tutor-home-page .tutor-ai-brief{box-shadow:0 18px 40px rgba(64,33,73,.17)!important}
:root[data-theme="dark"] :is(.home-hero,.home-kpi-grid .ops-kpi,.home-operation-card,.home-quick-actions,.tutor-home-page .t-panel){box-shadow:0 18px 46px rgba(2,1,9,.24)}

@media(max-width:1080px){.home-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tutor-home-page .tutor-layout{grid-template-columns:1fr}.tutor-home-page .tutor-side{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.tutor-home-page .tutor-ai-brief{grid-column:1/-1}}
@media(max-width:800px){.tutor-home-page .page-content{gap:14px}.home-hero{grid-template-columns:1fr;align-items:start;padding:22px}.home-hero-controls{justify-items:start}.home-hero-actions{justify-content:flex-start}.home-operations{grid-template-columns:1fr}.home-focus{grid-template-columns:1fr}.tutor-home-page .tutor-side{display:flex;flex-direction:column}.home-operation-copy strong,.home-operation-copy small{white-space:normal}}
@media(max-width:520px){.tutor-home-page .page-content{padding:14px 14px 28px}.home-hero{padding:20px 18px;border-radius:20px}.home-hero .ops-title{font-size:27px!important}.home-hero-controls,.home-hero-actions{width:100%}.home-hero-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.tutor-theme-switch{width:100%;justify-content:center}.home-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.home-kpi-grid .ops-kpi{grid-template-columns:1fr;align-content:start;gap:10px;min-height:126px;padding:14px!important}.home-kpi-icon{width:36px;height:36px;border-radius:11px}.home-operations{gap:8px}.home-operation-card{grid-template-columns:38px minmax(0,1fr) auto;padding:13px}.home-operation-icon{width:38px;height:38px}.home-announcement-card .home-operation-arrow{display:none}.home-quick-actions{padding:14px}.home-section-heading{margin-bottom:10px}.home-focus{gap:8px}.tutor-home-page .session-card{grid-template-columns:62px minmax(0,1fr)}.tutor-home-page .session-card .sc-status{grid-column:2}.tutor-home-page .followup-row{grid-template-columns:minmax(0,1fr) auto}.tutor-home-page .followup-row .fr-actions{grid-column:1/-1}.tutor-home-page .report-item{grid-template-columns:8px minmax(0,1fr)}.tutor-home-page .report-item .sc-btn{grid-column:2;justify-self:start}}
