/*
Theme Name: Alegry Blog
Theme URI: https://alegry.com/blog
Author: Alegry
Description: Tema do blog Alegry. Links de teste grátis e o formulário da newsletter ficam em Aparência → Personalizar → Alegry Blog.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: alegry-blog
*/

:root {
  --bg:#F7F6F3; --bg2:#EFEEEA; --bg3:#E8E7E2; --surface:#FFFFFF;
  --border:rgba(26,25,23,0.09); --border-md:rgba(26,25,23,0.14);
  --text-1:#1A1917; --text-2:#4A4946; --text-3:#8A8880; --text-4:#B0AEA8;
  --brand:#3C2FA0; --brand-light:#EEEDFE; --brand-mid:#AFA9EC; --brand-dark:#2A2070;
  --green:#1D9E75; --green-light:#E1F5EE;
  --amber:#BA7517; --amber-light:#FAEEDA;
  --red:#D85A30; --red-light:#FAECE7;
  --blue:#0A66C2; --blue-light:#E3EFFC;
  --radius:8px; --radius-lg:14px;
  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --serif:'Fraunces',Georgia,serif;
  --mono:'SF Mono','Fira Code',monospace;
  --shadow-sm: 0 1px 2px rgba(26,25,23,0.06);
  --shadow-md: 0 10px 32px rgba(26,25,23,0.10);
  --shadow-lg: 0 20px 56px rgba(26,25,23,0.16);
  color-scheme: light;
}
html.dark {
  --bg:#1A1917; --bg2:#252422; --bg3:#2E2C29; --surface:#1F1E1C;
  --border:rgba(255,255,255,0.08); --border-md:rgba(255,255,255,0.12);
  --text-1:#F0EDE8; --text-2:#C4BFB8; --text-3:#8A8880; --text-4:#5A5855;
  --brand-light:#2A2560;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 10px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.55);
  color-scheme: dark;
}
* { box-sizing:border-box; margin:0; padding:0; }
body { font-family: var(--font); background: var(--bg); color: var(--text-1); -webkit-font-smoothing:antialiased; line-height:1.5; }
img, svg { display:block; max-width:100%; }
a { color:inherit; text-decoration:none; }
button { font-family: inherit; }
::selection { background: var(--brand-mid); color: white; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

.read-progress { position:fixed; top:0; left:0; height:3px; background: var(--brand); z-index:100; width:0%; transition: width .1s linear; }

.site-header {
  position: sticky; top:0; z-index: 50; background: rgba(247,246,243,0.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
html.dark .site-header { background: rgba(26,25,23,0.86); }
.header-inner { position:relative; max-width: 1180px; margin:0 auto; padding: 0 24px; height: 68px; display:flex; align-items:center; gap: 28px; }
.brand-lockup { display:flex; align-items:center; gap:9px; flex-shrink:0; color:inherit; }
.lmark { width: 28px; height: 28px; background: var(--brand); border-radius: 8px; display:grid; place-items:center; }
.lmark svg { width: 15px; height:15px; fill:white; }
.brand-name { font-size:16px; font-weight:700; letter-spacing:-0.2px; }
.brand-blogword { font-family: var(--serif); font-style:italic; font-weight:500; color: var(--text-3); font-size:16px; }

.nav-cats { display:flex; align-items:center; gap: 18px; flex:1; min-width:0; flex-wrap:nowrap; overflow:hidden; }
.nav-cat-link { font-size:13.5px; font-weight:600; color: var(--text-2); white-space:nowrap; flex-shrink:0; }
.nav-cat-link:hover { color: var(--brand); }
.nav-cat-link.active { color: var(--brand); }
.nav-toggle { display:none; }

.header-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; margin-left:auto; }
.icon-btn { width:34px; height:34px; border-radius:50%; border:1px solid var(--border-md); background: var(--surface); color: var(--text-2); display:grid; place-items:center; cursor:pointer; font-size:15px; padding:0; }
.icon-btn:hover, a.icon-btn:hover { background: var(--bg2); }
.cta-btn, a.cta-btn, span.cta-btn { display:inline-block; background: var(--brand); color:white; border:none; border-radius: 20px; padding: 9px 18px; font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap; text-decoration:none; line-height:1.2; text-align:center; }
a.cta-btn:hover { background: var(--brand-dark); color:white; }
span.cta-btn { cursor:default; }

.search-overlay {
  position: fixed; inset:0; background: rgba(0,0,0,0.4); z-index: 90; display:none; align-items:flex-start; justify-content:center; padding-top: 120px;
}
.search-overlay.show { display:flex; }
.search-box { width:100%; max-width: 560px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 10px; }
.search-input-row { display:flex; align-items:center; gap:10px; padding: 12px 16px; }
.search-input-row i { color: var(--text-3); font-size:19px; }
.search-input-row input { flex:1; border:none; outline:none; background:transparent; font-size:16px; color: var(--text-1); font-family: var(--font); min-width:0; }
.search-input-row input:focus-visible { outline:none; }

@media (max-width: 900px){
  .nav-toggle { display:grid; }
  .nav-cats {
    display:none; position:absolute; top:100%; left:0; right:0; z-index:60;
    flex-direction:column; align-items:flex-start; gap:4px; overflow:visible;
    background: var(--surface); border-bottom:1px solid var(--border);
    padding: 8px 16px 14px; box-shadow: var(--shadow-md);
  }
  .nav-cats.is-open { display:flex; }
  .nav-cat-link { display:block; width:100%; padding:10px 8px; }
}

.container { max-width: 1180px; margin:0 auto; padding: 0 24px; }
.section-gap { margin-top: 56px; }
.eyebrow { font-size:11.5px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color: var(--brand); display:flex; align-items:center; gap:6px; margin-bottom:10px; }

.breadcrumb { display:flex; align-items:center; gap:6px; font-size:12.5px; color: var(--text-3); flex-wrap:wrap; padding-top:28px; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--text-4); }
.breadcrumb .current { color: var(--text-2); }

.cat-pill-row { display:flex; gap:8px; flex-wrap:wrap; margin: 22px 0 32px; }
.cat-pill {
  display:flex; align-items:center; gap:6px; padding: 8px 15px; border-radius:20px; font-size:13px; font-weight:600;
  border: 1px solid var(--border-md); background: var(--surface); color: var(--text-2);
}
.cat-pill i { font-size:14px; }
.cat-pill:hover { border-color: var(--brand-mid); color: var(--brand); }
.cat-pill.active { background: var(--text-1); color: var(--bg); border-color: var(--text-1); }

.article-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.article-card { color:inherit; display:block; }
.card-cover { border-radius: var(--radius-lg); aspect-ratio: 16/10.5; position:relative; overflow:hidden; margin-bottom:14px; background: var(--bg3); }
.card-cover .blob, .featured-cover .blob, .article-hero-cover .blob { position:absolute; border-radius:50%; filter: blur(32px); opacity:0.55; }
.card-cover .cicon, .featured-cover .cicon, .article-hero-cover .cicon { position:absolute; inset:0; display:grid; place-items:center; font-size:46px; color: rgba(255,255,255,0.55); }
.card-cover img, .featured-cover img, .article-hero-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.card-cat-chip {
  position:absolute; top:12px; left:12px; font-size:10.5px; font-weight:700; letter-spacing:0.03em; text-transform:uppercase;
  padding: 5px 10px; border-radius: 20px; background: rgba(255,255,255,0.92); color: var(--text-1); z-index:2;
}
.card-title { font-family: var(--serif); font-size:19px; font-weight:600; line-height:1.3; margin-bottom:8px; letter-spacing:-0.2px; }
.article-card:hover .card-title { color: var(--brand); }
.card-excerpt { font-size:13.5px; color: var(--text-3); line-height:1.55; margin-bottom:12px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.card-meta { display:flex; align-items:center; gap:8px; font-size:12px; color: var(--text-3); flex-wrap:wrap; }
.card-meta .mini-avatar { width:20px; height:20px; border-radius:50%; display:grid; place-items:center; font-size:9px; font-weight:700; color:white; flex-shrink:0; }
.card-meta .dot { width:3px; height:3px; border-radius:50%; background: var(--text-4); }

.featured-card { display:grid; grid-template-columns: 1.15fr 1fr; gap:40px; align-items:center; color:inherit; margin-bottom: 44px; }
.featured-cover { border-radius: 20px; aspect-ratio: 16/11; position:relative; overflow:hidden; background: var(--bg3); }
.featured-cover .blob { filter: blur(46px); opacity:0.6; }
.featured-cover .cicon { font-size:72px; color: rgba(255,255,255,0.5); }
.featured-title { font-family: var(--serif); font-size: 36px; font-weight:600; line-height:1.14; letter-spacing:-0.6px; margin: 14px 0 12px; }
.featured-card:hover .featured-title { color: var(--brand); }
.featured-deck { font-size:15px; color: var(--text-2); line-height:1.6; margin-bottom:16px; }

.alegry-pagination { margin-top: 40px; }
.alegry-pagination .page-numbers { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; list-style:none; padding:0; }
.alegry-pagination .page-numbers li { list-style:none; }
.alegry-pagination a.page-numbers, .alegry-pagination span.page-numbers {
  display:inline-block; border:1px solid var(--border-md); background: var(--surface); color: var(--text-2);
  padding: 11px 16px; border-radius: 24px; font-size:13.5px; font-weight:600;
}
.alegry-pagination a.page-numbers:hover, .alegry-pagination span.page-numbers.current { background: var(--text-1); color: var(--bg); border-color: var(--text-1); }

.with-rail { display:grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items:start; }
.rail-widget { background: var(--surface); border:1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom:20px; }
.rail-title { font-size:12.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color: var(--text-3); margin-bottom:14px; display:flex; align-items:center; gap:6px; }
a.rank-row { color:inherit; }
.rank-row { display:flex; align-items:flex-start; gap:12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom:none; }
.rank-num { font-family: var(--serif); font-size:20px; font-weight:600; color: var(--brand-mid); width:22px; flex-shrink:0; }
.rank-mid { min-width:0; }
.rank-title { font-size:13px; font-weight:600; line-height:1.4; margin-bottom:3px; }
.rank-row:hover .rank-title { color: var(--brand); }
.rank-sub { font-size:11px; color: var(--text-4); }

.newsletter-slot { margin-bottom:20px; }
.newsletter-slot iframe, .newsletter-slot form { max-width:100%; }
.newsletter-widget {
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-dark) 100%); border-radius:16px; padding:22px; color:white; margin-bottom:20px;
}
.newsletter-widget .nw-icon { width:36px; height:36px; border-radius:10px; background: rgba(255,255,255,0.16); display:grid; place-items:center; margin-bottom:12px; font-size:18px; }
.newsletter-widget h4 { font-family: var(--serif); font-size:18px; font-weight:600; margin-bottom:6px; }
.newsletter-widget p { font-size:12.5px; color: rgba(255,255,255,0.78); line-height:1.5; margin-bottom:14px; }
.nw-input-row { display:flex; gap:6px; }
.nw-input-row input { flex:1; border:none; border-radius:9px; padding:9px 10px; font-size:12.5px; font-family: var(--font); outline:none; min-width:0; }
.nw-input-row button { background: white; color: var(--brand); border:none; border-radius:9px; padding:9px 13px; font-size:12.5px; font-weight:700; cursor:pointer; flex-shrink:0; }
.nw-input-row button:disabled, .nw-input-row input:disabled { cursor:not-allowed; opacity:0.85; }

