/* Prototype banner (staging) */
.proto-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  padding: 0.45rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.proto-banner a {
  margin-left: 0.35rem;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.proto-banner a:hover {
  opacity: 0.9;
}

/* Header */
.site-header {
  position: fixed;
  inset: var(--proto-banner-h, 0) 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  background: rgba(12, 12, 12, 0.95);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}

.logo__mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  line-height: 1;
}

.logo__sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}

.nav a.is-active {
  box-shadow: inset 0 -2px 0 var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn:active {
  transform: translateY(0) scale(0.96) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* Поля ввода — те же скругления, что у кнопок на скрине (~10px) */
.input,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="image"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
textarea,
select {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.6rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-dim);
}

.input:hover,
input:not([type="checkbox"]):not([type="radio"]):hover,
textarea:hover,
select:hover {
  border-color: var(--text-dim);
}

.input:focus,
input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) calc(50% - 2px), calc(100% - 0.75rem) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn--primary:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--brand-glow);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(222, 0, 43, 0.04);
}

/* Shop strip */
.shop-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, var(--bg-raised) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
}

.shop-strip__text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.shop-strip__text strong {
  color: var(--text);
}

/* Category chips */
.chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.chip {
  flex-shrink: 0;
  padding: 0.45rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  transition: all 0.2s;
}

.chip:hover,
.chip.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 4px 12px var(--brand-glow);
}

/* Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.35s;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.card:hover::after {
  transform: scaleX(1);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-deep);
}

.card__media--gallery {
  touch-action: pan-y;
  cursor: pointer;
}

.card__media--gallery.is-swipe-armed {
  transform: translateY(-6px);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.card__gallery-hint {
  position: absolute;
  left: 50%;
  bottom: 0.65rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(8, 8, 8, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.card__media--gallery.is-swipe-armed .card__gallery-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

@media (hover: hover) and (pointer: fine) {
  .card__gallery-hint {
    opacity: 0;
  }

  .card:hover .card__gallery-hint {
    opacity: 0.95;
    transform: translateX(-50%) translateY(-2px);
  }
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.card:hover .card__media img {
  transform: scale(1.06);
}

.card__body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__cats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(222, 0, 43, 0.35);
  border-radius: var(--radius);
  background: rgba(222, 0, 43, 0.15);
  color: #ff6b6b;
}

.card__title {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  color: var(--text);
  transition: color 0.2s;
}

.card:hover .card__title {
  color: #fff;
}

.card__excerpt {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  flex: 1;
}

.card__meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  gap: 1rem;
}

.card--featured .card__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.card--placeholder {
  opacity: 0.55;
  pointer-events: none;
}

.card--placeholder .card__media {
  background: linear-gradient(135deg, var(--bg-raised), var(--bg-hover));
}

.breadcrumb {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb:hover {
  color: var(--brand);
}

.article-content .loading {
  color: var(--text-muted);
  font-style: italic;
}

/* Footer */
body.sto-blog-v2 #colophon.site-footer,
.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  border-top: 3px solid var(--brand);
  background: var(--bg-deep);
}

body.sto-blog-v2 #colophon.site-footer {
  background-color: var(--bg-deep) !important;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1rem;
}

