.mobile-site-menu{display:none}
.workspace-menu-toggle,.workspace-drawer-head{display:none}
.workspace-menu-backdrop[hidden]{display:none}
.search-box input,.prompt-card,.prompt-card>div,.prompt-surface,.page-width>*,.tk,.tk-panel,.tk-detail,.tk-thread{min-width:0}
.prompt-surface,.prompt-card,.tk-message-body{overflow-wrap:anywhere}
.map-compact-list{display:none}
@media(max-width:1050px){
  .workspace-theme .report-nav.studio-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;overflow:visible;padding:8px;top:0;position:relative}
  .workspace-theme .report-nav.studio-tabs a{min-width:0;min-height:52px;justify-content:center;white-space:normal;text-align:center;line-height:1.5;padding:8px 6px;font-size:13px}
  .workspace-theme .report-nav.studio-tabs a .icon{flex:none}
  .workspace-theme .report-nav.studio-tabs[data-indicator="ready"]::before{display:none}
  .workspace-theme .report-nav.studio-tabs[data-indicator="ready"] a.active{background:#2563eb;color:#fff}
  .workspace-theme #features .map-viewport,.workspace-theme #features .map-inspector,.workspace-theme #features .map-toolbar button{display:none}
  .workspace-theme #features .map-compact-list{display:block;padding:14px;background:#f8faff}
  .map-compact-list>p{margin:0 0 12px;color:#5c7595;font-size:13px;line-height:1.8}
  .map-compact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .map-compact-card{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:14px;border:1px solid #dbe6f5;border-radius:12px;background:#fff;color:#2a476e;box-shadow:0 2px 8px #244f8f0a}
  .map-compact-card:hover,.map-compact-card:focus-visible{border-color:#75a4ec;background:#f5f9ff}
  .map-compact-card:focus-visible{outline:3px solid #9bc0ff;outline-offset:2px}
  .map-compact-icon{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:9px;background:#edf4ff;color:#3275d4}
  .map-compact-icon .icon{width:19px;height:19px}
  .map-compact-copy{display:block;min-width:0;flex:1}
  .map-compact-copy strong,.map-compact-copy small{display:block;overflow-wrap:anywhere}
  .map-compact-copy strong{font-size:14px;line-height:1.7}
  .map-compact-copy small{margin-top:5px;color:#6e86a4;font-size:12px;line-height:1.8}
  .map-compact-arrow{flex:none;color:#4e86da}
  .workspace-theme .project-chat-toggle{width:52px;height:52px;min-height:52px;padding:0;justify-content:center;border-radius:15px}
  .workspace-theme .project-chat-toggle>span:not(.chat-unread-badge),.workspace-theme .project-chat-toggle>i{display:none}
  .workspace-theme .project-chat-toggle>.icon{width:24px;height:24px}
}
@media(max-width:600px){
  .workspace-theme .report-nav.studio-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .map-compact-grid{grid-template-columns:minmax(0,1fr)}
  .workspace-theme .studio-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .workspace-theme .studio-metric:last-child{grid-column:1/-1}
}
@media(max-width:800px){
  html:has(>body.workspace-theme),body.workspace-theme{width:100%;max-width:100%;overflow-x:hidden}
  .workspace-theme .workspace-shell,.workspace-theme .workspace-main,.workspace-theme .workspace-content,.workspace-theme .project-studio{min-width:0;max-width:100%}
  .workspace-theme .workspace-header-label{display:none}
  .workspace-menu-toggle{display:flex;align-items:center;justify-content:center;gap:7px;flex:none;min-width:45px;min-height:44px;padding:7px 10px;border:1px solid #dce6f4;border-radius:11px;background:#f5f8fd;color:#245ca9;font-size:13px;font-weight:800;cursor:pointer}
  .workspace-menu-toggle:focus-visible,.workspace-drawer-head button:focus-visible{outline:3px solid #9ec1fb;outline-offset:2px}
  .workspace-menu-bars{display:grid;gap:4px;width:20px}
  .workspace-menu-bars i{display:block;width:20px;height:2px;border-radius:2px;background:currentColor}
  .workspace-menu-backdrop{position:fixed;inset:0;z-index:89;width:100%;height:100%;background:#10284687;cursor:pointer}
  .workspace-theme .workspace-sidebar{position:fixed;inset:0 auto 0 0;right:0;left:auto;z-index:90;display:none;flex-direction:column;width:min(320px,88vw);height:100dvh;max-height:100dvh;padding:0 15px 18px;overflow-y:auto;overscroll-behavior:contain;border:0;box-shadow:-18px 0 50px #0d2e6b30}
  .workspace-theme .workspace-sidebar.is-open{display:flex}
  .workspace-drawer-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:70px;padding:10px 3px;color:#fff;background:#2563eb;font-size:16px}
  .workspace-drawer-head button{display:grid;place-items:center;width:38px;height:38px;border:1px solid #ffffff50;border-radius:10px;color:#fff;background:#ffffff1c;font-size:27px;line-height:1;cursor:pointer}
  .workspace-theme .workspace-sidebar .sidebar-inner{display:flex;flex:1;flex-direction:column;min-height:max-content}
  .workspace-theme .workspace-sidebar .sidebar-label{display:none}
  .workspace-theme .workspace-sidebar .sidebar-nav{display:grid;gap:2px;overflow:visible}
  .workspace-theme .workspace-sidebar .sidebar-divider{display:block;margin:10px 8px}
  .workspace-theme .workspace-sidebar .nav-link{display:flex;width:100%;flex-shrink:1;justify-content:flex-start;white-space:normal;margin:3px 0;padding:9px 13px}
  .workspace-theme .workspace-sidebar .nav-link.sidebar-admin-link{margin-top:12px;padding:9px 13px}
  .workspace-theme .workspace-sidebar .sidebar-bottom{display:flex;margin-top:auto;padding:20px 3px 2px}
  .workspace-theme .workspace-sidebar .sidebar-logout{margin:0}
  .workspace-theme.workspace-menu-open{overflow:hidden}
  .site-header .header-inner{gap:10px}
  .mobile-site-menu{display:block;position:relative;flex:none;z-index:50}
  .mobile-site-menu summary{display:flex;align-items:center;justify-content:center;gap:5px;min-height:40px;padding:0 10px;border:1px solid #dce6f4;border-radius:10px;background:#f5f8fd;color:#245ca9;font-size:12px;font-weight:800;cursor:pointer;list-style:none}
  .mobile-site-menu summary::-webkit-details-marker{display:none}
  .mobile-site-menu summary:focus-visible{outline:3px solid #9ec1fb;outline-offset:2px}
  .mobile-site-menu nav{position:absolute;top:calc(100% + 11px);left:0;display:grid;width:min(270px,calc(100vw - 24px));padding:9px;background:#fff;border:1px solid #dce6f4;border-radius:15px;box-shadow:0 18px 45px #163d7526}
  .mobile-site-menu nav a{display:block;padding:12px 13px;border-radius:9px;color:#294869;font-size:14px;font-weight:700}
  .mobile-site-menu nav a:hover,.mobile-site-menu nav a:focus-visible{background:#edf4ff;color:#1769ed}
}
@media print{.workspace-menu-toggle,.workspace-menu-backdrop,.workspace-drawer-head{display:none!important}}
@media(max-width:620px){
  .site-header .header-inner{padding:10px 12px;gap:8px}
  .site-header .brand-word{font-size:22px}
  .site-header .brand-mark{width:28px}
  .site-header .brand-mark svg{width:27px;height:27px}
  .site-header .header-actions{gap:8px;flex:none}
  .site-header .header-actions .btn{min-height:37px;padding:7px 9px;font-size:10px;white-space:nowrap}
  .site-header .header-actions .btn .icon{display:none}
  .mobile-site-menu summary{min-width:40px;padding:0 8px}
  .mobile-site-menu summary span{display:none}
  .page-width{padding-inline:16px}
  .section-heading{gap:10px;flex-wrap:wrap}
  .library-hero{padding-top:12px}
  .library-hero h1{font-size:clamp(27px,8vw,34px);line-height:1.55}
  .library-hero>p{line-height:1.9}
  .library-hero .search-box{margin:22px auto 17px;gap:5px}
  .library-hero .search-box input{min-width:0;font-size:14px}
  .library-hero .search-box button{width:43px;min-width:43px;padding:0}
  .library-categories{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:thin;margin-inline:-16px;padding:3px 16px 10px}
  .library-categories a{flex:none;scroll-snap-align:start;font-size:13px;padding:9px 13px;min-height:39px;white-space:nowrap}
  .prompt-card{padding:20px}
  .prompt-card h2{font-size:17px}
  .prompt-card .mt-auto{gap:11px;flex-wrap:wrap}
  .prompt-card .mt-auto a{font-size:13px}
  .prompt-card .mt-auto span{font-size:12px}
  .prompt-surface{padding:15px}
  .max-w-4xl>.flex.items-center{align-items:flex-start;gap:12px}
  .max-w-4xl>.flex.items-center>div{min-width:0}
  .max-w-4xl>.flex.items-center h1{overflow-wrap:anywhere;line-height:1.65}
  .max-w-4xl .section-heading .btn{width:100%;justify-content:center}
  .max-w-4xl form.card>button{width:100%;justify-content:center}
  .cta-panel .btn{width:100%;justify-content:center}
  .workspace-theme .studio-tabs{scroll-snap-type:x proximity;scroll-padding-inline:8px}
  .workspace-theme .studio-tabs a{scroll-snap-align:center}
  .workspace-theme .studio-tabs[data-indicator="ready"]::before{display:none}
  .workspace-theme .studio-tabs[data-indicator="ready"] a.active{background:#2563eb;color:#fff}
  .tk-tools input,.tk-tools select,.tk-tools button{width:100%;max-width:none}
  .tk-stats{gap:9px}
  .tk-stat{padding:14px;gap:6px;flex-wrap:wrap}
  .tk-stat strong{font-size:22px}
  .tk-message{max-width:100%;padding:14px}
}
@media(max-width:480px){
  .workspace-header .header-inner{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:7px}
  .workspace-header .header-inner>a:first-child{grid-column:1;min-width:0;justify-self:start}
  .workspace-header .header-actions{grid-column:2;min-width:0}
  .workspace-header .header-account,.workspace-header .header-actions>form{display:none}
  .workspace-header .workspace-menu-toggle{grid-column:3;min-width:44px;width:44px;padding:6px}
  .workspace-header .workspace-menu-toggle>span:last-child{display:none}
  .workspace-theme .studio-breadcrumb{flex-wrap:wrap;min-width:0}
  .workspace-theme .studio-report-status{margin-inline-start:0}
  .workspace-theme .studio-hero-actions{flex-wrap:wrap;gap:10px}
  .workspace-theme .studio-project-title>p{overflow-wrap:anywhere}
}
@media(max-width:380px){
  .site-header .header-actions>a:not(.btn){display:none}
  .site-header .brand-word{font-size:20px}
  .site-header .header-actions .btn{padding-inline:7px}
  .workspace-theme .studio-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .workspace-theme .studio-metric:last-child{grid-column:1/-1}
  .workspace-theme .project-chat-toggle{width:48px;height:48px;min-height:48px;padding:0;justify-content:center;border-radius:14px}
  .workspace-theme .project-chat-toggle>span:not(.chat-unread-badge),.workspace-theme .project-chat-toggle>i{display:none}
  .workspace-theme .project-chat-toggle>.icon{width:22px;height:22px}
  .workspace-theme .product-glance-heading{display:block}
  .workspace-theme .product-glance-heading .btn{width:100%;justify-content:center;margin-top:16px}
}
@media(max-width:700px){
  .tk-table table.mobile-cards{display:block;min-width:0;width:100%}
  .tk-table table.mobile-cards thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
  .tk-table table.mobile-cards tbody{display:grid;gap:12px}
  .tk-table table.mobile-cards tr{display:block;padding:12px;border:1px solid #dfe7f3;border-radius:14px;background:#fff}
  .tk-table table.mobile-cards td{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:9px 3px;border-bottom:1px solid #edf1f7;white-space:normal;text-align:left;overflow-wrap:anywhere}
  .tk-table table.mobile-cards td:last-child{border-bottom:0}
  .tk-table table.mobile-cards td::before{content:attr(data-label);font-size:12px;color:#71819b;flex:0 0 76px;text-align:right}
  .tk-table table.mobile-cards td:first-child{font-weight:700}
  .tk-table table.mobile-cards td:first-child::before{content:'موضوع'}
}

/* Workspace pages: keep content flexible before the sidebar becomes a drawer. */
.workspace-theme .workspace-content > *,
.workspace-theme .page-heading > *,
.workspace-theme .dashboard-start-copy,
.workspace-theme .project-card,
.workspace-theme .project-card footer,
.workspace-theme .profile-content,
.workspace-theme .profile-overview,
.workspace-theme .profile-form,
.workspace-theme .profile-section-heading > div,
.workspace-theme .intake-form,
.workspace-theme .intake-preview{min-width:0}
.workspace-theme .page-heading h1,
.workspace-theme .project-card h3,
.workspace-theme .project-card p,
.workspace-theme .profile-identity h2,
.workspace-theme .username-value,
.workspace-theme .sub-plan,
.workspace-theme .sub-meter strong{overflow-wrap:anywhere}
.workspace-theme .dashboard-plan-link{margin:0 0 20px}

@media(max-width:1050px){
  .workspace-theme .dashboard-projects{grid-template-columns:repeat(2,minmax(0,1fr))}
  .workspace-theme .profile-layout{grid-template-columns:minmax(0,210px) minmax(0,1fr)}
}
@media(max-width:800px){
  .workspace-theme .workspace-main{width:100%;padding:24px clamp(16px,3.5vw,28px) 48px}
  .workspace-theme .profile-layout{grid-template-columns:minmax(0,210px) minmax(0,1fr)}
  .workspace-theme .workspace-sidebar .sidebar-inner{min-height:0}
}
@media(max-width:650px){
  .workspace-theme .workspace-main{padding:20px 16px 42px}
  .workspace-theme .page-heading{align-items:flex-start;gap:14px;margin-bottom:20px}
  .workspace-theme .page-heading > div{min-width:0;flex:1 1 100%}
  .workspace-theme .page-heading h1{font-size:clamp(22px,6vw,27px);line-height:1.5}
  .workspace-theme .page-heading > .btn{width:100%;justify-content:center;min-height:44px}
  .workspace-theme .dashboard-heading{margin-bottom:8px}
  .workspace-theme .dashboard-heading > .btn{display:none}
  .workspace-theme .dashboard-plan-link{margin:0 0 16px}
  .workspace-theme .dashboard-plan-link .btn{min-height:40px;padding:8px 12px;border-radius:11px;font-size:12px}
  .workspace-theme .dashboard-start{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:start;gap:10px;margin-bottom:18px;padding:16px}
  .workspace-theme .dashboard-start-icon{grid-row:1;width:38px;height:38px}
  .workspace-theme .dashboard-start-copy{grid-column:2;grid-row:1;flex-basis:auto}
  .workspace-theme .dashboard-start-copy h2{font-size:16px;line-height:1.5}
  .workspace-theme .dashboard-start-copy p{font-size:12px;line-height:1.8}
  .workspace-theme .dashboard-start .btn{grid-column:1/-1;width:100%;margin:0;justify-content:center;min-height:44px;background:#2563eb;border-color:#2563eb;color:#fff}
  .workspace-theme .dashboard-projects{grid-template-columns:minmax(0,1fr)}
  .workspace-theme .dashboard-section-title{align-items:flex-start;flex-wrap:wrap;gap:3px 12px}
  .workspace-theme .workspace-summary{gap:10px 16px}
  .workspace-theme .project-card{padding:18px}
  .workspace-theme .project-card footer{align-items:flex-start;flex-wrap:wrap;gap:12px}
  .workspace-theme .project-card-actions{width:100%;justify-content:space-between;gap:8px}
  .workspace-theme .project-card-actions a{min-height:38px;display:inline-flex;align-items:center}
  .workspace-theme .profile-layout{grid-template-columns:minmax(0,1fr)}
  .workspace-theme .profile-account-details{align-items:flex-start;flex-wrap:wrap;gap:12px;padding:18px}
  .workspace-theme .profile-next{align-items:stretch}
  .workspace-theme .profile-next .btn{width:100%;justify-content:center;min-height:44px}
  .workspace-theme .profile-form .form-actions{align-items:stretch;gap:14px}
  .workspace-theme .profile-form .form-actions .btn{width:100%;min-height:44px}
  .workspace-theme .sub-current{padding:22px 18px;margin:18px 0 26px;border-radius:18px}
  .workspace-theme .sub-usage{grid-template-columns:minmax(0,1fr);gap:12px}
  .workspace-theme .sub-meter{min-width:0;padding:16px}
  .workspace-theme .sub-meter strong{font-size:clamp(18px,5vw,25px);line-height:1.5}
  .workspace-theme .sub-grid{grid-template-columns:minmax(0,1fr);gap:14px}
  .workspace-theme .sub-plan{min-width:0;padding:20px}
  .workspace-theme .sub-benefits{flex-wrap:wrap;gap:8px}
  .workspace-theme .sub-benefits span{padding:10px 12px}
}
@media(max-width:400px){
  .workspace-theme .workspace-main{padding-inline:12px}
  .workspace-theme .profile-form{padding:18px}
  .workspace-theme .profile-identity{padding:18px}
  .workspace-theme .project-card-actions{flex-wrap:wrap}
  .workspace-theme .dashboard-start{padding:15px}
}