.cat-mini-list { display:flex; flex-direction:column; gap:3px; }
a.cat-mini-item { text-decoration:none; }
.cat-mini-item { display:flex; align-items:center; justify-content:space-between; padding:8px 6px; border-radius:8px; font-size:13px; color: var(--text-2); }
.cat-mini-item:hover { background: var(--bg2); color: var(--text-1); }
.cat-mini-item .count { font-size:11px; color: var(--text-4); font-family: var(--mono); }

@media (max-width: 980px){ .with-rail { grid-template-columns: minmax(0, 1fr); } .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .featured-card { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px){ .article-grid { grid-template-columns: 1fr; } .brand-blogword { display:none; } }

.entity-hero { padding: 28px 0 8px; }
.cat-hero-icon { width:56px; height:56px; border-radius:16px; display:grid; place-items:center; font-size:26px; color:white; margin-bottom:18px; }
.entity-hero h1, .page-hero h1 { font-family: var(--serif); font-size:40px; font-weight:600; letter-spacing:-0.6px; margin-bottom:10px; }
.entity-hero .desc { font-size:15px; color: var(--text-2); max-width:620px; line-height:1.6; margin-bottom:16px; }
.entity-hero .desc p { margin:0; }
.entity-stats { display:flex; gap:18px; font-size:12.5px; color: var(--text-3); flex-wrap:wrap; }
.entity-stats b { color: var(--text-1); }

.author-hero { display:flex; gap:22px; align-items:center; padding: 28px 0 8px; }
.author-avatar-lg { width:88px; height:88px; border-radius:50%; display:grid; place-items:center; font-size:30px; font-weight:700; color:white; flex-shrink:0; }
.author-hero h1 { font-family: var(--serif); font-size:30px; font-weight:600; margin-bottom:4px; }
.author-role { font-size:13.5px; color: var(--brand); font-weight:600; margin-bottom:8px; }
.author-bio { font-size:14px; color: var(--text-2); line-height:1.6; max-width:560px; margin-bottom:10px; }
.author-social { display:flex; gap:8px; }
.author-social a.icon-btn { text-decoration:none; }

.article-hero-cover { border-radius: 20px; aspect-ratio: 21/9; position:relative; overflow:hidden; margin: 24px 0 36px; background: var(--bg3); }
.article-hero-cover .blob { filter: blur(60px); opacity:0.6; }
.article-hero-cover .cicon { font-size:90px; color: rgba(255,255,255,0.45); }

.article-head { max-width: 760px; margin: 0 auto; }
.article-cat-chip { display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; padding: 6px 13px; border-radius:20px; margin-bottom:16px; }
.article-title { font-family: var(--serif); font-size: 44px; font-weight:600; line-height:1.14; letter-spacing:-0.8px; margin-bottom: 16px; }
.article-deck { font-size:17px; color: var(--text-2); line-height:1.6; margin-bottom: 24px; }

.byline-row { display:flex; align-items:center; justify-content:space-between; padding: 18px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); flex-wrap:wrap; gap:14px; }
.byline-left { display:flex; align-items:center; gap:11px; }
.byline-avatar { width:42px; height:42px; border-radius:50%; display:grid; place-items:center; font-size:15px; font-weight:700; color:white; flex-shrink:0; text-decoration:none; }
.byline-name { font-size:13.5px; font-weight:700; }
a.byline-name:hover { color: var(--brand); }
.byline-sub { font-size:12px; color: var(--text-3); margin-top:1px; }
.byline-right { display:flex; align-items:center; gap:8px; }
.share-btn { width:34px; height:34px; border-radius:50%; border:1px solid var(--border-md); background: var(--surface); color: var(--text-2); display:grid; place-items:center; cursor:pointer; font-size:14px; padding:0; text-decoration:none; }
.share-btn:hover, a.share-btn:hover { background: var(--bg2); color: var(--brand); }
.share-btn.is-on { color: var(--brand); border-color: var(--brand-mid); background: var(--brand-light); }

