/*
 * SmartJots liquid-glass enhancement for Porto.
 *
 * The solid surface values are the baseline. Browsers that support
 * backdrop-filter receive the translucent material recipe below. Long-form
 * reading surfaces remain deliberately dense for predictable contrast.
 */

:root {
  color-scheme: light;
  --glass-canvas: #f7fafc;
  --glass-surface: #fbfdfe;
  --glass-surface-strong: #ffffff;
  --glass-plate: #ffffff;
  --glass-plate-soft: #f7f8fc;
  --glass-border: rgba(35, 42, 72, 0.16);
  --glass-control-border: #747b90;
  --glass-placeholder: #596174;
  --glass-border-bright: rgba(255, 255, 255, 0.96);
  --glass-highlight: rgba(255, 255, 255, 0.92);
  --glass-shadow: 0 24px 64px rgba(31, 38, 72, 0.12),
    0 8px 24px rgba(70, 157, 157, 0.08);
  --glass-shadow-soft: 0 12px 36px rgba(31, 38, 72, 0.09),
    0 3px 12px rgba(70, 157, 157, 0.06);
  --glass-shadow-hover: 0 30px 76px rgba(31, 38, 72, 0.16),
    0 12px 28px rgba(56, 194, 137, 0.12);
  --glass-focus: #5aa9e5;
  --glass-tint-blue: rgba(67, 159, 255, 0.14);
  --glass-tint-sky: rgba(95, 189, 252, 0.13);
  --glass-tint-green: rgba(76, 251, 167, 0.14);
  --glass-radius-xl: 36px;
  --glass-radius-lg: 28px;
  --glass-radius-md: 20px;
  --glass-blur: 22px;
  --glass-saturation: 135%;
  --glass-motion: 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --glass-canvas: #090a12;
  --glass-surface: #151721;
  --glass-surface-strong: #191b27;
  --glass-plate: #171923;
  --glass-plate-soft: #11131c;
  --glass-border: rgba(229, 235, 255, 0.16);
  --glass-control-border: #9ba4bd;
  --glass-placeholder: #b3b9c9;
  --glass-border-bright: rgba(255, 255, 255, 0.2);
  --glass-highlight: rgba(255, 255, 255, 0.16);
  --glass-shadow: 0 28px 72px rgba(0, 0, 0, 0.42),
    0 8px 24px rgba(53, 111, 133, 0.18);
  --glass-shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.32),
    0 3px 14px rgba(53, 111, 133, 0.12);
  --glass-shadow-hover: 0 34px 84px rgba(0, 0, 0, 0.5),
    0 12px 30px rgba(52, 200, 140, 0.16);
  --glass-focus: #9dd3fd;
  --glass-tint-blue: rgba(45, 134, 255, 0.17);
  --glass-tint-sky: rgba(91, 189, 252, 0.16);
  --glass-tint-green: rgba(61, 251, 161, 0.15);
}

@supports (
  (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
) {
  :root {
    --glass-surface: rgba(255, 255, 255, 0.68);
    --glass-surface-strong: rgba(255, 255, 255, 0.88);
    --glass-plate: rgba(255, 255, 255, 0.9);
    --glass-plate-soft: rgba(248, 249, 255, 0.82);
  }

  [data-theme="dark"] {
    --glass-surface: rgba(20, 22, 32, 0.72);
    --glass-surface-strong: rgba(24, 26, 38, 0.9);
    --glass-plate: rgba(21, 23, 34, 0.91);
    --glass-plate-soft: rgba(16, 18, 28, 0.84);
  }
}

/* Canvas and ambient color ------------------------------------------------- */

body.liquid-glass-theme {
  min-height: 100vh;
  background-color: var(--glass-canvas);
  background-image: radial-gradient(
      48rem 34rem at -8% -4%,
      var(--glass-tint-green),
      transparent 70%
    ),
    radial-gradient(
      54rem 38rem at 108% 10%,
      var(--glass-tint-blue),
      transparent 72%
    ),
    radial-gradient(
      42rem 30rem at 54% 42%,
      var(--glass-tint-sky),
      transparent 76%
    );
  background-repeat: no-repeat;
}

body.liquid-glass-theme .site-wrap {
  position: relative;
  isolation: isolate;
}

body.liquid-glass-theme .cover-bg {
  height: 175vh;
}

body.liquid-glass-theme .line-web {
  opacity: 0.045;
}

body.liquid-glass-theme .flair-one,
body.liquid-glass-theme .flair-two {
  opacity: 0.42;
}

[data-theme="dark"] body.liquid-glass-theme .line-web {
  opacity: 0.075;
}

[data-theme="dark"] body.liquid-glass-theme .flair-one,
[data-theme="dark"] body.liquid-glass-theme .flair-two {
  opacity: 0.3;
}

body.liquid-glass-theme
  :where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--glass-focus);
  outline-offset: 3px;
}

body.liquid-glass-theme .skip-link {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  left: 0.75rem;
  z-index: 10000;
  padding: 0.75rem 1rem;
  border: 2px solid var(--glass-focus);
  border-radius: 999px;
  color: var(--text-color-dark);
  background: var(--glass-surface-strong);
  box-shadow: var(--glass-shadow-soft);
  transform: translateY(-180%);
  transition: transform var(--glass-motion);
}

body.liquid-glass-theme .skip-link:focus {
  transform: translateY(0);
}

body.liquid-glass-theme
  :where(.intro-title, .post-title, .section-title, .tag-name) {
  text-wrap: balance;
}

/*
 * Legacy article layouts carry their own color tokens. Strengthen the two
 * muted tokens here so small labels remain WCAG AA-compliant on their solid
 * reading surfaces without changing the authored layouts.
 */
body.liquid-glass-theme .post-content .cv-root {
  --muted: #60657c !important;
  --accent-2: #1eaeb5 !important;
}

body.liquid-glass-theme .post-content .cv-root[data-theme="dark"] {
  --muted: #b8bed2 !important;
  --accent-2: #a8f5fd !important;
}

/* Shared material behavior ------------------------------------------------ */

body.liquid-glass-theme
  :where(
    .header-inner,
    .hero-intro-content,
    .tag-item,
    .all-tags,
    .esub-section-wrap,
    .esub-form-wrap,
    .footer-top,
    .single-post .post-header,
    .single-post-img-container,
    .post-content,
    .toc-container,
    .archive-cover-inner,
    .tag-card,
    .prev-post,
    .next-post,
    .related-post-card,
    .comment-wrap,
    .membership-switch,
    .tier-wrap,
    .sign-card,
    .account-wrap
  ) {
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    var(--glass-shadow-soft);
}

@supports (
  (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
) {
  body.liquid-glass-theme
    :where(
      .header-inner,
      .hero-intro-content,
      .tag-item,
      .all-tags,
      .footer-top,
      .single-post .post-header,
      .single-post-img-container,
      .archive-cover-inner,
      .tag-card,
      .prev-post,
      .next-post,
      .related-post-card,
      .comment-wrap,
      .membership-switch,
      .tier-wrap,
      .sign-card,
      .account-wrap
    ) {
    -webkit-backdrop-filter: blur(var(--glass-blur))
      saturate(var(--glass-saturation));
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  }

  body.liquid-glass-theme :where(.post-content, .toc-container) {
    -webkit-backdrop-filter: blur(12px) saturate(115%);
    backdrop-filter: blur(12px) saturate(115%);
  }
}

/* Navigation -------------------------------------------------------------- */

body.liquid-glass-theme .site-header,
body.liquid-glass-theme .site-header.small {
  margin-top: 1rem;
  padding: 0 0.5rem;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body.liquid-glass-theme .header-inner {
  position: relative;
  isolation: isolate;
  padding: 0.6rem 0.75rem 0.6rem 1.25rem;
  border-radius: 999px;
  background: radial-gradient(
      80% 160% at 8% -40%,
      var(--glass-highlight),
      transparent 58%
    ),
    linear-gradient(
      125deg,
      var(--glass-tint-blue),
      transparent 36%,
      var(--glass-tint-green)
    ),
    var(--glass-surface);
  box-shadow:
    inset 0 1px 0 var(--glass-border-bright),
    var(--glass-shadow-soft);
}

body.liquid-glass-theme .header-inner::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0.32),
    transparent 24%,
    transparent 72%,
    rgba(101, 252, 184, 0.12)
  );
}

body.liquid-glass-theme .sj-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.45rem, 0.8vw, 0.7rem);
  flex: 0 0 auto;
  width: auto;
  line-height: 0;
  text-decoration: none;
}

body.liquid-glass-theme .sj-brand-wordmark {
  color: #000;
  font-family: Figtree, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2rem, 3vw, 2.85rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
}

[data-theme="dark"] body.liquid-glass-theme .sj-brand-wordmark {
  color: #fff;
}

body.liquid-glass-theme .sj-brand-logo .sj-brand-symbol {
  display: block;
  width: clamp(3rem, 4.5vw, 4.25rem);
  height: clamp(3rem, 4.5vw, 4.25rem);
  object-fit: contain;
  max-height: none;
}


body.liquid-glass-theme .nav-left {
  margin-left: 24px;
}

body.liquid-glass-theme .nav-left li,
body.liquid-glass-theme .nav-right li {
  margin-inline: 0.2rem;
}

body.liquid-glass-theme .nav-left > li > a:not(.btn),
body.liquid-glass-theme .nav-right > li > a:not(.btn) {
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  transition:
    background-color var(--glass-motion),
    color var(--glass-motion),
    transform var(--glass-motion);
}

body.liquid-glass-theme .nav-left > li > a:not(.btn)::after,
body.liquid-glass-theme .nav-right > li > a:not(.btn)::after {
  content: none;
}

body.liquid-glass-theme .nav-left > li:hover > a:not(.btn),
body.liquid-glass-theme .nav-left > li > a:not(.btn):focus-visible,
body.liquid-glass-theme .nav-right > li:hover > a:not(.btn),
body.liquid-glass-theme .nav-right > li > a:not(.btn):focus-visible {
  background: var(--glass-plate-soft);
}

body.liquid-glass-theme .nav-icon {
  width: 44px;
  height: 44px;
  margin-right: 0.4rem;
  justify-content: center;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-plate-soft);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  transition:
    transform var(--glass-motion),
    border-color var(--glass-motion),
    color var(--glass-motion);
}

body.liquid-glass-theme .nav-icon:hover {
  color: var(--theme-color);
  transform: translateY(-1px);
}

body.liquid-glass-theme .nav-left li > ul,
body.liquid-glass-theme .nav-right li > ul {
  padding: 0.35rem;
  border-color: var(--glass-border);
  border-radius: var(--glass-radius-md);
  background: var(--glass-surface-strong);
  box-shadow: var(--glass-shadow-soft);
  -webkit-backdrop-filter: blur(var(--glass-blur))
    saturate(var(--glass-saturation));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
}

body.liquid-glass-theme .nav-left li > ul li a,
body.liquid-glass-theme .nav-right li > ul li a {
  border-radius: 14px;
}

/* Hero -------------------------------------------------------------------- */

body.liquid-glass-theme .site-hero {
  margin-top: 1.25rem;
  margin-bottom: 5rem;
}

body.liquid-glass-theme .hero-intro-content {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.5rem, 6vw, 5rem);
  border-radius: var(--glass-radius-xl);
  background: radial-gradient(
      36rem 18rem at 8% 0%,
      var(--glass-highlight),
      transparent 68%
    ),
    radial-gradient(
      30rem 24rem at 100% 100%,
      var(--glass-tint-green),
      transparent 70%
    ),
    linear-gradient(
      130deg,
      var(--glass-tint-blue),
      transparent 42%,
      var(--glass-tint-sky)
    ),
    var(--glass-surface);
  box-shadow:
    inset 0 1px 0 var(--glass-border-bright),
    var(--glass-shadow);
}

body.liquid-glass-theme .hero-intro-content::before {
  content: "";
  position: absolute;
  inset: -28% -18% auto 34%;
  z-index: -1;
  height: 70%;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: linear-gradient(
    112deg,
    transparent 18%,
    rgba(255, 255, 255, 0.2) 48%,
    transparent 68%
  );
  transform: rotate(-8deg);
  opacity: 0.8;
}

body.liquid-glass-theme .hero-intro-content::after {
  content: "";
  position: absolute;
  right: -14%;
  bottom: -62%;
  z-index: -1;
  width: 58%;
  aspect-ratio: 1;
  pointer-events: none;
  border: 1px solid rgba(112, 174, 255, 0.26);
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 28%,
    rgba(255, 255, 255, 0.2),
    transparent 46%
  );
  box-shadow: inset 0 0 30px rgba(107, 252, 188, 0.12);
}

