/* Phone and tablet layouts share the same controls and permissions as desktop. */
.mobile-menu-button,.mobile-menu-close,.mobile-back,.mobile-admin-badge{display:none}
.prodigy-badge .brand-symbol{background:var(--accent);color:var(--accent-ink,#000)}
.sidebar nav button.active{color:var(--accent-ink,#000)}
.prodigy-badge{border-radius:9px}
.prodigy-badge:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.workspace-menu{padding:0;border:1px solid #496052;border-radius:0 20px 20px 0;background:var(--dark);color:#e8f1ee;max-height:none}
.workspace-menu::backdrop{background:#06140db3}
#page-title:focus{outline:none}
.mobile-records td{overflow-wrap:anywhere}
@media(max-width:900px){
 html{scroll-padding-top:150px}
 body{padding-bottom:env(safe-area-inset-bottom)}
 #shell{min-width:0}
 .sidebar{display:none}
 #shell main{margin-left:0;min-width:0}
 .workspace-menu{position:fixed;inset:0 auto 0 0;margin:0;width:min(340px,calc(100% - 32px));max-width:none;height:100dvh;overflow-y:auto;overscroll-behavior:contain}
 .workspace-menu .sidebar{display:flex;position:static;width:100%;min-height:100%;padding:22px 18px max(22px,env(safe-area-inset-bottom));overflow:visible}
 .workspace-menu .sidebar .brand{font-size:21px;padding-right:38px}
 .mobile-menu-close{display:block;position:absolute;right:12px;top:14px;min-width:44px;min-height:44px;border:1px solid #496052;border-radius:8px;background:#243e33;color:#e8f1ee;font-size:22px}
 .workspace-menu .site-badge{display:flex;margin:28px 0 22px}
 .workspace-menu .site-badge small{max-width:none;font-size:12px}
 .workspace-menu .site-badge strong{font-size:14px}
 .workspace-menu .nav-label{display:block}
 .workspace-menu nav,.workspace-menu .custom-menu nav{display:grid;overflow:visible;margin:0;gap:5px}
 .workspace-menu nav button,.workspace-menu nav .tool-menu-link{white-space:normal;font-size:14px;min-height:48px;padding:12px;line-height:1.5}
 .workspace-menu nav button span,.workspace-menu nav .tool-menu-link span{display:inline-block;flex-shrink:0}
 .workspace-menu #inbox-nav-label{width:auto;font-size:14px}
 .workspace-menu .custom-menu{margin-top:20px;padding-top:14px}
 .workspace-menu .custom-menu summary{font-size:14px;min-height:44px;align-content:center}
 .workspace-menu .custom-note{display:block;font-size:12px;color:#b9cac3}
 .workspace-menu .sidebar-bottom{display:block;padding-top:24px}
 .workspace-menu .privacy-note{display:none}
 .workspace-menu .user-row{font-size:14px}
 .workspace-menu .user-row strong{font-size:13px;overflow-wrap:anywhere}
 .workspace-menu .user-row small{font-size:12px}
 .workspace-menu .user-row button{min-width:44px;min-height:44px}
 .topbar{position:sticky;top:0;z-index:25;display:grid;grid-template-columns:minmax(0,1fr);height:auto;gap:10px;padding:max(10px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left));background:var(--surface);box-shadow:0 2px 10px #0000000a}
 .topbar-leading{display:flex;align-items:center;gap:12px;min-width:0}
 .mobile-menu-button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;flex-shrink:0;padding:10px 13px;font-size:14px}
 .mobile-admin-badge{display:flex;align-items:center;gap:8px;margin-left:auto;font-size:15px;font-weight:600;color:var(--text-primary)}
 .mobile-admin-badge .brand-symbol{width:30px;height:32px;font-size:25px;margin-right:0}
 .mobile-admin-badge b{font-weight:400}
 #breadcrumb{display:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
 .topbar-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(85px,1fr));gap:8px;min-width:0}
 .topbar-actions .tag,#logout-top,#portal-switcher:empty{display:none}
 .topbar-actions .secondary{display:flex;align-items:center;justify-content:center;gap:4px;width:100%;min-height:44px;font-size:12px;white-space:normal;line-height:1.4;padding:9px 6px;text-align:center}
 .content{padding:24px max(16px,env(safe-area-inset-right)) 20px max(16px,env(safe-area-inset-left));max-width:100%}
 .page-heading{align-items:flex-start;flex-direction:column;gap:20px}
 .page-heading h1{font-size:28px;letter-spacing:-.8px;overflow-wrap:anywhere}
 .page-heading p{font-size:14px;line-height:1.65}
 .period{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;width:100%}
 .period label{font-size:11px;margin:0}
 .period select{width:100%;min-height:44px;font-size:16px;padding:10px}
 #shell main button,#shell main a.primary,#shell main a.secondary,#shell main summary{min-height:44px}
 #shell main .mini-link{white-space:normal}
 #shell main input:not([type=checkbox]):not([type=radio]),#shell main select,#shell main textarea,.portal-dialog input,.login-panel input{font-size:16px;min-height:44px;max-width:100%}
 #shell main input[type=checkbox]{width:22px;height:22px;flex-shrink:0}
 #shell main label{font-size:13px;line-height:1.6}
 .panel,.stack-card,.connection-card{padding:20px;min-width:0}
 .panel-head{flex-wrap:wrap;gap:12px}
 .panel-head h2{font-size:17px}
 .panel-head p,.panel-sub,.wide-note,.toolbar p,.stack-card p,.connection-card p,.insight p{font-size:13px;line-height:1.75}
 .metric-label{font-size:12px;gap:8px}
 .metric-foot{font-size:12px}
 .metric-value{font-size:clamp(22px,5.8vw,30px);overflow-wrap:anywhere}
 .metric{padding:18px 14px}
 .metrics{gap:12px}
 .two-col{grid-template-columns:minmax(0,1fr)}
 .bar-top,.legend,.chart-legend{font-size:12px;flex-wrap:wrap}
 .bar-top{gap:12px}
 .connection-line{font-size:13px;flex-wrap:wrap}
 .toolbar{flex-wrap:wrap;gap:14px}
 .toolbar button{white-space:normal}
 .status,.forms-badge,.ci-badge,.pill{font-size:11px;white-space:normal;line-height:1.5}
 .forms-tabs{flex-wrap:wrap;gap:8px}
 .forms-tabs button{font-size:13px;flex:1;white-space:normal}
 .forms-tabs #forms-refresh{flex:0 0 auto;margin-left:0}
 .forms-connection p,.forms-help,.forms-edit label small,.forms-history p,.forms-history small{font-size:12px}
 .forms-counts{grid-template-columns:repeat(3,minmax(0,1fr))}
 .forms-counts span{font-size:12px}
 .forms-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .forms-filters label,.forms-filters label:first-child{min-width:0}
 .forms-filters label:first-child,.forms-filters button{grid-column:1/-1}
 .forms-split{grid-template-columns:minmax(0,1fr)}
 .forms-list,.forms-builder,.forms-detail{min-width:0;scroll-margin-top:150px}
 .forms-request strong,.forms-request p{font-size:14px}
 .forms-request small{font-size:12px}
 .forms-request>div:first-child{align-items:flex-start}
 .forms-field{grid-template-columns:minmax(0,1fr)}
 .forms-field label{min-width:0}
 .forms-save{display:grid;grid-template-columns:minmax(0,1fr)}
 .forms-save button{white-space:normal;width:100%}
 .forms-fields-heading,.forms-pagination{flex-wrap:wrap}
 .forms-detail-open>.forms-list{display:none}
 .forms-split:not(.forms-detail-open)>.forms-detail{display:none}
 .mobile-back{display:block;margin:0 0 18px}
 .forms-preview{padding:16px}
 .appearance-panel{padding:20px}
 .stack-edit-row{grid-template-columns:minmax(0,1fr)}
 .stack-edit-row label:nth-child(3){grid-column:auto}
 .ci-metrics{gap:8px}
 .ci-metric{min-width:0;padding:15px 10px}
 .ci-metric span,.ci-metric small{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
 .ci-metric strong{font-size:28px}
 .ci-body{grid-template-columns:minmax(0,1fr)}
 .ci-body:not(.is-detail-open)>.ci-detail,.ci-body.is-detail-open>.ci-list{display:none}
 .ci-list{border-right:0}
 .customer-inbox [data-rows]{max-height:none;overflow:visible}
 .ci-filters{width:100%;flex-wrap:wrap;gap:4px}
 .ci-filters button{flex:1;font-size:13px}
 .ci-search{min-width:0;width:100%;margin-left:0}
 .ci-search input{min-width:0;width:100%;flex:1}
 .ci-kind{min-width:0;flex:1}
 .ci-row strong,.ci-row p{font-size:14px}
 .ci-row-meta,.ci-meta,.ci-notes-foot small,.ci-source-note{font-size:12px}
 .ci-detail{padding:20px;scroll-margin-top:150px}
 .ci-detail dl{grid-template-columns:minmax(0,1fr)}
 .ci-detail dd,.ci-message p{font-size:14px}
 .ci-notes-foot{flex-wrap:wrap}
 .ci-notes-foot small{max-width:none}
 .notification-card{padding:18px}
 .notification-actions button{white-space:normal}
 .portal-dialog{width:calc(100vw - 24px);padding:20px;max-height:calc(100dvh - 24px)}
 .portal-heading{align-items:flex-start;gap:10px}
 .portal-heading .secondary{min-width:44px;min-height:44px}
 .portal-link{min-height:76px}
 .release-summary{padding:20px}
 .release-card ul{padding-left:30px;padding-right:18px}
 .access-workspace .secondary{white-space:normal;line-height:1.7}
 .login-intro{min-height:0;padding:24px;gap:25px}
 .login-intro h1{font-size:32px;margin-top:12px}
 .login-intro p,.login-intro small{display:none}
 .login-panel{padding:28px 22px}
 .login-panel p{font-size:14px}
 footer{font-size:12px;line-height:1.7;flex-direction:column}
 .activity-console .feed-controls{width:100%;gap:8px}
 .activity-console .feed-state{flex-basis:100%;font-size:12px}
 .activity-console .feed-controls>button,.activity-console .feed-controls>select{flex:1}
 .activity-console .feed-display-settings{flex-basis:100%}
 .activity-console .feed-display-settings summary{align-content:center}
 .activity-console .feed-table-wrap{max-height:65dvh}
 .activity-console.feed-expanded .feed-table-wrap,.activity-console:fullscreen .feed-table-wrap{max-height:none}
 .activity-console .feed-footer{font-size:12px;line-height:1.7;flex-direction:column}
}
@media(max-width:900px){
 .table-scroll,.event-editor{min-width:0}
 .mobile-records,.activity-console .mobile-records,.event-editor .mobile-records{min-width:0!important;width:100%;table-layout:auto;display:block;font-size:13px!important}
 .mobile-records colgroup{display:none}
 .mobile-records thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .mobile-records tbody{display:grid;gap:14px;width:100%}
 .mobile-records tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px;padding:16px 0;border-bottom:1px solid var(--edge);min-width:0}
 .mobile-records td,.activity-console .mobile-records td,.event-editor .mobile-records td{display:block;padding:0!important;border:0;height:auto;white-space:normal;overflow:visible;text-overflow:clip;text-align:left;min-width:0;font-size:13px!important}
 .mobile-records td::before{content:attr(data-label);display:block;font-size:11px;line-height:1.6;color:var(--text-muted);font-weight:500;letter-spacing:.3px;margin-bottom:5px}
 .mobile-records td:first-child{grid-column:1/-1;font-weight:600}
 .mobile-records td[colspan]{grid-column:1/-1}
 .mobile-records[data-columns="2"] tbody tr,.event-editor .mobile-records tbody tr{grid-template-columns:minmax(0,1fr)}
 .mobile-records td small{display:block;font-size:12px;line-height:1.7}
 .access-workspace .mobile-records td .mini-link{margin:0 0 0 8px}
 .activity-console .mobile-records tbody{gap:0}
 .activity-console .mobile-records tbody tr{padding:16px;border-color:var(--feed-line);gap:12px}
 .activity-console .mobile-records td::before{color:#c8baa7}
 .activity-console .mobile-records td:nth-child(2){text-align:left}
 .activity-console .mobile-records .visitor-dot{width:44px;height:44px}
 .activity-console .mobile-records .visitor-dot::after{inset:14px}
 .activity-console .mobile-records .feed-badge{white-space:normal;font-size:11px}
 .activity-console .mobile-records tr.feed-new td{background:none}
 .activity-console .mobile-records tr.feed-new,.activity-console .mobile-records tr.feed-recent{background:#22271e}
 .activity-console .mobile-records tr.feed-recent td:first-child{box-shadow:none}
 .activity-console .mobile-records tr.feed-recent{border-left:3px solid #39ff88}
 .event-editor .mobile-records tbody{padding:16px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* The Live Feed is a dense monitor; its full details open on demand. */
.feed-compact-list{display:none}
.feed-options{display:contents}.feed-options>summary{display:none}
.feed-row-dialog{width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:22px;border:1px solid #695c49;border-radius:14px;background:#181713;color:#e5d8c6;overflow:auto}
.feed-row-dialog::backdrop{background:#07110dcc}
.feed-row-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:20px}
.activity-console .feed-row-dialog h2{color:#f0eadd;font-size:19px}
.feed-row-dialog dl{margin:0}.feed-row-dialog dl>div{padding:10px 0;border-bottom:1px solid #474238}
.activity-console .feed-row-dialog dt{color:#c8baa7;font-size:12px;margin-bottom:5px}
.activity-console .feed-row-dialog dd{margin:0;color:#f0eadd;font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
#shell main .activity-console .feed-row-dialog button{min-height:44px;font-size:14px;margin-top:10px}
@media(max-width:900px){
 .live-view .page-heading{display:none}
 .live-view .content{padding-top:8px}
 .live-view #demo-banner{padding:7px 10px;margin-bottom:8px;font-size:10px;line-height:1.4}
 .activity-console .feed-top{position:relative;flex-wrap:nowrap;align-items:center;padding:6px 8px;gap:8px;min-height:58px}
 .activity-console .feed-top>div:first-child{min-width:0}
 .activity-console .feed-top h2{font-size:15px;margin:0}
 .activity-console .feed-top p{display:none}
 .activity-console .feed-state{display:block;font-size:10px;line-height:1.5;white-space:nowrap}
 .activity-console .feed-options{display:block;flex-shrink:0}
 .activity-console .feed-options>summary{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;font-size:13px;border:1px solid #695c49;border-radius:6px;cursor:pointer}
 .activity-console .feed-options>summary::after{content:' ▾'}
 .activity-console .feed-options .feed-controls{position:absolute;right:8px;top:calc(100% - 4px);z-index:30;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:min(300px,calc(100vw - 52px));padding:12px;background:#181713;border:1px solid #695c49;border-radius:9px;box-shadow:0 12px 28px #0008;gap:10px}
 .activity-console .feed-options:not([open]) .feed-controls{display:none}
 .activity-console .feed-display-settings{grid-column:1/-1}
 .activity-console .feed-table{display:none!important}
 .activity-console .feed-table-wrap{height:var(--feed-viewport,60dvh);max-height:var(--feed-viewport,60dvh);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
 .activity-console.feed-expanded .feed-table-wrap,.activity-console:fullscreen .feed-table-wrap{flex:1;height:auto;max-height:none}
 .feed-compact-list{display:block;list-style:none;margin:0;padding:0}
 .feed-compact-item{margin:0;padding:0}
 #shell main .activity-console .feed-compact-row{display:grid;grid-template-columns:58px 7px 80px minmax(0,1fr);align-items:center;gap:6px;width:100%;height:var(--feed-row-height,18px);min-height:0!important;padding:0 7px;border:0;border-bottom:1px solid #302e29;border-radius:0;background:#181713;color:#e5d8c6;text-align:left;font:12px/1.15 ui-monospace,monospace;cursor:pointer}
 .feed-compact-row time{font-size:11px;font-variant-numeric:tabular-nums;color:#c8baa7}
 .feed-compact-row>span{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .feed-compact-visitor{width:6px;height:6px;border-radius:50%;background:var(--visitor-color,#c4d2ad)}
 .feed-compact-event{border-left:2px solid var(--event-bg,#ffcf33);padding-left:4px;font-size:11px}
 .feed-compact-path{font-size:12px}
 #shell main .activity-console .feed-compact-row:focus-visible{position:relative;z-index:1;outline:2px solid #96d8be;outline-offset:-2px}
 #shell main .activity-console .feed-recent .feed-compact-row{background:#22271e;border-left:2px solid #39ff88;padding-left:5px}
 .feed-compact-item.visitor-active .feed-compact-visitor{animation:visitor-neon var(--feed-pulse,2000ms) ease-in-out infinite}
 .feed-no-pulse .feed-compact-item .feed-compact-visitor{animation:none}
 .feed-compact-empty{padding:24px;font-size:12px;color:#c8baa7;line-height:1.7}
 .activity-console .feed-footer{flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px 12px;padding:5px 8px;font-size:10px;line-height:1.5}
 #shell main .activity-console .feed-footer button{margin:0;min-height:44px}
}
@media(prefers-reduced-motion:reduce){.feed-compact-item.visitor-active .feed-compact-visitor{animation:none}}
@media(max-width:900px){
 /* Keep notices available below the monitor instead of pushing rows offscreen. */
 .live-view .content{display:flex;flex-direction:column}
 .live-view #view-content{order:0}
 .live-view #demo-banner{order:-1}
 .live-view #setup-notice,.live-view #release-notice,.live-view #notice{order:1;margin-top:12px}
 .live-view .content>footer{order:2}
 .live-view #setup-notice:not([hidden])~#view-content .feed-top h2::after{content:' · Setup alert below';font-size:10px;color:#f4d27c;font-weight:400}
}