.article-layout { display:grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 56px; max-width: 980px; margin: 36px auto 0; align-items:start; }
.article-layout.is-solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.article-body { max-width: 680px; min-width: 0; font-size:16.5px; color: var(--text-1); line-height:1.8; overflow-wrap: break-word; }
.article-layout.is-solo .article-body { max-width: none; }
.article-body h2 { font-family: var(--serif); font-size:26px; font-weight:600; margin: 38px 0 14px; letter-spacing:-0.3px; scroll-margin-top: 90px; }
.article-body h3 { font-family: var(--serif); font-size:22px; font-weight:600; margin: 28px 0 12px; letter-spacing:-0.2px; }
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 0 0 20px 22px; }
.article-body li { margin-bottom:8px; }
.article-body strong { color: var(--text-1); font-weight:700; }
.article-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.article-body img { height:auto; border-radius: 12px; max-width: 100%; }
.article-body .wp-block-image, .article-body figure { margin: 24px 0; max-width: 100%; }
.article-body .wp-block-table { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.article-body table { width: 100%; border-collapse: collapse; }
.article-body iframe { max-width:100%; }
.article-body pre { overflow:auto; background: var(--bg2); padding:14px 16px; border-radius:12px; margin-bottom:18px; font-size:13.5px; }
.article-body code { font-family: var(--mono); font-size:0.92em; }
.article-body blockquote, .pull-quote {
  font-family: var(--serif); font-size:24px; font-style:italic; font-weight:500; color: var(--brand); line-height:1.4;
  border-left: 3px solid var(--brand); padding: 4px 0 4px 22px; margin: 30px 0;
}
.article-body blockquote p { margin:0; color:inherit; font:inherit; }

.article-body details { border-bottom: 1px solid var(--border); }
.article-body summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding: 16px 0; cursor:pointer; font-size:15px; font-weight:600; list-style:none; }
.article-body summary::-webkit-details-marker { display:none; }
.article-body summary::after {
  content:""; width:8px; height:8px; border-right:2px solid var(--text-3); border-bottom:2px solid var(--text-3);
  transform: rotate(45deg); flex-shrink:0; margin-top:-4px;
}
.article-body details[open] summary::after { transform: rotate(-135deg); margin-top:4px; }
.article-body details > :not(summary) { margin-bottom: 16px; }