body.liquid-glass-theme .site-hero .intro-title {
  max-width: 950px;
  margin-inline: auto;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

body.liquid-glass-theme .site-hero .intro-description {
  position: relative;
  max-width: 720px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius-md);
  background: var(--glass-plate-soft);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

body.liquid-glass-theme .site-hero .cta-wrapper {
  margin-top: 2rem;
}

/* Refractive controls ----------------------------------------------------- */

body.liquid-glass-theme .btn {
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: radial-gradient(
      140% 160% at 18% -50%,
      rgba(255, 255, 255, 0.6),
      transparent 42%
    ),
    linear-gradient(125deg, #316b94 0%, #2492a5 52%, #279363 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(37, 94, 110, 0.28),
    0 10px 26px rgba(47, 152, 149, 0.24),
    0 2px 8px rgba(60, 77, 170, 0.18);
  text-shadow: 0 1px 2px rgba(17, 48, 59, 0.28);
  opacity: 1;
  transition:
    transform var(--glass-motion),
    box-shadow var(--glass-motion),
    filter var(--glass-motion);
}

body.liquid-glass-theme .btn:hover,
body.liquid-glass-theme .btn:focus {
  opacity: 1;
  filter: saturate(112%) brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(37, 94, 110, 0.3),
    0 15px 34px rgba(47, 152, 149, 0.3),
    0 4px 10px rgba(60, 77, 170, 0.2);
  transform: translateY(-2px);
}

body.liquid-glass-theme .btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow:
    inset 0 2px 4px rgba(24, 65, 81, 0.28),
    0 5px 14px rgba(44, 114, 128, 0.2);
}

body.liquid-glass-theme input[type="text"],
body.liquid-glass-theme input[type="email"],
body.liquid-glass-theme input[type="url"],
body.liquid-glass-theme textarea {
  min-height: 48px;
  border-color: var(--glass-control-border);
  color: var(--text-color-dark);
  background: var(--glass-plate);
  box-shadow:
    inset 0 1px 2px rgba(34, 40, 72, 0.06),
    0 1px 0 var(--glass-highlight);
}

body.liquid-glass-theme :where(input, textarea)::placeholder {
  color: var(--glass-placeholder);
  opacity: 1;
}

body.liquid-glass-theme input[type="text"]:focus,
body.liquid-glass-theme input[type="email"]:focus,
body.liquid-glass-theme input[type="url"]:focus,
body.liquid-glass-theme textarea:focus {
  border-color: var(--glass-focus);
  box-shadow: 0 0 0 3px rgba(90, 169, 229, 0.18);
}

body.liquid-glass-theme .hero-subscription-form .email:focus-visible {
  outline: 3px solid var(--glass-focus);
  outline-offset: 2px;
}

body.liquid-glass-theme .notification.success {
  background: #166534;
}

body.liquid-glass-theme .notification.error {
  background: #b91c1c;
}

/* Post and tag cards ------------------------------------------------------ */

body.liquid-glass-theme .post-loop {
  margin-top: 5.5rem;
}

body.liquid-glass-theme .post-cards-wrap {
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

body.liquid-glass-theme .post-card.js-card {
  overflow: hidden;
  isolation: isolate;
  padding: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius-lg);
  background: var(--glass-surface);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    var(--glass-shadow-soft);
  transition:
    transform var(--glass-motion),
    box-shadow var(--glass-motion),
    border-color var(--glass-motion);
}

body.liquid-glass-theme .post-card.js-card::before {
  inset: -45%;
  border-radius: 50%;
  background: conic-gradient(
    from var(--rotation),
    transparent 0 44%,
    rgba(80, 158, 255, 0.68) 49%,
    rgba(255, 255, 255, 0.8) 52%,
    rgba(77, 251, 170, 0.66) 56%,
    transparent 62% 100%
  );
  filter: blur(24px);
  opacity: 0.18;
  transition:
    opacity var(--glass-motion),
    transform 500ms ease;
}

body.liquid-glass-theme .post-card.js-card::after {
  inset: 1px;
  border-radius: calc(var(--glass-radius-lg) - 1px);
  background: radial-gradient(
      80% 52% at 10% 0%,
      var(--glass-highlight),
      transparent 62%
    ),
    linear-gradient(
      135deg,
      var(--glass-tint-blue),
      transparent 42%,
      var(--glass-tint-green)
    ),
    var(--glass-surface);
  box-shadow: inset 0 1px 0 var(--glass-border-bright);
}

@supports (
  (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
) {
  body.liquid-glass-theme .post-card.js-card::after {
    -webkit-backdrop-filter: blur(var(--glass-blur))
      saturate(var(--glass-saturation));
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  }
}

body.liquid-glass-theme .post-card .post-img-wrap {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius-md);
  background: var(--glass-plate-soft);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

body.liquid-glass-theme .post-card .post-img-wrap img {
  border-radius: calc(var(--glass-radius-md) - 1px);
  transition:
    transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 420ms ease;
}

body.liquid-glass-theme .post-card .post-info-wrap {
  flex: 1 1 auto;
  padding: 1.25rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius-md);
  background: var(--glass-plate);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

body.liquid-glass-theme .post-card .post-title {
  letter-spacing: -0.025em;
}

body.liquid-glass-theme .post-card .post-excerpt {
  color: var(--text-color-main);
}

body.liquid-glass-theme .post-card:focus-within,
body.liquid-glass-theme .post-card:hover {
  border-color: rgba(101, 176, 228, 0.32);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    var(--glass-shadow-hover);
}

body.liquid-glass-theme .post-card:focus-within::before,
body.liquid-glass-theme .post-card:hover::before {
  opacity: 0.62;
  transform: rotate(10deg) scale(1.04);
}

body.liquid-glass-theme .tag-item,
body.liquid-glass-theme .all-tags {
  overflow: hidden;
  isolation: isolate;
  border-radius: 999px;
  background: radial-gradient(
      120% 180% at 10% -60%,
      var(--glass-highlight),
      transparent 54%
    ),
    linear-gradient(
      125deg,
      var(--glass-tint-blue),
      transparent 48%,
      var(--glass-tint-green)
    ),
    var(--glass-surface);
  box-shadow:
    inset 0 1px 0 var(--glass-border-bright),
    var(--glass-shadow-soft);
  transition:
    transform var(--glass-motion),
    box-shadow var(--glass-motion),
    border-color var(--glass-motion);
}

body.liquid-glass-theme .tag-item::before,
body.liquid-glass-theme .all-tags::before {
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.28) 48%,
    transparent 72%
  );
  opacity: 0.35;
}

body.liquid-glass-theme .tag-item::after,
body.liquid-glass-theme .all-tags::after {
  content: none;
}

body.liquid-glass-theme .tag-item:hover,
body.liquid-glass-theme .all-tags:hover {
  border-color: rgba(101, 176, 228, 0.32);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    var(--glass-shadow);
}

body.liquid-glass-theme .all-tags:hover .all-tags-link {
  color: var(--text-color-dark);
}

/* Subscription and footer ------------------------------------------------ */

body.liquid-glass-theme .esub-section-wrap {
  position: relative;
  isolation: isolate;
  border-color: rgba(255, 255, 255, 0.28);
  border-radius: var(--glass-radius-xl);
  background: radial-gradient(
      40rem 24rem at 0% 0%,
      rgba(80, 178, 255, 0.42),
      transparent 62%
    ),
    radial-gradient(
      34rem 26rem at 100% 100%,
      rgba(111, 252, 190, 0.44),
      transparent 66%
    ),
    linear-gradient(125deg, #4780b6 0%, #4097b6 48%, #26a270 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    var(--glass-shadow);
}

body.liquid-glass-theme .esub-section-wrap::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.2),
    transparent 26%,
    transparent 70%,
    rgba(255, 255, 255, 0.1)
  );
}

