/*
 * codepeek.dev — simplified, GitHub-like skin.
 *
 * Loaded after every other public stylesheet (includes/header.php). It only
 * re-tunes the shared tokens and flattens the shell: neutral greys, solid 1px
 * borders, 6px radii, no glows or gradients, a full-width header bar. Page
 * layouts stay in their own files; the brand colour still comes from admin
 * (--site-primary) and is kept for primary actions and links only.
 */
:root{
  --cp-bg:#0d1117;
  --cp-bg-soft:#0d1117;
  --cp-surface:#151b23;
  --cp-surface-2:#1c2128;
  --cp-surface-3:#262c36;
  --cp-line:#262c36;
  --cp-line-strong:#3d444d;
  --cp-highlight:0 0 0 transparent;
  --cp-text:#f0f6fc;
  --cp-text-2:#d1d9e0;
  --cp-muted:#9198a1;
  --cp-subtle:#7d8590;
  --cp-accent-glow:transparent;
  --cp-radius-sm:6px;
  --cp-radius:6px;
  --cp-radius-lg:12px;
  --cp-shadow:0 8px 24px rgba(1,4,9,.6);
  --cp-header-h:64px;
  --gh-header:#010409;
  --gh-btn:#212830;
  --gh-btn-hover:#262c36;
}