.growth-cta {
  background: linear-gradient(145deg, var(--brand-light) 0%, var(--bg2) 100%); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px 24px; margin: 32px 0; display:flex; align-items:center; gap:18px; flex-wrap:wrap;
}
.growth-cta .gc-icon { width:44px; height:44px; border-radius:12px; background: var(--brand); color:white; display:grid; place-items:center; font-size:20px; flex-shrink:0; }
.growth-cta .gc-mid { flex:1; min-width:200px; }
.growth-cta h4 { font-size:15px; font-weight:700; margin-bottom:3px; }
.growth-cta p { font-size:12.5px; color: var(--text-3); margin:0; line-height:1.45; }
.growth-cta .gc-btn { background: var(--brand); color:white; border:none; border-radius: 10px; padding: 10px 18px; font-size:13px; font-weight:600; white-space:nowrap; text-decoration:none; display:inline-block; }
a.growth-cta .gc-btn, .growth-cta a.gc-btn { color:white; text-decoration:none; }
.growth-cta a.gc-btn:hover { background: var(--brand-dark); color:white; }
span.growth-cta .gc-btn, .growth-cta span.gc-btn { cursor:default; }

.author-card-end { display:flex; gap:16px; align-items:center; background: var(--surface); border:1px solid var(--border); border-radius:16px; padding:20px; margin-top:40px; }
.author-card-end .byline-avatar { width:54px; height:54px; font-size:18px; }
.author-card-end .ac-bio { font-size:13px; color: var(--text-3); line-height:1.5; margin-top:4px; }