body.liquid-glass-theme .esub-form-wrap {
  border-color: rgba(255, 255, 255, 0.32);
  border-radius: var(--glass-radius-lg);
  background: rgba(255, 255, 255, 0.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 16px 42px rgba(16, 47, 66, 0.24);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

body.liquid-glass-theme .esub-form-wrap .btn {
  background: radial-gradient(
      120% 170% at 15% -50%,
      rgba(255, 255, 255, 0.28),
      transparent 40%
    ),
    linear-gradient(120deg, #111326, #242743);
}

body.liquid-glass-theme .site-footer {
  border-top: 0;
  background: transparent;
}

body.liquid-glass-theme .footer-top {
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: var(--glass-radius-xl);
  background: radial-gradient(
      34rem 18rem at 0% 0%,
      var(--glass-highlight),
      transparent 66%
    ),
    linear-gradient(
      125deg,
      var(--glass-tint-blue),
      transparent 50%,
      var(--glass-tint-green)
    ),
    var(--glass-surface);
}

body.liquid-glass-theme .footer-bottom {
  margin-top: 1.5rem;
  padding: 2rem 0 3rem;
}

body.liquid-glass-theme .social-icon,
body.liquid-glass-theme .js-scroll-top {
  border: 1px solid var(--glass-border);
  background: var(--glass-plate-soft);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

/* Reading and archive surfaces ------------------------------------------- */

body.liquid-glass-theme .single-post .post-header {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border-radius: var(--glass-radius-xl);
  background: radial-gradient(
      34rem 16rem at 0% 0%,
      var(--glass-highlight),
      transparent 68%
    ),
    linear-gradient(
      130deg,
      var(--glass-tint-blue),
      transparent 46%,
      var(--glass-tint-green)
    ),
    var(--glass-surface);
}

body.liquid-glass-theme .single-post .post-title {
  letter-spacing: -0.04em;
  line-height: 1.08;
}

body.liquid-glass-theme .single-post-img-container {
  padding: 0.5rem;
  border-radius: var(--glass-radius-lg);
  background: var(--glass-surface);
}

body.liquid-glass-theme .single-post-img-container img {
  border-radius: calc(var(--glass-radius-lg) - 7px);
}

body.liquid-glass-theme .post-content-area {
  align-items: flex-start;
  margin-top: 2.5rem;
}

body.liquid-glass-theme .post-content {
  min-width: 0;
  padding: clamp(1.4rem, 4vw, 3rem);
  border-radius: var(--glass-radius-lg);
  background: var(--glass-plate);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 16px 46px rgba(31, 38, 72, 0.08);
}

body.liquid-glass-theme .toc-container {
  padding: 1.25rem;
  border-radius: var(--glass-radius-md);
  background: var(--glass-surface-strong);
}

body.liquid-glass-theme .archive-cover-inner {
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: var(--glass-radius-xl);
  background: radial-gradient(
      34rem 18rem at 0% 0%,
      var(--glass-highlight),
      transparent 66%
    ),
    linear-gradient(
      125deg,
      var(--glass-tint-blue),
      transparent 48%,
      var(--glass-tint-green)
    ),
    var(--glass-surface);
}

body.liquid-glass-theme .archive-cover-inner.has-image {
  padding: clamp(3rem, 7vw, 5rem) 1rem;
  border-radius: var(--glass-radius-xl);
}

body.liquid-glass-theme .archive-cover-inner.has-image .cover-content-wrapper {
  border-color: var(--glass-border);
  border-radius: var(--glass-radius-lg);
  background: var(--glass-surface-strong);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    var(--glass-shadow-soft);
}

body.liquid-glass-theme .archive-cover-inner .cover-image {
  border-radius: var(--glass-radius-xl);
}

body.liquid-glass-theme .tag-card,
body.liquid-glass-theme .prev-post,
body.liquid-glass-theme .next-post,
body.liquid-glass-theme .related-post-card,
body.liquid-glass-theme .comment-wrap,
body.liquid-glass-theme .membership-switch,
body.liquid-glass-theme .tier-wrap,
body.liquid-glass-theme .sign-card,
body.liquid-glass-theme .account-wrap {
  border-radius: var(--glass-radius-lg);
  background: linear-gradient(
      135deg,
      var(--glass-tint-blue),
      transparent 46%,
      var(--glass-tint-green)
    ),
    var(--glass-surface);
}

body.liquid-glass-theme .related-post-card {
  height: 100%;
  padding: 0.75rem;
  transition:
    transform var(--glass-motion),
    box-shadow var(--glass-motion);
}

body.liquid-glass-theme .related-post-card .post-img-container {
  overflow: hidden;
  margin-bottom: 1rem;
  border-radius: var(--glass-radius-md);
}

body.liquid-glass-theme .related-post-card .post-info-wrap {
  padding: 0.35rem 0.5rem 0.75rem;
}

body.liquid-glass-theme .post-membership-cta {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--glass-radius-lg);
  background: radial-gradient(
      120% 160% at 10% -40%,
      rgba(255, 255, 255, 0.26),
      transparent 42%
    ),
    linear-gradient(125deg, #4882b9, #28976e);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    var(--glass-shadow-soft);
}

/* Responsive behavior ---------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {
  body.liquid-glass-theme .post-card:hover,
  body.liquid-glass-theme .tag-item:hover,
  body.liquid-glass-theme .all-tags:hover,
  body.liquid-glass-theme .related-post-card:hover,
  body.liquid-glass-theme .prev-post:hover,
  body.liquid-glass-theme .next-post:hover {
    transform: translateY(-5px);
  }

  body.liquid-glass-theme .post-card:hover .post-img-wrap img,
  body.liquid-glass-theme .related-post-card:hover .post-img-wrap img {
    transform: scale(1.025);
    filter: saturate(106%);
  }
}

@media (max-width: 1200px) {
  body.liquid-glass-theme .site-header {
    padding-inline: 0.75rem;
  }

  body.liquid-glass-theme .header-inner {
    padding: 0.6rem 0.75rem;
    border-radius: var(--glass-radius-lg);
  }

  body.liquid-glass-theme .nav-left {
    margin-left: 0;
  }

  body.liquid-glass-theme.is-menu-open .site-header {
    top: 0;
    height: 100dvh;
    margin-top: 0;
    margin-bottom: 0;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem
      max(0.75rem, env(safe-area-inset-bottom));
    background: var(--glass-canvas);
  }

  body.liquid-glass-theme.is-menu-open .site-header > .container {
    height: 100%;
    min-height: 0;
  }

  body.liquid-glass-theme.is-menu-open .header-inner {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    flex-wrap: nowrap;
    border-radius: var(--glass-radius-lg);
    background: var(--glass-surface-strong);
  }

  body.liquid-glass-theme.is-menu-open .nav-wrap {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overscroll-behavior: contain;
    border-top-color: var(--glass-border);
  }

  body.liquid-glass-theme .nav-left li a,
  body.liquid-glass-theme .nav-right li a {
    min-height: 48px;
  }
}

@media (max-width: 767px) {
  body.liquid-glass-theme {
    --glass-blur: 12px;
    background-image: radial-gradient(
        32rem 24rem at -20% 0%,
        var(--glass-tint-green),
        transparent 72%
      ),
      radial-gradient(
        34rem 24rem at 120% 12%,
        var(--glass-tint-blue),
        transparent 74%
      );
  }

  body.liquid-glass-theme .site-header {
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    padding-inline: 0.5rem;
  }

  body.liquid-glass-theme .sj-brand-logo {
    gap: 0.35rem;
  }

  body.liquid-glass-theme .sj-brand-wordmark {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  body.liquid-glass-theme .sj-brand-logo .sj-brand-symbol {
    width: clamp(2.35rem, 10vw, 3rem);
    height: clamp(2.35rem, 10vw, 3rem);
  }

  body.liquid-glass-theme .hero-intro-content {
    padding: 2.25rem 1.15rem;
    border-radius: var(--glass-radius-lg);
  }

  body.liquid-glass-theme .site-hero {
    margin-bottom: 3.5rem;
  }

  body.liquid-glass-theme .site-hero .intro-title {
    font-size: clamp(2.25rem, 11vw, 3.5rem);
  }

  body.liquid-glass-theme .site-hero .intro-description {
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
  }

  body.liquid-glass-theme .post-loop {
    margin-top: 4rem;
  }

  body.liquid-glass-theme .post-card.js-card {
    border-radius: 24px;
  }

  body.liquid-glass-theme .post-card .post-info-wrap {
    padding: 1rem;
  }

  body.liquid-glass-theme .esub-section-wrap,
  body.liquid-glass-theme .footer-top,
  body.liquid-glass-theme .single-post .post-header,
  body.liquid-glass-theme .archive-cover-inner {
    border-radius: var(--glass-radius-lg);
  }

  body.liquid-glass-theme .post-content {
    padding: 1.35rem;
    border-radius: 22px;
  }

  body.liquid-glass-theme .single-post-img-container {
    padding: 0.35rem;
    border-radius: 22px;
  }
}

@media (max-width: 575px) {
  body.liquid-glass-theme .container {
    padding-inline: 12px;
  }

  body.liquid-glass-theme .header-inner {
    padding-inline: 0.6rem;
  }

  body.liquid-glass-theme .nav-icon {
    width: 44px;
    height: 44px;
  }

  body.liquid-glass-theme .hero-intro-content::after {
    right: -32%;
    bottom: -38%;
    width: 82%;
  }

  body.liquid-glass-theme .esub-section-wrap {
    padding: 1.4rem;
  }

  body.liquid-glass-theme .esub-form-wrap {
    padding: 1.15rem;
  }

  body.liquid-glass-theme .footer-top {
    padding: 1.5rem;
  }

  body.liquid-glass-theme .single-post .post-title {
    font-size: clamp(2rem, 9vw, 2.75rem);
    line-height: 1.12;
  }

  body.liquid-glass-theme .single-post .post-excerpt {
    font-size: 1.125rem;
    line-height: 1.65;
  }
}

@media (max-width: 359px) {
  body.liquid-glass-theme .header-logo,
  body.liquid-glass-theme .mobile-only-items {
    flex-wrap: nowrap;
  }

  body.liquid-glass-theme .sj-brand-logo {
    gap: 0.25rem;
  }

  body.liquid-glass-theme .sj-brand-wordmark {
    font-size: 1.45rem;
  }

  body.liquid-glass-theme .sj-brand-logo .sj-brand-symbol {
    width: 2.2rem;
    height: 2.2rem;
  }

  body.liquid-glass-theme .mobile-only-items .nav-icon {
    margin-right: 0.2rem;
  }
}

/* Preference and capability fallbacks ----------------------------------- */

@media (prefers-reduced-motion: reduce) {
  body.liquid-glass-theme *,
  body.liquid-glass-theme *::before,
  body.liquid-glass-theme *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  body.liquid-glass-theme
    :where(
      .post-card,
      .tag-item,
      .all-tags,
      .related-post-card,
      .prev-post,
      .next-post,
      .btn
    ):hover {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass-surface: #fbfdfe;
    --glass-surface-strong: #ffffff;
    --glass-plate: #ffffff;
    --glass-plate-soft: #f7f8fc;
  }

  [data-theme="dark"] {
    --glass-surface: #151721;
    --glass-surface-strong: #191b27;
    --glass-plate: #171923;
    --glass-plate-soft: #11131c;
  }

  body.liquid-glass-theme
    :where(
      .header-inner,
      .hero-intro-content,
      .post-card,
      .tag-item,
      .all-tags,
      .esub-form-wrap,
      .footer-top,
      .single-post .post-header,
      .single-post-img-container,
      .post-content,
      .toc-container,
      .archive-cover-inner,
      .tag-card,
      .prev-post,
      .next-post,
      .related-post-card,
      .comment-wrap,
      .membership-switch,
      .tier-wrap,
      .sign-card,
      .account-wrap
    ) {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --glass-border: rgba(19, 24, 43, 0.52);
    --glass-surface: #ffffff;
    --glass-surface-strong: #ffffff;
    --glass-plate: #ffffff;
    --glass-plate-soft: #f4f5fa;
  }

  [data-theme="dark"] {
    --glass-border: rgba(255, 255, 255, 0.56);
    --glass-surface: #12141e;
    --glass-surface-strong: #171923;
    --glass-plate: #171923;
    --glass-plate-soft: #10121b;
  }

  body.liquid-glass-theme
    :where(
      .header-inner,
      .hero-intro-content,
      .post-card,
      .tag-item,
      .all-tags,
      .footer-top,
      .post-content
    ) {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (forced-colors: active) {
  body.liquid-glass-theme
    :where(
      .header-inner,
      .hero-intro-content,
      .post-card,
      .post-info-wrap,
      .tag-item,
      .all-tags,
      .esub-section-wrap,
      .esub-form-wrap,
      .footer-top,
      .single-post .post-header,
      .single-post-img-container,
      .post-content,
      .toc-container,
      .archive-cover-inner,
      .tag-card,
      .prev-post,
      .next-post,
      .related-post-card,
      .comment-wrap,
      .membership-switch,
      .tier-wrap,
      .sign-card,
      .account-wrap,
      .btn
    ) {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }

  body.liquid-glass-theme .btn {
    forced-color-adjust: auto;
  }
}

/* ========================================================================== 
   SmartJots component system 3.0

   Completes the refractive design across controls, reading utilities,
   Ghost editor cards, member surfaces, notifications, and empty/error states.
   Ghost Comments/Portal/Search are bridged separately in the accessibility
   runtime because their controls render in isolated frames.
   ========================================================================== */

:root {
  --sj-brand: #5aa9e5;
  --sj-brand-strong: #418cc4;
  --sj-brand-green: #2cc282;
  --sj-brand-cyan: #268bd2;
  --sj-success: #087f5b;
  --sj-danger: #c83358;
  --sj-warning: #a75b00;
  --sj-control-height: 48px;
  --sj-component-gap: clamp(1rem, 2.4vw, 1.75rem);
}

[data-theme="dark"] {
  --sj-brand: #9dd3fd;
  --sj-brand-strong: #7fc6fc;
  --sj-brand-green: #7cfcc2;
  --sj-brand-cyan: #7cc9ff;
  --sj-success: #6ee7b7;
  --sj-danger: #ff8aa7;
  --sj-warning: #ffc56e;
}

/* Semantic controls ------------------------------------------------------ */

body.liquid-glass-theme .btn-secondary {
  color: var(--text-color-dark);
  background: linear-gradient(145deg, var(--glass-fill-strong), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-quiet) border-box;
  box-shadow: inset 0 1px 0 var(--glass-border-bright),
    0 8px 22px rgba(31, 38, 72, 0.1);
  text-shadow: none;
}

body.liquid-glass-theme .btn-secondary:hover,
body.liquid-glass-theme .btn-secondary:focus {
  color: var(--text-color-dark);
}

body.liquid-glass-theme .btn-flat:not(.btn-error):not(.btn-success) {
  background: radial-gradient(
        140% 170% at 16% -58%,
        rgba(255, 255, 255, 0.58),
        transparent 43%
      )
      padding-box,
    linear-gradient(120deg, #336da5 0%, #3397b5 48%, #20b272 100%) padding-box,
    var(--glass-rim) border-box;
}

body.liquid-glass-theme .btn-error {
  color: #fff;
  background: radial-gradient(
        140% 170% at 16% -58%,
        rgba(255, 255, 255, 0.48),
        transparent 43%
      )
      padding-box,
    linear-gradient(120deg, #991b3e, #c83358 55%, #e24566) padding-box,
    linear-gradient(130deg, #ffb5c6, #ff5f87, #9c183b) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 11px 26px rgba(33, 157, 85, 0.22);
}

body.liquid-glass-theme .btn-success {
  color: #fff;
  background: linear-gradient(120deg, #087f5b, #0b9b6e) padding-box,
    linear-gradient(130deg, #9af5d0, #1abf88, #087f5b) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 11px 26px rgba(8, 127, 91, 0.2);
}

body.liquid-glass-theme
  :where(.btn, button, input[type="submit"]):where(
    :disabled,
    [aria-disabled="true"],
    [aria-busy="true"],
    .loading
  ) {
  cursor: wait;
  filter: saturate(65%);
  opacity: 0.62;
  pointer-events: none;
  transform: none;
}

body.liquid-glass-theme .btn[aria-busy="true"] span,
body.liquid-glass-theme .btn.loading span {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

body.liquid-glass-theme .btn[aria-busy="true"] span::after,
body.liquid-glass-theme .btn.loading span::after {
  width: 0.9em;
  height: 0.9em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: sj-spin 0.8s linear infinite;
}

@keyframes sj-spin {
  to {
    transform: rotate(1turn);
  }
}

body.liquid-glass-theme
  :where(
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    select,
    textarea
  ) {
  min-height: var(--sj-control-height);
  border: 1px solid transparent;
  color: var(--text-color-main);
  background: linear-gradient(var(--glass-fill-strong), var(--glass-fill-strong))
      padding-box,
    var(--glass-rim-quiet) border-box;
  box-shadow: inset 0 1px 0 var(--glass-border-bright),
    0 7px 18px rgba(31, 38, 72, 0.05);
  transition: border-color var(--glass-motion), box-shadow var(--glass-motion),
    background var(--glass-motion);
}

body.liquid-glass-theme select {
  width: 100%;
  padding: 0 2rem;
  border-radius: 999px;
}

body.liquid-glass-theme
  :where(
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    select,
    textarea
  ):focus {
  border-color: transparent;
  background: linear-gradient(var(--glass-fill-strong), var(--glass-fill-strong))
      padding-box,
    var(--glass-rim) border-box;
  box-shadow: 0 0 0 4px rgba(90, 169, 229, 0.13),
    0 10px 24px rgba(59, 111, 142, 0.1);
  outline: none;
}

body.liquid-glass-theme
  :where(input, select, textarea):where(:disabled, [aria-disabled="true"]) {
  cursor: not-allowed;
  opacity: 0.58;
}

body.liquid-glass-theme :where(input, textarea):user-invalid {
  background: linear-gradient(var(--glass-fill-strong), var(--glass-fill-strong))
      padding-box,
    linear-gradient(130deg, #ff9db6, var(--sj-danger)) border-box;
}

body.liquid-glass-theme :where(input, textarea):-webkit-autofill {
  -webkit-text-fill-color: var(--text-color-main);
  caret-color: var(--text-color-main);
  box-shadow: inset 0 0 0 1000px var(--glass-fill-strong),
    0 7px 18px rgba(31, 38, 72, 0.06);
}

body.liquid-glass-theme :where(input[type="checkbox"], input[type="radio"]) {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--sj-brand);
}

body.liquid-glass-theme .gh-error,
body.liquid-glass-theme .form-error {
  color: var(--sj-danger);
  font-weight: 650;
}

/* Navigation details and account menu ----------------------------------- */

body.liquid-glass-theme .nav-left li > ul,
body.liquid-glass-theme .nav-right li > ul {
  padding: 0.5rem;
  border-radius: var(--glass-radius-md);
}

body.liquid-glass-theme .nav-left li > ul li,
body.liquid-glass-theme .nav-right li > ul li {
  border: 0;
}

body.liquid-glass-theme .nav-left li > ul li a,
body.liquid-glass-theme .nav-right li > ul li a {
  height: auto;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  line-height: 1.35;
  transition: color var(--glass-motion), background var(--glass-motion),
    box-shadow var(--glass-motion);
}

body.liquid-glass-theme .nav-left li > ul li a:hover,
body.liquid-glass-theme .nav-left li > ul li a:focus-visible,
body.liquid-glass-theme .nav-right li > ul li a:hover,
body.liquid-glass-theme .nav-right li > ul li a:focus-visible {
  color: var(--text-color-dark);
  background: linear-gradient(
    120deg,
    rgba(72, 169, 255, 0.14),
    rgba(95, 191, 252, 0.13) 52%,
    rgba(72, 251, 164, 0.13)
  );
  box-shadow: inset 0 0 0 1px rgba(90, 169, 229, 0.18);
}

body.liquid-glass-theme .nav-user-link {
  border: 1px solid transparent;
  background: linear-gradient(var(--glass-fill-strong), var(--glass-fill-strong))
      padding-box,
    var(--glass-rim-soft) border-box;
  box-shadow: var(--glass-shadow-soft);
}

body.liquid-glass-theme .nav-user-link:focus-visible {
  box-shadow: 0 0 0 4px rgba(90, 169, 229, 0.18), var(--glass-shadow-soft);
}

body.liquid-glass-theme .nav-right .user-detail {
  margin: 0 0.25rem 0.35rem;
  padding: 0.75rem;
  border-bottom-color: rgba(90, 169, 229, 0.16);
  white-space: normal;
}

body.liquid-glass-theme .nav-right :where(.user-name, .user-email) {
  overflow-wrap: anywhere;
}

/* Article metadata, sharing, and pagination ----------------------------- */

body.liquid-glass-theme .tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

body.liquid-glass-theme .tag-list a,
body.liquid-glass-theme .tag-list :where(.post-featured, .post-visibility) {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(90, 169, 229, 0.16);
  border-radius: 999px;
  color: var(--text-color-main);
  background: linear-gradient(145deg, var(--glass-fill-strong), var(--glass-fill-b));
  box-shadow: inset 0 1px 0 var(--glass-border-bright);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

body.liquid-glass-theme .tag-list a:hover,
body.liquid-glass-theme .tag-list a:focus-visible {
  border-color: rgba(90, 169, 229, 0.42);
  color: var(--sj-brand-strong);
}

body.liquid-glass-theme .post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  color: var(--text-color-main);
}

body.liquid-glass-theme .post-meta :where(.post-date, .read-time) {
  font-variant-numeric: tabular-nums;
}

body.liquid-glass-theme .share-wrap {
  padding: 1rem 0;
}

body.liquid-glass-theme .share-title {
  margin-bottom: 0.9rem;
  letter-spacing: -0.025em;
}

body.liquid-glass-theme .share-links {
  flex-wrap: wrap;
  gap: 0.7rem;
}

body.liquid-glass-theme .social-icon,
body.liquid-glass-theme .js-scroll-top {
  border: 1px solid transparent;
  color: var(--text-color-main);
  background: linear-gradient(var(--glass-fill-strong), var(--glass-fill-strong))
      padding-box,
    var(--glass-rim-quiet) border-box;
  box-shadow: inset 0 1px 0 var(--glass-border-bright),
    0 6px 16px rgba(31, 38, 72, 0.07);
}

body.liquid-glass-theme .social-icon:focus-visible,
body.liquid-glass-theme .js-scroll-top:focus-visible {
  color: var(--text-color-dark);
  box-shadow: 0 0 0 4px rgba(90, 169, 229, 0.18),
    0 8px 20px rgba(31, 38, 72, 0.1);
}

body.liquid-glass-theme .prev-next-wrap,
body.liquid-glass-theme .related-post-wrap {
  margin-top: clamp(3.5rem, 7vw, 6rem);
}

body.liquid-glass-theme .prev-next-wrap {
  gap: var(--sj-component-gap);
}

body.liquid-glass-theme .prev-next-wrap :where(.prev-post, .next-post) {
  min-height: 100%;
}

body.liquid-glass-theme .related-post-card-wrap {
  gap: var(--sj-component-gap);
}

body.liquid-glass-theme .pagination-wrap {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding: 1rem;
}

body.liquid-glass-theme .post-load-button {
  min-width: min(100%, 190px);
}

/* Comments shell --------------------------------------------------------- */

body.liquid-glass-theme .comment-wrap {
  width: min(100%, 1280px);
  max-width: 1280px;
  margin: clamp(3.5rem, 7vw, 6rem) auto 0;
  padding: clamp(1.25rem, 3.5vw, 3rem);
  border: 2px solid transparent;
  border-radius: var(--glass-radius-lg);
  background: radial-gradient(
        32rem 24rem at 0% 0%,
        rgba(67, 159, 255, 0.12),
        transparent 70%
      )
      padding-box,
    radial-gradient(
        32rem 24rem at 100% 100%,
        rgba(76, 251, 167, 0.12),
        transparent 70%
      )
      padding-box,
    linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b)) padding-box,
    var(--glass-rim) border-box;
  box-shadow: var(--glass-shadow);
}

body.liquid-glass-theme .comment-heading,
body.liquid-glass-theme .comment-container {
  width: min(100%, 1080px);
  max-width: 1080px;
  margin-right: auto;
  margin-left: auto;
}

body.liquid-glass-theme .comment-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.4rem, 3vw, 2.25rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(90, 169, 229, 0.16);
}

body.liquid-glass-theme .comment-heading h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  letter-spacing: -0.04em;
}

body.liquid-glass-theme .comment-count {
  flex: none;
  color: var(--text-color-main);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

body.liquid-glass-theme .comment-container,
body.liquid-glass-theme #ghost-comments-root,
body.liquid-glass-theme #ghost-comments-root > iframe {
  width: 100%;
}

/* Reading utilities ------------------------------------------------------ */

body.liquid-glass-theme .toc-container {
  padding: 1rem;
  border: 1px solid transparent;
  border-radius: var(--glass-radius-md);
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-quiet) border-box;
  box-shadow: var(--glass-shadow-soft);
}

body.liquid-glass-theme .toc-title {
  margin: 0 0 0.75rem;
  padding: 0 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(90, 169, 229, 0.16);
}

body.liquid-glass-theme .toc > .toc-list {
  padding: 0;
}

body.liquid-glass-theme .toc ol ol {
  margin-top: 0.25rem;
  padding-left: 0.75rem;
}

body.liquid-glass-theme .toc ol li {
  margin: 0.15rem 0;
}

body.liquid-glass-theme .toc-link {
  position: relative;
  display: block;
  padding: 0.55rem 0.65rem 0.55rem 0.8rem;
  border-radius: 10px;
  color: var(--text-color-main);
  line-height: 1.4;
  overflow-wrap: anywhere;
  transition: color var(--glass-motion), background var(--glass-motion),
    box-shadow var(--glass-motion);
}

body.liquid-glass-theme .toc-link::before {
  top: 0.55rem;
  bottom: 0.55rem;
  left: 0;
  width: 3px;
  height: auto;
  margin: 0;
  border-radius: 3px;
  background: rgba(90, 169, 229, 0.2);
}

body.liquid-glass-theme .toc-link:hover,
body.liquid-glass-theme .toc-link:focus-visible,
body.liquid-glass-theme .toc-link.is-active-link {
  color: var(--text-color-dark);
  text-decoration: none;
  background: linear-gradient(
    110deg,
    rgba(72, 169, 255, 0.12),
    rgba(95, 191, 252, 0.12),
    rgba(72, 251, 164, 0.1)
  );
}

body.liquid-glass-theme .toc-link.is-active-link::before {
  background: linear-gradient(180deg, var(--sj-brand-cyan), var(--sj-brand-green));
}

body.liquid-glass-theme .post-content .table-responsive {
  overflow-x: auto;
  border: 1px solid transparent;
  border-radius: var(--glass-radius-md);
  background: linear-gradient(var(--glass-fill-strong), var(--glass-fill-strong))
      padding-box,
    var(--glass-rim-quiet) border-box;
  box-shadow: var(--glass-shadow-soft);
  scrollbar-color: var(--sj-brand) transparent;
}

body.liquid-glass-theme .post-content table {
  min-width: 42rem;
  border: 0;
  background: transparent;
}

body.liquid-glass-theme .post-content :where(th, td) {
  padding: 0.85rem 1rem;
  border: 0;
  border-bottom: 1px solid rgba(90, 169, 229, 0.14);
}

body.liquid-glass-theme .post-content th {
  color: var(--text-color-dark);
  background: linear-gradient(
    110deg,
    rgba(72, 169, 255, 0.11),
    rgba(95, 191, 252, 0.1),
    rgba(72, 251, 164, 0.08)
  );
  font-weight: 750;
}

body.liquid-glass-theme .post-content tbody tr:nth-child(even) td {
  background: rgba(90, 169, 229, 0.035);
}

body.liquid-glass-theme .post-content tbody tr:last-child td {
  border-bottom: 0;
}

body.liquid-glass-theme .post-content pre,
body.liquid-glass-theme .post-content pre[class*="language-"] {
  border: 1px solid transparent;
  border-radius: var(--glass-radius-md);
  color: #e9ebff;
  background: linear-gradient(145deg, #171a2b, #0f1120) padding-box,
    linear-gradient(132deg, #4db7ff, #6fc8fc 52%, #4deca2) border-box;
  box-shadow: 0 14px 34px rgba(17, 20, 40, 0.2);
  scrollbar-color: #7fc6fc #171a2b;
}

body.liquid-glass-theme .post-content :not(pre) > code {
  border: 1px solid rgba(90, 169, 229, 0.16);
  color: var(--sj-brand-strong);
  background: rgba(90, 169, 229, 0.09);
}

body.liquid-glass-theme .post-content blockquote:not(.kg-blockquote-alt) {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid transparent;
  border-radius: var(--glass-radius-md);
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-soft) border-box;
  box-shadow: var(--glass-shadow-soft);
}

body.liquid-glass-theme .post-content blockquote:not(.kg-blockquote-alt)::after {
  top: 1.25rem;
  bottom: 1.25rem;
  left: -2px;
  width: 4px;
  height: auto;
}

.post-content pre .token.comment,
.post-content pre .token.prolog,
.post-content pre .token.doctype,
.post-content pre .token.cdata {
  color: #aeb6cf;
}

.post-content pre .token.punctuation {
  color: #d0d5e8;
}

.post-content pre .token.property,
.post-content pre .token.tag,
.post-content pre .token.boolean,
.post-content pre .token.number,
.post-content pre .token.constant,
.post-content pre .token.symbol,
.post-content pre .token.deleted {
  color: #91fdc7;
}

.post-content pre .token.selector,
.post-content pre .token.attr-name,
.post-content pre .token.string,
.post-content pre .token.char,
.post-content pre .token.builtin,
.post-content pre .token.inserted {
  color: #a8e6a1;
}

.post-content pre .token.operator,
.post-content pre .token.entity,
.post-content pre .token.url,
.post-content pre .language-css .token.string,
.post-content pre .style .token.string {
  color: #ffd08a;
}

.post-content pre .token.atrule,
.post-content pre .token.attr-value,
.post-content pre .token.keyword {
  color: #82c7ff;
}

.post-content pre .token.function,
.post-content pre .token.class-name {
  color: #b6e8fe;
}

.post-content pre .token.regex,
.post-content pre .token.important,
.post-content pre .token.variable {
  color: #ffc76c;
}

/* Ghost editor cards ----------------------------------------------------- */

body.liquid-glass-theme .post-content
  :where(
    a.kg-bookmark-container,
    .kg-product-card-container,
    .kg-file-card-container,
    .kg-audio-card,
    .kg-video-card,
    .kg-toggle-card,
    .kg-nft-card-container,
    .kg-collection-card,
    .kg-transistor-card
  ) {
  border: 1px solid transparent !important;
  border-radius: var(--glass-radius-md) !important;
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-quiet) border-box !important;
  box-shadow: var(--glass-shadow-soft) !important;
}

body.liquid-glass-theme .post-content a.kg-bookmark-container::before,
body.liquid-glass-theme .post-content a.kg-bookmark-container::after {
  content: none;
}

body.liquid-glass-theme .post-content a.kg-bookmark-container:hover,
body.liquid-glass-theme .post-content a.kg-bookmark-container:focus-visible {
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
      padding-box,
    var(--glass-rim) border-box !important;
  box-shadow: var(--glass-shadow-hover) !important;
}

body.liquid-glass-theme .post-content
  :where(.kg-bookmark-title, .kg-bookmark-description, .kg-bookmark-metadata) {
  color: var(--text-color-main);
}

body.liquid-glass-theme .post-content
  :where(
    .kg-callout-card,
    .kg-header-card,
    .kg-signup-card,
    .kg-cta-card,
    .kg-file-card,
    .kg-audio-card,
    .kg-video-card,
    .kg-toggle-card,
    .kg-product-card
  ) {
  border: 1px solid rgba(90, 169, 229, 0.18);
  border-radius: var(--glass-radius-md);
  box-shadow: var(--glass-shadow-soft);
}

body.liquid-glass-theme .post-content
  :where(.kg-image-card img, .kg-gallery-image img, .kg-video-card video) {
  box-shadow: 0 10px 28px rgba(31, 38, 72, 0.1);
}

body.liquid-glass-theme .post-content
  :where(
    .kg-btn,
    .kg-product-card-button,
    .kg-signup-card-button,
    .kg-header-card-button,
    .kg-cta-button,
    .kg-file-card-button
  ) {
  min-height: var(--sj-control-height);
  padding: 0.72rem 1.5rem !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: radial-gradient(
        140% 170% at 16% -58%,
        rgba(255, 255, 255, 0.56),
        transparent 43%
      )
      padding-box,
    linear-gradient(120deg, #336da5 0%, #3397b5 48%, #20b272 100%) padding-box,
    var(--glass-rim) border-box !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56),
    0 11px 26px rgba(48, 140, 152, 0.22) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  transition: filter var(--glass-motion), transform var(--glass-motion),
    box-shadow var(--glass-motion);
}

body.liquid-glass-theme .post-content
  :where(
    .kg-btn,
    .kg-product-card-button,
    .kg-signup-card-button,
    .kg-header-card-button,
    .kg-cta-button,
    .kg-file-card-button
  ):focus-visible {
  outline: 3px solid var(--glass-focus);
  outline-offset: 3px;
}

body.liquid-glass-theme .post-content .kg-signup-card-fields {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 10px 28px rgba(16, 47, 66, 0.16);
}

body.liquid-glass-theme .post-content .kg-signup-card-input {
  min-width: 0;
  color: #171923;
  background: transparent !important;
  box-shadow: none;
}

body.liquid-glass-theme .post-content .kg-signup-card-heading {
  font-size: clamp(2rem, 5vw, 3.5rem) !important;
  text-wrap: balance;
}

body.liquid-glass-theme .post-content .kg-toggle-heading {
  color: var(--text-color-dark);
}

body.liquid-glass-theme .post-content :where(.kg-embed-card, .kg-video-card) iframe {
  max-width: 100%;
  border: 1px solid rgba(90, 169, 229, 0.18);
  border-radius: var(--glass-radius-md);
  background: var(--glass-fill-strong);
  box-shadow: var(--glass-shadow-soft);
}

/* Membership, account, and gated-content surfaces ----------------------- */

body.liquid-glass-theme .post-membership-cta {
  border: 1px solid transparent;
  border-radius: var(--glass-radius-lg);
  background: radial-gradient(
        36rem 22rem at 0% 0%,
        rgba(75, 190, 255, 0.32),
        transparent 62%
      )
      padding-box,
    linear-gradient(128deg, #26425e 0%, #2c7082 48%, #268b60 100%) padding-box,
    var(--glass-rim) border-box;
  box-shadow: var(--glass-shadow);
}

body.liquid-glass-theme .post-membership-cta .btn {
  color: #1b313f;
  background: linear-gradient(#fff, #f2faff) padding-box,
    var(--glass-rim-soft) border-box;
  box-shadow: 0 10px 28px rgba(13, 37, 53, 0.24);
  text-shadow: none;
}

body.liquid-glass-theme .membership-switch {
  max-width: 290px;
  padding: 6px;
  border: 1px solid transparent;
  background: linear-gradient(145deg, var(--glass-fill-strong), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-soft) border-box;
  box-shadow: var(--glass-shadow-soft);
}

body.liquid-glass-theme .membership-switch::before {
  top: 6px;
  bottom: 6px;
  right: 6px;
  width: calc(50% - 6px);
  border-radius: 999px;
  background: linear-gradient(120deg, #488cc6, #3faab4 58%, #2cc282);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 7px 18px rgba(57, 131, 152, 0.2);
}

body.liquid-glass-theme .membership-switch button,
body.liquid-glass-theme .membership-switch button.btn {
  height: 44px;
  padding: 0 1rem;
  border: 0;
  color: var(--text-color-main);
  background: transparent;
  box-shadow: none;
  line-height: 44px;
  text-shadow: none;
  transform: none;
}

body.liquid-glass-theme .membership-switch button:focus-visible {
  outline-offset: -2px;
}

body.liquid-glass-theme .tiers-container {
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sj-component-gap);
}

body.liquid-glass-theme .tier-wrap {
  overflow: visible;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid transparent;
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-soft) border-box;
}

body.liquid-glass-theme .tier-wrap .table-header,
body.liquid-glass-theme .subscriptions-info,
body.liquid-glass-theme .members-button-wrap {
  border-color: rgba(90, 169, 229, 0.16);
}

body.liquid-glass-theme :where(.trial-period, .discount-label) {
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(120deg, #488cc6, #3faab4 58%, #2cc282);
  box-shadow: 0 7px 18px rgba(57, 131, 152, 0.2);
}

body.liquid-glass-theme .tier-wrap .price {
  color: var(--text-color-dark);
  font-size: clamp(2.4rem, 5vw, 3rem);
  letter-spacing: -0.055em;
}

body.liquid-glass-theme .tier-wrap .icon-list svg {
  color: var(--sj-brand);
}

body.liquid-glass-theme .sign-card,
body.liquid-glass-theme .account-wrap {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid transparent;
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-soft) border-box;
  box-shadow: var(--glass-shadow);
}

body.liquid-glass-theme .sign-card {
  width: min(100%, 500px);
  max-width: 500px;
}

body.liquid-glass-theme .members-page-wrap {
  min-height: 100svh;
  background: radial-gradient(
      48rem 34rem at -8% -4%,
      var(--glass-tint-green),
      transparent 70%
    ),
    radial-gradient(
      54rem 38rem at 108% 10%,
      var(--glass-tint-blue),
      transparent 72%
    );
}

body.liquid-glass-theme .members-page-cover-image img {
  filter: saturate(92%) contrast(102%);
}

body.liquid-glass-theme .member-avatar-wrap {
  border: 1px solid transparent;
  background: linear-gradient(var(--glass-fill-strong), var(--glass-fill-strong))
      padding-box,
    var(--glass-rim) border-box;
  box-shadow: var(--glass-shadow-soft);
}

body.liquid-glass-theme .member-avatar-wrap::before {
  content: none;
}

body.liquid-glass-theme .subscription-expiration-warning {
  border: 1px solid transparent;
  color: var(--sj-danger);
  background: linear-gradient(
        145deg,
        rgba(246, 255, 250, 0.96),
        rgba(238, 255, 246, 0.9)
      )
      padding-box,
    linear-gradient(130deg, #ffadc1, var(--sj-danger)) border-box;
}

[data-theme="dark"] body.liquid-glass-theme .subscription-expiration-warning {
  background: linear-gradient(rgba(21, 59, 38, 0.92), rgba(18, 43, 31, 0.9))
      padding-box,
    linear-gradient(130deg, #ffadc1, var(--sj-danger)) border-box;
}

body.liquid-glass-theme .subscription-info-wrap:not(:last-child) {
  border-color: rgba(90, 169, 229, 0.16);
}

body.liquid-glass-theme .account-settings-link,
body.liquid-glass-theme .sign-card .alternate-option a,
body.liquid-glass-theme .post-membership-cta .sign-in-cta a {
  border-radius: 6px;
  font-weight: 700;
  text-underline-offset: 0.2em;
}

/* Notifications and system states --------------------------------------- */

body.liquid-glass-theme .notification {
  top: max(1rem, env(safe-area-inset-top));
  right: auto;
  left: 50%;
  width: min(720px, calc(100vw - 2rem));
  padding: 1rem 3.5rem 1rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--glass-radius-md);
  color: #fff;
  box-shadow: 0 18px 48px rgba(20, 23, 48, 0.24);
  transform: translate(-50%, -180%);
  transition: transform var(--glass-motion), opacity var(--glass-motion),
    visibility var(--glass-motion);
}

body.liquid-glass-theme .notification.success {
  background: linear-gradient(120deg, #086e51, #0c8e68) padding-box,
    linear-gradient(130deg, #a7f3d0, #2bd399, #087f5b) border-box;
}

body.liquid-glass-theme .notification.error {
  background: linear-gradient(120deg, #8f1c3a, #c83358) padding-box,
    linear-gradient(130deg, #ffc0cf, #ff6288, #a71e43) border-box;
}

body.liquid-glass-theme .notification.visible,
body.liquid-glass-theme .success .notification.success,
body.liquid-glass-theme .success + .message-container .notification.success,
body.liquid-glass-theme .error .notification.error,
body.liquid-glass-theme .error + .message-container .notification.error {
  transform: translate(-50%, 0);
}

body.liquid-glass-theme .notification.hidden,
body.liquid-glass-theme .success .notification.success.hidden,
body.liquid-glass-theme .success + .message-container .notification.success.hidden,
body.liquid-glass-theme .error .notification.error.hidden,
body.liquid-glass-theme .error + .message-container .notification.error.hidden {
  transform: translate(-50%, -180%);
}

body.liquid-glass-theme .notification-close {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  transform: translateY(-50%);
}

body.liquid-glass-theme .notification-close .close-icon {
  position: static;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: inherit;
}

body.liquid-glass-theme .notification-close:hover,
body.liquid-glass-theme .notification-close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

body.liquid-glass-theme .error-content-wrap {
  width: min(100%, 760px);
  margin: clamp(3rem, 9vw, 8rem) auto;
  padding: clamp(2rem, 6vw, 4.5rem);
  border: 1px solid transparent;
  border-radius: var(--glass-radius-xl);
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
      padding-box,
    var(--glass-rim) border-box;
  box-shadow: var(--glass-shadow);
  text-align: center;
}

body.liquid-glass-theme .error-code {
  margin-bottom: 1rem;
}

/* Dormant theme layouts remain visually coherent if assigned later. */
body.liquid-glass-theme .contact-card,
body.liquid-glass-theme .tag-card,
body.liquid-glass-theme .post-card-coverflow {
  border: 1px solid transparent;
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-soft) border-box;
  box-shadow: var(--glass-shadow-soft);
}

body.liquid-glass-theme .featured-post-slider
  :where(.swiper-button-prev, .swiper-button-next) {
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--text-color-dark);
  background: linear-gradient(var(--glass-fill-strong), var(--glass-fill-strong))
      padding-box,
    var(--glass-rim-soft) border-box;
  box-shadow: var(--glass-shadow-soft);
}

/* Hover-capable devices only --------------------------------------------- */

@media (hover: hover) and (pointer: fine) {
  body.liquid-glass-theme .social-icon:hover,
  body.liquid-glass-theme .js-scroll-top:hover {
    color: var(--text-color-dark);
    box-shadow: var(--glass-shadow-soft);
    transform: translateY(-2px);
  }

  body.liquid-glass-theme .post-content
    :where(
      .kg-btn,
      .kg-product-card-button,
      .kg-signup-card-button,
      .kg-header-card-button,
      .kg-cta-button,
      .kg-file-card-button
    ):hover {
    filter: saturate(112%) brightness(1.04);
    transform: translateY(-2px);
    box-shadow: 0 15px 34px rgba(48, 140, 152, 0.3) !important;
  }

  body.liquid-glass-theme .tier-wrap:hover {
    background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
        padding-box,
      var(--glass-rim) border-box;
    box-shadow: var(--glass-shadow-hover);
    transform: translateY(-4px);
  }
}

/* Responsive component behavior ----------------------------------------- */

@media (max-width: 991px) {
  body.liquid-glass-theme .toc-container {
    position: static;
    width: 100%;
    max-width: var(--global-width-content);
  }

  body.liquid-glass-theme .comment-wrap {
    width: 100%;
  }

  body.liquid-glass-theme .members-page-wrap.has-image .sign-card {
    border: 1px solid transparent;
    border-radius: var(--glass-radius-lg);
  }
}

/* High-contrast links on dark reading and directory surfaces. */
[data-theme="dark"] body.liquid-glass-theme
  .post-content
  :where(p, ul, ol, blockquote)
  a:not(.btn):not(.kg-btn):not(.primary-buy),
[data-theme="dark"] body.liquid-glass-theme .post-content h1 a,
[data-theme="dark"] body.liquid-glass-theme .post-content h2 a,
[data-theme="dark"] body.liquid-glass-theme .post-content h3 a {
  color: #86dcff !important;
  text-decoration-color: rgba(134, 220, 255, 0.72) !important;
  text-decoration-thickness: 0.11em !important;
  text-underline-offset: 0.16em;
}

[data-theme="dark"] body.liquid-glass-theme
  .post-content
  :where(p, ul, ol, blockquote)
  a:not(.btn):not(.kg-btn):not(.primary-buy):hover,
[data-theme="dark"] body.liquid-glass-theme
  .post-content
  :where(p, ul, ol, blockquote)
  a:not(.btn):not(.kg-btn):not(.primary-buy):focus-visible,
[data-theme="dark"] body.liquid-glass-theme .post-content h1 a:hover,
[data-theme="dark"] body.liquid-glass-theme .post-content h1 a:focus-visible,
[data-theme="dark"] body.liquid-glass-theme .post-content h2 a:hover,
[data-theme="dark"] body.liquid-glass-theme .post-content h2 a:focus-visible,
[data-theme="dark"] body.liquid-glass-theme .post-content h3 a:hover,
[data-theme="dark"] body.liquid-glass-theme .post-content h3 a:focus-visible {
  color: #72f0b2 !important;
  text-decoration-color: currentColor !important;
}

[data-theme="dark"] body.liquid-glass-theme
  .post-content
  :where(.sj-page-action, .sj-directory-link, .sj-topic-link) {
  color: #86dcff !important;
  border-color: rgba(134, 220, 255, 0.52);
  text-decoration: none !important;
}

[data-theme="dark"] body.liquid-glass-theme
  .post-content
  :where(.sj-page-action, .sj-directory-link, .sj-topic-link):hover,
[data-theme="dark"] body.liquid-glass-theme
  .post-content
  :where(.sj-page-action, .sj-directory-link, .sj-topic-link):focus-visible {
  color: #72f0b2 !important;
  border-color: #72f0b2;
  box-shadow: 0 10px 24px rgba(71, 218, 177, 0.2);
}

/* Modern publication pages and topic surfaces --------------------------- */

.sj-page-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  color: var(--text-color-main);
}

body:is(.page-about, .page-tags).liquid-glass-theme
  .post-content-area:not(.has-toc) {
  width: 100%;
  max-width: none;
}

body:is(.page-about, .page-tags).liquid-glass-theme
  .post-content-area:not(.has-toc)
  > .post-content {
  width: 100%;
  max-width: none;
  flex: 1 1 100%;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.sj-page-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 5vw, 4.75rem);
  border: 1px solid transparent;
  border-radius: clamp(24px, 4vw, 42px);
  background:
    radial-gradient(34rem 22rem at 0% 0%, rgba(72, 169, 255, 0.18), transparent 64%) padding-box,
    radial-gradient(32rem 22rem at 100% 100%, rgba(44, 210, 140, 0.16), transparent 66%) padding-box,
    linear-gradient(145deg, var(--glass-fill-strong), var(--glass-fill-b)) padding-box,
    var(--glass-rim) border-box;
  box-shadow: var(--glass-shadow-soft);
}

.sj-page-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  right: clamp(2.25rem, 5vw, 5rem);
  width: clamp(190px, 19vw, 310px);
  aspect-ratio: 1;
  background: url("../images/brand/smartjots-logo-new.png") center / contain no-repeat;
  opacity: 0.92;
  transform: translateY(-50%);
  pointer-events: none;
}

.sj-page-hero > * {
  position: relative;
  z-index: 1;
}

.sj-page-hero h2 {
  max-width: min(850px, 68%);
  margin: 0.35rem 0 1.25rem;
  font-size: clamp(2.35rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.sj-page-hero p {
  max-width: min(760px, 68%);
  margin: 0;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.65;
}

@media (max-width: 900px) {
  .sj-page-hero::after {
    right: 1.5rem;
    width: clamp(130px, 24vw, 190px);
    opacity: 0.2;
  }

  .sj-page-hero h2,
  .sj-page-hero p {
    max-width: 100%;
  }
}

.sj-eyebrow {
  color: #139b4b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sj-page-grid,
.sj-topic-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.75rem);
  margin-block: 2rem 4rem;
}

.sj-page-card,
.sj-directory-card {
  min-width: 0;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid transparent;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--glass-fill-strong), var(--glass-fill-b)) padding-box,
    var(--glass-rim-quiet) border-box;
  box-shadow: var(--glass-shadow-soft);
}

.sj-page-card h2,
.sj-directory-card h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  letter-spacing: -0.025em;
}

.sj-page-card p,
.sj-directory-card p { margin: 0; }

.sj-page-card--wide { grid-column: 1 / -1; }

.sj-page-actions,
.sj-directory-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.sj-page-action,
.sj-directory-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(53, 137, 202, 0.25);
  border-radius: 999px;
  color: var(--text-color-dark);
  font-weight: 750;
  background: var(--glass-fill-strong);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.sj-page-action:hover,
.sj-page-action:focus-visible,
.sj-directory-link:hover,
.sj-directory-link:focus-visible {
  border-color: #139b4b;
  box-shadow: 0 10px 22px rgba(54, 139, 181, 0.16);
  transform: translateY(-2px);
}

.sj-directory-card {
  position: relative;
  overflow: hidden;
  min-height: 245px;
}

.sj-directory-card::before {
  content: "";
  display: block;
  width: 52px;
  height: 7px;
  margin-bottom: 1.6rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #1264d8, #087f8c, #139b4b);
}

.sj-tag-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.35fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
  margin: clamp(1.5rem, 4vw, 3.5rem) 0 4rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid transparent;
  border-radius: clamp(26px, 4vw, 42px);
  background:
    radial-gradient(36rem 24rem at 100% 0%, rgba(55, 210, 142, 0.13), transparent 70%) padding-box,
    linear-gradient(145deg, var(--glass-fill-strong), var(--glass-fill-b)) padding-box,
    var(--glass-rim) border-box;
  box-shadow: var(--glass-shadow);
}

.sj-tag-art {
  position: relative;
  overflow: hidden;
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(75, 162, 218, 0.24);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(225, 243, 255, 0.9), rgba(226, 255, 242, 0.9));
  box-shadow: 0 18px 44px rgba(46, 92, 126, 0.16);
}

.sj-tag-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(0.92);
  border-radius: 24px;
}

.sj-tag-copy .tag-name {
  margin: 0.4rem 0 1rem;
  font-size: clamp(2.7rem, 7vw, 5.75rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-align: left;
}

.sj-tag-copy .tag-description {
  max-width: 680px;
  margin: 0 0 1.4rem;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.65;
}

.sj-tag-copy .tag-meta { justify-content: flex-start; }

.sj-topic-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
  min-height: 150px;
}

.sj-topic-thumb {
  display: block;
  overflow: hidden;
  width: 96px;
  aspect-ratio: 1;
  border: 1px solid rgba(59, 151, 208, 0.22);
  border-radius: 24px;
  background: linear-gradient(145deg, #e9f5ff, #e8fff2);
}

.sj-topic-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(0.9);
  border-radius: 19px;
}

.sj-topic-card .tag-info-wrap { text-align: left; }
.sj-topic-card .tag-name { margin-bottom: 0.25rem; }
.sj-topic-link { display: inline-block; margin-top: 0.75rem; color: #087f8c; font-weight: 750; }

@media (max-width: 767px) {
  .sj-page-grid,
  .sj-topic-directory,
  .sj-tag-hero { grid-template-columns: 1fr; }
  .sj-tag-art { width: min(76vw, 300px); margin: 0 auto; }
  .sj-tag-copy { text-align: center; }
  .sj-tag-copy .tag-name { text-align: center; }
  .sj-tag-copy .tag-meta { justify-content: center; }
  .sj-page-card--wide { grid-column: auto; }
}

@media (max-width: 767px) {
  body.liquid-glass-theme .comment-heading {
    align-items: flex-start;
  }

  body.liquid-glass-theme .prev-next-wrap {
    gap: 1rem;
  }

  body.liquid-glass-theme .post-content .kg-signup-card-fields {
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.65rem;
    border-radius: var(--glass-radius-md);
  }

  body.liquid-glass-theme .post-content .kg-signup-card-input,
  body.liquid-glass-theme .post-content .kg-signup-card-button,
  body.liquid-glass-theme .post-content
    :where(.kg-btn, .kg-product-card-button, .kg-header-card-button, .kg-cta-button) {
    width: 100%;
  }

  body.liquid-glass-theme .contact-card {
    overflow: visible;
  }
}

@media (max-width: 575px) {
  body.liquid-glass-theme :where(.comment-wrap, .tier-wrap, .sign-card, .account-wrap) {
    padding: 1.15rem;
    border-radius: 20px;
  }

  body.liquid-glass-theme .comment-heading {
    display: grid;
    gap: 0.35rem;
  }

  body.liquid-glass-theme .comment-count {
    font-size: 0.9rem;
  }

  body.liquid-glass-theme .post-content .table-responsive {
    width: calc(100% + 0.5rem);
    margin-left: -0.25rem;
  }

  body.liquid-glass-theme .post-content blockquote:not(.kg-blockquote-alt) {
    padding: 1.15rem;
    font-size: 1.2rem;
  }

  body.liquid-glass-theme .notification {
    top: max(0.5rem, env(safe-area-inset-top));
    width: calc(100vw - 1rem);
    padding: 0.85rem 3.25rem 0.85rem 1rem;
    font-size: 1rem;
  }

  body.liquid-glass-theme .price {
    height: auto;
    line-height: 1.2;
  }

  body.liquid-glass-theme .pricing-wrap {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  body.liquid-glass-theme .discount-label {
    margin: 0.5rem 0 0;
  }
}

/* Preference and accessibility fallbacks -------------------------------- */

@media (prefers-reduced-motion: reduce) {
  body.liquid-glass-theme *,
  body.liquid-glass-theme *::before,
  body.liquid-glass-theme *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  body.liquid-glass-theme
    :where(
      .comment-wrap,
      .toc-container,
      .tier-wrap,
      .sign-card,
      .account-wrap,
      .contact-card,
      .nav-left li > ul,
      .nav-right li > ul
    ) {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--glass-surface-strong);
  }
}

@media (prefers-contrast: more) {
  body.liquid-glass-theme
    :where(
      .comment-wrap,
      .toc-container,
      .tier-wrap,
      .sign-card,
      .account-wrap,
      .contact-card,
      .table-responsive,
      pre,
      input,
      select,
      textarea,
      .notification
    ) {
    border-width: 2px;
  }

  body.liquid-glass-theme :where(a, button, input, select, textarea):focus-visible {
    outline-width: 4px;
  }
}

@media (forced-colors: active) {
  body.liquid-glass-theme
    :where(
      .comment-wrap,
      .comment-heading,
      .toc-container,
      .tier-wrap,
      .sign-card,
      .account-wrap,
      .contact-card,
      .table-responsive,
      pre,
      .notification,
      .nav-left li > ul,
      .nav-right li > ul,
      .kg-card
    ) {
    border: 1px solid CanvasText !important;
    color: CanvasText !important;
    background: Canvas !important;
    box-shadow: none !important;
  }

  body.liquid-glass-theme
    :where(.btn, .kg-btn, input, select, textarea, .social-icon, .notification-close) {
    border: 1px solid ButtonText !important;
    color: ButtonText !important;
    background: ButtonFace !important;
    box-shadow: none !important;
    forced-color-adjust: auto;
  }

  body.liquid-glass-theme :where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid Highlight !important;
  }
}

@media print {
  body.liquid-glass-theme {
    background: #ffffff !important;
  }

  body.liquid-glass-theme
    :where(
      .header-inner,
      .hero-intro-content,
      .post-card,
      .post-info-wrap,
      .post-content,
      .single-post .post-header,
      .single-post-img-container,
      .archive-cover-inner
    ) {
    border-color: #d8d8dc !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }
}

/* ========================================================================== 
   SmartJots refractive editorial system 2.0

   Color lives at the material edge; content planes stay calm and readable.
   This restores Porto's original crisp gradient-rim construction while
   keeping the liquid-glass depth, responsive behavior, and solid fallbacks.
   ========================================================================== */

:root {
  --glass-canvas: #f6f9fb;
  --glass-fill-a: rgba(255, 255, 255, 0.88);
  --glass-fill-b: rgba(247, 252, 255, 0.72);
  --glass-fill-strong: rgba(255, 255, 255, 0.94);
  --glass-reading: #ffffff;
  --glass-rim: linear-gradient(
    132deg,
    rgba(255, 255, 255, 0.98) 0%,
    #56b8ff 20%,
    #79befc 43%,
    #49e1ed 64%,
    #44fb9d 83%,
    rgba(255, 255, 255, 0.96) 100%
  );
  --glass-rim-soft: linear-gradient(
    132deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(86, 184, 255, 0.56) 24%,
    rgba(121, 190, 252, 0.54) 51%,
    rgba(68, 251, 157, 0.55) 82%,
    rgba(255, 255, 255, 0.88) 100%
  );
  --glass-rim-quiet: linear-gradient(
    132deg,
    rgba(255, 255, 255, 0.96),
    rgba(86, 184, 255, 0.28) 30%,
    rgba(121, 190, 252, 0.3) 58%,
    rgba(68, 251, 157, 0.3) 82%,
    rgba(255, 255, 255, 0.9)
  );
  --glass-shadow: 0 1px 2px rgba(20, 23, 48, 0.07),
    0 14px 34px rgba(44, 81, 104, 0.1),
    0 32px 74px rgba(57, 170, 133, 0.07);
  --glass-shadow-soft: 0 1px 2px rgba(20, 23, 48, 0.06),
    0 10px 28px rgba(44, 81, 104, 0.09),
    0 22px 52px rgba(57, 170, 133, 0.05);
  --glass-shadow-hover: 0 2px 5px rgba(20, 23, 48, 0.1),
    0 20px 46px rgba(44, 81, 104, 0.14),
    0 40px 90px rgba(57, 170, 133, 0.1);
  --glass-radius-xl: 32px;
  --glass-radius-lg: 24px;
  --glass-radius-md: 16px;
  --glass-blur: 18px;
  --glass-saturation: 128%;
}

[data-theme="dark"] {
  --glass-canvas: #080914;
  --glass-fill-a: rgba(20, 22, 36, 0.88);
  --glass-fill-b: rgba(11, 13, 25, 0.78);
  --glass-fill-strong: rgba(22, 24, 38, 0.95);
  --glass-reading: #0e1019;
  --glass-rim: linear-gradient(
    132deg,
    rgba(255, 255, 255, 0.34) 0%,
    #43aaff 21%,
    #6ecafc 51%,
    #4ddccd 68%,
    #31fb9c 84%,
    rgba(255, 255, 255, 0.24) 100%
  );
  --glass-rim-soft: linear-gradient(
    132deg,
    rgba(255, 255, 255, 0.22),
    rgba(67, 170, 255, 0.62) 25%,
    rgba(110, 202, 252, 0.58) 54%,
    rgba(49, 251, 156, 0.56) 83%,
    rgba(255, 255, 255, 0.16)
  );
  --glass-rim-quiet: linear-gradient(
    132deg,
    rgba(255, 255, 255, 0.18),
    rgba(67, 170, 255, 0.34) 29%,
    rgba(110, 202, 252, 0.34) 58%,
    rgba(49, 251, 156, 0.34) 84%,
    rgba(255, 255, 255, 0.12)
  );
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.44),
    0 18px 48px rgba(0, 0, 0, 0.38),
    0 0 42px rgba(78, 188, 251, 0.09);
  --glass-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.38),
    0 12px 34px rgba(0, 0, 0, 0.31),
    0 0 30px rgba(78, 188, 251, 0.07);
  --glass-shadow-hover: 0 2px 5px rgba(0, 0, 0, 0.52),
    0 24px 58px rgba(0, 0, 0, 0.46),
    0 0 54px rgba(87, 206, 252, 0.14);
}

body.liquid-glass-theme {
  background-color: var(--glass-canvas);
  background-image: radial-gradient(
      52rem 34rem at -10% -4%,
      rgba(49, 251, 156, 0.15),
      transparent 66%
    ),
    radial-gradient(
      56rem 38rem at 110% 7%,
      rgba(69, 173, 255, 0.17),
      transparent 68%
    ),
    radial-gradient(
      42rem 30rem at 52% 44%,
      rgba(94, 199, 252, 0.1),
      transparent 72%
    ),
    linear-gradient(180deg, #fbfdff 0%, #f5f6fc 58%, #f8fdff 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

[data-theme="dark"] body.liquid-glass-theme {
  background-image: radial-gradient(
      52rem 34rem at -10% -4%,
      rgba(39, 251, 148, 0.16),
      transparent 66%
    ),
    radial-gradient(
      56rem 38rem at 110% 7%,
      rgba(54, 145, 255, 0.14),
      transparent 68%
    ),
    radial-gradient(
      42rem 30rem at 52% 44%,
      rgba(87, 195, 252, 0.12),
      transparent 72%
    ),
    linear-gradient(180deg, #080914 0%, #090b16 56%, #091014 100%);
}

body.liquid-glass-theme .site-wrap {
  overflow: hidden;
  overflow: clip;
}

body.liquid-glass-theme .line-web {
  opacity: 0.025;
}

body.liquid-glass-theme .flair-one,
body.liquid-glass-theme .flair-two {
  opacity: 0.24;
}

[data-theme="dark"] body.liquid-glass-theme .line-web {
  opacity: 0.05;
}

[data-theme="dark"] body.liquid-glass-theme .flair-one,
[data-theme="dark"] body.liquid-glass-theme .flair-two {
  opacity: 0.2;
}

/* Primary glass shells --------------------------------------------------- */

body.liquid-glass-theme .header-inner {
  border: 1px solid transparent;
  border-radius: var(--glass-radius-lg);
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-soft) border-box;
  box-shadow: var(--glass-shadow-soft);
}

body.liquid-glass-theme .header-inner::before {
  content: none;
}

body.liquid-glass-theme .logo-text {
  letter-spacing: -0.045em;
}

body.liquid-glass-theme .nav-icon {
  border-color: rgba(95, 104, 138, 0.24);
  background: linear-gradient(145deg, var(--glass-fill-strong), var(--glass-fill-b));
  box-shadow: inset 0 1px 0 var(--glass-border-bright),
    0 5px 14px rgba(31, 38, 72, 0.06);
}

[data-theme="dark"] body.liquid-glass-theme .nav-icon {
  border-color: rgba(216, 224, 255, 0.19);
}

body.liquid-glass-theme .hero-intro-content {
  border: 1px solid transparent;
  background: radial-gradient(
        38rem 20rem at 6% -8%,
        rgba(255, 255, 255, 0.72),
        transparent 65%
      )
      padding-box,
    radial-gradient(
        30rem 24rem at 102% 104%,
        rgba(56, 251, 158, 0.13),
        transparent 68%
      )
      padding-box,
    linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b)) padding-box,
    var(--glass-rim) border-box;
  box-shadow: inset 0 1px 0 var(--glass-border-bright), var(--glass-shadow);
}

[data-theme="dark"] body.liquid-glass-theme .hero-intro-content {
  background: radial-gradient(
        38rem 20rem at 6% -8%,
        rgba(255, 255, 255, 0.11),
        transparent 65%
      )
      padding-box,
    radial-gradient(
        30rem 24rem at 102% 104%,
        rgba(49, 251, 156, 0.14),
        transparent 68%
      )
      padding-box,
    linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b)) padding-box,
    var(--glass-rim) border-box;
}