/* ---------- Base: flat canvas ---------- */
html{background:var(--cp-bg)!important}
::selection{color:var(--cp-text);background:color-mix(in srgb,var(--cp-accent) 35%,transparent)}
*{scrollbar-color:#3d444d transparent}

/* ---------- Buttons ---------- */
.site-btn{min-height:32px;padding:0 12px;border-radius:6px;font:500 14px/1 var(--cp-font);letter-spacing:0;transition:background-color .12s,border-color .12s}
.site-btn:active{transform:none}
.site-btn--primary,.site-btn--primary:hover{box-shadow:inset 0 0 0 1px rgba(240,246,252,.1)}
.site-btn--primary:hover{filter:brightness(1.06)}
.site-btn--ghost{background:var(--gh-btn);box-shadow:inset 0 0 0 1px var(--cp-line-strong)}
.site-btn--ghost:hover{background:var(--gh-btn-hover)}
.site-icon-btn{width:32px;height:32px;border-radius:6px;box-shadow:inset 0 0 0 1px var(--cp-line-strong)}
.site-icon-btn:hover,details[open]>.site-icon-btn{background:var(--gh-btn-hover)}
.site-icon-btn svg{width:16px;height:16px}
.site-icon-btn>b{top:-4px;right:-4px;border-color:var(--gh-header)}

/* ---------- Header: full-width bar, content on the page box ---------- */
.site-header{padding:0 var(--cp-gutter);border-bottom:1px solid var(--cp-line-strong);background:var(--gh-header);pointer-events:auto}
.site-header__inner{height:var(--cp-header-h);padding:0;border-radius:0;box-shadow:none!important}
.site-header__inner::before{display:none}
.site-header.nav--scrolled .site-header__inner{box-shadow:none}
.site-brand__mark{width:32px;height:32px;border-radius:50%;box-shadow:none}
.site-brand__name{font:600 16px/1 var(--cp-font-display);letter-spacing:-.01em}
.site-nav__link{height:32px;padding:0 8px;border-radius:6px;color:var(--cp-text);font:600 14px/1 var(--cp-font)}
.site-nav__link:hover{background:var(--gh-btn-hover)}
.site-nav__link[aria-current=page],.site-nav__link[aria-expanded=true]{background:var(--gh-btn-hover)}
.site-search{height:32px;border-radius:6px;background:var(--cp-bg);box-shadow:inset 0 0 0 1px var(--cp-line-strong)}
.site-search:focus-within{background:var(--cp-bg);box-shadow:inset 0 0 0 1px var(--cp-accent),0 0 0 1px var(--cp-accent)}
.site-search kbd{border-radius:4px;background:transparent;box-shadow:inset 0 0 0 1px var(--cp-line-strong)}
.site-header .notification-menu>summary,.site-header .account-menu>summary{min-width:32px;height:32px;border-radius:6px;box-shadow:inset 0 0 0 1px var(--cp-line-strong)}
.site-header .notification-menu>summary{width:32px}
.site-header .account-menu>summary{box-shadow:none}
.site-header .notification-menu>summary:hover,.site-header .account-menu>summary:hover,.site-header details[open]>summary{background:var(--gh-btn-hover)}
.site-account-trigger{height:32px;border-radius:6px}
.site-account-trigger img,.site-account-trigger .avatar-initial{width:24px;height:24px;border-radius:50%}

/* Overlays share GitHub's popover shape */
.site-dropdown__panel,.site-search__suggestions,.hp-search__suggestions,.catalog-search__suggestions{border-radius:12px;background:var(--cp-surface)!important;box-shadow:0 0 0 1px var(--cp-line-strong),var(--cp-shadow)!important;animation:none}
.site-dropdown__panel{top:calc(100% + 8px)}
.site-dropdown__item,.site-search__suggestions a,.hp-search__suggestions a,.catalog-search__suggestions a,.notification-menu__dropdown>a{border-radius:6px}
.site-dropdown__item:hover,.site-dropdown__item:focus-visible,.notification-menu__dropdown>a:hover{background:var(--gh-btn-hover)}
.notification-menu__dropdown>a.is-unread::before{box-shadow:none}

@media (max-width:900px){
  .site-header{padding:0 var(--cp-gutter)}
  .site-header__inner{height:var(--cp-header-h);padding:0;border-radius:0}
  .site-nav{top:calc(var(--cp-header-h) + 8px);border-radius:12px;background:var(--cp-surface)!important;box-shadow:0 0 0 1px var(--cp-line-strong),var(--cp-shadow)!important}
  .site-nav__link{height:40px;font-size:15px}
  body.site-nav-open::after{-webkit-backdrop-filter:none;backdrop-filter:none}
  .site-dropdown__panel{top:calc(var(--cp-header-h) + 8px)}
}

/* ---------- Footer: quiet, one line of links ---------- */
.site-footer{margin-top:clamp(56px,8vw,96px);border-top:1px solid var(--cp-line-strong);background:var(--cp-bg)}
.site-footer::before,.site-footer__wordmark{display:none}
.site-footer__inner{padding:40px 0 28px}
.site-footer__col h4{color:var(--cp-text);font:600 14px/1 var(--cp-font);letter-spacing:0;text-transform:none}
.site-footer__col a{color:var(--cp-muted)}
.site-footer__col a:hover{color:var(--cp-text);text-decoration:underline}
.site-footer__bottom{border-top-color:var(--cp-line)}

/* ---------- Shared overlays and modals ---------- */
.scroll-top,.toast,.cookie-banner{border-radius:12px!important;background:var(--cp-surface)!important;box-shadow:0 0 0 1px var(--cp-line-strong),var(--cp-shadow)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
.category-picker-modal__dialog,.login-modal__dialog,.confirmation-modal section,.community-modal section,.creator-level-modal__dialog{border-radius:12px!important;background:var(--cp-surface)!important;box-shadow:0 0 0 1px var(--cp-line-strong),var(--cp-shadow)!important}
.category-picker-card{border-radius:6px!important;background:var(--cp-bg)!important;box-shadow:inset 0 0 0 1px var(--cp-line-strong)!important}
.category-picker-card:hover,.category-picker-card:focus-visible{background:var(--cp-surface-2)!important;transform:none}

/* Sign-in: smaller radii, no glow, no illustration motion */
.login-modal.auth2-modal{background:rgba(1,4,9,.7);-webkit-backdrop-filter:none;backdrop-filter:none}
.login-modal.auth2-modal .auth2-dialog,.auth2-card{border-color:var(--cp-line-strong)!important;border-radius:12px!important;background:var(--cp-surface)!important;box-shadow:var(--cp-shadow)}
.auth2-art{border-color:var(--cp-line-strong);background:var(--cp-bg)}
.auth2-provider,.auth2-field__control,.auth2-submit,.auth2-identity,.auth2-error{border-radius:6px}
.auth2-provider{min-height:44px;background:var(--gh-btn)}
.auth2-provider:hover,.auth2-submit:hover{transform:none}
.auth2-kicker{border-radius:2em;font-family:var(--cp-font);letter-spacing:0;text-transform:none}
.auth2-field__control{min-height:44px;background:var(--cp-bg)}
.auth2-submit{min-height:44px}

/* Creator level chip: GitHub "Label" style */
.creator-badge{border-radius:2em!important;box-shadow:none!important}

/* Reveal-on-scroll hides content until JS runs; show it straight away. */
.cp-reveal{opacity:1;transform:none;transition:none}

/* ---------- Home ---------- */
.hp-hero__orb,.hp-hero__grid,.hp-cta__glow{display:none}
.hp-hero h1{color:var(--cp-text);background:none;-webkit-background-clip:border-box;background-clip:border-box;letter-spacing:-.03em}
.hp-pill{border-radius:2em;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}
.hp-stats{border-radius:6px;background:var(--cp-surface);box-shadow:inset 0 0 0 1px var(--cp-line-strong)}
.hp-card,.hp-category{border-radius:6px;background:var(--cp-surface);box-shadow:inset 0 0 0 1px var(--cp-line-strong);transform:none!important}
.hp-card:hover,.hp-category:hover{box-shadow:inset 0 0 0 1px var(--cp-muted)}
/* Articles stay frameless: cover on top, plain text below. */
.hp-article__visual{border-radius:6px;background:var(--cp-surface);box-shadow:inset 0 0 0 1px var(--cp-line-strong)}
.hp-article:hover .hp-article__visual{box-shadow:inset 0 0 0 1px var(--cp-muted)}
.hp-article:hover .hp-article__visual img{transform:none}
.hp-article small{font-family:var(--cp-font)}
.hp-card__preview{border-radius:4px}
.hp-cta{border-radius:6px;background:var(--cp-surface);box-shadow:inset 0 0 0 1px var(--cp-line-strong)}

/* ---------- Browse / categories / tags ---------- */
body.browse-page{background:var(--cp-bg)!important}
body.browse-page .catalog-head h1{color:var(--cp-text);background:none;-webkit-background-clip:border-box;background-clip:border-box;font-size:clamp(1.75rem,3.2vw,2.5rem);letter-spacing:-.02em}
body.browse-page .catalog-head__kicker{color:var(--cp-muted);font-family:var(--cp-font);letter-spacing:0;text-transform:none}
body.browse-page .catalog-head__count{border-color:var(--cp-line-strong);border-radius:2em;color:var(--cp-text-2);background:var(--cp-surface-2);font-family:var(--cp-font)}
body.browse-page .catalog-cats__item{height:32px;padding:0 12px;border-radius:6px;background:var(--gh-btn);font-size:14px}
body.browse-page .catalog-cats__item:hover{transform:none;background:var(--gh-btn-hover)}
body.browse-page .catalog-cats__item small{border-radius:2em}
body.browse-page .catalog-toolbar{border-radius:6px;background:var(--cp-surface)!important;-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none}
/* Cards are just the preview: no frame, and title, maker, votes and controls
   fade in over it on hover or keyboard focus. */
body.browse-page .component-card{padding:0;border:0;border-radius:6px;background:transparent;box-shadow:none}
body.browse-page .component-card:hover{transform:none;border:0;box-shadow:none}
body.browse-page .component-card__preview{border-radius:6px}
body.browse-page .component-card__cat{display:none}
body.browse-page .component-card .get-code{border-radius:6px;box-shadow:none}
body.browse-page .catalog-pagination a{border-radius:6px}
body.browse-page .component-card__info{position:absolute;z-index:4;top:0;right:0;left:0;padding:12px 12px 28px;border-radius:6px 6px 0 0;background:linear-gradient(rgba(1,4,9,.82),rgba(1,4,9,.5) 60%,transparent);opacity:0;transform:translateY(-4px);transition:opacity .15s ease,transform .15s ease;pointer-events:none}
body.browse-page .component-card:hover .component-card__info,body.browse-page .component-card:focus-within .component-card__info{opacity:1;transform:none;pointer-events:auto}
body.browse-page .component-card__title{color:#fff}
body.browse-page .component-card__author{color:rgba(255,255,255,.78)}
body.browse-page .component-card__author:hover{color:#fff}
body.browse-page .component-card__votes{border-color:rgba(255,255,255,.22);border-radius:6px;color:#fff;background:rgba(1,4,9,.4)}
@media (prefers-reduced-motion:reduce){body.browse-page .component-card__info{transition:none;transform:none}}

/* ---------- Element page ---------- */
body.component-page main.cp2{--cp2-radius:6px;background:var(--cp-bg)!important}
body.component-page .cp2 h1.cp2-title{color:var(--cp-text);background:none;-webkit-background-clip:border-box;background-clip:border-box}
body.component-page .cp2 .cp2-stage .workbench{border-radius:6px!important;box-shadow:0 0 0 1px var(--cp-line-strong)!important}
.cp2 .cp2-bar{border-radius:6px;background:var(--cp-surface)!important;-webkit-backdrop-filter:none;backdrop-filter:none}
body.component-page .cp2 :is(.cp2-card,.license-card,.hashtag-card,.discussion){border-color:var(--cp-line-strong)!important;border-radius:6px!important;background:var(--cp-surface)!important;box-shadow:none!important}
body.component-page .cp2 :is(.framework-export__trigger,.favorite-button,.component-report>summary,.component-report-login,.cp2-author [data-follow]),
body.component-page .cd-head [data-follow],body.component-page .hashtag-card a{border-radius:6px!important}
body.component-page .cp2 .cp2-about .component-attribution,body.component-page .cd-head .component-attribution,body.component-page .cd-head .framework-menu{border-radius:6px!important}
body.component-page .export-dialog{border-radius:12px;background:var(--cp-surface);box-shadow:var(--cp-shadow)}
body.component-page .export-modal__backdrop{background:rgba(1,4,9,.7);-webkit-backdrop-filter:none;backdrop-filter:none}
body.component-page .export-dialog>header>button{border-radius:6px}
body.component-page .export-languages button{border-radius:6px}
body.component-page .export-code{background:var(--cp-bg)}
body.component-page .export-code__bar button{border-radius:6px}
@media (max-width:767.98px){
  body.component-page .export-dialog{border-radius:12px 12px 0 0}
  body.component-page .export-languages button{border-radius:2em}
}

/* ---------- Publish wizard ---------- */
body.submit-v2-page{background:var(--cp-bg)!important}
.sub2-btn{border-radius:6px}
.sub2-btn--block,.sub2-chip,.sub2-step,.sub2-stepper__btn,.sub2-field input,.sub2-field textarea,.sub2-choice,.sub2-check,.sub2-alert,.sub2-draft:not([hidden]),.sub2 .creator-donation-note,.sub2-gate__icon{border-radius:6px}
.sub2-gate,.sub2-panel,.sub2-summary,.sub2-review__canvas,.sub2-review__facts,.sub2 .tag-suggestions:not([hidden]){border-radius:6px;background:var(--cp-surface);box-shadow:none}
.sub2-panel,.sub2-summary{border-color:var(--cp-line-strong)}
.sub2-panel--editor .workbench{border-radius:6px!important}
.sub2-tech__option,.sub2-tag,.sub2 .tag-suggestions button{border-radius:2em}
.sub2-progress span{background:var(--cp-accent)}
.sub2-actions{background:var(--cp-bg);-webkit-backdrop-filter:none;backdrop-filter:none}
@media (max-width:767.98px){.sub2-panel,.sub2-summary{border-radius:6px}}

/* ---------- Blog ---------- */
.blog-hero{background:none!important}
.blog-hero h1,.article-header h1{color:var(--cp-text);background:none;-webkit-background-clip:border-box;background-clip:border-box}
.blog-categories a{border-radius:6px}
.blog-card__visual{border-radius:6px;background:var(--cp-surface)!important;box-shadow:inset 0 0 0 1px var(--cp-line-strong)}
.blog-card__visual>span{text-shadow:none}
.article-cover img{border-radius:6px}
.article-content .article-toc,.article-shell>.article-toc,.article-toc__toggle{border-radius:6px;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}

/* ---------- Kickers: quiet section labels instead of neon mono caps ---------- */
html body :is(.cp-kicker,.hp-kicker,.catalog-head__kicker,.cp2 .cp2-eyebrow,.sub2-kicker,.sub2-summary__kicker,.cd-crumbs,.cp2 .cp2-crumbs,.blog-hero>span,.article-header>span):not(#_){color:var(--cp-muted)!important;font-family:var(--cp-font)!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important}
.cp2 .cp2-crumbs a,.cd-crumbs a{color:var(--cp-accent)}

/* Generic panels from app-pages.css */
.panel{border-radius:6px!important}

/* ---------- 404 and sign-in illustration ---------- */
.not-found{background:var(--cp-bg)!important}
.not-found__grid{display:none}
.not-found__card{border-color:var(--cp-line-strong);border-radius:6px;background:var(--cp-surface);box-shadow:none}
.not-found__symbol{border-radius:6px;background:var(--cp-surface-2);box-shadow:none}
.auth2-art__glow{display:none}
.auth2-art *{animation:none!important}

/* ---------- Light mode (admin: Website appearance → Allow light mode) ----------
   GitHub light palette. Hard-coded colours in the page stylesheets are remapped
   by the generated light/*.css companions (tools/build-light-theme.py). */
html[data-theme="light"]{
  color-scheme:light;
  --cp-bg:#ffffff;
  --cp-bg-soft:#f6f8fa;
  --cp-surface:#ffffff;
  --cp-surface-2:#f6f8fa;
  --cp-surface-3:#eff2f5;
  --cp-line:#d1d9e0b3;
  --cp-line-strong:#d1d9e0;
  --cp-text:#1f2328;
  --cp-text-2:#25292e;
  --cp-muted:#59636e;
  --cp-subtle:#818b98;
  --cp-shadow:0 8px 24px rgba(140,149,159,.2);
  --gh-header:#f6f8fa;
  --gh-btn:#f6f8fa;
  --gh-btn-hover:#eff2f5;
}
html[data-theme="light"] *{scrollbar-color:#d1d9e0 transparent}
html[data-theme="light"] .site-icon-btn>b{border-color:var(--gh-header)}

/* Theme switch: show the icon of the theme you would switch to. */
.site-theme-toggle__sun{display:block}
.site-theme-toggle__moon{display:none}
html[data-theme="light"] .site-theme-toggle__sun{display:none}
html[data-theme="light"] .site-theme-toggle__moon{display:block}

/* ---------- Modals: one GitHub-style dialog for every overlay ---------- */
:is(.login-modal__backdrop,.community-modal__backdrop,.confirmation-modal__backdrop,.category-picker-modal__backdrop,.avatar-modal__backdrop,.copy-donation-modal__backdrop,.component-donation-modal__backdrop,.creator-level-modal__backdrop){background:rgba(1,4,9,.6)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
:is(.creator-level-modal,.avatar-modal){-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
:is(.login-modal__dialog,.community-modal>section,.confirmation-modal>section,.creator-level-modal__dialog,.category-picker-modal__dialog,.avatar-modal__dialog,.copy-donation-modal__dialog,.component-donation-modal__dialog){border:1px solid var(--cp-line-strong)!important;border-radius:12px!important;background:var(--cp-surface)!important;box-shadow:var(--cp-shadow)!important}
:is(.login-modal__dialog,.category-picker-modal__grid a)::after,.category-picker-modal__grid a::before{display:none!important}
/* Section labels inside dialogs */
:is(.community-modal small,.confirmation-modal small,.creator-level-modal__current small,.copy-donation-modal__dialog small,.component-donation-modal__dialog small,.avatar-modal__label,.category-picker-modal__dialog>p,.login-modal__dialog>span){color:var(--cp-muted)!important;font-family:var(--cp-font)!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important}
:is(.community-modal,.confirmation-modal,.creator-level-modal,.category-picker-modal,.copy-donation-modal,.component-donation-modal,.avatar-modal) :is(h2,h3){letter-spacing:-.01em!important}
/* Icons, close buttons and tiles */
:is(.confirmation-modal__icon,.community-modal__icon,.creator-level-modal__current-icon,.login-modal__mark,.category-picker-modal__grid i){border:1px solid var(--cp-line-strong)!important;border-radius:6px!important;background:var(--cp-surface-2)!important;box-shadow:none!important}
:is(.login-modal__close,.community-modal__close,.creator-level-modal__close,.category-picker-modal__close,.avatar-modal__close,.copy-donation-modal__close){border-radius:6px!important;box-shadow:none!important}
:is(.category-picker-modal__grid a,.creator-level-modal__next,.creator-level-modal__current,.creator-level-modal__rules,.login-modal__benefits li){border:1px solid var(--cp-line-strong)!important;border-radius:6px!important;background:var(--cp-surface-2)!important;box-shadow:none!important;transform:none!important}
.category-picker-modal__grid a:hover{border-color:var(--cp-muted)!important}
/* Form controls and buttons */
:is(.community-modal,.confirmation-modal,.copy-donation-modal,.component-donation-modal,.login-modal) :is(select,textarea,input:not([type=checkbox]):not([type=radio])){border:1px solid var(--cp-line-strong)!important;border-radius:6px!important;background:var(--cp-bg)!important;color:var(--cp-text)!important;box-shadow:none!important}
:is(.community-modal,.confirmation-modal,.copy-donation-modal,.component-donation-modal,.login-modal) :is(select,textarea,input):focus{border-color:var(--cp-accent)!important;outline:0;box-shadow:0 0 0 1px var(--cp-accent)!important}
:is(.confirmation-modal__actions button,.community-modal__submit,.copy-donation-modal__link,.copy-donation-modal__skip,.copy-donation-modal__secondary,.login-modal__providers a,.cookie-banner__actions button,.component-donation-modal__options a){border-radius:6px!important;box-shadow:none!important;transform:none!important}
.confirmation-modal__cancel,.copy-donation-modal__skip{border:1px solid var(--cp-line-strong)!important;background:var(--gh-btn)!important;color:var(--cp-text)!important}
/* The donation prompt inside the code panel is inline, not a floating dialog. */
.code-panel>.copy-donation-modal .copy-donation-modal__dialog{border:0!important;border-radius:0!important;box-shadow:none!important}
/* Toasts */
.toast,.detail-toast{border:1px solid var(--cp-line-strong)!important;border-radius:6px!important;background:var(--cp-surface)!important;box-shadow:var(--cp-shadow)!important}
.toast::before,.toast__progress{box-shadow:none!important}

/* Remaining small caps labels across pages: plain, muted, sentence case. */
html body :is(.hp-stats dt,.preview-zoom__label,.preview-zoom>output,.preview-color>span,.preview-theme-toggle__label,.discussion__head span,.component-author-byline small,.license-card>small,.hashtag-card>small,.app-eyebrow,.sub2-review__fact>dt,.not-found__eyebrow,.component-community>article>small):not(#_){color:var(--cp-muted)!important;font-family:var(--cp-font)!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important}
.hp-pill__tag{border-radius:2em!important;font-family:var(--cp-font)!important;letter-spacing:0!important;text-transform:none!important}

/* Buttons everywhere share the 6px GitHub shape (legacy .btn and element actions were pills). */
html body :is(.btn,.vote-button,.favorite-button,.figma-copy,.canva-import,.svg-export,.prompt-copy,.framework-export__trigger,.component-report>summary,.component-report-login,.sort-select__trigger,.not-found .btn,.cp2 .cp2-bar button,.cp2 .cp2-bar a):not(#_){border-radius:6px!important;box-shadow:none!important}
:is(.btn,.vote-button,.favorite-button,.figma-copy,.svg-export,.framework-export__trigger):hover{transform:none!important}
body.component-page .export-dialog>header span{color:var(--cp-muted);font-family:var(--cp-font);font-weight:600;letter-spacing:0;text-transform:none}

/* Light mode: avatars and level chips sit on saturated colours, so their text stays dark-on-colour or white-on-colour on purpose. */
html[data-theme="light"]{--cp-subtle:#6e7781}
html[data-theme="light"] :is(.component-card__avatar,.avatar-initial,.comment-avatar,.author-card__avatar){color:#fff!important}
html[data-theme="light"] main.pf .pf-level__num{color:#1f2328!important}

/* Narrow phones: the theme switch moves from the header bar into the menu drawer. */
.site-nav__theme svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.site-nav .site-nav__theme{display:none}
@media (max-width:520px){.site-actions .site-theme-toggle{display:none}.site-nav .site-nav__theme{display:inline-flex}}

/* ---------- Header v2: same canvas, controls and tabs as the pages ----------
   The bar shares the page background (no separate black strip). Nav links work
   like the underline tabs used on profiles and the element page, and every
   control uses the same bordered button as the rest of the site. */
.site-header{background:var(--cp-bg);border-bottom:1px solid var(--cp-line-strong)}
.site-header__inner{gap:16px}
.site-brand__mark{border-radius:6px}
.site-nav{align-self:stretch;gap:4px}
.site-nav__link{position:relative;height:auto;align-self:stretch;padding:0 10px;border-radius:0;color:var(--cp-muted);background:none!important;font:500 14px/1 var(--cp-font)}
.site-nav__link:hover{color:var(--cp-text)}
.site-nav__link::after{position:absolute;right:6px;bottom:-1px;left:6px;height:2px;border-radius:2px;content:"";background:transparent}
.site-nav__link:hover::after{background:var(--cp-line-strong)}
.site-nav__link[aria-current=page],.site-nav__link[aria-expanded=true]{color:var(--cp-text);font-weight:600}
.site-nav__link[aria-current=page]::after,.site-nav__link[aria-expanded=true]::after{background:var(--cp-accent)}
.site-icon-btn,.site-header .notification-menu>summary,.site-header .account-menu>summary{border:0;background:var(--gh-btn);box-shadow:inset 0 0 0 1px var(--cp-line-strong)}
.site-icon-btn:hover,details[open]>.site-icon-btn,.site-header .notification-menu>summary:hover,.site-header .account-menu>summary:hover,.site-header details[open]>summary{background:var(--gh-btn-hover)}
.site-header .account-menu>summary{padding:0 8px 0 4px}
.site-search{background:var(--cp-surface)}
@media (max-width:900px){
  .site-nav{align-self:auto}
  .site-nav__link{align-self:auto;height:40px;padding:0 12px;border-radius:6px;color:var(--cp-text)}
  .site-nav__link::after{display:none}
  .site-nav__link:hover,.site-nav__link[aria-current=page]{background:var(--gh-btn-hover)!important}
}
.site-header .account-menu>summary,.site-header .site-account-trigger{height:32px!important;min-height:32px}
html body .hp-pill__tag:not(#_){border-radius:2em;font-family:var(--cp-font);font-weight:600;letter-spacing:0;text-transform:none}

/* "Copy prompt" on the element page: same control as Figma/SVG. */
body.component-page .prompt-copy{display:inline-flex;align-items:center;gap:7px;min-height:32px;padding:0 12px;border:1px solid var(--cp-line-strong);border-radius:6px;color:var(--cp-text);background:var(--gh-btn);font:500 13px/1 var(--cp-font);white-space:nowrap;cursor:pointer}
body.component-page .prompt-copy:hover{background:var(--gh-btn-hover)}
body.component-page .prompt-copy svg{width:16px;height:16px;fill:none;stroke:var(--cp-accent);stroke-width:1.8;stroke-linejoin:round}
body.component-page .prompt-copy.copied{border-color:var(--cp-accent)}
.component-actions .prompt-copy{order:3}
@media (max-width:900px){.component-actions .prompt-copy{order:2}}
/* Element action bar: every control is a 32px GitHub button. */
html body.component-page .cp2 .cp2-bar :is(.vote-button,.prompt-copy,.figma-copy,.canva-import,.svg-export,.framework-export__trigger,.favorite-button,.component-report>summary,.component-report-login):not(#_){height:32px!important;min-height:32px!important;padding:0 12px!important;border:1px solid var(--cp-line-strong)!important;background:var(--gh-btn)!important;color:var(--cp-text)!important;font:500 13px/1 var(--cp-font)!important}
html body.component-page .cp2 .cp2-bar :is(.vote-button,.prompt-copy,.figma-copy,.canva-import,.svg-export,.framework-export__trigger,.favorite-button,.component-report>summary):not(#_):hover{background:var(--gh-btn-hover)!important}
html body.component-page .cp2 .cp2-bar .vote-button[aria-pressed=true]:not(#_){border-color:var(--cp-accent)!important;color:var(--cp-accent-ink)!important;background:var(--cp-accent)!important}
/* Header controls: one 32px size. On narrow screens the account button only
   shows the avatar, so it becomes a 32px square like its neighbours. */
html body .site-header :is(.site-account-trigger img,.site-account-trigger .avatar-initial):not(#_){width:22px!important;height:22px!important;min-width:0;border-radius:50%!important;font-size:10px!important}
@media (max-width:900px){
  html body .site-header .account-menu>summary:not(#_){width:32px!important;min-width:32px!important;height:32px!important;padding:0!important;justify-content:center}
}
@media (max-width:520px){html body .site-header .site-actions__publish:not(#_){width:32px;min-width:32px;padding:0}}
/* Avatar initials are an <i>: make it a real 22px circle whatever the initials. */
html body .site-header .site-account-trigger .avatar-initial:not(#_){display:inline-grid!important;flex:none;place-items:center;overflow:hidden;padding:0!important;line-height:1!important;font:700 9px/1 var(--cp-font)!important;letter-spacing:0!important}
/* Unread badge sits on the bell's corner, outlined with the page colour. */
html body .site-header .site-icon-btn>b:not(#_){top:-6px;right:-6px;min-width:18px;height:18px;padding:0 5px;border:2px solid var(--cp-bg);font:700 10px/1 var(--cp-font)}

/* ---------- Comments: same surfaces, borders and fields as the rest ---------- */
html body :is(.comment-box,.comment,.comment-list,.comment-thread,.comment--reply,.comment-login-gate,.discussion__notice,.comment-moderation-notice,.comment-reply-box,.comment-edit-box):not(#_){border-color:var(--cp-line-strong)!important;border-radius:6px;background:var(--cp-surface)!important;box-shadow:none!important}
html body :is(.comment-thread,.comment--reply):not(#_){background:var(--cp-bg)!important}
html body :is(.comment-box textarea,.comment-reply-box textarea,.comment-edit-box textarea):not(#_){border:1px solid var(--cp-line-strong)!important;border-radius:6px;background:var(--cp-bg)!important;color:var(--cp-text)!important}
html body :is(.comment-box textarea,.comment-reply-box textarea,.comment-edit-box textarea):focus:not(#_){border-color:var(--cp-accent)!important;outline:0;box-shadow:0 0 0 1px var(--cp-accent)!important}
html body :is(.comment-code,.comment p code):not(#_){border-color:var(--cp-line-strong)!important;background:var(--cp-bg)!important}
html body .comment-code figcaption:not(#_){background:var(--cp-surface-2)!important}
html body .comment-login-gate__lock:not(#_){border-color:var(--cp-line-strong)!important;border-radius:6px;background:var(--cp-surface-2)!important}
html body .comment-mention-suggestions:not(#_){border-color:var(--cp-line-strong)!important;border-radius:6px;background:var(--cp-surface)!important;box-shadow:var(--cp-shadow)!important}
html body .comment-mention-suggestions button:is(:hover,:focus-visible):not(#_){background:var(--gh-btn-hover)!important}
html body .comment-box .comment-submit:not(#_){border-radius:6px;box-shadow:none!important}

/* ---------- One type scale for titles (GitHub-like) ----------
   Page titles 24px, section titles 18px, dialog titles 18px, card titles
   14–16px. The home hero keeps a larger, but tamer, headline. */
html body :is(.catalog-head h1,.sub2 h1,.sub2-head h1,.cp2 h1.cp2-title,.blog-hero h1,.article-header h1,main.static-page h1,.app-shell h1,.auth2-body h1,.not-found h1,.pf h1):not(#_){font-size:24px!important;line-height:1.25!important;letter-spacing:-.01em!important}
html body :is(.hp-section__head h2,.sub2-panel__head h2,.discussion__head h2,.cp2-card h2,.license-card strong,.pf-section>header h2,main.static-page h2,.app-shell h2,.auth2-body h2):not(#_){font-size:18px!important;line-height:1.3!important;letter-spacing:0!important}
html body .hp-hero h1:not(#_){font-size:clamp(32px,4.6vw,48px)!important;line-height:1.1!important}
html body :is(.login-modal__dialog,.community-modal>section,.confirmation-modal>section,.creator-level-modal__dialog,.category-picker-modal__dialog,.avatar-modal__dialog,.copy-donation-modal__dialog,.component-donation-modal__dialog,.export-dialog>header,.auth2-dialog) :is(h2,h3):not(#_){font-size:18px!important;line-height:1.3!important;letter-spacing:0!important}
html body .auth2-dialog .auth2-body h2:not(#_){font-size:20px!important}
html body :is(#homePublishTitle,.hp-cta h2):not(#_){font-size:clamp(24px,3vw,32px)!important;line-height:1.2!important;letter-spacing:-.01em!important}
html body :is(.blog-empty h2,.guest-access-gate h1):not(#_){font-size:18px!important}

/* Export and AI prompt menus share one popover style. */
html body .component-actions .framework-menu:not(#_){padding:6px;border:1px solid var(--cp-line-strong);border-radius:12px;background:var(--cp-surface);box-shadow:var(--cp-shadow)}
html body .component-actions .framework-menu button:not(#_){gap:10px;padding:8px 10px;border-radius:6px;color:var(--cp-text)}
html body .component-actions .framework-menu button:hover:not(#_),html body .component-actions .framework-menu button:focus-visible:not(#_){background:var(--gh-btn-hover)}
html body .component-actions .framework-menu strong:not(#_){font:600 13px/1.3 var(--cp-font)}
html body .component-actions .framework-menu small:not(#_){color:var(--cp-muted);font:400 12px/1.35 var(--cp-font)}
html body .component-actions .framework-menu svg:not(#_){flex:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.component-actions .prompt-export{order:3}
.component-actions .prompt-export .framework-menu{right:auto;left:0;width:280px}
.prompt-copy i{margin-left:2px;font-style:normal;font-size:14px;line-height:1;transition:transform .16s ease}
.prompt-copy[aria-expanded=true] i{transform:rotate(180deg)}
@media (max-width:900px){.component-actions .prompt-export{order:2}.component-actions .prompt-export .framework-menu{width:min(280px,calc(100vw - 32px))}}
@media (max-width:620px){
  html body .component-actions .prompt-export:not(#_){grid-column:1/-1!important;flex:0 0 100%!important;width:100%}
  html body .component-actions .prompt-export .prompt-copy:not(#_){width:100%;justify-content:center}
  html body .component-actions .prompt-export .framework-menu:not(#_){right:0;left:0;width:auto;max-width:none}
}

/* Share button: same control as Save / Report. */
html body.component-page .cp2-secondary .share-button:not(#_){display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border:1px solid var(--cp-line-strong);border-radius:6px;color:var(--cp-text);background:var(--gh-btn);font:500 13px/1 var(--cp-font);cursor:pointer}
html body.component-page .cp2-secondary .share-button:hover:not(#_){background:var(--gh-btn-hover)}
html body.component-page .cp2-secondary .share-button svg:not(#_){width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Save to GitHub dialog (component.php #githubModal). */
.github-modal:not([hidden]){position:fixed;z-index:2000;inset:0;display:grid;place-items:center;padding:16px}
.github-modal__backdrop{position:absolute;inset:0;border:0;background:rgba(1,4,9,.6);cursor:default}
.github-modal__dialog{position:relative;display:grid;gap:14px;width:min(100%,480px);padding:20px;border:1px solid var(--cp-line-strong);border-radius:12px;background:var(--cp-surface);box-shadow:var(--cp-shadow);color:var(--cp-text)}
.github-modal__dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.github-modal__dialog h2{margin:0;font:600 18px/1.3 var(--cp-font)!important}
.github-modal__dialog>p{margin:0;color:var(--cp-muted);font:400 14px/1.5 var(--cp-font)}
.github-modal__dialog>p strong{color:var(--cp-text)}
.github-modal__close{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid var(--cp-line-strong);border-radius:6px;color:var(--cp-text);background:var(--gh-btn);font-size:20px;line-height:1;cursor:pointer}
.github-modal__form{display:grid;gap:12px}
.github-modal__form label{display:grid;gap:6px;min-width:0}
.github-modal__form label>span{font:600 14px/1.3 var(--cp-font)}
.github-modal__form label em{color:var(--cp-muted);font-style:normal;font-weight:400}
.github-modal__form small{color:var(--cp-muted);font-size:12px}
.github-modal__form input{height:36px;padding:0 10px;border:1px solid var(--cp-line-strong);border-radius:6px;color:var(--cp-text);background:var(--cp-bg);font:400 14px/1 var(--cp-font)}
.github-modal__form input:focus{border-color:var(--cp-accent);outline:0;box-shadow:0 0 0 1px var(--cp-accent)}
.github-modal__row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.github-modal__file{margin:0;color:var(--cp-muted);font-size:13px;overflow-wrap:anywhere}
.github-modal__file code{color:var(--cp-text);font-family:var(--cp-font-mono)}
.github-modal__form footer{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}
.github-modal__form footer button{height:32px;padding:0 14px;border-radius:6px;font:600 14px/1 var(--cp-font);cursor:pointer}
.github-modal__cancel{border:1px solid var(--cp-line-strong);color:var(--cp-text);background:var(--gh-btn)}
.github-modal__submit{border:1px solid rgba(240,246,252,.1);color:var(--cp-accent-ink);background:var(--cp-accent)}
@media (max-width:480px){.github-modal__row{grid-template-columns:1fr}}

/* AI prompt menu v2: header, brand-tinted actions, size footer. */
html body .component-actions .prompt-menu:not(#_){width:320px;padding:6px}
.prompt-menu__head{display:grid;gap:3px;padding:8px 10px 10px;border-bottom:1px solid var(--cp-line);margin-bottom:4px}
.prompt-menu__head strong{color:var(--cp-text);font:600 14px/1.3 var(--cp-font)}
.prompt-menu__head small{color:var(--cp-muted);font:400 12px/1.4 var(--cp-font)}
html body .component-actions .prompt-menu .prompt-menu__item:not(#_){display:flex;align-items:center;gap:12px;padding:8px 10px}
html body .component-actions .prompt-menu .prompt-menu__item>span:not(.prompt-menu__logo):not(#_){flex:1;min-width:0}
.prompt-menu__logo{display:grid;flex:none;place-items:center;width:32px;height:32px;border:1px solid var(--cp-line-strong);border-radius:8px;color:var(--cp-text);background:var(--cp-surface-2)}
html body .component-actions .prompt-menu .prompt-menu__logo svg:not(#_){width:18px;height:18px;stroke-width:1.6}
.prompt-menu__item--chatgpt .prompt-menu__logo{border-color:transparent;color:#fff;background:#10a37f}
.prompt-menu__item--claude .prompt-menu__logo{border-color:transparent;color:#fff;background:#d97757}
.prompt-menu__item>i{flex:none;color:var(--cp-muted);font-style:normal;font-size:14px}
.prompt-menu__item:hover>i,.prompt-menu__item:focus-visible>i{color:var(--cp-text)}
.prompt-menu__foot{margin-top:4px;padding:8px 10px 4px;border-top:1px solid var(--cp-line);color:var(--cp-muted);font:400 12px/1.4 var(--cp-font)}
.prompt-menu__foot:empty{display:none}

/* Browse ≤900px: browse-v2.css pinned the toolbar back to `sticky` and the
   heading to the right, which left an empty 280px band above the grid.
   The toolbar is the bottom sheet opened by "Search & filters" here. */
@media (max-width:900px){
  html body.browse-page .catalog-head:not(#_){flex-direction:column;align-items:flex-start;justify-content:flex-start}
  html body.browse-page .catalog-toolbar:not(#_){position:fixed;z-index:1200;top:auto;right:0;bottom:0;left:0;margin:0;padding:16px var(--cp-gutter) calc(16px + env(safe-area-inset-bottom));border-radius:12px 12px 0 0}
}
/* Brand marks in the AI menu draw with their own fill/stroke attributes. */
html body .component-actions .prompt-menu .prompt-menu__logo svg:not(#_){width:20px;height:20px;fill:revert-layer;stroke:revert-layer}
html body .component-actions .prompt-menu .prompt-menu__item--claude .prompt-menu__logo svg:not(#_){fill:currentColor;stroke:none}
html body .component-actions .prompt-menu .prompt-menu__item--chatgpt .prompt-menu__logo svg:not(#_){fill:none;stroke:currentColor;stroke-width:1.5}
html body .component-actions .prompt-menu .prompt-menu__item[data-prompt-action=copy] .prompt-menu__logo svg:not(#_){fill:none;stroke:currentColor;stroke-width:1.7}

/* Language logos (HTML, CSS, Tailwind) are filled marks: never let a
   page's line-icon rule (stroke: currentColor) outline them. */
html body svg.technology-logo:not(#_),html body svg.technology-logo *:not(#_){stroke:none!important}
html body svg.technology-logo path[fill="none"]:not(#_){fill:none!important}

/* AI prompt menu without brand icons: text rows with an external-link hint. */
html body .component-actions .prompt-menu .prompt-menu__item:not(#_){padding:9px 10px}

/* Viewer + editor (includes/code-editor.php on the element, publish and edit
   pages): no outer frame, the panels sit straight on the page surface. */
html body .workbench:not(#_),html body .cp2 .cp2-stage .workbench:not(#_),html body .sub2-panel--editor .workbench:not(#_){border:0!important;box-shadow:none!important;outline:0!important}
html body .workbench :is(.preview-panel,.code-panel,.preview-stage-shell):not(#_){border:0!important;box-shadow:none!important}

/* One dropdown caret for Export and AI prompt: a small drawn chevron. */
html body .component-actions :is(.framework-export__trigger,.prompt-copy)>i:not(#_){display:inline-block;flex:0 0 7px;width:7px;height:7px;margin:0 2px 3px 6px;border:0;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;color:var(--cp-muted);font-size:0;line-height:0;transform:rotate(45deg);transition:transform .16s ease}
html body .component-actions :is(.framework-export__trigger,.prompt-copy)[aria-expanded=true]>i:not(#_){margin-bottom:-2px;transform:rotate(225deg)}
