/* ============================================================
   PryzmWorkspace V7.1 — Workspace OS polish pass
   Tighter rhythm, calmer hierarchy, richer native-app feel.
   ============================================================ */
:root{
  --p-rail:88px;
  --p-content:1360px;
}

/* Overall proportions */
.study-sidebar{width:var(--p-rail)!important}
.study-main{margin-left:var(--p-rail)!important}
.study-content{padding:24px clamp(22px,2.6vw,42px) 56px!important}
.study-container{max-width:var(--p-content)!important}
.study-topbar{height:70px!important;min-height:70px!important;padding:9px 20px!important}
.page-heading{min-width:132px!important}
.page-title{font-size:1.08rem!important;font-weight:750!important;letter-spacing:-.035em!important}
.command-search{height:44px!important;max-width:520px!important;border-radius:14px!important;box-shadow:none!important}
.command-search:focus-within{box-shadow:0 0 0 3px var(--n-accent-soft)!important}

/* Rail refinement */
.study-brand{height:58px!important;min-height:58px!important}
.brand-button{width:50px!important;height:50px!important;border-radius:16px!important}
.study-brand-mark{width:40px!important;height:40px!important;border-radius:13px!important;box-shadow:none!important}
.sidebar-nav{padding:12px 0 10px!important;gap:3px!important}
.nav-link{min-height:55px!important;border-radius:14px!important;gap:4px!important;font-size:.55rem!important;font-weight:680!important}
.nav-link .nav-icon{height:23px!important;font-size:.86rem!important}
.nav-link.active::before{left:-8px!important;top:16px!important;bottom:16px!important;width:2px!important}
.study-settings-link{min-height:49px!important;border-radius:13px!important}
.workspace-branding{padding:5px 2px 2px!important}
.workspace-branding strong{font-size:.46rem!important;opacity:.78}

/* Header control polish */
.topbar-right .icon-btn,.study-icon-button{width:40px;height:40px;border-radius:12px!important;box-shadow:none!important}
.connection-chip{height:36px!important;border-radius:12px!important;background:transparent!important}
.top-add-file{height:40px!important;border-radius:12px!important;padding-inline:15px!important}
.runtime-notice{max-width:var(--p-content);margin:10px auto 0!important;border-radius:14px!important;padding:10px 13px!important;font-size:.62rem!important;box-shadow:none!important}
.runtime-notice-copy small{line-height:1.45!important}

/* Home rhythm */
.v7-home{max-width:var(--p-content)!important;gap:20px!important}
.v7-home-head{align-items:center!important;padding:5px 2px 4px!important;min-height:104px!important}
.v7-home-head h2{margin:8px 0 5px!important;font-size:clamp(2rem,2.8vw,3.05rem)!important;line-height:.98!important;letter-spacing:-.058em!important;font-weight:745!important}
.v7-home-head p{font-size:.69rem!important;color:var(--n-muted)!important}
.v7-overline{font-size:.48rem!important;letter-spacing:.13em!important;opacity:.85}
.v7-head-actions{gap:7px!important}
.v7-head-actions .study-button,.v7-head-actions .study-button-primary{min-height:38px!important}
.v7-focus-row{grid-template-columns:minmax(0,1.62fr) minmax(295px,.72fr)!important;gap:14px!important}
.v7-resume-card{min-height:220px!important;padding:25px 28px!important;border-radius:22px!important;box-shadow:0 10px 32px rgba(0,0,0,.06)!important}
html[data-theme="dark"] .v7-resume-card{box-shadow:0 14px 34px rgba(0,0,0,.22)!important}
.v7-resume-copy{max-width:68%!important}
.v7-resume-copy h3{font-size:clamp(1.6rem,2.4vw,2.45rem)!important;line-height:1.02!important;letter-spacing:-.05em!important;margin:8px 0 8px!important}
.v7-resume-copy p{font-size:.66rem!important;line-height:1.55!important}
.v7-resume-actions{margin-top:18px!important;gap:7px!important}
.v7-resume-art{transform:scale(.9);transform-origin:center right;right:20px!important;top:28px!important}
.v7-today-card{min-height:220px!important;padding:19px 20px!important;border-radius:22px!important;box-shadow:none!important}
.v7-today-head{padding-bottom:12px!important}
.v7-today-grid button{min-height:52px!important;padding:11px 0!important}
.v7-today-grid b{font-size:1.18rem!important}
.v7-today-grid span{font-size:.54rem!important}

