/*
 * Small reviewed presentation adjustments.
 * This external layer deploys independently of HTML; keep its URL stable.
 * Browsers revalidate its ETag on each page load.
 */
.site-announcement {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 clamp(16px, 3vw, 40px);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
  background: var(--announcement-background, #2b2c30);
  color: var(--announcement-foreground, #fff);
  font-family: var(--font-family-mono, monospace);
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
  overflow-wrap: normal;
  white-space: nowrap;
}
.site-announcement p { display: block; flex: 0 0 auto; width: max-content; min-width: 100%; max-width: none; margin: 0; }
.site-announcement p a { display: inline; }
.site-announcement a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: .18em; unicode-bidi: isolate; }
.site-announcement a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

.site-announcement a:hover { color: inherit; text-decoration-thickness: 2px; }
/* The brand green is a fill; text uses the theme's contrast-adjusted accent. */
a:hover { color: var(--color-accent-text); }
.site-announcement a:hover { color: inherit; }
/* Keep desktop utilities inside the viewport while the announcement is visible.
 * Reserve the header area when the lower sticky inset raises the sidebar. */
@media (min-width:768px) {
  .sidebar {
    bottom:0;
    padding-block-start:var(--layout--navbar--height);
    padding-block-end:var(--spacing-4);
  }
  .sidebar [data-cms-navigation] { min-height:0; flex-shrink:1; }
  .sidebar > .scope-utilities { flex-shrink:0; }
}

/* The component catalog uses the available content width rather than the reading column. */
.post-design-system .section-hero{max-width:none;width:100%;padding-inline:0;padding-block-end:0;box-sizing:border-box}
.post-design-system .section-hero .section-image{display:none}
.post-design-system .post-content{max-width:none;width:100%}

/* Recognizable brand colors belong to social actions; neutral at rest. */
.navbar .navbar-socials{gap:12px}
:is(.navbar-social-link,.footer a){--social-hover:var(--color-contrast)}
:is(.navbar-social-link,.footer a)[href^="https://t.me/"]{--social-hover:#229ed9}
:is(.navbar-social-link,.footer a)[href^="https://wa.me/"]{--social-hover:#25d366}
:is(.navbar-social-link,.footer a)[href^="mailto:"]{--social-hover:var(--color-accent-text)}
:is(.navbar-social-link,.footer a)[href*="instagram.com/"]{--social-hover:#e4405f}
:is(.navbar-social-link,.footer a)[href*="youtube.com/"]{--social-hover:#ff0000}
:is(.navbar-social-link,.footer a)[href*="facebook.com/"]{--social-hover:#0866ff}
:is(.navbar-social-link,.footer a)[href*="tiktok.com/"]{--social-hover:#25f4ee}
:is(.navbar-social-link,.footer a)[href*="linkedin.com/"]{--social-hover:#0a66c2}
.navbar-social-link:is(:hover,:focus-visible),
.navbar-social-link:is(:hover,:focus-visible)>svg{color:var(--social-hover)}
:is(.navbar-social-link,.footer a)[href*="instagram.com/"]:is(:hover,:focus-visible)>svg{background:linear-gradient(35deg,#feda75,#fa7e1e,#d62976,#962fbf,#4f5bd5)}
:is(.navbar-social-link,.footer a)[href*="tiktok.com/"]:is(:hover,:focus-visible)>svg{background:linear-gradient(110deg,#25f4ee 40%,#fe2c55 60%)}
:is(.navbar-social-link,.footer a)[href*="bsky.app/"]{--social-hover:#0085ff}
:is(.navbar-social-link,.footer a)[href*="mastodon.social/"]{--social-hover:#6364ff}
.footer a:is(:hover,:focus-visible)>:is(svg,.icon){color:var(--social-hover,var(--color-contrast))}
.footer a.nav-link:is(:hover,:focus-visible)>.label::before{background-color:var(--social-hover)}
.navbar a.button-member[href^="https://t.me/"]:is(:hover,:focus-visible){background:#229ed9;color:#111}

/* Long disclosure lists scroll inside the panel, keeping its surface and close overlay in place. */
.popup-navigation .popup-container{overflow-y:auto;overscroll-behavior:contain}
/* The current footer destination uses the same surface and label shift as hover. */
.footer a.nav-link[aria-current="page"]::before { opacity:1; }
.footer a.nav-link[aria-current="page"] > .label { transform:translateX(var(--spacing-1)); }

/* content-visibility:auto implies paint containment and clips the existing tag rotation. */
.post-card { content-visibility:visible; overflow:visible; }
.post-card .post-card-content,
.post-card .post-card-meta { overflow:visible; }

/* Instagram is part of the subscription heading; the media rail remains independent. */
.scope-subscription-title { align-items:center; display:flex; gap:var(--spacing-4); direction:ltr; unicode-bidi:isolate; overflow-wrap:anywhere; font-weight:var(--font-weight-bold); }
.scope-subscription-title > a { display:inline-flex; align-items:center; gap:var(--spacing-4); font-weight:inherit; background:transparent; }
.scope-subscription-title > a:is(:hover,:focus-visible) {
  background:linear-gradient(35deg,#feda75,#fa7e1e,#d62976,#962fbf,#4f5bd5);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  text-decoration-color:#d62976;
}
.scope-subscription-title > a:is(:hover,:focus-visible) .scope-subscription-instagram-icon {
  background:linear-gradient(35deg,#feda75,#fa7e1e,#d62976,#962fbf,#4f5bd5);
}
.section-subscription .section-content .scope-subscription-title { font-weight:700; }
.scope-subscription-socials { display:flex; flex-wrap:wrap; gap:12px 24px; margin-top:24px; }
.scope-subscription-social { display:inline-flex; align-items:center; gap:8px; direction:ltr; unicode-bidi:isolate; overflow-wrap:anywhere; }
.scope-subscription-social-icon { display:inline-block; flex:0 0 auto; width:1.2em; height:1.2em; background:currentColor; -webkit-mask:var(--ri-social) center / contain no-repeat; mask:var(--ri-social) center / contain no-repeat; }
.scope-subscription-social-threads { --ri-social:var(--ri-threads-fill); }
.scope-subscription-social-youtube { --ri-social:var(--ri-youtube-fill); }
.section-subscription .scope-subscription-title > a,
.section-subscription .scope-subscription-socials > a { text-decoration:none; }
.section-subscription .scope-subscription-social-threads { opacity:.75; }
.section-subscription .scope-subscription-social-threads:is(:hover,:focus-visible) { color:var(--color-contrast); opacity:1; }
.section-subscription .scope-subscription-social-youtube:is(:hover,:focus-visible) { color:#ff0000; }
@media (max-width:600px) {
  .section-subscription { flex-direction:column; }
  .section-subscription .section-content { width:100%; min-width:0; padding:32px 24px; }
  .section-subscription .scope-subscription-title { font-size:clamp(18px,5.5vw,26px); }
  .scope-subscription-title > a { min-width:0; }
  .scope-subscription-socials { flex-direction:column; align-items:flex-start; gap:16px; }
}
.scope-subscription-instagram-icon,
.scope-pagination-complete-icon {
  background-color:currentColor;
  display:inline-block;
  flex:0 0 auto;
  height:1em;
  -webkit-mask:var(--ri-control) center / contain no-repeat;
  mask:var(--ri-control) center / contain no-repeat;
  width:1em;
}
.scope-subscription-instagram-icon { --ri-control:var(--ri-instagram-fill); }
.scope-pagination-complete-icon { --ri-control:var(--ri-scroll-to-bottom-fill); }
.pagination-button .complete .scope-pagination-complete-icon { display:inline-block; }
.pagination-button.complete > .complete { display:inline-flex; align-items:center; gap:var(--spacing-3); }

/* Captions sit within the bookmark surface with the same inset as its content. */
.post-content .kg-bookmark-card > figcaption { margin:0; padding:var(--spacing-6) var(--spacing-8); }
.post-content .kg-bookmark-card > figcaption > p { margin:0; }
.section-recommendations .recommendation-card { border:0; background:var(--announcement-background, #2b2c30); color:var(--announcement-foreground, #fff); }
.section-recommendations .recommendation-card > a { color:inherit; }
.section-recommendations .recommendation-card:hover { background:color-mix(in srgb,var(--announcement-background, #2b2c30),#fff 5%); }
.page-template .section-hero.section-hero-align-start { align-items:flex-start; text-align:start; }
.page-template .section-hero.section-hero-align-start > p { margin-inline:0; }
@media (max-width:737px) {
  .section-recommendations > .section-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:534px) {
  .section-recommendations > .section-list { grid-template-columns:minmax(0,1fr); }
}

/* Shared reading typography for articles and pages. */
.post-content blockquote:not(.kg-blockquote-alt) { font-family:var(--font-family-mono); }
.post-content > :is(h2,h3,h4,h5,h6) { font-weight:var(--font-weight-bold); }

/* Defer plain excerpts only: containing the entire card clips rotating tags. */
.pagination-posts-list .post-card:nth-child(n+5) .post-card-content>p{content-visibility:auto;contain-intrinsic-block-size:auto 4lh}
@media print{.pagination-posts-list .post-card:nth-child(n+5) .post-card-content>p{content-visibility:visible;contain-intrinsic-block-size:none}}
/* Footer social links use the same quiet hover surface as contact links. */
.footer .footer-social-links .social-link{transform:none;transition:color .2s ease}
.footer .footer-social-links .social-link::before{content:"";position:absolute;inset:calc(var(--spacing-4)*-1) calc(var(--spacing-5)*-1);border-radius:var(--radius-2);background:var(--color-background-200);opacity:0;transition:opacity .2s ease;z-index:-1}
.footer .footer-social-links .social-link>span{transition:transform .2s ease}
.footer .footer-social-links .social-link:is(:hover,:focus-visible){transform:none;color:var(--color-contrast)}
.footer .footer-social-links .social-link:is(:hover,:focus-visible)::before{opacity:1}
.footer .footer-social-links .social-link:is(:hover,:focus-visible)>span{transform:translateX(var(--spacing-1))}

/* Search refinement belongs in the mutable presentation layer. */
.popup-navigation,
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease, visibility 0s linear .25s;
}

.popup-navigation.popup-show,
.search-modal.search-show {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  transition-delay: 0s;
}

body.modal-open {
  overflow: hidden;
}

.search-modal {
  display: grid;
  place-items: start center;
  padding: max(72px, 8vh) var(--layout--padding, 24px) var(--layout--padding, 24px);
  background: color-mix(in srgb, var(--color-background, #17181b) 76%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.search-modal-overlay {
  position: fixed;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.search-modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 96px));
  overflow-y: auto;
  border: 0;
  border-radius: var(--radius-3, 16px);
  background: var(--color-background, #17181b);
  box-shadow: 0 12px 36px -12px color-mix(in srgb,var(--color-accent) 24%,transparent), 0 32px 80px -20px color-mix(in srgb,var(--color-accent) 32%,transparent), 0 24px 70px -20px rgb(0 0 0 / 35%);
  padding: var(--spacing-8, 32px);
}

.search-modal-head,
.search-modal-input-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-7, 24px);
}

.search-modal-head {
  justify-content: space-between;
  margin-bottom: var(--spacing-7, 24px);
}

.search-modal-head h2 {
  margin: 0;
  font-size: var(--font-h3, 1.5rem);
  font-weight: 600;
  color: var(--color-contrast, #fff);
}

.search-modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--color-contrast, #fff);
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-modal-close-btn:hover {
  background: transparent;
  color: var(--color-accent);
}

.search-modal-input-row {
  border: 0;
  border-radius: var(--radius-2, 12px);
  background: var(--color-background-200, rgb(255 255 255 / 4%));
  padding: 0 var(--spacing-7, 20px);
  transition: box-shadow 0.2s ease;
}

.search-modal-input-row:focus-within {
  box-shadow: 0 5px 22px -3px color-mix(in srgb,var(--color-accent) 36%,transparent);
}

.search-modal-input-row svg {
  flex-shrink: 0;
  color: var(--color-secondary, rgb(255 255 255 / 50%));
}

.search-modal-input-row input {
  width: 100%;
  min-height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-contrast, #fff);
  font-family: inherit;
  font-size: 1.05rem;
}

.search-modal-input-row input::placeholder {
  color: var(--color-secondary, rgb(255 255 255 / 40%));
}

.search-status {
  margin: var(--spacing-7, 20px) 0 0;
  color: var(--color-secondary, rgb(255 255 255 / 50%));
  font-size: var(--font-small, 0.875rem);
}

.search-results {
  display: grid;
  gap: var(--spacing-3, 12px);
  margin-top: var(--spacing-7, 20px);
}

.search-result {
  position: relative;
  border-radius: var(--radius-2, 12px);
  padding: var(--spacing-7, 18px);
  background: color-mix(in srgb, var(--color-background-200, rgb(255 255 255 / 3%)) 60%, transparent);
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.search-result:hover,
.search-result:focus-within {
  background: var(--color-background-200, rgb(255 255 255 / 8%));
  border-color: var(--color-border, rgb(255 255 255 / 12%));
  transform: translateY(-1px);
}

.search-result-type {
  color: var(--color-accent, #FF1A75);
  font-size: var(--font-x-small, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-result h3 {
  margin: var(--spacing-2, 6px) 0 0;
  font-size: var(--font-large, 1.15rem);
  font-weight: 600;
  line-height: 1.35;
}

.search-result h3 a {
  color: var(--color-contrast, #fff);
  text-decoration: none;
}

.search-result h3 a::after {
  position: absolute;
  inset: 0;
  content: '';
}

.search-result p {
  margin: var(--spacing-3, 8px) 0 0;
  color: var(--color-secondary, rgb(255 255 255 / 70%));
  font-size: var(--font-small, 0.9rem);
  line-height: 1.45;
}

.search-result mark {
  background: color-mix(in srgb, var(--color-accent, #FF1A75) 30%, transparent);
  color: var(--color-contrast, #fff);
  padding: 1px 4px;
  border-radius: 3px;
}

@media (width <= 640px) {
  .search-modal {
    padding: 16px;
    align-items: stretch;
  }

  .search-modal-panel {
    max-height: calc(100vh - 32px);
    padding: 20px;
    border-radius: 14px;
  }
}

.search-modal-head h2{display:flex;align-items:center;gap:10px}
.search-modal-head h2::before{content:"";display:inline-block;width:24px;height:24px;flex:none;background:currentColor;mask:var(--ri-signpost-fill) center/contain no-repeat;-webkit-mask:var(--ri-signpost-fill) center/contain no-repeat}
.search-modal-input-row input,.search-modal-input-row input:focus{padding:0;margin:0;border:0;outline:0;box-shadow:none}
.search-modal-close-btn:focus-visible{outline:2px solid var(--color-accent);outline-offset:3px}

/* The shared button reset hides empty spans; keep the masked Ask glyph visible. */
[data-header-layout-preview] .preview-chat-reset > .preview-reset-icon { display:inline-block; }
@media(max-width:600px){
 [data-header-layout-preview][data-layout-surface=ask] .preview-chat-hero .preview-identity h1 { flex-basis:100%; }
}

/* Arabic contact hotfix: preserve shaping and mirror the split control. */
html[data-nevsky-view="ghost"]:lang(ar) .button-tg {
  font-family:"Geeza Pro","Noto Sans Arabic",Tahoma,Geist,Arial,sans-serif;
  letter-spacing:normal;
  font-feature-settings:normal;
}
html[data-nevsky-view="ghost"][dir="rtl"] [data-header-layout-preview] .preview-contact-action > .button-tg {
  border-radius:0 999px 999px 0;
}
html[data-nevsky-view="ghost"][dir="rtl"] [data-header-layout-preview] .preview-contact-menu > summary {
  border-radius:999px 0 0 999px;
}

.site-announcement a::after{content:"";display:inline-block;width:.75em;height:.75em;margin-inline-start:.22em;vertical-align:.08em;background:currentColor;mask:url("data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5.63589%2019.7784L4.22169%2018.3644L15.657%206.92908L10.0712%206.92908V4.92908L19.0712%204.92908L19.0712%2013.9291H17.0712L17.0712%208.34326L5.63589%2019.7784Z%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat}

/* Borderless floating menus: surface contrast and elevation define the edge. */
html[data-nevsky-view="ghost"] .scope-language-picker>ul,
html [data-header-layout-preview] .preview-contact-menu .preview-contact-options {
 border:0;
 background:var(--color-background-200);
 box-shadow:0 12px 28px rgb(0 0 0 / 18%),0 32px 64px rgb(0 0 0 / 12%);
}
/* Search focus is a solid inverse surface, with no ring or colored halo. */
.search-modal-panel {
 box-shadow:0 24px 70px rgb(0 0 0 / 28%);
}
.search-modal-input-row {
 box-shadow:none;
 transition:background-color .16s ease,color .16s ease;
}
.search-modal-input-row:focus-within {
 background:var(--color-contrast);
 color:var(--color-background);
 box-shadow:none;
}
.search-modal-input-row:focus-within :is(input,svg) {
 color:var(--color-background);
}
.search-modal-input-row:focus-within input::placeholder {
 color:var(--color-background);
 opacity:.7;
}
@media(prefers-reduced-motion:reduce){.search-modal-input-row{transition:none}}
@media(forced-colors:active){.search-modal-input-row:focus-within{outline:2px solid Highlight;outline-offset:2px}}

/* Opt-in seven article hero layouts; existing articles retain their markup. */
/* Additional article layouts. Existing templates remain unchanged unless selected. */
.hero-layout-image-top{display:flex!important;flex-direction:column;gap:var(--layout--gap)}
.hero-layout-image-top>.section-image{order:-1;width:100%}
.hero-layout-image-top>.section-hero-split-content,.hero-layout-text-only>.section-hero-split-content,.hero-layout-image-wide>.section-hero-split-content{width:100%;max-width:var(--container-small--width);margin-inline:auto}
.hero-layout-text-only>.section-image{display:none!important}
.hero-layout-image-wide>.section-image{width:100%;max-width:none}
body:has(.hero-layout-fullscreen){position:relative}
body:has(.hero-layout-fullscreen) :is(.container,main#content){position:static}
body:has(.hero-layout-fullscreen) :is(.navbar,.navbar-container,.sidebar,.gh-announcement-bar,.gh-announcement-bar-content){background:transparent!important;color:#fff;z-index:100;--color-foreground:#fff;--color-secondary:#e5e5e5;--color-contrast:#fff}
body:has(.hero-layout-fullscreen) .navbar{position:relative}
.hero-layout-fullscreen{display:flex!important;align-items:flex-end;min-height:calc(100svh - var(--hero-offset,160px));padding-block:40px 8vh!important;position:static!important;isolation:auto;gap:0!important}
.hero-layout-fullscreen>.section-hero-split-content{position:relative;z-index:2;width:min(850px,100%);margin:0;align-self:flex-end;text-align:left;color:#fff;--color-foreground:#fff;--color-secondary:#e5e5e5;--color-contrast:#fff}
.hero-layout-fullscreen>.section-hero-split-content h1{font-size:clamp(36px,5vw,76px);text-wrap:balance}
.hero-layout-fullscreen>.section-image{position:absolute!important;inset:0 0 auto!important;width:100vw!important;max-width:none!important;height:100svh!important;margin:0!important;z-index:0;overflow:hidden;background:#393b3f}
.hero-layout-fullscreen>.section-image :is(figure,picture,img){display:block;width:100%;height:100%;margin:0;max-width:none;object-fit:cover;border-radius:0}
.hero-layout-fullscreen>.section-image:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#0008 0%,#0001 35%,#000b 100%)}
body:has(.hero-layout-fullscreen) :is(.post-content,.footer){position:relative;z-index:2;background:var(--color-background)}
.editor-site-cover-placeholder{display:grid;place-content:center;gap:8px;width:100%;min-height:380px;aspect-ratio:4/3;padding:24px;background:var(--color-background-200,#333);color:var(--color-secondary,#bbb);border:0;border-radius:6px;font:14px/1.6 Geist,sans-serif;cursor:pointer;text-align:center}
.hero-layout-fullscreen .editor-site-cover-placeholder{height:100%;position:relative;z-index:3;align-content:start;padding-top:180px;background:transparent;color:#fff}
.editor-site-preview-banner select{width:min(320px,70vw);display:inline-block;margin:8px 12px 0;padding:7px 10px;border:0;border-radius:5px;background:var(--color-background);color:var(--color-foreground);font:inherit}
@media(max-width:700px){.hero-layout-fullscreen{min-height:calc(100svh - var(--hero-offset,150px));padding-bottom:10vh!important}.hero-layout-fullscreen>.section-hero-split-content h1{font-size:clamp(30px,7vw,46px)}}
.hero-layout-fullscreen>.section-image img{height:100%!important;object-fit:cover!important}
/* The base hero is a column: bottom alignment belongs to its main axis. */
.hero-layout-fullscreen{justify-content:flex-end!important;align-items:flex-start!important}
.hero-layout-fullscreen>.section-hero-split-content{align-self:flex-start}

/* Fullscreen cover stays unobstructed by the normal sticky glass navigation. */
body:has(.hero-layout-fullscreen) :is(.navbar,.navbar-container,.sidebar){backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
