/* Studio, report pages and Slack previews. Builds on product.css tokens. */
:root{--done:#3aa17e;--doing:#2563eb;--todo:#d9dbe6;--warn:#d99a2b;--bad:#d4534c;--ok:#3aa17e;--slack-ink:#1d1c1d;--slack-muted:#616061}
.studio,.report-page,.people-page{padding-top:44px;padding-bottom:80px}
.studio-head,.report-page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:28px;flex-wrap:wrap}
.studio-head h1,.report-page-head h1{font-size:clamp(32px,3.6vw,46px)}
.studio-head p,.report-page-head p{color:var(--muted);max-width:620px;margin:12px 0 0!important}
.studio-head-actions{display:flex;gap:10px;flex-wrap:wrap}
.studio-grid{display:grid;grid-template-columns:minmax(0,440px) minmax(0,1fr);gap:24px;align-items:start}
.studio-form{position:sticky;top:104px;max-height:calc(100vh - 124px);overflow:auto}
.studio-alert{border-radius:10px;padding:12px 16px;margin-bottom:16px;font-weight:550;background:var(--mint);border:1px solid #cde8da}
.studio-alert.error{background:#fdecea;border-color:#f3c5c1;color:#8b2a24}
.studio-editing{font-size:13px;color:var(--muted);margin:10px 0 0!important}
.workspace-card.studio-form{padding:22px}
.segmented{display:flex;background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:4px;gap:4px}
.segmented label{flex:1;cursor:pointer}
.segmented input{position:absolute;opacity:0;pointer-events:none}
.segmented span{display:block;text-align:center;padding:9px 10px;border-radius:7px;font-weight:600;font-size:14px}
.segmented input:checked+span{background:white;box-shadow:0 1px 4px #172b4d1a;color:var(--accent)}
.segmented input:focus-visible+span{outline:3px solid #60a5fa}
.segmented.small span{padding:6px 8px;font-size:13px}
.studio-fieldset{border:0;border-top:1px solid var(--line);margin:20px 0 0;padding:18px 0 0}
.studio-fieldset legend{font:700 12px Manrope,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding-right:10px}
.field{display:flex;flex-direction:column;gap:6px;margin:12px 0}
.field>span,.field-label{font-size:13px;font-weight:650;display:block;margin:12px 0 6px}
.field>span{margin:0}
.field em,.field-label em{font-style:normal;font-weight:450;color:var(--muted)}
.field select,.field input[type=text],.field textarea{width:100%;border:1px solid var(--line);border-radius:9px;background:white;padding:10px 12px;font:inherit;font-size:14px;color:var(--ink)}
.field textarea{resize:vertical;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}
.field select:focus,.field input:focus,.field textarea:focus{outline:2px solid #60a5fa;border-color:var(--accent)}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field-hint{font-size:12px;color:var(--muted)}
.field-error{font-size:12px;color:var(--bad);font-weight:600;min-height:0}
.field-error:empty{display:none}
.report-type-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.report-type{position:relative;border:1px solid var(--line);border-radius:10px;background:white;padding:10px 12px;cursor:pointer;display:block}
.report-type input{position:absolute;opacity:0;pointer-events:none}
.report-type strong{display:block;font-size:13.5px}
.report-type small{display:block;color:var(--muted);font-size:11.5px;line-height:1.4;margin-top:3px}
.report-type:has(input:checked){border-color:var(--accent);background:var(--lavender);box-shadow:0 0 0 1px var(--accent) inset}
.report-type:has(input:focus-visible){outline:3px solid #60a5fa}
.chip-grid{display:flex;flex-wrap:wrap;gap:6px}
.chip-grid label,.day-picker label{cursor:pointer}
.chip-grid input,.day-picker input{position:absolute;opacity:0;pointer-events:none}
.chip-grid span,.day-picker span{display:inline-block;border:1px solid var(--line);background:white;border-radius:30px;padding:6px 11px;font-size:12.5px;font-weight:550}
.chip-grid input:checked+span,.day-picker input:checked+span{background:var(--accent);border-color:var(--accent);color:white}
.chip-grid input:focus-visible+span,.day-picker input:focus-visible+span{outline:3px solid #60a5fa}
.day-picker{display:flex;gap:6px;flex-wrap:wrap}
.day-picker span{min-width:46px;text-align:center}
.radio-list{display:flex;flex-direction:column;gap:8px}
.radio-list label{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:white;cursor:pointer}
.radio-list label:has(input:checked){border-color:var(--accent);background:var(--lavender)}
.radio-list input{margin-top:4px;accent-color:var(--accent)}
.radio-list strong{display:block;font-size:13.5px}
.radio-list small{display:block;color:var(--muted);font-size:12px;line-height:1.45}
.check-grid{display:flex;flex-direction:column;gap:8px;margin:14px 0;font-size:14px}
.check-grid input{accent-color:var(--accent);margin-right:6px}
.personal-note{font-size:12.5px;background:var(--peach);border-radius:8px;padding:8px 12px;margin:10px 0 0!important}
.studio-actions{display:flex;flex-wrap:wrap;gap:8px;position:sticky;bottom:-22px;background:white;padding:16px 0 4px;margin-top:10px;border-top:1px solid var(--line)}
.studio-actions .button{flex:1 1 auto;min-height:44px;padding:10px 14px}
.button[disabled]{opacity:.55;pointer-events:none}
.studio-preview{min-width:0;background:white;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.preview-tabs{display:flex;border-bottom:1px solid var(--line);background:var(--paper)}
.preview-tabs button{border:0;background:none;padding:14px 18px;font-weight:650;font-size:14px;color:var(--muted);border-bottom:2px solid transparent}
.preview-tabs button[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent);background:white}
.preview-panel{padding:24px;min-height:420px}
.preview-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;min-height:360px;color:var(--muted);border:1.5px dashed var(--line);border-radius:12px;padding:20px}
.preview-empty strong{color:var(--ink);font-size:17px}
.studio-preview[aria-busy=true] .preview-panel{opacity:.5;transition:opacity .2s}
.skeleton{height:14px;border-radius:6px;background:linear-gradient(90deg,#eef0f6,#f8f9fc,#eef0f6);background-size:200% 100%;animation:shimmer 1.2s infinite;margin:12px 0}
@keyframes shimmer{to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.skeleton{animation:none}}
.studio-list{margin-top:28px}
.studio-list-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.studio-list-head h2{font-size:24px}
.schedule-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.schedule-item{border:1px solid var(--line);border-radius:12px;padding:14px 16px;background:white;display:flex;flex-direction:column;gap:6px}
.schedule-item.paused{opacity:.7;background:var(--paper)}
.schedule-item h3{font-size:16px;letter-spacing:-.02em}
.schedule-item p{margin:0!important;font-size:13px;color:var(--muted)}
.schedule-item .row-actions{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:6px}
.schedule-item .row-actions button{border:0;background:none;padding:0;font-weight:650;font-size:13px;color:var(--accent)}
.schedule-item .row-actions button.danger{color:var(--bad)}
/* Report */
.rp{color:var(--ink)}
.rp-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}
.rp-title{font-size:24px!important;letter-spacing:-.03em!important;line-height:1.25!important}
.rp-title a:hover{color:var(--accent)}
.rp-sub{color:var(--muted);font-size:14px;margin:6px 0 0!important}
.rp-health{flex-shrink:0;border-radius:30px;padding:6px 12px;font-size:12.5px;font-weight:700;white-space:nowrap}
.rp-health-on_track,.rp-health-done{background:#e3f4ec;color:#21714f}
.rp-health-at_risk{background:#fdf1dc;color:#8a5a0b}
.rp-health-off_track{background:#fde4e2;color:#952e28}
.rp-goal{background:var(--lavender);border-radius:10px;padding:10px 14px;font-size:14px}
.rp-progress{display:flex;height:14px;border-radius:8px;overflow:hidden;background:var(--todo);margin:16px 0 8px}
.rp-seg{display:block;height:100%}
.rp-seg-done{background:var(--done)}.rp-seg-in_progress{background:var(--doing)}.rp-seg-todo{background:var(--todo)}
.rp-legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:12.5px;color:var(--muted);margin:0 0 16px!important}
.rp-legend span{display:inline-flex;align-items:center;gap:6px}
.rp-dot{display:inline-block;width:10px;height:10px;border-radius:3px}
.rp-unit{margin-left:auto}
.rp-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-bottom:18px}
.rp-stat{border:1px solid var(--line);border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:2px;background:white}
.rp-stat span{font-size:12px;color:var(--muted);font-weight:600}
.rp-stat strong{font:750 24px Manrope,sans-serif;letter-spacing:-.03em}
.rp-stat small{font-size:11.5px;color:var(--muted)}
.rp-stat small.rp-delta{color:var(--accent);font-weight:650}
.rp-chart{margin:0 0 18px;border:1px solid var(--line);border-radius:12px;padding:14px 14px 4px}
.rp-chart figcaption{font-weight:650;font-size:13.5px;margin-bottom:6px}
.rp-svg{width:100%;height:220px;display:block}
.rp-grid{stroke:#eceef4;stroke-width:1}
.rp-axis{fill:var(--muted);font-size:10px;font-family:'DM Sans',sans-serif}
.rp-line{fill:none;stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}
.rp-dashed{stroke-dasharray:6 5;stroke-width:1.8}
polyline.rp-series-0{stroke:#2563eb}polyline.rp-series-1{stroke:#93c5fd}polyline.rp-series-2{stroke:#3aa17e}
rect.rp-series-0,i.rp-series-0{fill:#2563eb;background:#2563eb}rect.rp-series-1,i.rp-series-1{fill:#3aa17e;background:#3aa17e}rect.rp-series-2,i.rp-series-2{fill:#e38b4f;background:#e38b4f}
.rp-line+.rp-line{}
.rp-insights{background:var(--paper);border-radius:12px;padding:14px 18px;margin-bottom:18px}
.rp-insights h3,.rp-section h3{font-size:15px!important;letter-spacing:-.01em!important;margin-bottom:8px!important}
.rp-insights ul{margin:0;padding-left:18px;font-size:14px}
.rp-ai{margin-top:10px;font-size:14px;border-top:1px solid var(--line);padding-top:10px}
.rp-ai strong:first-child{display:block;margin-bottom:4px}
.rp-sections{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}
.rp-section{border:1px solid var(--line);border-radius:12px;padding:14px 16px;min-width:0}
.rp-section.rp-wide{grid-column:1/-1}
.rp-section h4{font-size:13px;margin:10px 0 4px;color:var(--muted)}
.rp-count{display:inline-block;background:var(--paper);border-radius:20px;padding:0 8px;font-size:12px;color:var(--muted);font-weight:650}
.rp-issues{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.rp-issue{display:flex;flex-direction:column;font-size:13.5px;border-left:3px solid var(--todo);padding-left:10px}
.rp-issue.rp-state-in_progress{border-color:var(--doing)}.rp-issue.rp-state-done{border-color:var(--done)}
.rp-issue a{font-weight:550;overflow-wrap:anywhere}
.rp-issue a:hover{color:var(--accent)}
.rp-key{font-family:ui-monospace,Menlo,monospace;font-size:12px;color:var(--accent);font-weight:700}
.rp-meta{font-size:12px;color:var(--muted)}
.rp-muted{color:var(--muted);font-size:13px;margin:4px 0 0!important}
.rp-error,.rp-empty{border-radius:10px;padding:14px 16px;background:#fdecea;color:#8b2a24;font-weight:550}
.rp-empty{background:var(--paper);color:var(--ink)}
.rp-bars{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.rp-bar-label{display:flex;justify-content:space-between;gap:10px;font-size:13.5px}
.rp-bar-label a,.rp-bar-label>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rp-bar-label strong{white-space:nowrap;font-size:12.5px}
.rp-bar{height:8px;border-radius:5px;background:var(--todo);overflow:hidden;margin-top:4px}
.rp-bar span{display:block;height:100%;background:var(--done);border-radius:5px}
.rp-h-off_track .rp-bar span{background:var(--bad)}.rp-h-at_risk .rp-bar span{background:var(--warn)}
.rp-bars small{font-size:12px;color:var(--muted)}
.rp-table-wrap{overflow-x:auto}
.rp-table{border-collapse:collapse;width:100%;font-size:13.5px}
.rp-table th,.rp-table td{text-align:left;padding:7px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
.rp-table th{font-size:12px;color:var(--muted)}
.rp-foot{font-size:12px;color:var(--muted);margin-top:16px}
/* Slack message preview */
.slack-surface{font-family:Lato,'Slack-Lato',system-ui,sans-serif;color:var(--slack-ink)}
.sk-message{display:flex;gap:10px;font-size:15px;line-height:1.46}
.sk-avatar{width:36px;height:36px;border-radius:6px;background:var(--accent);color:white;display:flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0}
.sk-body{min-width:0;flex:1}
.sk-author{font-weight:900;margin-bottom:2px}
.sk-app{font-size:10px;font-weight:700;background:#e8e8e8;color:var(--slack-muted);border-radius:3px;padding:1px 4px;vertical-align:middle}
.sk-header{font-weight:900;font-size:18px;margin:6px 0}
.sk-section{display:flex;gap:12px;margin:6px 0;overflow-wrap:anywhere}
.sk-section-main{flex:1;min-width:0}
.sk-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;margin-top:4px}
.sk-context{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:12.5px;color:var(--slack-muted);margin:4px 0}
.sk-context img{border-radius:3px}
.sk-divider{border:0;border-top:1px solid #e8e8e8;margin:10px 0}
.sk-actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.sk-button{display:inline-flex;align-items:center;border:1px solid #c4c4c4;border-radius:4px;padding:3px 12px;font-weight:700;font-size:13px;background:white;color:var(--slack-ink)}
.sk-button.sk-primary{background:#007a5a;border-color:#007a5a;color:white}
.sk-button.sk-danger{color:#e01e5a;border-color:#e01e5a}
.sk-overflow{padding:0 8px;height:28px}
.sk-image{margin:8px 0}
.sk-image img{max-width:100%;border-radius:8px;border:1px solid #e8e8e8}
.sk-image figcaption{font-size:13px;color:var(--slack-muted);margin-bottom:4px}
.sk-section a{color:#1264a3}
.sk-section code,.sk-context code{font-family:Monaco,Menlo,monospace;font-size:12px;background:#f8f8f8;border:1px solid #e8e8e8;border-radius:3px;padding:1px 3px;color:#e01e5a}
.sk-section pre{font-family:Monaco,Menlo,monospace;font-size:12px;background:#f8f8f8;border:1px solid #e8e8e8;border-radius:4px;padding:8px;white-space:pre;overflow-x:auto}
.sk-mention{background:#e8f5fa;color:#1264a3;border-radius:3px;padding:0 2px}
/* Report page */
.report-picker{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin-bottom:20px}
.report-picker .field{margin:0;min-width:180px}
.report-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px;margin-bottom:24px}
.report-gallery a{display:block;border:1px solid var(--line);border-radius:12px;padding:14px 16px;background:white}
.report-gallery a:hover,.report-gallery a[aria-current=page]{border-color:var(--accent);background:var(--lavender)}
.report-gallery strong{display:block}
.report-gallery span{font-size:12.5px;color:var(--muted)}
.report-body{background:white;border:1px solid var(--line);border-radius:14px;padding:24px}
.report-cta{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
/* People */
.people-table{width:100%;border-collapse:collapse;font-size:14px}
.people-table th,.people-table td{text-align:left;padding:10px;border-bottom:1px solid var(--line);vertical-align:middle}
.people-table th{font-size:12px;color:var(--muted)}
.people-table select{border:1px solid var(--line);border-radius:8px;padding:7px 10px;font:inherit;font-size:14px;max-width:100%}
.people-table img{border-radius:50%;vertical-align:middle;margin-right:8px}
.match-source{font-size:11.5px;color:var(--muted)}
.save-state{font-size:12px;color:var(--ok);font-weight:650}
@media (max-width:960px){.studio-grid{grid-template-columns:1fr}.studio-form{position:static;max-height:none;overflow:visible}.studio-actions{position:static}}
@media (max-width:620px){.shell.studio,.shell.report-page,.shell.people-page{width:calc(100% - 32px)}.field-row,.report-type-grid{grid-template-columns:1fr}.sk-fields{grid-template-columns:1fr}.preview-panel{padding:16px}.rp-head{flex-direction:column}.people-table thead{display:none}.people-table tr{display:block;border-bottom:1px solid var(--line);padding:8px 0}.people-table td{display:block;border:0;padding:4px 0}}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.sample-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.sample-tabs button{border:1px solid var(--line);background:white;border-radius:30px;padding:8px 16px;font-weight:650;font-size:14px}
.sample-tabs button[aria-selected=true]{background:var(--accent);border-color:var(--accent);color:white}
.sample-report{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:16px;align-items:start}
.sample-report .slack-surface .badge{margin-bottom:12px}
.capability-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-top:36px}
.capability-grid article{background:white;border:1px solid var(--line);border-radius:14px;padding:22px}
.capability-grid h3{font-size:19px!important;margin:12px 0 8px!important}
.capability-grid p{color:var(--muted);font-size:14.5px;margin:0!important}
.capability-grid code{font-size:.85em;background:var(--lavender);border-radius:4px;padding:1px 4px}
@media (max-width:860px){.sample-report{grid-template-columns:1fr}}

/* Keep validation and schedule actions usable with keyboard and touch. */
.field [aria-invalid=true]{border-color:var(--bad);outline-color:var(--bad)}
.schedule-item .row-actions button{min-height:40px;padding:6px 2px}
.schedule-item .row-actions button:disabled{opacity:.5;cursor:wait}
.schedule-item .row-actions button:focus-visible,.preview-tabs button:focus-visible{outline:3px solid #60a5fa;outline-offset:2px;border-radius:4px}
@media(max-width:620px){.schedule-list,.rp-sections{grid-template-columns:minmax(0,1fr)}.studio-actions .field-hint{flex-basis:100%}}

.workspace-sections{display:flex;flex-wrap:wrap;gap:10px 20px;margin:0 0 24px;padding:12px 0;border-block:1px solid var(--line);font-size:14px;font-weight:650}
.workspace-sections a{color:var(--accent);padding:5px 0}
.studio-list{margin-top:0;margin-bottom:24px}
.workspace-account{margin-top:32px}
#create-schedule,#schedule-list-section,#delivery-activity,#workspace-plan{scroll-margin-top:110px}

.sk-avatar img{display:block;width:100%;height:100%;border-radius:6px}
/* Large directories use bounded tables and a single searchable recipient picker. */
.people-sync{display:flex;justify-content:space-between;align-items:center;gap:24px;flex-wrap:wrap}
.people-sync>div:first-child{flex:1;min-width:240px}
.people-sync p{margin-bottom:8px}
.people-search-bar{display:grid;grid-template-columns:minmax(0,2fr) minmax(180px,1fr);gap:18px}
.field input[type=search]{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:white;font:inherit;color:var(--ink)}
.people-detail{display:block;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.people-table td{overflow-wrap:anywhere;max-width:320px}
.people-table td:last-child .text-button{display:block;margin-top:8px;font-size:12px}
.people-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 0;font-size:13px}
.people-dialog{width:min(560px,calc(100% - 32px));max-height:85vh;overflow:auto;padding:24px;border:1px solid var(--line);border-radius:14px;color:var(--ink)}
.people-dialog::backdrop{background:#172b4d66}
.people-dialog h2{font-size:23px;letter-spacing:-.03em}
.people-dialog>p{font-size:14px;margin:12px 0;color:var(--muted)}
.people-dialog>.button{margin-top:16px}
.people-results{display:flex;flex-direction:column;gap:7px;max-height:40vh;overflow:auto}
.people-result{text-align:left;background:white;border:1px solid var(--line);border-radius:9px;padding:10px 12px;min-height:48px;color:var(--ink)}
.people-result:hover,.people-result:focus-visible{border-color:var(--accent);background:var(--lavender)}
.people-result strong,.people-result small{display:block;overflow-wrap:anywhere}
.people-result small{color:var(--muted);font-size:12px}
@media(max-width:620px){.people-search-bar{grid-template-columns:1fr;gap:0}.people-table td{max-width:none}}