body.liquid-glass-theme .hero-intro-content > * {
  position: relative;
  z-index: 2;
}

body.liquid-glass-theme .hero-intro-content::before {
  inset: -28% -16% auto 26%;
  z-index: 1;
  height: 66%;
  border-color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(255, 255, 255, 0.24) 48%,
    transparent 72%
  );
  box-shadow: inset 0 -1px 0 rgba(104, 142, 255, 0.22),
    0 14px 46px rgba(94, 196, 252, 0.06);
}

body.liquid-glass-theme .hero-intro-content::after {
  z-index: 1;
  right: -12%;
  bottom: -66%;
  width: 56%;
  border-color: rgba(105, 184, 255, 0.35);
  background: radial-gradient(
    circle at 32% 26%,
    rgba(255, 255, 255, 0.32),
    rgba(109, 157, 255, 0.08) 36%,
    rgba(64, 251, 162, 0.1) 62%,
    transparent 72%
  );
  box-shadow: inset 0 0 34px rgba(107, 252, 188, 0.15),
    0 0 46px rgba(97, 142, 255, 0.08);
}

body.liquid-glass-theme .site-hero {
  margin-top: 1.75rem;
  margin-bottom: 4.5rem;
}

body.liquid-glass-theme .site-hero .intro-title {
  max-width: 900px;
  font-size: clamp(3.25rem, 5.7vw, 5rem);
  font-weight: 800;
  line-height: 0.99;
  letter-spacing: -0.06em;
}