/* Section headings */
.v7-strip-section,.v7-study-panel{min-width:0}
.v7-section-head{margin-bottom:9px!important;align-items:flex-end!important}
.v7-section-head h3{font-size:.82rem!important;letter-spacing:-.025em!important;margin-top:4px!important}
.text-button{font-size:.56rem!important}
.v7-lower-grid{gap:16px!important}

/* Library empty state is a workspace placeholder, not a giant banner */
.v7-horizontal-shelf .empty-paper{min-height:205px!important;border-radius:18px!important;background:color-mix(in srgb,var(--n-surface) 86%,var(--n-bg))!important;border-style:solid!important}
.v7-horizontal-shelf .empty-paper .empty-sketch{width:48px!important;height:48px!important;font-size:1.25rem!important;background:var(--n-surface)!important}
.v7-horizontal-shelf .empty-paper h3{font-size:.82rem!important}
.v7-horizontal-shelf .empty-paper p{font-size:.64rem!important;margin:6px auto 12px!important}
.empty-paper{border-radius:16px!important}

/* Cards and shelves */
.file-tile,.note-book,.reviewer-pdf,.deck-card,.quiz-card{border-radius:16px!important;box-shadow:none!important;transition:transform .16s ease,border-color .16s ease,background .16s ease!important}
.file-tile:hover,.note-book:hover,.reviewer-pdf:hover,.deck-card:hover,.quiz-card:hover{transform:translateY(-2px)!important;border-color:var(--n-line-strong)!important}
.file-tile-preview{border-radius:12px!important}
.note-book-preview{border-radius:12px!important}
.v7-horizontal-shelf .recent-strip{gap:11px!important}

/* Study modes */
.v7-study-panel{border-radius:20px!important;padding:18px!important}
.v7-study-actions{gap:5px!important}
.v7-study-actions button{min-height:54px!important;border-radius:12px!important;padding:8px 9px!important}
.v7-study-actions button>span{width:32px!important;height:32px!important;border-radius:9px!important}
.v7-study-actions b{font-size:.65rem!important}
.v7-study-actions small{font-size:.54rem!important}
.v7-weak-note{border-radius:12px!important}

/* Library / settings polish */
.library-toolbar{margin-bottom:13px!important}
.toolbar-search{border-radius:13px!important}
.folder-card{border-radius:15px!important}
.settings-layout{gap:16px!important}
.settings-nav,.settings-panel{border-radius:18px!important}
.settings-panel{padding:22px!important}

/* Modals */
.study-modal{border-radius:20px!important;box-shadow:0 30px 90px rgba(0,0,0,.24)!important}
.modal-head{min-height:58px!important}
.modal-actions{padding:12px 16px!important}

/* Note canvas polish */
.note-modal-head{min-height:56px!important}
.note-stage{padding-top:20px!important}
.note-page{box-shadow:0 24px 78px rgba(0,0,0,.38)!important}
.compact-inkbar{border-radius:20px!important;padding:6px 7px!important;box-shadow:0 18px 48px rgba(0,0,0,.36)!important}
.compact-inkbar .inktool{min-width:38px!important;height:38px!important;border-radius:11px!important}
.note-pages-panel,.note-summary-panel{border-radius:15px!important}

/* Scrollbars: subtle on desktop */
@media (pointer:fine){
  *{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--n-muted) 28%,transparent) transparent}
  *::-webkit-scrollbar{width:8px;height:8px}
  *::-webkit-scrollbar-track{background:transparent}
  *::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--n-muted) 26%,transparent);border-radius:999px;border:2px solid transparent;background-clip:padding-box}
  *::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--n-muted) 42%,transparent);background-clip:padding-box}
}

@media(max-width:1050px){
  .v7-home-head h2{font-size:2.6rem!important}
  .v7-resume-copy{max-width:74%!important}
}
@media(max-width:820px){
  .study-sidebar{width:252px!important}
  .study-main{margin-left:0!important}
  .v7-home-head{min-height:0!important;align-items:flex-start!important}
  .v7-home-head h2{font-size:2.3rem!important}
  .v7-resume-copy{max-width:72%!important}
}
@media(max-width:600px){
  .study-content{padding-inline:14px!important}
  .v7-home-head h2{font-size:2.08rem!important}
  .v7-home-head{gap:14px!important}
  .v7-resume-card{min-height:205px!important;padding:22px 18px!important}
  .v7-resume-copy{max-width:84%!important}
  .v7-resume-art{opacity:.36!important;right:-16px!important}
  .v7-today-card{min-height:0!important}
  .v7-horizontal-shelf .empty-paper{min-height:178px!important}
}

