.tpl-library,.tpl-editor{color:#203047;max-width:1500px;margin:auto}.tpl-library header,.tpl-editor header{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:24px}.tpl-library h1,.tpl-editor h1{margin:0 0 10px;font-size:30px;line-height:1.2}.tpl-library header p,.tpl-editor header p{color:#657588;font-size:14px;margin:6px 0}.tpl-eyebrow{font-size:11px!important;letter-spacing:1.5px;text-transform:uppercase;color:#28645a!important}.tpl-actions,.tpl-tabs,.tpl-placeholders{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.tpl-library button,.tpl-editor button{border:1px solid #c9d5df;border-radius:7px;padding:9px 13px;background:#fff;color:#203047;cursor:pointer;font:inherit;font-size:13px}.tpl-library button:hover,.tpl-editor button:hover{border-color:#28645a;background:#f0f7f4}.tpl-library button:disabled,.tpl-editor button:disabled{opacity:.5;cursor:wait}.tpl-library button.tpl-primary,.tpl-editor button.tpl-primary{background:#28645a;color:white;border-color:#28645a}.tpl-filter{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;padding:20px;background:white;border:1px solid #e0e6ec;border-radius:12px}.tpl-library label,.tpl-editor label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:600;color:#536579}.tpl-library input,.tpl-library select,.tpl-editor input,.tpl-editor select,.tpl-editor textarea{min-width:0;width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid #c9d5df;border-radius:6px;font:inherit;font-size:14px;background:white;color:#203047}.tpl-library input:focus,.tpl-editor input:focus,.tpl-editor textarea:focus,.tpl-editor select:focus{outline:2px solid #87c1b3;outline-offset:1px}.tpl-count{font-size:13px;color:#657588}.tpl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:16px}.tpl-card{background:white;border:1px solid #dde5ec;border-radius:12px;padding:20px;display:flex;flex-direction:column;min-height:210px}.tpl-card h2{font-size:17px;line-height:1.4;margin:18px 0 8px}.tpl-card>p{font-size:13px;color:#617183;line-height:1.6;flex:1}.tpl-card small{font-size:11px;color:#748396;margin:10px 0 18px}.tpl-meta{display:flex;justify-content:space-between;gap:12px;font-size:10px;color:#526b61}.tpl-meta span:first-child{max-width:75%}.tpl-empty{padding:28px;background:#f5f8fa;color:#718194;border:1px dashed #cbd7e0;border-radius:10px;font-size:14px}.tpl-editor-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);gap:24px}.tpl-form,.tpl-preview{min-width:0;background:white;padding:22px;border:1px solid #dce4eb;border-radius:12px}.tpl-form fieldset{border:0;padding:0;margin:0;min-width:0}.tpl-form fieldset:disabled input,.tpl-form fieldset:disabled textarea,.tpl-form fieldset:disabled select{opacity:.85;background:#f6f8fa}.tpl-two{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:18px}.tpl-form>fieldset>label{margin:18px 0}.tpl-note{font-size:11px!important;color:#738195;line-height:1.6;margin:12px 0 20px}.tpl-tabs{border-bottom:1px solid #e0e6ec;padding-bottom:10px;margin:20px 0 14px}.tpl-tabs [aria-selected=true],.tpl-tabs [aria-pressed=true]{background:#e7f2ed;color:#245b4f;border-color:#b3d2c5}.tpl-code{display:flex;height:330px;min-width:0;margin-top:8px;border:1px solid #c9d5df;border-radius:7px;background:#f9fbfd;overflow:hidden}.tpl-code>pre{margin:0;padding:12px 9px;line-height:22px;font:13px/22px ui-monospace,Consolas,monospace;color:#7c899b;background:#eff3f7;text-align:right;overflow:hidden;user-select:none;min-width:34px}.tpl-code-layer{position:relative;flex:1;min-width:0;overflow:hidden}.tpl-code-layer pre,.tpl-code-layer textarea{position:absolute;inset:0;margin:0!important;padding:12px!important;font:13px/22px ui-monospace,Consolas,monospace!important;border:0!important;border-radius:0!important;white-space:pre!important;overflow:auto;tab-size:2;word-wrap:normal!important}.tpl-code-layer pre{pointer-events:none;color:#223446;scrollbar-width:none}.tpl-code-layer textarea{background:transparent!important;color:transparent!important;caret-color:#203047;resize:none}.tpl-code-layer textarea::selection{background:#c8e5f4;color:transparent}.tpl-code-tag{color:#095ea9}.tpl-code-token{color:#9a3c7c;font-weight:600}.tpl-placeholders{font-size:11px;margin:12px 0 20px}.tpl-placeholders button{font-family:ui-monospace,Consolas,monospace;font-size:11px;padding:5px 7px}.tpl-asset-row{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;margin:20px 0}.tpl-asset-row label{flex:1;min-width:180px}.tpl-upload,.tpl-debrief{border:1px solid #e1e7ed;border-radius:8px;padding:14px;margin:18px 0}.tpl-upload summary,.tpl-debrief summary{font-size:13px;font-weight:600;cursor:pointer;margin-bottom:16px}.tpl-upload>input{margin-bottom:12px}.tpl-check{flex-direction:row!important;align-items:center;font-size:11px!important}.tpl-check input{width:16px!important}.tpl-debrief label{margin-bottom:14px}.tpl-preview{position:sticky;top:20px;align-self:start}.tpl-preview [data-preview-state]{font-size:11px;color:#718297}.tpl-frame-wrap{width:100%;overflow:auto;background:#e6ebef;border:1px solid #e1e6eb;border-radius:7px}.tpl-frame-wrap iframe{display:block;width:100%;height:560px;border:0;background:white}.tpl-frame-wrap.tpl-mobile iframe{width:375px;max-width:100%;margin:auto}.tpl-mail-subject{padding:12px;font-size:12px;background:#f0f5f8;overflow-wrap:anywhere}.tpl-preview-link{display:block;font-size:12px;margin:12px 0 20px;color:#28645a}.tpl-text-preview{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;font-size:13px;padding:18px;max-height:560px;overflow:auto;border:1px solid #e1e7ec}.tpl-error{color:#a43631;font-size:13px;white-space:pre-wrap;margin:10px 0}.tpl-error:not(:empty){background:#fff1ee;border:1px solid #f0c5bf;border-radius:8px;padding:14px}.tpl-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.tpl-preview [data-history] h3,.tpl-preview [data-test] h3{font-size:15px;margin-top:22px}.tpl-preview [data-history] button{margin:0 5px 5px 0}.tpl-preview [data-test] label{margin:12px 0}[data-template-form=test]{border-top:1px solid #e0e6ec;margin-top:22px;padding-top:10px}@media(max-width:1100px){.tpl-editor-layout{grid-template-columns:minmax(0,1fr)}.tpl-preview{position:static}}@media(max-width:640px){.tpl-library header,.tpl-editor header{flex-direction:column}.tpl-filter,.tpl-two{grid-template-columns:1fr}.tpl-library h1,.tpl-editor h1{font-size:25px}.tpl-form,.tpl-preview{padding:15px}.tpl-grid{grid-template-columns:1fr}.tpl-frame-wrap iframe{height:500px}.tpl-code{height:290px}}
.tpl-shelves{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 14px}.tpl-shelves button{border-radius:20px;padding:7px 14px;font-weight:600}.tpl-shelves button[aria-pressed=true]{background:#185b62;color:#fff;border-color:#185b62}.tpl-library{container-type:inline-size}.tpl-filter.tpl-faceted{display:grid;grid-template-columns:minmax(110px,1fr) minmax(155px,1.13fr) minmax(175px,1.26fr) minmax(105px,.77fr) minmax(120px,.92fr) minmax(108px,.78fr);align-items:end;gap:12px}.tpl-faceted label{min-width:0}.tpl-faceted select{max-width:100%;width:100%}.tpl-brandline,.tpl-result-bar,.tpl-pages{display:flex;align-items:center;gap:10px}.tpl-brandline{min-height:31px;margin:0 0 12px;font-size:13px;font-weight:700;color:#324a5b}.tpl-brandline img{width:54px;height:29px;object-fit:contain;object-position:left center}.tpl-result-bar{justify-content:space-between;flex-wrap:wrap;margin:12px 0}.tpl-pages{font-size:12px;color:#3c5666}.tpl-pages button,.tpl-brand-permission button{font:inherit;color:#1a515e;border:1px solid #c8dbde;background:white;border-radius:6px;padding:6px 10px;cursor:pointer}.tpl-pages button:disabled{opacity:.5;cursor:default}.tpl-brand-permission{width:100%;padding:12px;background:#f2f7fa;border-radius:8px;font-size:12px}.tpl-brand-permission p{margin:5px 0 9px}.cp-template[hidden]{display:none}
@container(max-width:940px){.tpl-filter.tpl-faceted{grid-template-columns:repeat(3,minmax(100px,1fr))}}@container(max-width:570px){.tpl-filter.tpl-faceted{grid-template-columns:repeat(2,minmax(95px,1fr))}.tpl-filter.tpl-faceted label:first-child{grid-column:1/-1}}

.tpl-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.tpl-card-top .tpl-brandline{margin:0;min-width:0}.tpl-library-mark{color:#60758b;font-size:13px;font-weight:650;letter-spacing:.01em}.tpl-library .tpl-favorite{width:34px;height:34px;min-width:34px;padding:7px;display:grid;place-items:center;border-color:#e1e7ed;border-radius:9px;color:#708297}.tpl-favorite svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}.tpl-library .tpl-favorite[aria-pressed=true]{color:#a7690c;background:#fff7e6;border-color:#efd7a4}.tpl-favorite[aria-pressed=true] svg{fill:#f6cf74}.tpl-quick-filters{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:14px 0 0}.tpl-library .tpl-favorite-filter{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:13px;cursor:pointer}.tpl-favorite-filter input{width:16px;height:16px;padding:0;accent-color:#087e8c}.tpl-library .tpl-filter-reset{border:0;background:none;color:#64748b;padding:4px 0;font-size:12px}.tpl-library button:focus-visible{outline:2px solid #128a96;outline-offset:3px}.tpl-empty{grid-column:1/-1}.tpl-empty p{font-size:13px;line-height:1.65;margin:7px 0 14px}

/* Rounded discovery cards: catalogue chrome only, never email/landing content. */
.modern-shell .content .tpl-library .tpl-shelves{gap:8px;margin:0 0 22px;padding:5px;width:fit-content;max-width:100%;border-radius:999px;background:#eaf0f4}
.modern-shell .content .tpl-library .tpl-shelves button{border:0;border-radius:999px;background:transparent;padding:11px 17px;min-height:41px;color:#637384;font-size:12px;box-shadow:none;transition:background .18s,color .18s,box-shadow .18s}
.modern-shell .content .tpl-library .tpl-shelves button:hover{background:#f8fbfc;color:#237c86}
.modern-shell .content .tpl-library .tpl-shelves button[aria-pressed=true]{background:#fff;color:#167b86;box-shadow:0 3px 12px #24445a0b}
.modern-shell .content .tpl-library .tpl-filter{background:#ffffffbf;border:1px solid #e7edf1;border-radius:24px;padding:22px;box-shadow:0 8px 25px #27435d03;gap:15px}
.modern-shell .content .tpl-library .tpl-filter label{font-size:12px;color:#5f7485}
.modern-shell .content .tpl-library .tpl-filter :is(input,select){background:#f7f9fb;border:1px solid #e5ebf0;border-radius:13px;min-height:42px}
.modern-shell .content .tpl-library .tpl-quick-filters{padding:4px 3px 0;margin-top:15px}
.modern-shell .content .tpl-library .tpl-favorite-filter{padding:8px 12px;border-radius:999px;background:#fff;font-size:12px;font-weight:500;box-shadow:0 2px 6px #28475b04}
.modern-shell .content .tpl-library .tpl-favorite-filter:has(input:checked){background:#fff2d7;color:#876119}
.modern-shell .content .tpl-library .tpl-result-bar{margin:15px 2px 21px;gap:12px}
.modern-shell .content .tpl-library .tpl-count{color:#637384;font-size:12px}
.modern-shell .content .tpl-library .tpl-pages button{border-radius:999px;padding:8px 13px;border-color:#e2e9ef;min-height:35px;font-size:12px}
.modern-shell .content .tpl-library .tpl-grid{gap:22px;grid-template-columns:repeat(auto-fill,minmax(275px,1fr))}
.modern-shell .content .tpl-library .tpl-discovery-card{--catalog-tint:#e8f6f2;--catalog-ink:#34776e;padding:0;min-height:0;border:1px solid #e6edf2;border-radius:24px;background:#fff;box-shadow:0 5px 20px #254b5d05;overflow:hidden;transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
.modern-shell .content .tpl-library .tpl-discovery-card:nth-child(4n+2){--catalog-tint:#f0ecfb;--catalog-ink:#756194}
.modern-shell .content .tpl-library .tpl-discovery-card:nth-child(4n+3){--catalog-tint:#fff0e5;--catalog-ink:#825d3d}
.modern-shell .content .tpl-library .tpl-discovery-card:nth-child(4n+4){--catalog-tint:#eaf3fc;--catalog-ink:#466c8f}
.modern-shell .content .tpl-library .tpl-card-top{position:relative;padding:22px 22px 20px;margin:0;min-height:101px;background:var(--catalog-tint);gap:14px}
.modern-shell .content .tpl-library .tpl-card-top::after{content:'';position:absolute;width:100px;height:100px;border:19px solid #ffffff52;border-radius:50%;right:-24px;top:-35px;pointer-events:none}
.modern-shell .content .tpl-library .tpl-brandline{position:relative;z-index:1;display:flex;align-items:center;gap:12px;margin:0;min-width:0;color:var(--catalog-ink);font-size:13px;font-weight:650;line-height:1.4}
.modern-shell .content .tpl-library .tpl-brand-logo{display:grid;place-items:center;width:60px;height:56px;flex:none;background:#fff;border:1px solid #ffffffa8;border-radius:18px;box-shadow:0 4px 12px #263f5106;padding:10px}
.modern-shell .content .tpl-library .tpl-brand-logo img{display:block;width:100%;height:100%;max-height:35px;object-fit:contain;object-position:center}
.modern-shell .content .tpl-library .tpl-library-symbol svg{width:25px;height:25px;stroke:currentColor;stroke-width:1.6}
.modern-shell .content .tpl-library .tpl-library-mark{color:var(--catalog-ink)}
.modern-shell .content .tpl-library .tpl-card-top .tpl-favorite{position:relative;z-index:1;flex:none;width:34px;height:34px;min-width:34px;padding:7px;border:0;border-radius:50%;background:#ffffffb8;color:var(--catalog-ink);box-shadow:0 2px 8px #38556a04;align-self:flex-start;transition:background .18s,transform .18s}
.modern-shell .content .tpl-library .tpl-card-top .tpl-favorite:hover:not(:disabled){background:#fff;transform:rotate(-9deg) scale(1.06)}
.modern-shell .content .tpl-library .tpl-card-top .tpl-favorite[aria-pressed=true]{background:#fff2c9;color:#a57313;box-shadow:0 2px 8px #bc852615}
.modern-shell .content .tpl-library .tpl-card-body{display:flex;flex:1;flex-direction:column;padding:22px;min-width:0}
.modern-shell .content .tpl-library .tpl-discovery-card .tpl-meta{align-items:flex-start;gap:7px;color:#65798b;font-size:10px;line-height:1.4}
.modern-shell .content .tpl-library .tpl-discovery-card .tpl-meta>span:first-child{padding:5px 8px;border-radius:999px;background:#f3f6f8;color:#5f7485;max-width:65%}
.modern-shell .content .tpl-library .tpl-discovery-card .tpl-meta>span:last-child{padding:5px 0;text-align:right;white-space:nowrap;font-size:10px}
.modern-shell .content .tpl-library .tpl-discovery-card h2{font-size:18px;line-height:1.42;letter-spacing:-.025em;margin:17px 0 10px;color:#203c53;font-weight:650;min-height:51px}
.modern-shell .content .tpl-library .tpl-card-body>p{font-size:12px;line-height:1.75;color:#65798b;margin:0 0 15px;flex:1;overflow-wrap:anywhere}
.modern-shell .content .tpl-library .tpl-card-body>small{font-size:10px;font-weight:450;color:#65798b;line-height:1.5;margin:2px 0 20px}
.modern-shell .content .tpl-library .tpl-discovery-card .tpl-actions{gap:8px;margin-top:auto;padding:0;border:0}
.modern-shell .content .tpl-library .tpl-discovery-card .tpl-actions>button{border-radius:999px;padding:9px 13px;border-color:#e4ebf0;font-size:11px;min-height:36px;font-weight:600;color:#5f7485;transition:background .18s,transform .18s}
.modern-shell .content .tpl-library .tpl-discovery-card .tpl-actions>.tpl-open{background:#168c97;border-color:#168c97;color:#fff;box-shadow:0 4px 9px #168c9712}
.modern-shell .content .tpl-library .tpl-discovery-card .tpl-actions>.tpl-open:hover{background:#117984;border-color:#117984}
.modern-shell .content .tpl-library .tpl-discovery-card .tpl-actions>[data-template-action=campaign]{flex:1 0 100%;justify-content:center;background:#f6f9fb;border-color:transparent;color:#526e82;margin-top:2px}
.modern-shell .content .tpl-library .tpl-empty{border-radius:24px;background:#ffffffb8;border-color:#dce7ed;padding:42px 28px}
@media(hover:hover){.modern-shell .content .tpl-library .tpl-discovery-card:hover{transform:translateY(-5px);border-color:#cae0e5;box-shadow:0 14px 32px #285b6d0b}}
@media(max-width:640px){.modern-shell .content .tpl-library .tpl-shelves{border-radius:22px;width:100%;padding:5px;gap:4px}.modern-shell .content .tpl-library .tpl-shelves button{padding:9px 12px;font-size:11px}.modern-shell .content .tpl-library .tpl-filter{padding:18px;gap:12px;border-radius:22px}.modern-shell .content .tpl-library .tpl-grid{grid-template-columns:1fr}.modern-shell .content .tpl-library .tpl-card-top{min-height:94px}.modern-shell .content .tpl-library .tpl-discovery-card h2{min-height:0}.modern-shell .content .tpl-library .tpl-card-body>p{font-size:13px}.modern-shell .content .tpl-library .tpl-card-top,.modern-shell .content .tpl-library .tpl-card-body{padding:20px}}
@media(prefers-reduced-motion:reduce){.modern-shell .content .tpl-library :is(.tpl-discovery-card,.tpl-favorite,.tpl-shelves button,.tpl-actions button){transition:none;transform:none!important}}

/* Catalogue/editor actions share the rounded product controls. */
.modern-shell .content :is(.tpl-library,.tpl-editor)>header button,
.modern-shell .content .tpl-editor :is(.tpl-actions,.tpl-tabs,.tpl-preview)>button,
.modern-shell .content .tpl-editor .tpl-preview :is([data-history],[data-test]) button{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:40px;padding:10px 17px;border:1px solid #dde8ed;border-radius:999px;
  background:#fff;color:#536f81;box-shadow:0 3px 9px #244c6005;font-size:12px;font-weight:600;
  transition:background .18s,border-color .18s,box-shadow .18s;
}
.modern-shell .content :is(.tpl-library,.tpl-editor)>header button:hover:not(:disabled),
.modern-shell .content .tpl-editor :is(.tpl-actions,.tpl-tabs,.tpl-preview)>button:hover:not(:disabled){background:#eef7f8;border-color:#c9e0e5;color:#247582}
.modern-shell .content :is(.tpl-library,.tpl-editor) button.tpl-primary{background:#168c97;border-color:#168c97;color:#fff;border-radius:999px;min-height:41px;padding:10px 18px;box-shadow:0 5px 12px #168c9717;font-weight:650}
.modern-shell .content :is(.tpl-library,.tpl-editor) button.tpl-primary:hover:not(:disabled){background:#117984;border-color:#117984;box-shadow:0 6px 15px #168c9720;color:#fff}
.modern-shell .content .tpl-editor .tpl-tabs button[aria-selected=true],
.modern-shell .content .tpl-editor .tpl-tabs button[aria-pressed=true]{background:#e9f5f4;border-color:#cee5e4;color:#207d83}
.modern-shell .content .tpl-library .tpl-discovery-card .tpl-meta{font-size:11px;color:#5f7485}
.modern-shell .content .tpl-library .tpl-discovery-card .tpl-meta>span:last-child{font-size:10.5px;color:#5f7485}
.modern-shell .content .tpl-library .tpl-card-body>small{font-size:11px;color:#5f7485}
.modern-shell .content :is(.tpl-library,.tpl-editor) button:disabled{opacity:.5;box-shadow:none;cursor:not-allowed}
.modern-shell .content :is(.tpl-library,.tpl-editor) button:focus-visible{outline:3px solid #42a6b4;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.modern-shell .content :is(.tpl-library,.tpl-editor) button{transition:none}}