.footer-social__label {
  width: 100%;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer-social a {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.footer-social a:hover {
  color: #ff6b6b;
  border-color: var(--brand);
  background: rgba(222, 0, 43, 0.08);
}

.site-footer__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__cta,
.site-footer__nav-item {
  margin: 0;
}

.site-footer__cta .btn--primary {
  width: 100%;
  justify-content: center;
}

.sidebar-follow {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.sidebar-follow__title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.sidebar-follow__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-follow__links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.sidebar-follow__links a:hover {
  color: var(--brand);
}

.concept-badge {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  border: 1px dashed var(--brand);
  border-radius: var(--radius);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.35rem 0.55rem;
}

/* Category nav — chips (concept v2 build 10) */
.cat-nav--crumbs {
  position: relative;
  z-index: 60;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 0 0 1.25rem;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  line-height: 1.2;
}

.cat-nav__item {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  max-width: min(340px, 50vw);
  gap: 0;
  overflow: visible;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cat-nav__item:active {
  transform: scale(0.96);
}

.cat-nav__item:hover:not(.is-current) {
  border-color: var(--border-strong);
  background: var(--bg-raised);
}

.cat-nav__item.is-current {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 4px 16px var(--brand-glow);
}

.cat-nav__sep {
  flex-shrink: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  user-select: none;
  padding: 0 0.05rem;
}

.cat-nav__label {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-nav__item.has-menu .cat-nav__label {
  padding-right: 0.55rem;
}

a.cat-nav__label {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

a.cat-nav__label:hover {
  color: var(--text);
}

.cat-nav__item.is-current .cat-nav__label,
.cat-nav__item.is-current .cat-nav__toggle {
  color: #fff;
}

.cat-nav__item.is-current .cat-nav__label,
.cat-nav__label--static {
  user-select: none;
  cursor: default;
}

.cat-nav__item--selector .cat-nav__label--static {
  max-width: min(42vw, 12rem);
}

.cat-nav__label--btn {
  padding: 0.5rem 0.75rem;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
}

.cat-nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem 0.5rem 0.55rem;
  margin: 0;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: transparent;
  font-size: 0.65rem;
  color: var(--text-dim);
  cursor: pointer;
  touch-action: manipulation;
}

.cat-nav__item.is-current .cat-nav__toggle {
  border-left-color: rgba(255, 255, 255, 0.28);
}

.cat-nav__item.has-menu:hover:not(.is-current) .cat-nav__toggle,
.cat-nav__item.is-ellipsis:hover .cat-nav__toggle {
  color: var(--brand);
}

[data-cat-nav] {
  position: relative;
  z-index: 100;
}

.cat-nav__depot,
.cat-nav__depot .cat-nav__menu-src {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#cat-nav-flyout.cat-nav__flyout {
  min-width: 240px;
  padding: 0.45rem;
  background-color: #141414 !important;
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--brand);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75);
}

#cat-nav-flyout[hidden]:not(.is-open) {
  display: none !important;
}

#cat-nav-flyout.is-open {
  display: block !important;
}

.cat-nav__flyout--cascade {
  overflow: visible;
  padding: 0;
  max-height: none;
}

.cat-nav__cascade {
  position: relative;
}

.cat-nav__col {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  min-width: 240px;
}

.cat-nav__cascade-item {
  position: relative;
}

.cat-nav__cascade-item.has-children > .cat-nav__menu-link {
  padding-right: 1.5rem;
}

.cat-nav__cascade-item.has-children > .cat-nav__menu-link::after {
  content: "›";
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.55;
}

.cat-nav__col--flyout {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  margin-left: -2px;
  min-width: 240px;
  padding: 0.35rem;
  background: #141414;
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--brand);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  z-index: 2;
}

.cat-nav__cascade-item:hover > .cat-nav__col--flyout,
.cat-nav__cascade-item:focus-within > .cat-nav__col--flyout {
  display: block;
}

.cat-nav__all-panel {
  display: flex;
  flex-direction: column;
  min-width: 240px;
}

.cat-nav__menu--all-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 0.15rem;
  padding-bottom: 0.25rem;
}

.cat-nav__menu-link--all {
  font-weight: 700;
}

.cat-nav__menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cat-nav__menu-link {
  display: block;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border-radius: var(--radius);
}

.cat-nav__menu-link:hover,
.cat-nav__menu-link.is-active {
  color: #fff;
  background: rgba(222, 0, 43, 0.35);
}

.cat-nav__fallback {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  .cat-nav--crumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide Firefox scrollbar */
    -ms-overflow-style: none; /* Hide IE scrollbar */
    padding-right: 2.5rem !important; /* Ensure last element can scroll into view and be read */
    /* Beautiful fading mask on the right side to indicate hidden items */
    mask-image: linear-gradient(to right, #000 0%, #000 80%, transparent 98%);
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 80%, transparent 98%);
  }
  .cat-nav--crumbs::-webkit-scrollbar {
    display: none; /* Hide Chrome/Safari scrollbar */
  }
}

@media (max-width: 900px) {
  .nav {
    display: none;
    position: fixed;
    inset: calc(var(--header-h) + var(--proto-banner-h)) 0 auto;
    flex-direction: column;
    background: var(--bg-deep);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .nav.is-open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .logo__mark {
    font-size: 1.15rem;
  }

  .logo__sub {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .site-header .btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  .logo__mark {
    font-size: 0.95rem;
  }
  .logo__sub {
    font-size: 0.55rem;
    letter-spacing: 0.05em;
  }
  .site-header .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.7rem;
  }
}

/* Mobile TOC Bottom Sheet & FAB (Brutal Premium style) */
.mobile-toc-fab {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 8px 30px var(--brand-glow);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s, visibility 0.3s, background 0.2s;
}

.mobile-toc-fab:hover {
  background: var(--brand-dark);
}

.mobile-toc-fab svg {
  flex-shrink: 0 !important;
}

.mobile-toc-fab.is-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.mobile-toc-sheet {
  position: fixed;
  inset: 0;
  z-index: 1001;
  pointer-events: none;
  display: none;
}

.mobile-toc-sheet.is-active {
  display: block;
}

.mobile-toc-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: auto;
}