/* V7.5.3 — centered Study AI generation states */
.ai-generation-host{
  min-height:132px!important;
  display:grid!important;
  place-items:center!important;
  padding:18px!important;
  border:1px solid color-mix(in srgb,var(--n-accent,#8f99ff) 18%,var(--n-line,rgba(255,255,255,.08)))!important;
  border-radius:16px!important;
  background:color-mix(in srgb,var(--n-accent,#8f99ff) 4%,var(--n-surface,#15191d))!important;
  overflow:hidden!important;
}
.ai-generation-status{
  width:min(100%,520px);
  min-height:96px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  text-align:center;
  color:var(--n-ink,var(--v6-text,#f3f4f4));
}
.ai-generation-status .ai-generation-spinner{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  margin-bottom:3px;
  border-radius:50%;
  background:color-mix(in srgb,var(--n-accent,#8f99ff) 12%,transparent);
  color:var(--n-accent,#9ca5ff);
  font-size:.82rem;
}
.ai-generation-status .ai-generation-spinner svg,
.ai-generation-status .ai-generation-spinner i{
  animation:aiStatusSpin .9s linear infinite;
}
.ai-generation-status strong{
  display:block;
  max-width:100%;
  font-size:.72rem;
  line-height:1.45;
  font-weight:760;
  overflow-wrap:anywhere;
}
.ai-generation-status small{
  display:block;
  max-width:430px;
  color:var(--n-muted,var(--v6-muted,#9299a1));
  font-size:.56rem;
  line-height:1.5;
}
#generatorProviderNotice.ai-generation-host,
#reviewProviderNotice.ai-generation-host{margin-top:3px}
.smart-note-output.ai-generation-host{white-space:normal;max-height:none;overflow:hidden}
.nursing-result-output.ai-generation-host{min-height:260px!important}
.nursing-result-output.ai-generation-host .ai-generation-status{min-height:220px}
@keyframes aiStatusSpin{to{transform:rotate(360deg)}}
@media (max-width:640px){
  .ai-generation-host{min-height:118px!important;padding:14px!important;border-radius:14px!important}
  .ai-generation-status{min-height:86px;gap:6px}
  .ai-generation-status .ai-generation-spinner{width:32px;height:32px}
  .ai-generation-status strong{font-size:.69rem}
  .ai-generation-status small{font-size:.54rem}
}
@media (prefers-reduced-motion:reduce){.ai-generation-status .ai-generation-spinner svg,.ai-generation-status .ai-generation-spinner i{animation-duration:1.8s}}


/* V7.5.4 topbar / search refinement */
.study-topbar{
  position:sticky;
  top:0;
  z-index:120;
  min-height:62px!important;
  height:62px!important;
  padding:10px 18px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:14px!important;
}
.topbar-left,.topbar-right{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
}
.topbar-left{
  gap:14px!important;
  flex:1 1 auto!important;
  overflow:hidden!important;
}
.topbar-right{
  gap:8px!important;
  justify-self:end!important;
  flex:0 0 auto!important;
}
.page-heading{
  min-width:max-content!important;
  flex:0 0 auto!important;
}
.command-search,
.study-search{
  display:flex!important;
  align-items:center!important;
  align-self:center!important;
  margin:0!important;
  flex:1 1 520px!important;
  min-width:320px!important;
  max-width:560px!important;
  height:44px!important;
  border-radius:14px!important;
}
.command-search input,
.study-search input{
  height:100%!important;
  min-height:0!important;
  line-height:1!important;
  padding:0!important;
}
.command-search .kbd-pill{
  margin-left:auto!important;
}
.runtime-notice{
  margin:10px 18px 0!important;
}
@media (max-width: 1100px){
  .study-topbar{padding:10px 14px!important;}
  .page-heading{display:none!important;}
  .command-search,.study-search{min-width:0!important;max-width:none!important;}
}
@media (max-width: 760px){
  .study-topbar{min-height:58px!important;height:58px!important;padding:9px 12px!important;}
  .topbar-left{gap:10px!important;}
  .command-search,.study-search{height:40px!important;border-radius:12px!important;}
  .runtime-notice{margin:8px 12px 0!important;}
}
