@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root{
  --tpl-bg:#090d15;
  --tpl-surface:#101722;
  --tpl-surface-2:#131c29;
  --tpl-surface-3:#182334;
  --tpl-line:#243246;
  --tpl-line-soft:#1b2737;
  --tpl-text:#edf5ff;
  --tpl-muted:#8fa2ba;
  --tpl-blue:#66c5ff;
  --tpl-blue-strong:#168fd5;
  --tpl-pink:#e995d0;
  --tpl-green:#78d9b5;
  --tpl-warning:#f1c67b;
  --tpl-danger:#ef8d99;
  --tpl-shadow:0 22px 70px rgba(0,0,0,.32);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;background:var(--tpl-bg)}
body.template-public{margin:0;min-height:100vh;background:
  radial-gradient(circle at 88% 2%,rgba(39,171,212,.13),transparent 30rem),
  radial-gradient(circle at 12% 32%,rgba(215,117,190,.07),transparent 26rem),
  var(--tpl-bg);color:var(--tpl-text);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.template-public a{color:inherit;text-decoration:none}
.template-public button,.template-public input,.template-public select,.template-public textarea{font:inherit}
.tpl-container{width:min(1280px,calc(100% - 48px));margin-inline:auto}
.tpl-header{position:sticky;top:0;z-index:50;border-bottom:1px solid rgba(125,156,196,.14);background:rgba(9,13,21,.9);backdrop-filter:blur(18px)}
.tpl-header-inner{min-height:76px;display:flex;align-items:center;gap:28px}
.tpl-brand{display:flex;align-items:center;flex:0 0 auto}
.tpl-brand img{width:108px;height:46px;object-fit:contain}
.tpl-nav{display:flex;align-items:center;gap:7px;min-width:0}
.tpl-nav a{padding:10px 12px;border-radius:9px;color:#9fb0c5;font-size:13px;font-weight:600;transition:.16s}
.tpl-nav a:hover,.tpl-nav a.active{background:#151e2b;color:#f3f7ff}
.tpl-header-actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.tpl-language{height:38px;border:1px solid var(--tpl-line);border-radius:9px;background:#101722;color:#c9d6e7;padding:0 9px}
.tpl-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:42px;padding:10px 16px;border:1px solid var(--tpl-line);border-radius:10px;background:#141d2a;color:#d9e6f7;font-weight:700;font-size:13px;cursor:pointer;transition:transform .15s,border-color .15s,background .15s}
.tpl-button:hover{transform:translateY(-1px);border-color:#426184;background:#182436}
.tpl-button.primary{background:linear-gradient(135deg,#128fda,#19a6d0);border-color:#2db6ee;color:white;box-shadow:0 10px 30px rgba(16,143,218,.18)}
.tpl-button.primary:hover{background:linear-gradient(135deg,#1aa0ea,#25b4dd)}
.tpl-button.danger{background:rgba(239,141,153,.09);border-color:rgba(239,141,153,.36);color:#ffb2bb}
.tpl-button.ghost{background:transparent}
.tpl-button.small{min-height:36px;padding:8px 12px;font-size:12px}
.tpl-button[disabled]{opacity:.45;cursor:not-allowed;transform:none}
.tpl-hero{padding:76px 0 42px;border-bottom:1px solid rgba(125,156,196,.11)}
.tpl-eyebrow{margin:0 0 13px;color:var(--tpl-blue);font:600 11px/1.4 "JetBrains Mono",monospace;letter-spacing:.16em;text-transform:uppercase}
.tpl-hero h1,.tpl-detail-title{margin:0;font-size:clamp(40px,5vw,66px);line-height:1.02;letter-spacing:-.055em}
.tpl-hero-copy{max-width:810px}
.tpl-hero-copy>p:not(.tpl-eyebrow){margin:18px 0 0;max-width:700px;color:#9eb0c7;font-size:16px;line-height:1.75}
.tpl-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:26px}
.tpl-search-panel{margin-top:44px;display:grid;gap:16px}
.tpl-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:11px;max-width:860px}
.tpl-search{position:relative}
.tpl-search i{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:#71849d}
.tpl-search input{width:100%;height:54px;padding:0 18px 0 45px;border:1px solid var(--tpl-line);border-radius:12px;background:#101722;color:white;outline:none}
.tpl-search input:focus{border-color:#3b86b6;box-shadow:0 0 0 3px rgba(52,149,210,.09)}
.tpl-filter-row{display:flex;align-items:flex-start;gap:14px}
.tpl-filter-label{flex:0 0 72px;padding-top:9px;color:#70849e;font:600 10px/1.4 "JetBrains Mono",monospace;letter-spacing:.15em;text-transform:uppercase}
.tpl-chips{display:flex;gap:8px;flex-wrap:wrap}
.tpl-chip{border:1px solid var(--tpl-line);border-radius:999px;background:#0e151f;color:#a8b8ca;padding:8px 12px;font-size:12px;cursor:pointer}
.tpl-chip:hover,.tpl-chip.active{border-color:#247fb7;background:rgba(32,153,216,.09);color:#70cfff}
.tpl-chip small{margin-left:5px;color:#657890}
.tpl-main{padding:42px 0 80px}
.tpl-section{margin-top:46px}
.tpl-section:first-child{margin-top:0}
.tpl-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}
.tpl-section-head h2{margin:0;font-size:21px;letter-spacing:-.025em}
.tpl-section-head p{margin:4px 0 0;color:#73869f;font-size:12px}
.tpl-section-kicker{color:var(--tpl-blue);font:600 10px "JetBrains Mono",monospace;letter-spacing:.14em;text-transform:uppercase}
.tpl-featured-grid{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:16px}
.tpl-card{position:relative;display:flex;flex-direction:column;min-width:0;border:1px solid var(--tpl-line);border-radius:16px;background:linear-gradient(155deg,#111925,#0e151f);overflow:hidden;transition:transform .16s,border-color .16s,box-shadow .16s}
.tpl-card:hover{transform:translateY(-3px);border-color:#395371;box-shadow:0 18px 50px rgba(0,0,0,.22)}
.tpl-card.featured:first-child{min-height:284px}
.tpl-card-link{display:flex;flex-direction:column;height:100%;padding:22px}
.tpl-card-top{display:flex;align-items:flex-start;gap:13px}
.tpl-card-icon{width:46px;height:46px;display:grid;place-items:center;flex:0 0 auto;border:1px solid #2d3b50;border-radius:13px;background:#172235;color:#7fd1ff;font-size:18px}
.tpl-card.featured:first-child .tpl-card-icon{width:56px;height:56px;font-size:21px}
.tpl-card-title{min-width:0}
.tpl-card-title h3{margin:2px 0 4px;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tpl-card.featured:first-child .tpl-card-title h3{font-size:24px}
.tpl-card-title span{color:#768ba5;font-size:11px}
.tpl-verified{margin-left:auto;color:#44bafa;font-size:13px}
.tpl-description{margin:17px 0 16px;color:#9badc3;font-size:13px;line-height:1.65;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.tpl-card.featured:first-child .tpl-description{font-size:14px;max-width:610px}
.tpl-tags{display:flex;flex-wrap:wrap;gap:7px;margin-top:auto}
.tpl-tag{padding:6px 9px;border-radius:7px;background:#141f2f;color:#8fa7c2;font-size:10px}
.tpl-card-meta{display:flex;align-items:center;gap:14px;margin-top:19px;padding-top:16px;border-top:1px solid var(--tpl-line-soft);color:#7f92a9;font:500 10px "JetBrains Mono",monospace}
.tpl-card-meta span:last-child{margin-left:auto}
.tpl-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.tpl-empty{display:none;padding:65px 24px;border:1px dashed #2a394e;border-radius:16px;text-align:center;color:#7588a1}
.tpl-pagination{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:28px}
.tpl-page{min-width:40px;height:40px;border:1px solid var(--tpl-line);border-radius:9px;background:#101722;color:#a7b8ca;font-weight:700;cursor:pointer}
.tpl-page.active{background:#17283b;color:#77ccff;border-color:#3489b8}
.tpl-page.ellipsis{display:grid;place-items:center;border:0;background:transparent;cursor:default}
.tpl-footer{border-top:1px solid rgba(125,156,196,.13);padding:28px 0;background:#080c13}
.tpl-footer-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;color:#73869f;font-size:11px}
.tpl-footer-inner img{width:92px;height:38px;object-fit:contain}

.tpl-breadcrumb{display:flex;gap:9px;align-items:center;padding:34px 0 12px;color:#7488a1;font-size:12px}
.tpl-breadcrumb a:hover{color:var(--tpl-blue)}
.tpl-detail-hero{padding:26px 0 34px;border-bottom:1px solid rgba(125,156,196,.11)}
.tpl-detail-head{display:flex;gap:20px;align-items:flex-start}
.tpl-detail-icon{display:grid;place-items:center;width:76px;height:76px;flex:0 0 auto;border:1px solid #304157;border-radius:19px;background:#121c2a;color:#ff5f76;font-size:30px}
.tpl-detail-title{font-size:clamp(36px,4vw,54px)}
.tpl-author{display:flex;align-items:center;gap:8px;margin-top:10px;color:#8599b2;font-size:12px}
.tpl-author .verified{color:#3bbafd}
.tpl-detail-description{max-width:820px;margin:18px 0 0;color:#a5b5c9;font-size:15px;line-height:1.75}
.tpl-detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;padding:34px 0 80px}
.tpl-content-card,.tpl-side-card{border:1px solid var(--tpl-line);border-radius:16px;background:#101722}
.tpl-content-card{overflow:hidden}
.tpl-content-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid var(--tpl-line)}
.tpl-content-head h2{margin:0;font-size:17px}
.tpl-content-head span{color:#70849d;font-size:11px}
.tpl-structure{display:grid;grid-template-columns:1fr 1fr;min-height:520px}
.tpl-structure-column{min-width:0;padding:20px}
.tpl-structure-column+.tpl-structure-column{border-left:1px solid var(--tpl-line)}
.tpl-column-label{margin:0 0 16px;color:#7f94ad;font:600 10px "JetBrains Mono",monospace;letter-spacing:.12em}
.tpl-category{margin:18px 0 8px;color:#8da4bf;font:600 10px "JetBrains Mono",monospace;letter-spacing:.1em;text-transform:uppercase}
.tpl-channel{display:flex;gap:9px;align-items:flex-start;padding:7px 0;color:#9fb3ca;font-size:12px}
.tpl-channel i{width:14px;color:#627b96;text-align:center;margin-top:2px}
.tpl-channel-copy{min-width:0}
.tpl-channel-copy strong{display:block;color:#a9bdd3;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tpl-channel-copy small{display:block;margin-top:3px;color:#62778f;line-height:1.45}
.tpl-role{display:flex;align-items:center;gap:9px;padding:8px 0;color:#a9bdd3;font-size:12px}
.tpl-role-dot{width:10px;height:10px;border-radius:50%;border:1px solid rgba(255,255,255,.18);background:var(--role-color,#73859b);flex:0 0 auto}
.tpl-role span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tpl-role small{margin-left:auto;color:#61758d;font-size:9px}
.tpl-sticky{position:sticky;top:100px;align-self:start;display:grid;gap:14px}
.tpl-side-card{padding:20px}
.tpl-use-button{width:100%;min-height:54px;font-size:14px}
.tpl-side-note{margin:11px 0 0;color:#72869e;font-size:10px;line-height:1.55;text-align:center}
.tpl-stat-list{display:grid;gap:0;margin:0}
.tpl-stat-list div{display:flex;justify-content:space-between;gap:14px;padding:15px 0;border-bottom:1px solid var(--tpl-line-soft)}
.tpl-stat-list div:last-child{border-bottom:0;padding-bottom:0}
.tpl-stat-list dt{color:#7f92a9;font-size:12px}
.tpl-stat-list dd{margin:0;color:#d9e4f2;font:600 11px "JetBrains Mono",monospace;text-align:right}
.tpl-warning{margin-top:16px;padding:13px 14px;border:1px solid rgba(241,198,123,.27);border-radius:11px;background:rgba(241,198,123,.06);color:#c8af85;font-size:11px;line-height:1.6}
.tpl-dialog{width:min(620px,calc(100% - 30px));border:1px solid #35455c;border-radius:18px;background:#101722;color:white;padding:0;box-shadow:var(--tpl-shadow)}
.tpl-dialog::backdrop{background:rgba(2,6,12,.76);backdrop-filter:blur(4px)}
.tpl-dialog-body{padding:24px}
.tpl-dialog h3{margin:0;font-size:20px}
.tpl-dialog p{color:#8fa2ba;font-size:12px;line-height:1.7}
.tpl-form{display:grid;gap:12px;margin-top:18px}
.tpl-field{display:grid;gap:6px}
.tpl-field label{color:#8ea1b9;font-size:11px;font-weight:600}
.tpl-field input,.tpl-field textarea,.tpl-field select{width:100%;border:1px solid var(--tpl-line);border-radius:10px;background:#0d141e;color:white;padding:11px 12px;outline:none}
.tpl-field input:focus,.tpl-field textarea:focus,.tpl-field select:focus{border-color:#3f8cba}
.tpl-dialog-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:20px}
.tpl-result{margin-top:14px;padding:12px;border-radius:10px;background:#0d141e;color:#93a8c1;font-size:11px}
.tpl-result.error{border:1px solid rgba(239,141,153,.35);color:#ffadb8}
.tpl-result.success{border:1px solid rgba(120,217,181,.35);color:#a4e8d0}
.tpl-confirm-line{display:flex;align-items:flex-start;gap:10px;margin-top:16px;color:#a7b8cb;font-size:12px}
.tpl-confirm-line input{margin-top:3px}
.tpl-progress{height:8px;border-radius:999px;background:#0a1018;overflow:hidden;margin-top:16px}
.tpl-progress>span{display:block;height:100%;width:0;background:linear-gradient(90deg,#1b98dc,#65d5f2);transition:width .2s}
.tpl-mobile-menu{display:none}

@media(max-width:1000px){
  .tpl-featured-grid{grid-template-columns:1fr 1fr}.tpl-card.featured:first-child{grid-column:1/-1;min-height:0}
  .tpl-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tpl-detail-layout{grid-template-columns:1fr}.tpl-sticky{position:static;grid-row:1}
}
@media(max-width:780px){
  .tpl-container{width:min(100% - 30px,1280px)}
  .tpl-header-inner{min-height:68px;gap:12px}.tpl-brand img{width:88px}
  .tpl-nav{display:none}.tpl-header-actions .tpl-language{display:none}
  .tpl-mobile-menu{display:block;position:relative}
  .tpl-mobile-menu summary{list-style:none;width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--tpl-line);border-radius:9px;background:#111925;cursor:pointer}
  .tpl-mobile-menu summary::-webkit-details-marker{display:none}
  .tpl-mobile-menu nav{position:absolute;right:0;top:48px;width:240px;padding:8px;border:1px solid var(--tpl-line);border-radius:12px;background:#101722;box-shadow:var(--tpl-shadow)}
  .tpl-mobile-menu nav a{display:block;padding:11px 12px;border-radius:8px;color:#aebed0;font-size:12px}.tpl-mobile-menu nav a:hover{background:#172334}
  .tpl-hero{padding-top:52px}.tpl-search-row{grid-template-columns:1fr}.tpl-search-row .tpl-button{width:100%}
  .tpl-filter-row{display:grid;gap:7px}.tpl-filter-label{padding-top:0}
  .tpl-featured-grid,.tpl-grid{grid-template-columns:1fr}
  .tpl-card.featured:first-child{grid-column:auto}
  .tpl-detail-head{gap:14px}.tpl-detail-icon{width:58px;height:58px;border-radius:15px;font-size:22px}
  .tpl-structure{grid-template-columns:1fr}.tpl-structure-column+.tpl-structure-column{border-left:0;border-top:1px solid var(--tpl-line)}
}
@media(max-width:520px){
  .tpl-header-actions>.tpl-button{padding:8px 10px;font-size:11px}
  .tpl-hero h1{font-size:40px}.tpl-hero-copy>p:not(.tpl-eyebrow){font-size:14px}
  .tpl-card-link{padding:18px}.tpl-card-meta{gap:8px;font-size:9px}
  .tpl-footer-inner{align-items:flex-start;flex-direction:column}
  .tpl-detail-hero{padding-top:14px}.tpl-detail-head{align-items:center}.tpl-detail-description{font-size:13px}
}