.toc-rail { position: sticky; top: 90px; }
.toc-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color: var(--text-3); margin-bottom:12px; }
.toc-link { display:block; font-size:13px; color: var(--text-3); padding: 6px 0 6px 12px; border-left:2px solid var(--border); line-height:1.4; }
.toc-link:hover { color: var(--text-1); }
.toc-link.active { color: var(--brand); border-left-color: var(--brand); font-weight:600; }

.sticky-cta-bar {
  position: fixed; left:0; right:0; bottom: 0; width: 100%; max-width: 100%;
  background: var(--text-1); color: var(--bg); z-index: 60;
  box-shadow: var(--shadow-lg); transform: translateY(110%); transition: transform .3s ease;
}
.sticky-cta-bar.show { transform: translateY(0); }
html.dark .sticky-cta-bar { background: var(--surface); border-top:1px solid var(--border-md); color: var(--text-1); }
.scb-inner { max-width: 1180px; margin:0 auto; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); display:flex; align-items:center; justify-content:space-between; gap:16px; min-width: 0; }
.scb-text { font-size:13.5px; font-weight:600; flex: 1; min-width: 0; }
.scb-text span { display:block; font-size:11.5px; font-weight:400; color: var(--text-3); margin-top:1px; line-height: 1.4; }

.related-section { max-width: 980px; margin: 56px auto 0; }
.related-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:22px; }

