.tm-workspace{max-width:1240px;margin:auto;padding:8px 0 40px}.tm-hero{display:flex;justify-content:space-between;align-items:center;padding:34px 36px;background:linear-gradient(115deg,var(--color-leaf),#f3f7e9 65%,var(--color-sky));border-radius:var(--radius-card);gap:24px}.tm-hero h2{font-size:clamp(26px,3vw,38px);letter-spacing:-1.3px;max-width:520px;line-height:1.15;margin:14px 0}.tm-hero p{line-height:1.7;color:var(--color-muted)}.tm-tabs{display:flex;gap:22px;border-bottom:1px solid var(--color-line);margin:28px 0 24px}.tm-tabs button{border:0;border-radius:0;padding:12px 0;background:none;color:var(--color-muted)}.tm-tabs button[aria-current=page]{border-bottom:2px solid var(--color-accent);color:var(--color-ink);font-weight:650}.tm-filters{display:flex;gap:12px;align-items:center}.tm-filters label{margin:0}.tm-search{flex:1}.tm-filters input,.tm-filters select{width:100%;min-height:44px}.tm-result-count{font-size:13px;color:var(--color-muted);margin:22px 0 16px}.tm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.tm-card{border:1px solid var(--color-line);border-radius:16px;padding:24px;display:flex;flex-direction:column;transition:border-color .15s,box-shadow .15s}.tm-card:hover{border-color:#97b4a5;box-shadow:0 5px 20px #172e2909}.tm-card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.tm-icon{width:50px;height:50px;border-radius:14px;display:grid;place-items:center;font-size:28px;background:var(--color-lilac)}.tm-organisation{background:var(--color-leaf)}.tm-department{background:var(--color-sky)}.tm-card h3{font-size:20px;line-height:1.35;margin:10px 0}.tm-card p{color:var(--color-muted);line-height:1.6;flex:1;margin-bottom:28px}.tm-card-bottom{display:flex;justify-content:space-between;gap:10px;font-size:13px;border-top:1px solid var(--color-line);padding-top:18px}.tm-card .actions{margin:18px 0 0}.tm-card .actions button{width:100%}.tm-card small{font-size:12px;color:var(--color-muted)}.tm-boundary{color:var(--color-muted);font-size:12px;margin-top:32px;line-height:1.6}.tm-empty{text-align:center;padding:70px 24px;border:1px dashed var(--color-line);border-radius:16px;margin-top:20px}.tm-detail-head{display:flex;justify-content:space-between;gap:28px;padding:40px 0;border-bottom:1px solid var(--color-line)}.tm-detail-head h2{font-size:34px;letter-spacing:-1px;max-width:650px}.tm-detail-head p{max-width:650px;line-height:1.6}.tm-detail-head>div:last-child{min-width:200px;text-align:right}.tm-price{font-size:26px;display:block;margin-bottom:16px}.tm-detail-columns{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr);gap:48px;padding:24px 0}.tm-detail-columns h3{margin-top:26px}.tm-structure{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:20px 0}.tm-structure>div{border:1px solid var(--color-line);padding:20px;border-radius:12px}.tm-structure p,.tm-requirement p{line-height:1.6;color:var(--color-muted)}.tm-item,.tm-export-item,.tm-install{border:1px solid var(--color-line);border-radius:10px;padding:16px;margin:10px 0}.tm-item summary,.tm-export-item summary,.tm-install summary{cursor:pointer;line-height:1.6}.tm-item small,.tm-export-item small{color:var(--color-muted);margin-left:8px}.tm-item pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f7f9f7;padding:18px;font-family:inherit;font-size:14px;line-height:1.7}.tm-requirement{padding:16px 0;border-bottom:1px solid var(--color-line)}.tm-flow{max-width:900px;margin:auto}.tm-flow-head{display:flex;justify-content:space-between;align-items:center}.tm-steps{display:flex;list-style:none;padding:0;margin:32px 0 40px;gap:12px}.tm-steps li{flex:1;font-size:13px;color:var(--color-muted);display:flex;align-items:center;gap:8px}.tm-steps li span{border:1px solid var(--color-line);border-radius:50%;width:28px;height:28px;display:grid;place-items:center}.tm-steps [aria-current=step]{color:var(--color-accent);font-weight:650}.tm-steps [aria-current=step] span{background:var(--color-leaf);border-color:var(--color-accent)}.tm-flow h2{font-size:28px;letter-spacing:-.6px}.tm-flow p{line-height:1.65}.tm-flow form>label,.tm-fields label{display:block;margin:20px 0}.tm-flow input:not([type=checkbox]),.tm-flow textarea,.tm-flow select{width:100%;margin-top:8px}.tm-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.tm-flow textarea{min-height:110px;resize:vertical;line-height:1.6}.tm-flow .tm-check{display:flex;align-items:flex-start;gap:10px;line-height:1.6}.tm-check input{margin-top:6px;flex-shrink:0}.tm-flow-actions{display:flex;justify-content:flex-end;gap:12px;border-top:1px solid var(--color-line);padding-top:24px;margin:32px 0}.tm-summary{background:var(--color-leaf);padding:18px 24px;border-radius:12px}.tm-error{background:var(--color-error-bg);color:var(--color-error);padding:16px;border-radius:8px;margin-bottom:20px}.tm-install summary .badge{margin-left:16px}.tm-workspace .notice{margin:18px 0}.tm-export-item summary label{display:inline}.tm-flow code{overflow-wrap:anywhere;font-size:12px}button[data-t]:disabled{opacity:.5;cursor:not-allowed}@media(max-width:1100px){.tm-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.tm-grid,.tm-detail-columns,.tm-fields{grid-template-columns:1fr}.tm-hero,.tm-detail-head{display:block;padding:24px}.tm-hero button{margin-top:16px}.tm-detail-head>div:last-child{text-align:left;margin-top:24px}.tm-filters{flex-wrap:wrap}.tm-search{flex-basis:100%}.tm-steps{gap:4px}.tm-steps li{font-size:10px;display:block}.tm-steps li span{margin-bottom:6px}.tm-flow-head{gap:12px}.tm-detail-columns{gap:12px}}

.tm-card-counts{font-size:13px;color:var(--color-muted);margin:0 0 18px}.tm-card-counts:empty{display:none}

.tm-card-counts{display:grid;gap:8px;margin:0 0 22px;color:var(--color-ink)}
.tm-count-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 13px;border-radius:8px;font-size:13px;color:#214b39;background:var(--color-leaf)}
.tm-count-row strong{font-size:16px;font-variant-numeric:tabular-nums}
.tm-count-agents{background:var(--color-sky);color:#224d61}
.tm-department-names{display:grid;gap:5px;padding:7px 2px 0;font-size:12px;color:#385448;line-height:1.6}
.tm-department-names strong{font-size:13px;font-weight:550;color:var(--color-ink)}

/* Scope colors are consistent across listings, structure and file groups. */
.tm-workspace .tm-type-organisation{background:var(--color-leaf);color:#214b39;border-color:#c9ddbf}
.tm-workspace .tm-type-department{background:var(--color-sky);color:#224d61;border-color:#c6e2ef}
.tm-workspace .tm-type-agent{background:var(--color-lilac);color:#563a78;border-color:#dccdef}
.tm-structure .tm-structure-department{background:#f4fafc;border-color:#cee5ef}
.tm-structure .tm-structure-agent{background:#f9f6fc;border-color:#e2d7f0}
.tm-requirement-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tm-requirement-heading .rc-tool-icon{flex:0 0 36px;width:36px;height:36px;display:grid;place-items:center;border-radius:9px}
.tm-requirement-heading img{width:24px;height:24px;object-fit:contain}
.tm-file-group{margin:24px 0 30px;padding-left:16px;border-left:3px solid #c9ddbf}
.tm-file-department{border-left-color:#b8dce9}.tm-file-agent{border-left-color:#d4bfe9}
.tm-file-group h4{margin:0 0 16px}.tm-file-owner+ .tm-file-owner{margin-top:24px}
.tm-file-owner h5{font-size:14px;font-weight:650;margin:12px 0;color:var(--color-ink)}

.tm-connector-mark{flex:0 0 36px;width:36px;height:36px;display:grid;place-items:center;background:#fff;border:1px solid var(--color-line);border-radius:9px;color:var(--color-ink)}
.tm-brand-glyph{display:block;width:24px;height:24px;mask-size:contain;mask-repeat:no-repeat;mask-position:center;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center}

.tm-vault-disclosure{background:#f6f8f6;border:1px solid var(--color-line);border-radius:10px;padding:14px 16px;color:var(--color-ink);font-size:13px;line-height:1.65}.tm-vault-disclosure strong{font-weight:650}

.tm-vault-requirement{padding:16px 0;border-bottom:1px solid var(--color-line)}
.tm-vault-requirement code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;font-weight:650;color:var(--color-ink);overflow-wrap:anywhere}
.tm-vault-requirement p{font-size:13px;line-height:1.6;color:var(--color-muted);margin:6px 0 8px}
.tm-vault-requirement small{font-size:12px;color:var(--color-muted)}

.tm-scope-options{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:20px 0}
.tm-scope-options button{text-align:left;padding:18px;display:flex;flex-direction:column;gap:8px;white-space:normal;align-items:flex-start;line-height:1.5;background:#fff;border:1px solid var(--color-line);border-radius:12px}
.tm-scope-options button span{font-size:12px;color:var(--color-muted);font-weight:400}
.tm-scope-options button[aria-pressed=true]{background:var(--color-leaf);border-color:var(--color-accent);box-shadow:inset 0 0 0 1px var(--color-accent)}
.tm-listing-preview{border:1px solid var(--color-line);border-radius:12px;padding:20px;margin:24px 0}
.tm-listing-preview>summary{font-weight:600;cursor:pointer;line-height:1.6}
.tm-agent-model{display:grid;gap:4px;padding:10px 12px;background:#fff;border:1px solid #e2d7f0;border-radius:8px;margin:14px 0;font-size:12px}
.tm-agent-model>span{color:var(--color-muted)}.tm-agent-model strong{font-size:14px;color:#563a78}
.tm-source-settings{background:var(--color-leaf);border:1px solid #c9ddbf;border-radius:12px;padding:18px;margin:20px 0}
.tm-source-settings p{font-size:13px;margin:8px 0;line-height:1.6}
@media(max-width:700px){.tm-scope-options{grid-template-columns:1fr}.tm-scope-options button{padding:14px}}
.tm-scope-options button[data-type=Department][aria-pressed=true]{background:var(--color-sky);border-color:#477c94;box-shadow:inset 0 0 0 1px #477c94}
.tm-scope-options button[data-type=Agent][aria-pressed=true]{background:var(--color-lilac);border-color:#80649f;box-shadow:inset 0 0 0 1px #80649f}
/* Publishing: quiet form chrome and a visibly nested operating model. */
.tm-publish{max-width:1240px;margin:auto}
.tm-publish>button{border:0;background:transparent;padding-left:0;color:var(--color-muted)}
.tm-publish-heading{margin:22px 0 28px}
.tm-publish-heading h2{font-size:30px;letter-spacing:-.9px;line-height:1.2;margin:0 0 10px}
.tm-publish-heading p{color:var(--color-muted);margin:0;font-size:14px}
.tm-publish-source{padding:22px 24px;background:#f7f9f7;border:1px solid var(--color-line);border-radius:14px;margin-bottom:30px}
.tm-source-selectors{display:grid;grid-template-columns:1fr 1fr;gap:20px;max-width:740px}
.tm-publish label{display:block;font-size:13px;font-weight:600;color:var(--color-ink)}
.tm-publish input:not([type=checkbox]),.tm-publish textarea,.tm-publish select,.tm-publish .select-trigger{width:100%;box-sizing:border-box;background:#fff;border:1px solid #cddbd4;border-radius:9px;padding:12px 14px;font:inherit;font-size:14px;font-weight:400;color:var(--color-ink);transition:border-color .15s,box-shadow .15s;min-height:46px}
.tm-publish input:not([type=checkbox]),.tm-publish textarea,.tm-publish .styled-select{margin-top:8px}
.tm-publish .styled-select{display:block;width:100%}
.tm-publish .styled-select select{margin:0}
.tm-publish input:focus,.tm-publish textarea:focus,.tm-publish .select-trigger:focus-visible{outline:0;border-color:var(--color-accent);box-shadow:0 0 0 3px #246b5514}
.tm-publish input::placeholder,.tm-publish textarea::placeholder{color:#7b8a83;font-size:13px}
.tm-publish textarea{resize:vertical;line-height:1.6;min-height:96px}
.tm-publish-source .tm-scope-options{max-width:740px;margin:18px 0 0;gap:8px;grid-template-columns:repeat(3,minmax(0,1fr))}
.tm-publish-source .tm-scope-options button{padding:12px 14px;border-radius:8px;align-items:center;justify-content:center;text-align:center;min-height:46px;white-space:normal;font-size:13px;box-shadow:none}
.tm-publish-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:28px;align-items:start}
.tm-preview-heading{display:flex;gap:12px;justify-content:space-between;align-items:center;margin:0 0 16px}
.tm-preview-heading h3{margin:0;font-size:18px}.tm-preview-heading>span{font-size:12px;color:var(--color-muted)}
.tm-publish-listing{border:1px solid var(--color-line);border-radius:14px;padding:24px;background:#fff;position:sticky;top:24px;box-shadow:0 4px 18px #172e2905}
.tm-publish-listing>h3{font-size:18px;margin:0 0 24px}
.tm-publish-listing>label{margin:0 0 20px}
.tm-publish .tm-price-field{max-width:180px;margin-bottom:12px}
.tm-price-input{position:relative;margin-top:8px;max-width:180px}
.tm-price-input>span{position:absolute;left:14px;top:13px;font-size:15px;font-weight:500;z-index:1}
.tm-publish .tm-price-input input{padding-left:31px;margin:0;width:100%}
.tm-price-field small{display:block;margin-top:7px;color:var(--color-muted);font-size:12px;font-weight:400}
.tm-payment-note,.tm-listing-note{font-size:12px;color:var(--color-muted);line-height:1.6;margin:12px 0 20px}
.tm-publish .tm-check{display:flex;align-items:flex-start;gap:9px;font-size:12px;font-weight:400;line-height:1.6;border-top:1px solid var(--color-line);padding-top:20px;margin-top:22px}
.tm-save-listing{width:100%;margin-top:2px;min-height:44px}
.tm-listing-note{margin:14px 0 0}
.tm-hierarchy{display:grid;gap:16px}
.tm-tree-company{display:block;border:1px solid #cbddc7;background:#fbfcfa;border-radius:14px;overflow:hidden}
.tm-tree-company-header{padding:20px 22px;background:#eaf2e5;display:flex;align-items:center;gap:12px}
.tm-tree-symbol{width:34px;height:34px;flex:0 0 34px;background:#fff;border:1px solid #d0dfc9;border-radius:9px;display:grid;place-items:center;font-size:21px;color:#385f3a}
.tm-tree-kind{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:#4d694f;font-weight:650}
.tm-tree-company-header h3{font-size:19px;letter-spacing:-.4px;margin:3px 0 0}
.tm-tree-totals{display:flex;gap:10px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end;font-size:11px;color:#3e5c41}
.tm-tree-config{display:flex;gap:8px;flex-wrap:wrap;padding:14px 22px 0}
.tm-tree-config span{font-size:11px;padding:5px 9px;background:#fff;border:1px solid #dce6d7;border-radius:6px;color:#3d5843}
.tm-company-files{padding:14px 22px 0}
.tm-tree-departments{display:grid;gap:16px}
.tm-tree-company>.tm-tree-departments{padding:20px}
.tm-tree-department{border:1px solid #cbdfeb;border-radius:12px;background:#f5fafd;overflow:hidden;min-width:0}
.tm-tree-department-header{padding:17px 18px;display:flex;align-items:center;gap:11px}
.tm-tree-department-header .tm-tree-symbol{background:#e5f1f8;border-color:#c8dfec;color:#326079}
.tm-tree-department-header h4{font-size:16px;line-height:1.3;letter-spacing:-.2px;margin:0}
.tm-tree-department-header p{font-size:12px;color:#5b737e;line-height:1.5;margin:5px 0 0}
.tm-tree-count{margin-left:auto;white-space:nowrap;font-size:11px;color:#3b647a}
.tm-tree-department>.tm-file-list{margin:0 18px 16px}
.tm-tree-agents{display:grid;gap:12px;padding:0 16px 16px}
.tm-tree-agent{border:1px solid #dfd4eb;border-radius:10px;background:#fff;overflow:hidden;min-width:0}
.tm-tree-agent>header{background:#f6f2fb;display:flex;align-items:flex-start;gap:10px;padding:15px 16px;flex-wrap:wrap}
.tm-tree-avatar{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:9px;background:#e9def6;color:#60437f;font-size:13px;font-weight:650}
.tm-tree-identity{flex:1;min-width:120px}
.tm-tree-identity h5{font-size:14px;margin:0 0 4px;line-height:1.4}
.tm-tree-identity p{font-size:12px;color:#6b5d78;line-height:1.55;margin:0;max-width:460px}
.tm-tree-model{display:inline-flex;gap:6px;align-items:center;max-width:100%;font-size:11px;color:#583b75;background:#fff;border:1px solid #e0d3ed;padding:6px 8px;border-radius:6px;white-space:normal;line-height:1.4}
.tm-tree-model img{object-fit:contain;flex-shrink:0}
.tm-tree-agent>.tm-file-list{padding:5px 14px 8px}
.tm-tree-company>.tm-tree-agent{margin:0 20px 20px}
.tm-file-list{display:grid;gap:0;min-width:0}
.tm-file-list .tm-file-row{display:flex;align-items:center;text-align:left;gap:10px;background:transparent;border:0;border-radius:6px;padding:11px 5px;color:var(--color-ink);width:100%;min-width:0;font-size:12px;font-weight:500;line-height:1.45;box-shadow:none}
.tm-file-row:hover{background:#edf2ee}.tm-file-row:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}
.tm-file-row>span:nth-child(2){overflow-wrap:anywhere;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.tm-file-symbol{flex:0 0 24px;width:24px;height:27px;border:1px solid #d5dfd9;background:#fff;border-radius:5px;display:grid;place-items:center;color:#61776c;font-size:13px}
.tm-file-open{margin-left:auto;color:#73857c;opacity:0}.tm-file-row:hover .tm-file-open,.tm-file-row:focus-visible .tm-file-open{opacity:1}
.tm-file-dialog{width:min(840px,calc(100vw - 40px));max-height:85vh;border:1px solid var(--color-line);border-radius:14px;padding:0;color:var(--color-ink);box-shadow:0 20px 70px #172e2930}
.tm-file-dialog::backdrop{background:#142b254a}
.tm-file-dialog header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:18px 24px;border-bottom:1px solid var(--color-line);position:sticky;top:0;background:#fff}
.tm-file-dialog h2{font-size:16px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere;margin:0}
.tm-file-dialog header button{font-size:22px;min-width:36px;padding:3px}
.tm-file-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;font-family:var(--font-ui);line-height:1.8;font-size:14px;padding:24px;margin:0}
.tm-publish-dependencies{padding:24px 2px 0}
.tm-publish-dependencies>h3{font-size:17px;margin:0 0 8px}
.tm-workspace .tm-vault-heading{margin-top:42px;padding-top:0}
.tm-publish-dependencies .tm-requirement{padding:16px 0}
.tm-publish-dependencies .tm-requirement p{font-size:13px;line-height:1.6}
.tm-publish-dependencies .tm-requirement small{font-size:12px;color:var(--color-muted)}
@media(min-width:1450px){.tm-publish-layout{grid-template-columns:minmax(0,1fr) 360px;gap:36px}}
@media(max-width:1100px){.tm-publish-layout{grid-template-columns:minmax(0,1fr) 300px;gap:20px}.tm-publish-listing{padding:20px}.tm-tree-company-header{padding:18px}.tm-tree-company>.tm-tree-departments{padding:14px}.tm-tree-department-header{flex-wrap:wrap}.tm-tree-count{margin-left:45px}.tm-tree-agent>header{gap:9px}.tm-tree-model{margin-left:40px}}
@media(max-width:900px){.tm-publish-layout{grid-template-columns:1fr}.tm-publish-listing{position:static}.tm-source-selectors{grid-template-columns:1fr 1fr}.tm-publish-listing>label{max-width:100%}.tm-tree-count{margin-left:auto}.tm-tree-model{margin-left:0}}
@media(max-width:580px){.tm-publish-source{padding:16px}.tm-source-selectors{grid-template-columns:1fr}.tm-publish-heading h2{font-size:26px}.tm-tree-company-header{padding:16px;flex-wrap:wrap}.tm-tree-totals{width:100%;justify-content:flex-start;margin-left:46px}.tm-company-files{padding:8px 12px 0}.tm-tree-company>.tm-tree-departments{padding:12px}.tm-tree-department-header{padding:14px 12px}.tm-tree-department>.tm-file-list{margin:0 12px 12px}.tm-tree-agents{padding:0 10px 10px}.tm-tree-agent>header{padding:13px 12px}.tm-tree-model{margin-left:40px}.tm-preview-heading{align-items:flex-start}.tm-preview-heading>span{font-size:11px;text-align:right}.tm-publish-source .tm-scope-options button{padding:10px 5px;font-size:12px}}

.tm-scope-content{display:grid;gap:22px;padding:0 18px 18px}
.tm-company-files{padding:0}.tm-company-files>.tm-scope-content{padding:20px 22px 8px}
.tm-tree-agent>.tm-scope-content{padding:18px 16px}
.tm-content-group{min-width:0}
.tm-content-group>h6{font-size:11px;font-weight:650;letter-spacing:.65px;text-transform:uppercase;color:#466255;margin:0 0 8px;line-height:1.5}
.tm-tree-department>.tm-scope-content>.tm-content-group>h6{color:#42677a}
.tm-tree-agent>.tm-scope-content>.tm-content-group>h6{color:#705886}
.tm-content-group .tm-file-row{padding-top:8px;padding-bottom:8px}
.tm-definition{padding:13px 14px;background:#fff;border:1px solid #dbe4df;border-radius:8px;margin-top:8px}
.tm-definition h5{font-size:13px;font-weight:600;line-height:1.55;margin:0;color:var(--color-ink)}
.tm-definition p{font-size:12px;line-height:1.65;color:var(--color-muted);margin:6px 0 0}
.tm-definition small{display:block;font-size:11px;line-height:1.6;color:var(--color-muted);margin-top:8px}
.tm-goal-definition{border-left:3px solid #a3bba0}
.tm-goal-target{display:block;font-size:11px;color:#365e47;font-weight:600;margin-top:9px}
@media(max-width:580px){.tm-company-files>.tm-scope-content{padding:16px 12px 6px}.tm-scope-content{padding:0 12px 16px}.tm-tree-agent>.tm-scope-content{padding:14px 12px}}

.tm-definition .tm-definition-title{display:flex;gap:12px;align-items:flex-start;text-align:left;width:100%;padding:0;border:0;background:none;box-shadow:none;border-radius:3px;font-size:13px;font-weight:600;line-height:1.55;color:var(--color-ink)}
.tm-definition-title>span{margin-left:auto;font-size:12px;opacity:0;color:var(--color-muted)}
.tm-definition-title:hover{text-decoration:underline}.tm-definition-title:hover>span,.tm-definition-title:focus-visible>span{opacity:1}
.tm-definition-title:focus-visible{outline:2px solid var(--color-accent);outline-offset:4px}
.tm-definition-dialog h2{font-family:var(--font-ui)}
/* Production private capture uses the prototype hierarchy and review columns. */
#templates-workspace{min-width:0}
#templates-workspace form{margin:0;padding:0;border:0;background:transparent}
#templates-workspace button{font:inherit;font-size:14px;line-height:1.5;padding:10px 16px;min-height:40px;border:1px solid var(--color-line);border-radius:8px;background:#fff;color:var(--color-ink)}
#templates-workspace button.primary{background:var(--color-citron);border-color:var(--color-citron-line);font-weight:600}
#templates-workspace .tm-tabs button{border:0;border-radius:0;background:none;padding:12px 0;color:var(--color-muted)}
#templates-workspace .tm-tabs button[aria-current=page]{border-bottom:2px solid var(--color-accent);color:var(--color-ink)}
#templates-workspace .tm-editor-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:32px;margin-top:24px;align-items:start}
#templates-workspace .tm-editor-fields{padding:24px;border:1px solid var(--color-line);border-radius:12px}
#templates-workspace .tm-check{display:flex;align-items:start;gap:10px;font-size:14px}
#templates-workspace input[type=checkbox]{width:16px;min-height:16px;margin:4px 0 0;flex:none}
#templates-workspace textarea{width:100%;min-height:110px;border:1px solid var(--color-line);border-radius:8px;font:inherit;padding:12px}
#templates-workspace .tm-definition-field{margin:14px 0;font-size:13px;overflow-wrap:anywhere}
#templates-workspace .tm-definition-field strong{text-transform:capitalize}
#templates-workspace .tm-definition-field p{white-space:pre-wrap;line-height:1.7}
#templates-workspace .tm-plan{padding:0;list-style:none}
#templates-workspace .tm-plan li{border-bottom:1px solid var(--color-line);padding:14px 0;margin:0}
#templates-workspace .tm-plan small{display:block;color:var(--color-muted);font-size:12px;margin-top:4px}
#templates-workspace .tm-unsupported,#templates-workspace .tm-exclusions{margin:24px 0;font-size:13px;line-height:1.7}
#templates-workspace .tm-hierarchy{margin-top:24px}
#templates-workspace .tm-tree-agent header{display:flex;align-items:center;gap:12px}
#templates-workspace .tm-tree-agent h5{margin:0}
#templates-workspace .tm-tree-agent p{line-height:1.6;color:var(--color-muted);margin:6px 0}
#templates-workspace .tm-tree-agent header small{margin-left:auto;color:var(--color-muted)}
#templates-workspace .tm-tree-company-header{display:flex;justify-content:space-between;gap:12px}
#templates-workspace .tm-tabs{overflow:auto;white-space:nowrap}
#templates-workspace .tm-detail-head>div{min-width:0}
#templates-workspace .tm-flow-head h2,#templates-workspace .tm-card h3,#templates-workspace .tm-install{overflow-wrap:anywhere}
#templates-workspace .tm-flow-actions{flex-wrap:wrap}
#templates-workspace .tm-open-copy{display:inline-block;padding:12px 0;color:var(--color-accent)}
@media(max-width:700px){#templates-workspace .tm-editor-layout{grid-template-columns:minmax(0,1fr);gap:20px}#templates-workspace .tm-hero,#templates-workspace .tm-detail-head{padding:24px 16px}#templates-workspace .tm-editor-fields{padding:18px}#templates-workspace .tm-flow-head{align-items:start}#templates-workspace .tm-flow-head h2{font-size:24px}#templates-workspace .tm-tree-agent header{flex-wrap:wrap}}

#templates-workspace{scroll-margin-top:96px}

#templates-workspace>.templates-title{font-size:28px;line-height:1.2;font-weight:650;letter-spacing:-.7px;margin:0 0 36px}

#templates-workspace .tm-hero .eyebrow{font-size:12px;line-height:1.5;letter-spacing:1.1px;text-transform:uppercase;color:var(--color-muted)}
#templates-workspace .badge{display:inline-flex;border:1px solid var(--color-line);border-radius:999px;font-size:11px;padding:5px 9px;letter-spacing:.4px;text-transform:uppercase}

/* P05 detail: nested source content follows the motion study. */
.tm-scope-content{display:grid;gap:22px;padding:0 18px 18px}
.tm-company-files{padding:0}.tm-company-files>.tm-scope-content{padding:20px 22px 8px}
.tm-tree-agent>.tm-scope-content{padding:18px 16px}
.tm-content-group{min-width:0}
.tm-content-group>h6{font-size:11px;font-weight:650;letter-spacing:.65px;text-transform:uppercase;color:#466255;margin:0 0 8px;line-height:1.5}
.tm-tree-department>.tm-scope-content>.tm-content-group>h6{color:#42677a}
.tm-tree-agent>.tm-scope-content>.tm-content-group>h6{color:#705886}
.tm-content-group .tm-file-row{padding-top:8px;padding-bottom:8px}
.tm-definition{padding:13px 14px;background:#fff;border:1px solid #dbe4df;border-radius:8px;margin-top:8px}
.tm-definition h5{font-size:13px;font-weight:600;line-height:1.55;margin:0;color:var(--color-ink)}
.tm-definition p{font-size:12px;line-height:1.65;color:var(--color-muted);margin:6px 0 0}
.tm-definition small{display:block;font-size:11px;line-height:1.6;color:var(--color-muted);margin-top:8px}
.tm-goal-definition{border-left:3px solid #a3bba0}
.tm-goal-target{display:block;font-size:11px;color:#365e47;font-weight:600;margin-top:9px}

#templates-workspace .tm-filters{display:flex;gap:12px;align-items:center}
#templates-workspace .tm-filters .tm-search{min-width:0;flex:1}
#templates-workspace .tm-filters label:not(.tm-search){flex:0 0 140px}
#templates-workspace .tm-filters .styled-select{width:100%}
#templates-workspace .tm-detail-head h2{margin:0 0 18px;font-size:34px;line-height:1.2}
#templates-workspace .tm-detail-meta{font-size:13px;color:var(--color-muted);margin-top:22px}
#templates-workspace .tm-detail-head>div:last-child{flex:0 0 auto;min-width:150px}
#templates-workspace .tm-detail-columns{align-items:start}
#templates-workspace .tm-detail-columns h3{margin:24px 0 18px}
#templates-workspace .tm-detail-columns .tm-tree-company-header h3{margin:3px 0 0}
#templates-workspace .tm-tree-company-header{align-items:center;justify-content:flex-start}
#templates-workspace .tm-tree-department-header{align-items:center}
#templates-workspace .tm-tree-agent>header{align-items:flex-start}
#templates-workspace .tm-detail-columns .tm-content-group{padding:0 18px 16px;margin:0}
#templates-workspace .tm-detail-columns .tm-tree-agent>.tm-content-group{padding:14px 16px}
#templates-workspace .tm-content-group h6{font-size:11px;text-transform:uppercase;letter-spacing:.8px;margin:16px 0 10px;color:var(--color-muted)}
#templates-workspace .tm-definition>button{display:block;text-align:left;border:0;background:none;padding:0;min-height:0;font-weight:600}
#templates-workspace .tm-definition>button:hover{text-decoration:underline}
#templates-workspace [data-file-row]{display:flex;align-items:center;text-align:left;gap:10px;width:100%;min-width:0;border:0;background:none;padding:8px 5px;font-size:12px}
#templates-workspace [data-file-row]>span:last-child{overflow-wrap:anywhere;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
#templates-workspace [data-file-row]:hover{background:#edf2ee}
#templates-workspace .tm-agent-purpose{padding:8px 16px}
#templates-workspace .tm-price{font-size:26px}
#templates-workspace .tm-detail-head>div:first-child{min-width:0}
#templates-workspace .tm-detail-head h2,#templates-workspace .tm-tree-identity{overflow-wrap:anywhere}
@media(max-width:700px){#templates-workspace .tm-filters{flex-wrap:wrap}#templates-workspace .tm-filters label:not(.tm-search){flex:1 1 110px}#templates-workspace .tm-filters .tm-search{flex-basis:100%}#templates-workspace .tm-detail-head{padding:32px 0}#templates-workspace .tm-detail-head h2{font-size:28px}#templates-workspace .tm-detail-columns{grid-template-columns:minmax(0,1fr)}#templates-workspace .tm-tree-company-header{flex-wrap:wrap}}

/* P05 setup uses the same nested preview and quiet header as the motion study. */
#templates-workspace .tm-setup-flow{max-width:900px;margin:0 auto}
#templates-workspace .tm-setup-flow .tm-flow-head{align-items:center;gap:20px}
#templates-workspace .tm-setup-flow .tm-flow-head>span{font-size:15px;text-align:right;overflow-wrap:anywhere;min-width:0}
#templates-workspace .tm-setup-flow .tm-steps{margin:32px 0 40px}
#templates-workspace .tm-setup-flow form>h2{font-size:28px;line-height:1.2;letter-spacing:-.8px;margin:0 0 20px}
#templates-workspace .tm-setup-flow form>p{font-size:15px;line-height:1.65;margin:0 0 16px}
#templates-workspace .tm-setup-flow .tm-hierarchy{margin-top:16px}
#templates-workspace .tm-setup-flow .tm-tree-company-header h3{font-size:19px;margin:3px 0 0}
#templates-workspace .tm-setup-flow .tm-content-group{padding:0 18px 16px;margin:0}
#templates-workspace .tm-setup-flow .tm-tree-agent>.tm-content-group{padding:14px 16px}
#templates-workspace .tm-setup-flow .tm-tree-department-header p{font-size:12px;line-height:1.5;margin:5px 0 0}
#templates-workspace .tm-setup-flow .tm-tree-agent p{font-size:12px}
#templates-workspace .tm-setup-flow .tm-tree-company-header>div{min-width:0}
#templates-workspace .tm-setup-flow .tm-tree-company-header h3{overflow-wrap:anywhere}
@media(max-width:700px){#templates-workspace .tm-setup-flow .tm-flow-head{align-items:flex-start}#templates-workspace .tm-setup-flow .tm-flow-head>button{flex-shrink:0}#templates-workspace .tm-setup-flow form>h2{font-size:26px}#templates-workspace .tm-setup-flow .tm-steps{margin:28px 0 32px}#templates-workspace .tm-setup-flow .tm-tree-totals{margin-left:0}}

/* Reuse the shared picker treatment without Templates' generic button chrome. */
#templates-workspace .styled-select{min-width:0}
#templates-workspace button.select-trigger{position:relative;padding:10px 40px 10px 12px;min-height:42px;text-align:left;border-radius:10px;font-size:13px;font-weight:500;white-space:normal}
#templates-workspace button.select-trigger>span{min-width:0;overflow-wrap:anywhere}
#templates-workspace button.select-trigger:after{right:16px;flex:none}
#templates-workspace button.select-trigger:hover:not(:disabled){border-color:var(--color-accent);background:#f5faf7}
#templates-workspace button.select-trigger[aria-expanded=true]{border-color:var(--color-accent);box-shadow:0 0 0 3px #246b5515}
#templates-workspace button.select-option{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;margin:0;padding:9px 12px;border:0;border-radius:7px;background:#fff;color:var(--color-ink);text-align:left;font-size:13px;font-weight:400;white-space:normal}
#templates-workspace button.select-option[aria-selected=true]{background:#eff5f1;font-weight:600}
#templates-workspace button.select-option:hover,#templates-workspace button.select-option:focus-visible{background:#eff5f1}
#templates-workspace button.select-option:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}
#templates-workspace .tm-setup-flow form>label,#templates-workspace [data-template-capture]>label{display:grid;gap:8px;margin:20px 0;font-size:14px}
#templates-workspace .tm-setup-flow form>label>.styled-select,#templates-workspace [data-template-capture]>label>.styled-select{display:block;width:100%;margin:0}
#templates-workspace .tm-setup-flow form>label input{margin-top:0;box-sizing:border-box}
#templates-workspace .tm-setup-flow form>label.tm-check{display:flex;gap:10px}

/* Private capture: one decision per step, with a quiet live selection summary. */
#templates-workspace .tm-create-flow{max-width:1040px;margin:0 auto}
#templates-workspace .tm-create-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:0 0 26px;border:0}
#templates-workspace .tm-create-heading h2{font-size:28px;font-weight:600;letter-spacing:-.7px;margin:0 0 9px}
#templates-workspace .tm-create-heading p{font-size:14px;color:var(--color-muted);margin:0;line-height:1.6}
#templates-workspace .tm-create-heading>button{flex:none;font-size:13px;min-height:36px;padding:7px 12px}
.tm-create-steps{display:flex;justify-content:space-between;list-style:none;padding:0 0 24px;margin:0 0 34px;border-bottom:1px solid var(--color-line);gap:18px}
.tm-create-steps li{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--color-muted)}
.tm-create-steps li>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;border:1px solid var(--color-line);font-size:12px;flex:none}
.tm-create-steps li[aria-current=step]{color:var(--color-accent);font-weight:600}
.tm-create-steps li[aria-current=step]>span{border-color:var(--color-accent);background:var(--color-leaf)}
#templates-workspace .tm-capture-card{max-width:600px;border:1px solid var(--color-line);border-radius:18px;padding:32px;margin:0 auto;background:linear-gradient(135deg,#f6faf2 0%,#fff 70%)}
.tm-create-symbol{display:grid;place-items:center;width:46px;height:46px;flex:none;border-radius:13px;background:var(--color-leaf);color:var(--color-accent);font-size:24px}
#templates-workspace .tm-capture-card h3{font-size:22px;letter-spacing:-.4px;margin:24px 0 12px}
#templates-workspace .tm-capture-card>p{font-size:14px;color:var(--color-muted);line-height:1.75;margin:0 0 28px;max-width:490px}
#templates-workspace .tm-create-flow label:not(.tm-check){display:block;font-size:13px;font-weight:500;margin:0 0 22px}
#templates-workspace .tm-create-flow label>.styled-select{display:block;margin-top:10px;width:100%}
#templates-workspace .tm-create-flow .select-trigger{min-height:46px}
#templates-workspace .tm-create-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:26px;padding-top:22px;border-top:1px solid var(--color-line)}
#templates-workspace .tm-create-actions>button{font-size:13px;padding:9px 16px}
#templates-workspace .tm-create-footnote{text-align:center;font-size:12px;color:var(--color-muted);margin:20px auto;line-height:1.7}
.tm-create-columns{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:30px;align-items:start}
#templates-workspace .tm-create-source{display:flex;align-items:center;gap:14px;padding:20px;border:1px solid #d7e5d4;border-radius:14px;background:#f5f9f1}
.tm-create-source>div{min-width:0;flex:1}
#templates-workspace .tm-create-source small,.tm-create-summary>small,.tm-create-eyebrow{font-size:11px;letter-spacing:.6px;color:var(--color-muted);text-transform:uppercase}
#templates-workspace .tm-create-source h3{font-size:17px;line-height:1.5;margin:4px 0;overflow-wrap:anywhere}
#templates-workspace .tm-create-source p{font-size:12px;margin:0;color:var(--color-muted)}
#templates-workspace .tm-create-source>button{border:0;background:transparent;font-size:12px;padding:4px;min-height:30px}
#templates-workspace .tm-create-section-head{margin:30px 0 22px}
#templates-workspace .tm-create-section-head h3{font-size:17px;margin:0 0 8px}
#templates-workspace .tm-create-section-head p{font-size:13px;line-height:1.6;color:var(--color-muted);margin:0}
#templates-workspace .tm-create-flow .tm-content-group{margin:22px 0}
#templates-workspace .tm-create-flow .tm-content-group h4{font-size:12px;font-weight:500;color:var(--color-muted);margin:0 0 10px}
#templates-workspace .tm-create-flow .tm-export-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 12px;padding:16px;border:1px solid var(--color-line);border-radius:11px;margin:8px 0;background:#fff;align-items:center}
#templates-workspace .tm-create-flow .tm-export-item .tm-check{font-size:13px;line-height:1.6;margin:0;font-weight:500}
#templates-workspace .tm-create-flow .tm-export-item input{accent-color:var(--color-accent)}
#templates-workspace .tm-create-flow .tm-export-item>button{font-size:12px;background:none;border:0;min-height:30px;padding:4px;color:var(--color-accent);white-space:nowrap}
#templates-workspace .tm-create-flow .tm-export-item>button:hover{text-decoration:underline}
#templates-workspace .tm-create-flow .tm-export-item>small{grid-column:1/-1;font-size:11px;color:var(--color-muted);line-height:1.6;margin-left:26px}
#templates-workspace .tm-create-summary{position:sticky;top:96px;padding:22px;border:1px solid var(--color-line);border-radius:14px;background:#fafcf9;min-width:0}
#templates-workspace .tm-create-summary h3{font-size:15px;line-height:1.5;margin:0 0 20px;overflow-wrap:anywhere}
#templates-workspace .tm-create-summary>small+h3{margin-top:7px;margin-bottom:10px}
#templates-workspace .tm-create-summary h4{font-size:12px;margin:24px 0 12px}
#templates-workspace .tm-create-summary p{font-size:12px;line-height:1.75;color:var(--color-muted);margin:14px 0 0}
.tm-selection-counts{display:grid;gap:12px;padding:16px 0;border-top:1px solid var(--color-line);border-bottom:1px solid var(--color-line)}
.tm-selection-counts>div{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px}
.tm-selection-counts strong{font-weight:600}
#templates-workspace .tm-create-summary .tm-requirement{padding:10px 0;border:0;margin:0}
#templates-workspace .tm-create-summary .tm-requirement h3{font-size:12px;margin:0}
#templates-workspace .tm-create-summary .tm-requirement p{font-size:11px;margin:4px 0 0}
#templates-workspace .tm-create-summary .tm-requirement-empty{font-size:11px;margin:8px 0}
#templates-workspace .tm-create-flow .tm-create-details{padding:28px;border:1px solid var(--color-line);border-radius:16px;background:#fff}
#templates-workspace .tm-create-details h3{font-size:22px;letter-spacing:-.4px;margin:10px 0}
#templates-workspace .tm-create-details>p{font-size:13px;color:var(--color-muted);line-height:1.7;margin:0 0 28px}
#templates-workspace .tm-create-details input:not([type=checkbox]),#templates-workspace .tm-create-details textarea{display:block;box-sizing:border-box;width:100%;padding:12px 14px;font-size:14px;margin:10px 0 0;border:1px solid var(--color-line);border-radius:9px;min-height:46px}
#templates-workspace .tm-create-details textarea{min-height:130px;resize:vertical}
.tm-optional{font-size:11px;color:var(--color-muted);font-weight:400;margin-left:8px}
#templates-workspace .tm-create-details .tm-create-review{font-size:12px;line-height:1.7;font-weight:400;margin-top:26px;color:var(--color-muted)}
#templates-workspace .tm-capture-note{font-size:12px;line-height:1.7;padding:16px;border-radius:10px;background:#fcf6ea;color:#73552e}
#templates-workspace .tm-capture-note ul{margin:8px 0 0;padding-left:18px}
@media(max-width:760px){
 .tm-create-columns{grid-template-columns:minmax(0,1fr);gap:24px}
 #templates-workspace .tm-create-summary{position:static;order:-1}
 #templates-workspace .tm-create-final .tm-create-summary{order:0}
 #templates-workspace .tm-create-heading h2{font-size:24px}
 .tm-create-steps{gap:8px;margin-bottom:24px}
 .tm-create-steps li{font-size:11px;gap:6px;align-items:flex-start}
 .tm-create-steps li>span{width:23px;height:23px;font-size:10px}
 #templates-workspace .tm-capture-card{padding:22px}
 #templates-workspace .tm-capture-card h3{font-size:20px}
 #templates-workspace .tm-create-flow .tm-create-details{padding:22px}
 #templates-workspace .tm-create-source{padding:16px;flex-wrap:wrap}
 #templates-workspace .tm-create-heading p{font-size:12px}
}
.tm-file-dialog>.tm-definition-field{font-size:13px;line-height:1.75;margin:22px 0;padding:0 26px;overflow-wrap:anywhere}
.tm-file-dialog>.tm-definition-field strong{font-size:12px;font-weight:600;color:var(--color-muted)}
.tm-file-dialog>.tm-definition-field p{margin:8px 0 0;white-space:pre-wrap}
.tm-file-dialog>.tm-definition-field ol{padding-left:20px;margin:8px 0 0}
.tm-file-dialog>.tm-definition-field li{margin:5px 0}
@media(max-width:700px){.tm-file-dialog>.tm-definition-field{padding:0 20px}}
#templates-workspace .tm-create-flow{padding-bottom:100px}
@media(max-width:760px){#templates-workspace{scroll-margin-top:168px}}

.tm-file-dialog:has(.tm-definition-field) header h2{font-family:var(--font-ui)}

/* Sharing is a deliberate final choice, with portable-content review beside it. */
.tm-sharing{border:0;padding:0;margin:30px 0 22px;display:grid;gap:10px;min-width:0}
.tm-sharing legend{font-size:14px;font-weight:600;margin-bottom:12px}
.tm-sharing-option{display:flex!important;align-items:flex-start;gap:12px!important;border:1px solid var(--line,#d9e5e1);border-radius:14px;padding:17px!important;margin:0!important;cursor:pointer;background:#fff;transition:background .15s,border-color .15s}
.tm-sharing-option:hover{background:#f7faf8}
.tm-sharing-option.is-selected{background:#f3f8f1;border-color:#94b6a7}
.tm-sharing-option input{width:17px!important;height:17px;flex:0 0 17px;margin:3px 0 0!important;accent-color:#246e59}
.tm-sharing-option span{display:grid;gap:5px;line-height:1.5}
.tm-sharing-option strong{font-size:15px}
.tm-sharing-option small{font-size:13px;font-weight:400;color:var(--muted,#526b62)}
.tm-sharing-note{background:#f6f8f5;border-radius:12px;padding:18px;margin:16px 0;font-size:13px;line-height:1.6}
.tm-sharing-note p{font-size:13px!important;margin:8px 0 16px!important}
.tm-sharing-note .tm-check{align-items:flex-start!important;margin:0!important}
.tm-sharing-dialog{max-width:560px}
.tm-sharing-dialog-body{padding:24px}
.tm-detail-head>div:last-child{display:grid;gap:12px;justify-items:end}
@media(max-width:600px){.tm-sharing-option{padding:14px!important}.tm-sharing-dialog-body{padding:18px}.tm-detail-head>div:last-child{justify-items:start}}
.tm-sharing-dialog>form{border:0;border-radius:0;padding:0;margin:0;background:transparent;box-shadow:none;max-width:none}
.tm-sharing-dialog header h2{font-family:var(--font-ui);font-size:20px;line-height:1.35}
.tm-sharing-dialog header button{border:0;background:transparent;color:var(--color-ink);border-radius:8px;flex:0 0 36px}
.tm-sharing-dialog header button:hover{background:var(--color-surface,#f1f6f3)}
.tm-sharing-dialog-body{line-height:1.65}
.tm-sharing-dialog-body>p{margin:0 0 18px}
.tm-sharing-dialog .tm-create-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:24px;flex-wrap:wrap}
.tm-sharing-dialog .tm-create-actions button{font-size:14px;padding:10px 16px}
.tm-sharing-dialog .tm-check{display:flex;align-items:flex-start;gap:10px;font-weight:400;text-align:left;margin:0}
.tm-sharing-dialog .tm-check input{width:16px;height:16px;flex:0 0 16px;margin:3px 0 0;accent-color:var(--color-accent,#246e59)}