body.liquid-glass-theme .site-hero .intro-description {
  max-width: 760px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text-color-main);
  background: transparent;
  box-shadow: none;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.65;
}

body.liquid-glass-theme .site-hero .cta-wrapper {
  margin-top: 2.25rem;
}

/* Controls --------------------------------------------------------------- */

body.liquid-glass-theme .btn {
  border: 1px solid transparent;
  background: radial-gradient(
        140% 170% at 16% -58%,
        rgba(255, 255, 255, 0.58),
        transparent 43%
      )
      padding-box,
    linear-gradient(120deg, #336da5 0%, #3397b5 48%, #20b272 100%) padding-box,
    var(--glass-rim) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(32, 90, 110, 0.35),
    0 11px 26px rgba(48, 140, 152, 0.22),
    0 3px 10px rgba(49, 76, 175, 0.18);
  text-shadow: 0 1px 2px rgba(17, 48, 59, 0.32);
}

body.liquid-glass-theme .btn:hover,
body.liquid-glass-theme .btn:focus {
  filter: none;
  transform: none;
}

body.liquid-glass-theme .btn:focus-visible {
  outline: 3px solid var(--glass-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--glass-canvas),
    0 14px 32px rgba(48, 140, 152, 0.28);
}

/* Article cards: restore the crisp Porto gradient rim ------------------- */

body.liquid-glass-theme .post-loop {
  margin-top: 4.75rem;
}

body.liquid-glass-theme .post-cards-wrap {
  gap: clamp(1.25rem, 2.25vw, 1.75rem);
}

body.liquid-glass-theme .post-card.js-card {
  overflow: hidden;
  padding: 0.875rem;
  border: 0;
  border-radius: var(--glass-radius-lg);
  background: transparent;
  box-shadow: var(--glass-shadow-soft);
  transform: translateZ(0);
}

body.liquid-glass-theme .post-card.js-card::before {
  inset: 0;
  border-radius: inherit;
  background: var(--glass-rim-soft);
  filter: none;
  opacity: 1;
  transform: none;
  transition: filter var(--glass-motion), background var(--glass-motion);
}

body.liquid-glass-theme .post-card.js-card::after {
  inset: 1px;
  border-radius: calc(var(--glass-radius-lg) - 1px);
  background: radial-gradient(
      110% 72% at 8% -10%,
      rgba(255, 255, 255, 0.58),
      transparent 46%
    ),
    linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b));
  box-shadow: inset 0 1px 0 var(--glass-border-bright),
    inset 0 -1px 0 rgba(63, 108, 129, 0.08);
}