.site-footer { margin-top: 80px; border-top: 1px solid var(--border); padding: 44px 0 30px; }
.footer-grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-col h5 { font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color: var(--text-3); margin-bottom:14px; }
.footer-col a, .footer-col span.footer-link { display:block; font-size:13px; color: var(--text-2); margin-bottom:9px; }
.footer-col a:hover { color: var(--brand); }
.footer-blurb { font-size:12.5px; color:var(--text-3); line-height:1.6; max-width:220px; }
.footer-bottom { display:flex; justify-content:space-between; align-items:center; padding-top:22px; border-top:1px solid var(--border); font-size:12px; color: var(--text-4); flex-wrap:wrap; gap:10px; }

.page-wrap { max-width: 760px; margin: 36px auto 80px; }
.page-wrap .article-body { max-width:none; }
.empty-note { color: var(--text-3); font-size:14px; }
.post-password-form { margin-top: 28px; }
.post-password-form input[type="password"], .post-password-form input[type="submit"] {
  border:1px solid var(--border-md); border-radius:10px; padding:10px 12px; font-family: var(--font); font-size:14px;
}
.post-password-form input[type="submit"] { background: var(--brand); color:white; border:none; font-weight:600; cursor:pointer; }

.toast {
  position: fixed; bottom: 24px; left:50%; transform: translateX(-50%) translateY(20px); opacity:0;
  background: var(--text-1); color: var(--bg); font-size:13px; font-weight:500; padding: 10px 18px; border-radius: 10px;
  z-index: 200; transition: all .25s; display:flex; align-items:center; gap:8px; pointer-events:none; white-space:nowrap;
}
.toast.show { opacity:1; transform: translateX(-50%) translateY(0); }
html.dark .toast { background: var(--surface); color: var(--text-1); border: 1px solid var(--border-md); }
body:has(.sticky-cta-bar.show) .toast { bottom: 88px; }

@media (min-width: 783px) {
  html.admin-bar .site-header { top: 32px; }
  html.admin-bar .read-progress { top: 32px; }
  html.admin-bar .toc-rail { top: 122px; }
}
@media (max-width: 782px) {
  html.admin-bar .site-header { top: 46px; }
  html.admin-bar .read-progress { top: 46px; }
}
@media (max-width: 760px){
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .toc-rail { display:none; }
  .article-title { font-size:32px; overflow-wrap: break-word; }
  .footer-grid { grid-template-columns:1fr 1fr; }
  .related-grid { grid-template-columns: minmax(0, 1fr); }
  .entity-hero h1, .page-hero h1 { font-size:32px; }
  .author-hero { align-items:flex-start; }
  .scb-inner { gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .sticky-cta-bar .cta-btn { flex-shrink: 0; }
}
@media (max-width: 520px){
  .footer-grid { grid-template-columns:1fr; }
}