.mobile-toc-sheet.is-open .mobile-toc-sheet__backdrop {
  opacity: 1;
}

.mobile-toc-sheet__container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-top: 1px solid var(--border-strong);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  pointer-events: auto;
}

.mobile-toc-sheet.is-open .mobile-toc-sheet__container {
  transform: translateY(0);
}

.mobile-toc-sheet__pull-bar {
  width: 36px;
  height: 4px;
  background: var(--text-dim);
  border-radius: 2px;
  margin: 12px auto 6px;
  opacity: 0.5;
}

.mobile-toc-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.mobile-toc-sheet__title {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  letter-spacing: 0.03em;
}

.mobile-toc-sheet__close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.mobile-toc-sheet__close svg {
  stroke: var(--text) !important;
  stroke-width: 2.5px;
  flex-shrink: 0 !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
}

.mobile-toc-sheet__close:hover {
  background: var(--bg-deep);
  color: var(--text);
  border-color: var(--border-strong);
}

.mobile-toc-sheet__content {
  overflow-y: auto;
  padding: 1.25rem 1.25rem 2.5rem;
  -webkit-overflow-scrolling: touch;
}

.mobile-toc-sheet__list {
  margin: 0;
  padding-left: 1.2rem;
  list-style-type: decimal;
  color: var(--text-muted);
}

.mobile-toc-sheet__item {
  margin-bottom: 1rem;
  line-height: 1.5;
}

.mobile-toc-sheet__link {
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.mobile-toc-sheet__link:hover,
.mobile-toc-sheet__link.is-active {
  color: var(--brand);
  font-weight: 800;
}

.toc a.is-active {
  color: var(--brand) !important;
  font-weight: 700;
}

@media (max-width: 960px) {
  .mobile-toc-fab {
    display: flex;
  }
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand-glow);
  z-index: 99999;
  pointer-events: none;
  transition: width 0.1s ease;
}

/* Shimmer & Skeleton Loaders (CLS Optimization) */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.cat-nav-skeleton {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  overflow: hidden;
  height: 38px;
}

.cat-nav-skeleton__item {
  height: 28px;
  width: 90px;
  border-radius: var(--radius, 6px);
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--border) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite linear;
}

.cat-nav-skeleton__item:nth-child(2) {
  width: 140px;
}

.cat-nav-skeleton__item:nth-child(3) {
  width: 110px;
}

/* Clickable Zoom Images inside Articles */
.sto-single-article img {
  cursor: zoom-in;
  transition: opacity 0.25s ease;
}

.sto-single-article img:hover {
  opacity: 0.95;
}

/* Lightbox Premium Modal Overlay */
.sto-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(8, 8, 8, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  user-select: none;
}

.sto-lightbox.is-active {
  display: flex !important;
}

.sto-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Chameleon Backdrop Blur */
.sto-lightbox__backdrop-blur {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(60px) brightness(0.3) saturate(1.2);
  opacity: 0;
  transition: background-image 0.5s ease, opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.sto-lightbox.is-active .sto-lightbox__backdrop-blur {
  opacity: 0.25;
}

/* Lightbox Viewport & Slider */
.sto-lightbox__viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Slide Container with 3D Depth-Parallax */
.sto-lightbox__slide {
  position: absolute;
  width: 95vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9) translate3d(0, 0, 0);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
}

.sto-lightbox__slide.is-prev {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9) translate3d(-100%, 0, 0);
}

.sto-lightbox__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translate3d(0, 0, 0);
}

.sto-lightbox__slide.is-next {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9) translate3d(100%, 0, 0);
}