[data-theme="dark"] body.liquid-glass-theme .post-card.js-card::after {
  background: radial-gradient(
      110% 72% at 8% -10%,
      rgba(255, 255, 255, 0.1),
      transparent 46%
    ),
    linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b));
}

body.liquid-glass-theme .post-card .post-img-wrap {
  overflow: hidden;
  border: 1px solid rgba(81, 89, 120, 0.14);
  border-radius: 17px;
  background: var(--glass-fill-strong);
  box-shadow: 0 10px 25px rgba(31, 34, 70, 0.1),
    inset 0 1px 0 var(--glass-border-bright);
}

body.liquid-glass-theme .post-card .post-img-wrap img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9 !important;
  border-radius: 16px;
  object-fit: cover;
}

body.liquid-glass-theme .post-card .post-info-wrap {
  padding: 1.15rem 0.45rem 0.55rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.liquid-glass-theme .post-card .post-title {
  margin-top: 1rem;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

body.liquid-glass-theme .post-card .post-excerpt {
  margin-bottom: 1.25rem;
  color: var(--text-color-main);
  line-height: 1.62;
}

body.liquid-glass-theme .post-card:hover {
  border-color: transparent;
  box-shadow: var(--glass-shadow-soft);
  transform: none;
}

body.liquid-glass-theme .post-card:hover::before {
  filter: none;
}

body.liquid-glass-theme .post-card:focus-within {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(90, 169, 229, 0.2), var(--glass-shadow-hover);
  transform: translateY(-3px);
}

body.liquid-glass-theme .post-card:focus-within::before {
  background: var(--glass-rim);
  filter: saturate(112%) brightness(1.03);
  transform: none;
}

/* Popular-topic pills ---------------------------------------------------- */

body.liquid-glass-theme .tag-item,
body.liquid-glass-theme .all-tags {
  border: 0;
  background: transparent;
  box-shadow: var(--glass-shadow-soft);
}

body.liquid-glass-theme .tag-item::before,
body.liquid-glass-theme .all-tags::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: var(--glass-rim-soft);
  filter: none;
  opacity: 1;
  transition: filter var(--glass-motion), background var(--glass-motion);
}

body.liquid-glass-theme .tag-item::after,
body.liquid-glass-theme .all-tags::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b));
  opacity: 1;
}

body.liquid-glass-theme .tag-item:hover,
body.liquid-glass-theme .all-tags:hover {
  border-color: transparent;
  box-shadow: var(--glass-shadow-soft);
  transform: none;
}

body.liquid-glass-theme .tag-item:hover::before,
body.liquid-glass-theme .all-tags:hover::before {
  background: var(--glass-rim-soft);
  filter: none;
}

body.liquid-glass-theme .all-tags:hover::after {
  opacity: 1;
}

body.liquid-glass-theme .tag-item:focus-within,
body.liquid-glass-theme .all-tags:focus-within {
  box-shadow: 0 0 0 3px rgba(90, 169, 229, 0.2), var(--glass-shadow);
}

body.liquid-glass-theme .tag-item:focus-within::before,
body.liquid-glass-theme .all-tags:focus-within::before {
  background: var(--glass-rim);
  filter: saturate(112%);
}

/* Newsletter, footer, archive, and reading surfaces --------------------- */

body.liquid-glass-theme .esub-section-wrap {
  border: 1px solid transparent;
  background: radial-gradient(
        36rem 22rem at 0% 0%,
        rgba(75, 190, 255, 0.32),
        transparent 62%
      )
      padding-box,
    radial-gradient(
        34rem 24rem at 100% 100%,
        rgba(90, 252, 179, 0.34),
        transparent 65%
      )
      padding-box,
    linear-gradient(128deg, #26425e 0%, #2c7082 48%, #268b60 100%) padding-box,
    var(--glass-rim) border-box;
  box-shadow: var(--glass-shadow);
}

body.liquid-glass-theme .esub-form-wrap {
  border-color: rgba(255, 255, 255, 0.3);
  background: #2d5366;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 16px 42px rgba(16, 47, 66, 0.24);
}

body.liquid-glass-theme .footer-top,
body.liquid-glass-theme .archive-cover-inner,
body.liquid-glass-theme .single-post .post-header,
body.liquid-glass-theme .single-post-img-container {
  border: 1px solid transparent;
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-soft) border-box;
  box-shadow: var(--glass-shadow-soft);
}

body.liquid-glass-theme .single-post .post-header {
  padding: clamp(1.75rem, 5vw, 3.5rem);
}

body.liquid-glass-theme .single-post-img-container {
  padding: 0.6rem;
}

body.liquid-glass-theme .post-content {
  border: 1px solid transparent;
  background: linear-gradient(var(--glass-reading), var(--glass-reading))
      padding-box,
    var(--glass-rim-quiet) border-box;
  box-shadow: 0 1px 2px rgba(20, 23, 48, 0.04),
    0 18px 52px rgba(31, 38, 72, 0.08);
}

[data-theme="dark"] body.liquid-glass-theme .post-content {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4),
    0 20px 58px rgba(0, 0, 0, 0.34);
}

body.liquid-glass-theme
  :where(
    .tag-card,
    .prev-post,
    .next-post,
    .related-post-card,
    .comment-wrap,
    .membership-switch,
    .tier-wrap,
    .sign-card,
    .account-wrap
  ) {
  border: 1px solid transparent;
  background: linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-quiet) border-box;
  box-shadow: var(--glass-shadow-soft);
}

