/* Shared template authoring surface; existing workspaces retain their own styling. */
.template-studio{margin-top:12px}.template-studio .studio-top-tabs{display:flex;background:#fff;color:#203047;min-height:44px;overflow:auto}.template-studio .studio-top-tabs button{flex:1;min-width:130px;border:0;border-bottom:3px solid transparent;background:transparent;color:#fff;font:inherit;padding:16px 24px;cursor:pointer}.template-studio .studio-top-tabs button.active{border-bottom-color:#c5ad77;background:#1c3c50}.studio-lower-tabs{display:flex!important;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:thin;padding:10px 22px!important;gap:22px!important;min-height:64px}.studio-lower-tabs>button,.studio-tab{flex:0 0 auto}.studio-tab{position:relative;display:flex;align-items:center}.studio-tab>button:not(.studio-insert){padding:12px 22px}.studio-insert{position:absolute;z-index:3;top:50%;transform:translate(-50%,-50%);border:0;border-radius:50%;background:#cfb77d;color:#142f40;height:25px;width:25px;opacity:0;pointer-events:none;cursor:pointer;font-size:20px;line-height:1}.studio-insert.before{left:0}.studio-insert.after{left:100%}.studio-tab:hover .studio-insert,.studio-tab:focus-within .studio-insert{opacity:1;pointer-events:auto}.studio-template-meta{display:flex;gap:16px;align-items:end;flex-wrap:wrap;border-bottom:1px solid #dce2e5;padding-bottom:20px;margin-bottom:20px}.studio-template-meta>label:first-child{flex:2;min-width:200px}.studio-template-meta>label{flex:1;min-width:160px}.studio-template-meta .field{display:block;width:100%}.studio-controls{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:14px 0;border-bottom:1px solid #dce2e5}.studio-controls fieldset{display:flex;gap:14px;flex-wrap:wrap;border:1px solid #dce2e5;border-radius:10px;padding:8px 14px}.studio-controls legend{font-size:12px;color:#657a8b}.studio-controls label,.studio-template-meta label{font-size:14px}.studio-tab-heading{display:flex;align-items:center;gap:12px;margin:24px 0}.studio-tab-heading h1{margin:0;flex:1}.studio-remove{color:#9e3030!important}.studio-overview-editor{border-top:1px solid #dce2e5;margin-top:32px;padding-top:24px}.studio-panel-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:18px;align-items:start}.studio-overview-panel{grid-column:span var(--panel-span,6);height:var(--panel-height,280px);min-height:0;max-height:var(--panel-height,280px);max-width:100%;border:1px solid #dce2e5;border-radius:14px;padding:20px;box-sizing:border-box;background:#fff;min-width:0;overflow:auto}.studio-overview-panel[draggable=true]{cursor:grab;background:#fafbf9}.studio-overview-panel h2,.studio-overview-panel h3{margin-top:0}.studio-overview-panel .controls{gap:8px;flex-wrap:wrap}.studio-overview-panel .controls>label{min-width:70px;flex:1}.studio-runtime-section{margin:20px 0 30px}.studio-runtime-section .studio-runtime-section{border-left:2px solid #dce2e5;padding-left:20px}.studio-runtime-field{margin:20px 0}.studio-runtime-field .field{width:100%}.studio-check-item{display:flex;gap:12px;align-items:center;margin:10px 0}.studio-check-item>label{flex:1}.studio-check-item>.field{flex:1}.studio-outline-node{margin:14px 0}.studio-outline-node .studio-outline-node{margin-left:26px}.studio-outline-node .row{flex-wrap:wrap}.studio-outline-node .row .field{flex:1;min-width:120px}.studio-task-row{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid #edf0f2}.studio-task-row label{flex:1}.studio-task-add{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.studio-task-add .field{width:100%;min-width:0}.studio-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}.studio-calendar-day{min-height:32px;padding:3px;background:#f3f5f5;display:flex;flex-direction:column;align-items:center}.studio-calendar-day.outside{opacity:.4}.studio-calendar-day strong{color:#957c41}.studio-live-panel progress{width:100%;accent-color:#b49c63}.template-category-row{display:grid;grid-template-columns:3fr 1fr;gap:12px;align-items:end;border:0;padding:0;margin:12px 0}.template-category-row>label{min-width:0}.template-category-row input{width:100%}.template-category-row button{white-space:normal}.template-project-actions{display:flex;flex-direction:column;gap:10px;margin-left:auto;width:210px;flex-shrink:0}.template-project-actions .btn{width:100%!important;box-sizing:border-box}.project-launch-widget [data-template-project-manage]{display:none}.template-studio input[type=checkbox],.template-runtime input[type=checkbox]{border-radius:50%!important}.studio-no-ribbon .sermon-format-bar,.studio-no-ribbon .compact-writing-ribbon,.studio-no-ribbon .sch-rich-toolbar{display:none!important}.studio-live-panel>.sermon-rich-notes{min-height:90px}.template-studio :focus-visible{outline:2px solid #9e864f;outline-offset:3px}.studio-saved-tabs{padding-bottom:14px!important}@media(hover:none){.studio-insert{opacity:1;pointer-events:auto}}@media(max-width:760px){.studio-overview-panel{grid-column:span 12!important;min-height:160px}.studio-template-meta{display:grid;grid-template-columns:1fr}.studio-controls{align-items:start}.template-category-row{grid-template-columns:3fr 1fr}.template-project-actions{width:100%;margin-top:12px}.studio-lower-tabs{gap:16px!important}.template-studio .document-content{padding:16px!important}}
.sermon-modal fieldset.template-category-row{display:grid!important;grid-template-columns:minmax(0,3fr) minmax(0,1fr)!important;gap:12px!important;border:0!important;padding:0!important;width:100%;box-sizing:border-box;align-items:end!important}.sermon-modal fieldset.template-category-row>label{display:block!important;width:auto!important;min-width:0}.sermon-modal fieldset.template-category-row .field{width:100%!important;box-sizing:border-box}.sermon-modal fieldset.template-category-row>.btn{width:100%!important;min-width:0!important;margin:0!important}
html body #app .template-studio .studio-top-tabs>button{display:block!important;visibility:visible!important;opacity:1!important;flex:1!important;width:auto!important;min-height:44px!important;margin:0!important;border:0!important;border-bottom:3px solid transparent!important;border-radius:0!important;background:transparent!important;color:#667789!important;font:300 13px/1.4 Inter,sans-serif!important;padding:11px 24px!important;box-shadow:none!important;text-indent:0!important}html body #app .template-studio .studio-top-tabs>button.active{border-bottom-color:#c5ad77!important;background:#faf9f5!important;color:#203047!important}
#sermonNewModal fieldset.template-category-row{display:grid!important;grid-template-columns:minmax(0,3fr) minmax(0,1fr)!important;gap:12px!important;border:0!important;padding:0!important}#sermonNewModal fieldset.template-category-row>label{width:auto!important;min-width:0!important;max-width:none!important}#sermonNewModal fieldset.template-category-row .field{width:100%!important;max-width:none!important}

/* Compact controls opt out of the large site-wide checkbox pills. */
html body #app .template-studio .studio-controls{gap:10px;padding:10px 0 14px;align-items:center}
html body #app .template-studio .studio-controls fieldset{margin:0;gap:4px 8px;border-color:#e7ebed;padding:5px 8px 7px;border-radius:7px;min-width:0;flex:1;justify-content:flex-start}
html body #app .template-studio .studio-controls legend{font-size:10px;font-weight:300;padding:0 4px;color:#7b8894}
html body #app .template-studio .studio-controls label:has(>input[type="checkbox"]){background:transparent!important;border:1px solid transparent!important;border-radius:5px!important;min-height:27px!important;padding:3px 6px!important;gap:5px!important;font:300 11px/1.4 Inter,sans-serif!important;white-space:nowrap;width:auto!important;flex:0 0 auto!important}
html body #app .template-studio .studio-controls label:has(>input:checked){background:#f4f3ed!important;border-color:#e4ddcc!important;color:#243849}
html body #app .template-studio .studio-controls input[type="checkbox"]{width:12px!important;height:12px!important;min-width:12px!important;margin:0!important}
html body #app .template-studio .studio-top-tabs{border-bottom:1px solid #e2e6e8;background:#fff!important;min-height:44px}
html body #app .template-studio .studio-top-tabs>button{border-bottom-width:2px!important}
html body #app .template-studio .studio-lower-tabs .studio-tab>.studio-insert{display:grid!important;place-items:center!important;position:absolute!important;top:calc(50% - 1px)!important;transform:translate(-50%,-50%)!important;width:22px!important;min-width:22px!important;max-width:22px!important;height:22px!important;min-height:22px!important;max-height:22px!important;padding:0!important;margin:0!important;border:2px solid #fff!important;border-radius:50%!important;background:#d0bb85!important;color:#203047!important;font:300 17px/18px Inter,sans-serif!important;box-shadow:0 1px 4px #20304718!important;text-decoration:none!important}
html body #app .template-studio .studio-lower-tabs .studio-tab>.studio-insert.before{left:0!important}
html body #app .template-studio .studio-lower-tabs .studio-tab>.studio-insert.after{left:100%!important}
html body #app .template-studio #templateStudioTabTitle[contenteditable="true"]{outline:0;cursor:text}
html body #app .studio-overview-panel{height:var(--panel-height,280px)!important;min-height:0!important;max-height:var(--panel-height,280px)!important;align-self:start;padding:16px!important}
.studio-overview-panel[draggable]>.controls{position:sticky;bottom:-16px;background:#fafbf9;border-top:1px solid #e8ecef;padding:8px 0;margin-bottom:0}
.studio-overview-panel[draggable]>p{font-size:12px;line-height:1.4;margin-bottom:10px}
.studio-research-intro{padding:8px 0 18px;border-bottom:1px solid #e2e6e8}
.studio-research-layout>.studio-runtime-section{border:1px solid #e3e7e9;border-radius:10px;padding:20px;background:#fdfdfb}
.studio-research-layout .studio-runtime-field>h3{font-weight:400;font-size:14px}
.studio-review-sources{border-top:1px solid #e2e6e8;padding-top:20px}
html body #app .project-launch-widget{display:grid!important;grid-template-columns:minmax(0,1fr) 210px!important;column-gap:20px;align-content:start!important;min-height:0!important;height:auto!important}
html body #app .project-launch-widget>.row{grid-column:1;grid-row:1;align-self:start}
html body #app .project-launch-widget>p{grid-column:1;grid-row:2;margin:6px 0 12px!important;font-size:12px}
html body #app .project-launch-widget>.project-continue-row{grid-column:1;grid-row:3;display:flex;align-items:center;align-self:end;min-width:0;gap:10px}
html body #app .project-launch-widget>.template-project-actions{grid-column:2;grid-row:1/4;align-self:start;margin:0;width:210px;gap:8px}
html body #app .project-launch-widget .template-project-actions>.btn{min-height:34px!important;padding:6px 10px!important;font-size:12px!important}
html body #app .research-template-footer{display:flex!important;align-items:center;justify-content:flex-end;gap:10px;margin-top:16px;flex-wrap:wrap}
@media(max-width:650px){html body #app .project-launch-widget{grid-template-columns:1fr!important}html body #app .project-launch-widget>.template-project-actions{grid-column:1;grid-row:4;width:100%;margin-top:12px}html body #app .template-studio .studio-controls{align-items:flex-start}.studio-controls fieldset{flex-basis:100%!important}.studio-research-layout>.studio-runtime-section{padding:14px}}
html body #app .project-launch-widget{align-self:start!important}

/* Keep title metrics identical while editing; writing-field defaults do not apply. */
html body #app .template-studio #templateStudioTabTitle{font:400 29px/1.3 Georgia,serif!important;min-height:38px!important;min-width:0;box-sizing:border-box;border:0!important;border-radius:0!important;padding:0!important;margin:0!important;background:transparent!important;box-shadow:none!important;outline:0!important;white-space:pre-wrap;overflow-wrap:anywhere}
html body #app .template-studio .studio-controls-tools{display:flex;flex-direction:column;align-items:flex-start;gap:3px;flex:0 0 auto}
html body #app .template-studio .studio-controls .studio-add-overview{font:300 11px/1.4 Inter,sans-serif!important;min-height:25px!important;padding:3px 6px!important;margin:0!important;background:transparent!important;border:1px solid transparent!important;border-radius:5px!important;box-shadow:none!important;white-space:nowrap}
html body #app .template-studio .studio-controls .studio-add-overview:disabled{color:#8c959c!important;opacity:.55!important;cursor:default}
html body #app .template-studio .studio-insert svg{display:block!important;width:12px!important;height:12px!important;min-width:12px!important;margin:0!important;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round}
.sch-message-dialog>label{display:block;margin-bottom:8px;white-space:pre-wrap}
.sch-message-dialog>.field{width:100%;box-sizing:border-box;margin-bottom:18px}

.studio-tab[draggable=true]>button:not(.studio-insert){cursor:grab}.studio-tab[draggable=true]:active>button:not(.studio-insert){cursor:grabbing}
#serviceChurchModal .service-template-group{border:1px solid #dce2e5;border-radius:12px;padding:16px;margin:14px 0}
#serviceChurchModal .service-template-group h3{margin:0}#serviceChurchModal .service-template-group .service-details-grid{margin:12px 0}