/* Architectural Frame Layout */
.sto-lightbox__frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: min(1000px, 85vw);
  max-height: min(650px, 72vh);
  background: rgba(16, 16, 16, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.02), 0 24px 70px rgba(0, 0, 0, 0.85);
  padding: 10px;
  box-sizing: border-box;
  overflow: visible;
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Hide architectural frame borders and shadows when image is zoomed */
.sto-lightbox__frame:has(.is-zoomed) {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.sto-lightbox__image {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  border-radius: 4px;
  cursor: zoom-in;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* Double-tap Zoom scale */
.sto-lightbox__image.is-zoomed {
  transform: scale(2);
  cursor: grab;
}

/* Standalone Numeric Counter */
.sto-lightbox__counter {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(12, 12, 12, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.4rem 0.95rem;
  border-radius: 20px;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* Lightbox Buttons (Brutal Premium style) */
.sto-lightbox__close,
.sto-lightbox__nav-btn {
  background: rgba(12, 12, 12, 0.6);
  border: 1px solid var(--border);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, color 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sto-lightbox__close:hover,
.sto-lightbox__nav-btn:hover {
  background: var(--bg-deep);
  border-color: #ffffff;
  color: var(--brand);
}

.sto-lightbox__close:active,
.sto-lightbox__nav-btn:active {
  transform: scale(0.9);
}

.sto-lightbox__close svg,
.sto-lightbox__nav-btn svg {
  stroke: currentColor;
  stroke-width: 2.5px;
  flex-shrink: 0;
}

/* Position Close Button */
.sto-lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
}

.sto-lightbox__close svg {
  width: 20px;
  height: 20px;
}

/* Symmetrical Navigation Arrows */
.sto-lightbox__nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
}

.sto-lightbox__nav-btn svg {
  width: 24px;
  height: 24px;
}

.sto-lightbox__nav-btn--prev {
  left: 1.5rem;
}

.sto-lightbox__nav-btn--next {
  right: 1.5rem;
}

/* Hide navigation buttons on mobile screens for cleaner layout (use swiping!) */
@media (max-width: 768px) {
  .sto-lightbox__nav-btn {
    display: none;
  }
}

/* Segmented Progress Indicator */
.sto-lightbox__progress {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.sto-lightbox__segment {
  height: 4px;
  width: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  transition: background 0.3s ease, width 0.3s ease;
  cursor: pointer;
  position: relative;
}

.sto-lightbox__segment::before {
  content: '';
  position: absolute;
  inset: -10px 0;
}

.sto-lightbox__segment:hover {
  background: rgba(255, 255, 255, 0.35);
}

.sto-lightbox__segment.is-active {
  background: linear-gradient(90deg, #de002b 0%, #ff4b1f 100%) !important;
  box-shadow: 0 0 12px rgba(255, 75, 31, 0.7);
  width: 36px;
}

.sto-lightbox__progress:has(.sto-lightbox__segment:only-child) {
  display: none;
}

/* Image Caption Overlay */
.sto-lightbox__caption {
  position: absolute;
  bottom: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(600px, 85vw);
  background: rgba(12, 12, 12, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius, 6px);
  padding: 0.6rem 1.2rem;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.sto-lightbox__caption.is-visible {
  opacity: 1;
}

/* Medium-style Quote Share Tooltip */
.sto-quote-share {
  position: absolute;
  height: 46px;
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 23px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  padding: 0 8px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) translateX(-50%) scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sto-quote-share::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: rgba(20, 20, 20, 0.9) transparent transparent;
  display: block;
  width: 0;
}

.sto-quote-share.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) translateX(-50%) scale(1);
}

.sto-quote-share__divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 6px;
}

.sto-quote-share__btn {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: rgba(255, 255, 255, 0.8) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 15px !important;
  height: 100% !important;
  font-family: 'Manrope', sans-serif !important;
  font-weight: 700;
  font-size: 0.84rem !important;
  transition: color 0.15s ease, transform 0.15s ease !important;
  text-decoration: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.sto-quote-share__btn svg {
  margin-right: 7px !important;
  transition: transform 0.15s ease !important;
  width: 16px !important;
  height: 16px !important;
  stroke-width: 2.5px !important;
}

.sto-quote-share__btn--social {
  padding: 0 !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  margin: 0 2px !important;
}

.sto-quote-share__btn--social svg {
  margin-right: 0 !important;
}

.sto-quote-share__btn:hover {
  color: #ffffff !important;
  background: transparent !important;
}

.sto-quote-share__btn--copy:hover {
  color: var(--brand, #de002b) !important;
}

.sto-quote-share__btn--tg:hover {
  color: #0088cc !important;
  background: rgba(0, 136, 204, 0.1) !important;
}

.sto-quote-share__btn--vk:hover {
  color: #0077ff !important;
  background: rgba(0, 119, 255, 0.1) !important;
}

.sto-quote-share__btn:active {
  transform: scale(0.95) !important;
}

/* Copied Animation */
.sto-quote-share__btn.is-copied {
  color: #4cd964 !important;
}