/* Embedded report color tokens follow the host theme. The article HTML
   intentionally has no data-theme attribute of its own. */
[data-theme="dark"] body.liquid-glass-theme .post-content .cv-root {
  --plane: #0e1019 !important;
  --surface: #171a26 !important;
  --ink: #f4f5ff !important;
  --ink2: #d2d6e7 !important;
  --muted: #b8bed2 !important;
  --line: rgba(229, 235, 255, 0.16) !important;
  --accent: #9ec5ff !important;
  --accent-2: #b7f5fe !important;
  --accent-soft: #242f3a !important;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.34) !important;
}

[data-theme="dark"] body.liquid-glass-theme .post-content .cv-root .prose {
  border-left-color: var(--accent-2);
  background: rgba(33, 236, 250, 0.1);
}

/* Ghost gallery cards retain their intended row geometry inside the new
   reading surface. */
body.liquid-glass-theme .post-content .kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

body.liquid-glass-theme .post-content .kg-gallery-row {
  display: flex;
  gap: 0.75rem;
}

body.liquid-glass-theme .post-content .kg-gallery-image {
  min-width: 0;
  flex: 1 1 0;
}

body.liquid-glass-theme .post-content .kg-gallery-image img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

/* Deliberate interaction states ----------------------------------------- */

@media (hover: hover) and (pointer: fine) {
  body.liquid-glass-theme .btn:hover {
    filter: saturate(112%) brightness(1.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72),
      inset 0 -1px 0 rgba(32, 90, 110, 0.38),
      0 15px 34px rgba(48, 140, 152, 0.3),
      0 5px 14px rgba(49, 76, 175, 0.2);
    transform: translateY(-2px);
  }

  body.liquid-glass-theme .post-card:hover,
  body.liquid-glass-theme .tag-item:hover,
  body.liquid-glass-theme .all-tags:hover,
  body.liquid-glass-theme .related-post-card:hover,
  body.liquid-glass-theme .prev-post:hover,
  body.liquid-glass-theme .next-post:hover {
    box-shadow: var(--glass-shadow-hover);
    transform: translateY(-5px);
  }

  body.liquid-glass-theme .post-card:hover::before,
  body.liquid-glass-theme .tag-item:hover::before,
  body.liquid-glass-theme .all-tags:hover::before {
    background: var(--glass-rim);
    filter: saturate(115%) brightness(1.03);
  }
}

/* Responsive refinements ------------------------------------------------ */

@media (max-width: 1200px) {
  body.liquid-glass-theme .header-inner,
  body.liquid-glass-theme.is-menu-open .header-inner {
    border: 1px solid transparent;
    border-radius: 22px;
    background: linear-gradient(
          145deg,
          var(--glass-fill-strong),
          var(--glass-fill-b)
        )
        padding-box,
      var(--glass-rim-soft) border-box;
  }
}

@media (max-width: 767px) {
  body.liquid-glass-theme {
    --glass-blur: 11px;
    background-image: radial-gradient(
        28rem 22rem at -28% -2%,
        rgba(49, 251, 156, 0.13),
        transparent 70%
      ),
      radial-gradient(
        30rem 22rem at 128% 10%,
        rgba(69, 173, 255, 0.15),
        transparent 72%
      ),
      linear-gradient(180deg, #fbfdff 0%, #f5f6fc 68%, #f8fdff 100%);
    background-attachment: scroll;
  }

  [data-theme="dark"] body.liquid-glass-theme {
    background-image: radial-gradient(
        28rem 22rem at -28% -2%,
        rgba(39, 251, 148, 0.13),
        transparent 70%
      ),
      radial-gradient(
        30rem 22rem at 128% 10%,
        rgba(54, 145, 255, 0.12),
        transparent 72%
      ),
      linear-gradient(180deg, #080914 0%, #090b16 68%, #091014 100%);
  }

  body.liquid-glass-theme .flair-one,
  body.liquid-glass-theme .flair-two {
    display: none;
  }

  body.liquid-glass-theme .hero-intro-content {
    padding: 2.75rem 1.25rem;
    border-radius: 22px;
    box-shadow: 0 1px 2px rgba(20, 23, 48, 0.06),
      0 16px 38px rgba(44, 81, 104, 0.11);
  }

  body.liquid-glass-theme .site-hero {
    margin-top: 1rem;
    margin-bottom: 3.25rem;
  }

  body.liquid-glass-theme .site-hero .intro-title {
    font-size: clamp(2.45rem, 10.8vw, 3.25rem);
    line-height: 1.02;
    letter-spacing: -0.058em;
  }

  body.liquid-glass-theme .site-hero .intro-description {
    padding: 0;
    font-size: 1.05rem;
    line-height: 1.6;
  }

  body.liquid-glass-theme .hero-intro-content::before {
    inset: -20% -38% auto 10%;
  }

  body.liquid-glass-theme .hero-intro-content::after {
    right: -34%;
    bottom: -43%;
    width: 84%;
  }

  body.liquid-glass-theme .post-loop {
    margin-top: 3.75rem;
  }

  body.liquid-glass-theme .post-card.js-card {
    padding: 0.75rem;
    border-radius: 22px;
    box-shadow: 0 1px 2px rgba(20, 23, 48, 0.06),
      0 12px 30px rgba(44, 81, 104, 0.09);
  }

  body.liquid-glass-theme .post-card.js-card::after {
    border-radius: 21px;
  }

  body.liquid-glass-theme .post-card .post-img-wrap,
  body.liquid-glass-theme .post-card .post-img-wrap img {
    border-radius: 14px;
  }

  body.liquid-glass-theme .post-card .post-info-wrap {
    padding: 1rem 0.35rem 0.45rem;
  }

  body.liquid-glass-theme .footer-top,
  body.liquid-glass-theme .archive-cover-inner,
  body.liquid-glass-theme .single-post .post-header,
  body.liquid-glass-theme .single-post-img-container,
  body.liquid-glass-theme .post-content {
    border-radius: 22px;
  }

  body.liquid-glass-theme .single-post-img-container {
    padding: 0.4rem;
  }
}

@media (max-width: 575px) {
  body.liquid-glass-theme .header-inner {
    border-radius: 20px;
  }

  body.liquid-glass-theme .hero-intro-content {
    padding: 2.5rem 1.1rem;
  }

  body.liquid-glass-theme .site-hero .cta-wrapper {
    margin-top: 1.9rem;
  }

  body.liquid-glass-theme .tag-item,
  body.liquid-glass-theme .all-tags {
    box-shadow: 0 1px 2px rgba(20, 23, 48, 0.05),
      0 8px 20px rgba(44, 81, 104, 0.08);
  }
}

/* Capability and preference fallbacks ---------------------------------- */

@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass-fill-a: #ffffff;
    --glass-fill-b: #f8fafc;
    --glass-fill-strong: #ffffff;
  }

  [data-theme="dark"] {
    --glass-fill-a: #151721;
    --glass-fill-b: #11131c;
    --glass-fill-strong: #191b27;
  }
}

@media (prefers-contrast: more) {
  body.liquid-glass-theme .header-inner,
  body.liquid-glass-theme .hero-intro-content,
  body.liquid-glass-theme .footer-top,
  body.liquid-glass-theme .single-post .post-header,
  body.liquid-glass-theme .single-post-img-container,
  body.liquid-glass-theme .post-content {
    border: 2px solid var(--glass-focus);
    background: var(--glass-surface-strong);
  }

  body.liquid-glass-theme .post-card.js-card::before,
  body.liquid-glass-theme .tag-item::before,
  body.liquid-glass-theme .all-tags::before {
    background: var(--glass-focus);
  }

  body.liquid-glass-theme .post-card.js-card::after,
  body.liquid-glass-theme .tag-item::after,
  body.liquid-glass-theme .all-tags::after {
    background: var(--glass-surface-strong);
  }
}

@media (forced-colors: active) {
  body.liquid-glass-theme .header-inner,
  body.liquid-glass-theme .hero-intro-content,
  body.liquid-glass-theme .post-card.js-card,
  body.liquid-glass-theme .tag-item,
  body.liquid-glass-theme .all-tags,
  body.liquid-glass-theme .footer-top,
  body.liquid-glass-theme .single-post .post-header,
  body.liquid-glass-theme .single-post-img-container,
  body.liquid-glass-theme .post-content,
  body.liquid-glass-theme .btn {
    border: 1px solid CanvasText !important;
    background: Canvas !important;
    color: CanvasText !important;
    box-shadow: none !important;
  }

  body.liquid-glass-theme .post-card.js-card::before,
  body.liquid-glass-theme .post-card.js-card::after,
  body.liquid-glass-theme .tag-item::before,
  body.liquid-glass-theme .tag-item::after,
  body.liquid-glass-theme .all-tags::before,
  body.liquid-glass-theme .all-tags::after {
    content: none !important;
  }
}

@media print {
  body.liquid-glass-theme .header-inner,
  body.liquid-glass-theme .hero-intro-content,
  body.liquid-glass-theme .post-card.js-card,
  body.liquid-glass-theme .post-content,
  body.liquid-glass-theme .single-post .post-header,
  body.liquid-glass-theme .single-post-img-container {
    border: 1px solid #d8d8dc !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  body.liquid-glass-theme .post-card.js-card::before,
  body.liquid-glass-theme .post-card.js-card::after {
    content: none !important;
  }
}

/* -------------------------------------------------------------------------
   SmartJots responsive editorial canvas 3.0
   Wider report-led articles on large screens, with a disciplined prose
   measure and the same authored report theme in light and dark modes.
   ---------------------------------------------------------------------- */

body.post-template.liquid-glass-theme {
  --sj-article-shell: 1280px;
  --sj-article-header: 1080px;
  --sj-article-media: 1240px;
  --sj-article-prose: 760px;
  --sj-report-inner: 1080px;
}

body.post-template.liquid-glass-theme .post-content .cv-root {
  width: 100%;
  min-width: 0;
  container-type: inline-size;
}

body.post-template.liquid-glass-theme .post-content .cv-root .cv-wrap {
  width: 100%;
  max-width: min(100%, var(--sj-report-inner));
}

body.post-template.liquid-glass-theme
  .post-content
  .cv-root
  :where(.tile, .qcard, .rcard) {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.post-template.liquid-glass-theme .post-content .tiktok-embed {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

@media (min-width: 768px) {
  body.post-template.liquid-glass-theme
    .post-content-area:not(.has-toc) {
    width: min(
      var(--sj-article-shell),
      calc(100vw - clamp(32px, 6vw, 96px))
    );
    max-width: none;
  }

  body.post-template.liquid-glass-theme
    .post-content-area:not(.has-toc)
    > .post-content {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: 1 1 100%;
  }

  body.post-template.liquid-glass-theme
    .post-content
    > :where(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, pre, hr) {
    max-width: min(100%, var(--sj-article-prose));
    margin-inline: auto;
  }
}

@media (min-width: 1200px) {
  body.post-template.liquid-glass-theme
    .post-vertical:not(.narrow)
    > .post-header {
    width: min(100%, var(--sj-article-header));
    max-width: var(--sj-article-header);
  }

  body.post-template.liquid-glass-theme
    .post-vertical:not(.narrow)
    > .single-post-img-container {
    width: min(100%, var(--sj-article-media));
    max-width: var(--sj-article-media);
  }

  body.post-template.liquid-glass-theme .post-content-area.has-toc {
    width: min(1400px, calc(100vw - 64px));
    max-width: none;
  }

  body.post-template.liquid-glass-theme
    .post-content-area.has-toc
    > .post-content {
    min-width: 0;
    max-width: 1040px;
  }
}

html[data-theme="dark"]
  body.liquid-glass-theme
  .post-content
  .cv-root,
body.liquid-glass-theme .post-content .cv-root[data-theme="dark"] {
  color-scheme: dark;
  --plane: #0e1019 !important;
  --surface: #171a26 !important;
  --ink: #f4f5ff !important;
  --ink2: #d2d6e7 !important;
  --muted: #b8bed2 !important;
  --line: rgba(229, 235, 255, 0.16) !important;
  --accent: #9ec5ff !important;
  --accent-2: #b7f5fe !important;
  --accent-soft: #242f3a !important;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.34) !important;
  background: var(--plane)
    radial-gradient(
      60vw 40vh at 8% -5%,
      rgba(33, 236, 250, 0.1),
      transparent 60%
    );
}

html[data-theme="dark"]
  body.liquid-glass-theme
  .post-content
  .cv-root
  .prose,
body.liquid-glass-theme
  .post-content
  .cv-root[data-theme="dark"]
  .prose {
  border-left-color: var(--accent-2);
  background: rgba(33, 236, 250, 0.1);
}

/* Navigation feedback ----------------------------------------------------
   A high-clarity refractive pill for pointer hover and keyboard focus. */

body.liquid-glass-theme .nav-left > li > a:not(.btn),
body.liquid-glass-theme .nav-right > li > a:not(.btn) {
  border: 2px solid transparent;
  background: transparent;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition:
    transform 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  body.liquid-glass-theme .nav-left > li:hover > a:not(.btn),
  body.liquid-glass-theme .nav-right > li:hover > a:not(.btn) {
    color: #111426;
    background:
      radial-gradient(
          120% 160% at 4% -20%,
          rgba(86, 184, 255, 0.28),
          transparent 54%
        )
        padding-box,
      radial-gradient(
          120% 160% at 100% 120%,
          rgba(68, 251, 157, 0.2),
          transparent 58%
        )
        padding-box,
      linear-gradient(
          145deg,
          rgba(255, 255, 255, 0.97),
          rgba(246, 251, 255, 0.86)
        )
        padding-box,
      var(--glass-rim) border-box;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.95),
      0 12px 28px rgba(69, 125, 173, 0.22),
      0 0 0 3px rgba(121, 190, 252, 0.1),
      0 0 22px rgba(68, 251, 157, 0.12);
    transform: translateY(-2px) scale(1.035);
  }

  [data-theme="dark"]
    body.liquid-glass-theme
    .nav-left
    > li:hover
    > a:not(.btn),
  [data-theme="dark"]
    body.liquid-glass-theme
    .nav-right
    > li:hover
    > a:not(.btn) {
    color: #ffffff;
    background:
      radial-gradient(
          120% 160% at 4% -20%,
          rgba(67, 170, 255, 0.24),
          transparent 54%
        )
        padding-box,
      radial-gradient(
          120% 160% at 100% 120%,
          rgba(49, 251, 156, 0.22),
          transparent 58%
        )
        padding-box,
      linear-gradient(
          145deg,
          rgba(31, 34, 52, 0.96),
          rgba(17, 19, 33, 0.92)
        )
        padding-box,
      var(--glass-rim) border-box;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 12px 30px rgba(0, 0, 0, 0.42),
      0 0 0 3px rgba(108, 192, 252, 0.15),
      0 0 24px rgba(49, 251, 156, 0.16);
  }
}

body.liquid-glass-theme .nav-left > li > a:not(.btn):focus-visible,
body.liquid-glass-theme .nav-right > li > a:not(.btn):focus-visible {
  color: var(--text-color-dark);
  background:
    linear-gradient(145deg, var(--glass-fill-strong), var(--glass-fill-b))
      padding-box,
    var(--glass-rim) border-box;
  box-shadow:
    inset 0 1px 0 var(--glass-border-bright),
    0 10px 24px rgba(69, 125, 173, 0.18),
    0 0 0 3px rgba(121, 190, 252, 0.1);
  transform: translateY(-2px);
}

body.liquid-glass-theme .nav-left > li > a:not(.btn):active,
body.liquid-glass-theme .nav-right > li > a:not(.btn):active {
  transform: translateY(0) scale(0.98);
}

/* Commerce feedback ------------------------------------------------------
   Match the navigation's refractive rollover on reader-value "Buy it" CTAs. */

body.liquid-glass-theme .post-content .cv-root a.primary-buy {
  border: 2px solid transparent !important;
  background:
    linear-gradient(120deg, #316da5, #2497a8 52%, #20b272) padding-box,
    var(--glass-rim) border-box !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 8px 20px rgba(69, 125, 173, 0.18) !important;
  transition:
    transform 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease !important;
}

@media (hover: hover) and (pointer: fine) {
  body.liquid-glass-theme .post-content .cv-root a.primary-buy:hover {
    color: #ffffff !important;
    background:
      radial-gradient(
          120% 160% at 4% -20%,
          rgba(86, 184, 255, 0.32),
          transparent 54%
        )
        padding-box,
      radial-gradient(
          120% 160% at 100% 120%,
          rgba(68, 251, 157, 0.28),
          transparent 58%
        )
        padding-box,
      linear-gradient(120deg, #316da5, #2497a8 52%, #20b272) padding-box,
      var(--glass-rim) border-box !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.68),
      0 12px 28px rgba(69, 125, 173, 0.28),
      0 0 0 3px rgba(121, 190, 252, 0.12),
      0 0 22px rgba(68, 251, 157, 0.16) !important;
    filter: saturate(112%) brightness(1.05);
    transform: translateY(-2px) scale(1.035);
  }
}

body.liquid-glass-theme .post-content .cv-root a.primary-buy:focus-visible {
  outline: 3px solid var(--glass-focus) !important;
  outline-offset: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 10px 24px rgba(69, 125, 173, 0.22),
    0 0 0 3px rgba(121, 190, 252, 0.14) !important;
  transform: translateY(-2px);
}

body.liquid-glass-theme .post-content .cv-root a.primary-buy:active {
  transform: translateY(0) scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  body.liquid-glass-theme .nav-left > li > a:not(.btn),
  body.liquid-glass-theme .nav-right > li > a:not(.btn),
  body.liquid-glass-theme .post-content .cv-root a.primary-buy {
    transition: none;
  }

  body.liquid-glass-theme .nav-left > li:hover > a:not(.btn),
  body.liquid-glass-theme .nav-left > li > a:not(.btn):focus-visible,
  body.liquid-glass-theme .nav-right > li:hover > a:not(.btn),
  body.liquid-glass-theme .nav-right > li > a:not(.btn):focus-visible,
  body.liquid-glass-theme .post-content .cv-root a.primary-buy:hover,
  body.liquid-glass-theme .post-content .cv-root a.primary-buy:focus-visible {
    transform: none;
  }
}

@media (forced-colors: active) {
  body.liquid-glass-theme .nav-left > li > a:not(.btn),
  body.liquid-glass-theme .nav-right > li > a:not(.btn) {
    border-color: ButtonText;
    color: ButtonText;
    background: Canvas;
    box-shadow: none;
    transform: none;
  }
}

/* Late cascade guards for semantic button variants. The editorial-system
   block above intentionally owns the base .btn material. */
body.liquid-glass-theme .btn.btn-secondary {
  color: var(--text-color-dark);
  background: linear-gradient(145deg, var(--glass-fill-strong), var(--glass-fill-b))
      padding-box,
    var(--glass-rim-quiet) border-box;
  box-shadow: inset 0 1px 0 var(--glass-border-bright),
    0 8px 22px rgba(31, 38, 72, 0.1);
  text-shadow: none;
}

body.liquid-glass-theme .btn.btn-error {
  color: #fff;
  background: radial-gradient(
        140% 170% at 16% -58%,
        rgba(255, 255, 255, 0.48),
        transparent 43%
      )
      padding-box,
    linear-gradient(120deg, #991b3e, #c83358 55%, #e24566) padding-box,
    linear-gradient(130deg, #ffb5c6, #ff5f87, #9c183b) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 11px 26px rgba(33, 157, 85, 0.22);
}

body.liquid-glass-theme .btn.btn-success {
  color: #fff;
  background: linear-gradient(120deg, #087f5b, #0b9b6e) padding-box,
    linear-gradient(130deg, #9af5d0, #1abf88, #087f5b) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 11px 26px rgba(8, 127, 91, 0.2);
}

/* Alternate Porto layouts use the same material system when assigned. */
body.liquid-glass-theme .hero-two-column {
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.5rem, 5vw, 4rem);
  border: 2px solid transparent;
  border-radius: var(--glass-radius-xl);
  background: radial-gradient(34rem 24rem at 0% 0%, rgba(75, 190, 255, 0.16), transparent 68%) padding-box,
    radial-gradient(34rem 24rem at 100% 100%, rgba(90, 252, 179, 0.16), transparent 68%) padding-box,
    linear-gradient(145deg, var(--glass-fill-a), var(--glass-fill-b)) padding-box,
    var(--glass-rim) border-box;
  box-shadow: var(--glass-shadow);
}

body.liquid-glass-theme .hero-email-subscription {
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(var(--glass-fill-strong), var(--glass-fill-strong)) padding-box,
    var(--glass-rim-soft) border-box;
  box-shadow: var(--glass-shadow-soft);
}

body.liquid-glass-theme .hero-email-subscription::before,
body.liquid-glass-theme .hero-email-subscription::after {
  content: none;
}

body.liquid-glass-theme .site-cover-image-wrapper img {
  border: 1px solid rgba(90, 169, 229, 0.18);
  border-radius: var(--glass-radius-lg);
  box-shadow: var(--glass-shadow);
}

body.liquid-glass-theme .post-card-coverflow {
  overflow: hidden;
  border-radius: var(--glass-radius-lg);
}

body.liquid-glass-theme .post-card-coverflow .post-img-wrap img {
  border-radius: calc(var(--glass-radius-lg) - 4px);
}

body.liquid-glass-theme .footer-description {
  color: var(--text-color-main);
}

body.liquid-glass-theme .footer-nav-column-heading {
  color: var(--text-color-dark);
  letter-spacing: -0.025em;
}

body.liquid-glass-theme .footer-nav a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9px;
  transition: color var(--glass-motion), background var(--glass-motion);
}

body.liquid-glass-theme .footer-nav a:hover,
body.liquid-glass-theme .footer-nav a:focus-visible {
  color: var(--text-color-dark);
  background: linear-gradient(110deg, rgba(72, 169, 255, 0.11), rgba(95, 191, 252, 0.11), rgba(72, 251, 164, 0.09));
  text-decoration: none;
}

body.liquid-glass-theme .copyright {
  color: var(--text-color-main);
}

body.liquid-glass-theme
  :where(
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    select
  ) {
  border-radius: 999px;
}

body.liquid-glass-theme textarea {
  border-radius: var(--glass-radius-md);
}

body.liquid-glass-theme .tag-card .tag-image-wrap {
  border: 1px solid rgba(90, 169, 229, 0.16);
  border-radius: var(--glass-radius-md);
  box-shadow: 0 10px 26px rgba(31, 38, 72, 0.09);
}

body.liquid-glass-theme .tag-card .post-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(90, 169, 229, 0.16);
  border-radius: 999px;
  background: var(--glass-fill-strong);
}

/* Image-backed archive heroes ------------------------------------------ */

/* Keep tag and author copy readable while allowing the artwork to remain
   part of the composition. These values intentionally sit below the global
   strong-surface opacity because the image itself supplies the backdrop. */
body.liquid-glass-theme .archive-cover-inner.has-image .cover-content-wrapper {
  max-width: min(50rem, calc(100% - 2rem));
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(250, 251, 255, 0.7);
  -webkit-backdrop-filter: blur(20px) saturate(128%);
  backdrop-filter: blur(20px) saturate(128%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 20px 54px rgba(15, 23, 54, 0.18);
}

[data-theme="dark"]
  body.liquid-glass-theme
  .archive-cover-inner.has-image
  .cover-content-wrapper {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(12, 16, 31, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 22px 58px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"]
  body.liquid-glass-theme
  .archive-cover-inner.has-image
  :where(.tag-name, .name, .tag-description, .bio, .tag-meta, .author-meta, a) {
  color: #f7f8ff;
}

@supports not (
  (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
) {
  body.liquid-glass-theme .archive-cover-inner.has-image .cover-content-wrapper {
    background: rgba(250, 251, 255, 0.9);
  }

  [data-theme="dark"]
    body.liquid-glass-theme
    .archive-cover-inner.has-image
    .cover-content-wrapper {
    background: rgba(12, 16, 31, 0.9);
  }
}

@media (max-width: 767px) {
  body.liquid-glass-theme .hero-two-column {
    padding: 1.25rem;
    border-radius: 22px;
  }

  body.liquid-glass-theme .hero-email-subscription {
    border-radius: var(--glass-radius-md);
  }
}

/* ==========================================================================
   SmartJots per-tag carousels ("rails")
   Scrolling is native CSS scroll-snap — no carousel library, no layout JS.
   Arrow buttons call one inline scrollBy(); everything works without them.
   ========================================================================== */
body.liquid-glass-theme .sj-rails {
  padding: 8px 0 4px;
}
body.liquid-glass-theme .sj-rail {
  margin: 0 0 44px;
}
body.liquid-glass-theme .sj-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}
body.liquid-glass-theme .sj-rail-title {
  margin: 0;
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
body.liquid-glass-theme .sj-rail-title a {
  color: inherit;
  text-decoration: none;
  background-image: var(--glass-accent-gradient, linear-gradient(90deg, #439fff, #5fbdfc, #4cfba7));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.35s ease;
}
body.liquid-glass-theme .sj-rail-title a:hover,
body.liquid-glass-theme .sj-rail-title a:focus-visible {
  background-size: 100% 2px;
}
body.liquid-glass-theme .sj-rail-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}
body.liquid-glass-theme .sj-rail-count {
  font-size: 0.82rem;
  color: var(--glass-placeholder);
  white-space: nowrap;
}
body.liquid-glass-theme .sj-rail-nav {
  display: none;
  gap: 8px;
}
body.liquid-glass-theme .sj-rail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface-strong);
  color: inherit;
  box-shadow: var(--glass-shadow-soft);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
body.liquid-glass-theme .sj-rail-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--glass-shadow-hover);
}

/* the rail itself */
body.liquid-glass-theme .sj-rail-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 300px);
  gap: 16px;
  margin: 0;
  padding: 4px 4px 18px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}
body.liquid-glass-theme .sj-rail-track::-webkit-scrollbar { height: 8px; }
body.liquid-glass-theme .sj-rail-track::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 99px;
}
body.liquid-glass-theme .sj-rail-track:focus-visible {
  outline: 2px solid var(--glass-focus);
  outline-offset: 4px;
  border-radius: var(--glass-radius-md);
}
body.liquid-glass-theme .sj-rail-item {
  scroll-snap-align: start;
  min-width: 0;
}

body.liquid-glass-theme .sj-rail-card {
  height: 100%;
  border-radius: var(--glass-radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  box-shadow: var(--glass-shadow-soft);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
body.liquid-glass-theme .sj-rail-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-hover);
}
body.liquid-glass-theme .sj-rail-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
body.liquid-glass-theme .sj-rail-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--glass-plate-soft);
  overflow: hidden;
}
body.liquid-glass-theme .sj-rail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
body.liquid-glass-theme .sj-rail-media-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(120% 120% at 12% 0%, var(--glass-tint-blue), transparent 60%),
    radial-gradient(120% 120% at 88% 100%, var(--glass-tint-green), transparent 60%),
    var(--glass-plate-soft);
}
body.liquid-glass-theme .sj-rail-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
}
body.liquid-glass-theme .sj-rail-card-title {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.32;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.liquid-glass-theme .sj-rail-card-meta {
  font-size: 0.78rem;
  color: var(--glass-placeholder);
}

/* trailing "see all" card */
body.liquid-glass-theme .sj-rail-item-all { grid-auto-columns: 200px; }
body.liquid-glass-theme .sj-rail-all {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  height: 100%;
  min-width: 190px;
  padding: 18px;
  border-radius: var(--glass-radius-md);
  border: 1px dashed var(--glass-border);
  background: var(--glass-plate-soft);
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.3;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
body.liquid-glass-theme .sj-rail-all:hover {
  transform: translateY(-3px);
  border-color: var(--glass-focus);
}

@media (min-width: 900px) {
  body.liquid-glass-theme .sj-rail-nav { display: flex; }
}
@media (max-width: 640px) {
  body.liquid-glass-theme .sj-rail-track {
    grid-auto-columns: minmax(220px, 78vw);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.liquid-glass-theme .sj-rail-track { scroll-behavior: auto; }
  body.liquid-glass-theme .sj-rail-card,
  body.liquid-glass-theme .sj-rail-all,
  body.liquid-glass-theme .sj-rail-btn { transition: none; }
  body.liquid-glass-theme .sj-rail-card:hover,
  body.liquid-glass-theme .sj-rail-all:hover,
  body.liquid-glass-theme .sj-rail-btn:hover { transform: none; }
}

html[data-theme="dark"] body.liquid-glass-theme .sj-rail-card,
html[data-theme="dark"] body.liquid-glass-theme .sj-rail-btn {
  background: var(--glass-surface);
  border-color: var(--glass-border);
}
html[data-theme="dark"] body.liquid-glass-theme .sj-rail-all {
  background: var(--glass-plate-soft);
}

/* Article hero split -----------------------------------------------------
   Keep the feature image and title card in one navigation-width row. The
   title remains first in the document for accessibility; grid areas place
   the image first visually and stack it above the title on narrow screens. */

body.post-template.liquid-glass-theme
  .post-vertical
  > .post-hero-split {
  display: grid;
  grid-template-areas:
    "media"
    "header";
  gap: clamp(1rem, 2vw, 1.5rem);
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

body.post-template.liquid-glass-theme
  .post-vertical
  > .post-hero-split
  > .post-header {
  grid-area: header;
  width: 100%;
  max-width: none;
  margin: 0;
}

body.post-template.liquid-glass-theme
  .post-vertical
  > .post-hero-split
  > .single-post-img-container {
  grid-area: media;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}

body.post-template.liquid-glass-theme
  .post-vertical
  > .post-hero-no-image {
  grid-template-areas: "header";
  max-width: var(--sj-article-header);
}

/* Match the article container's outer gutter to the navigation container.
   Both shells then stay pixel-aligned before and after the 1392px max-width
   engages, including tablet and mobile widths. */
body.post-template.liquid-glass-theme .main {
  padding-inline: 0.5rem;
}

@media (max-width: 1200px) {
  body.post-template.liquid-glass-theme .main {
    padding-inline: 0.75rem;
  }
}

@media (max-width: 767px) {
  body.post-template.liquid-glass-theme .main {
    padding-inline: 0.5rem;
  }
}

@media (min-width: 992px) {
  body.post-template.liquid-glass-theme
    .post-vertical
    > .post-hero-split:not(.post-hero-no-image) {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    grid-template-areas: "media header";
    align-items: start;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  body.post-template.liquid-glass-theme
    .post-vertical
    > .post-hero-split:not(.post-hero-no-image) {
    grid-template-columns: minmax(0, 36fr) minmax(0, 64fr);
    gap: 1rem;
  }
}

@media (max-width: 991px) {
  body.post-template.liquid-glass-theme
    .post-vertical
    > .post-hero-split
    > .single-post-img-container
    > img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
}
