/*
 * SOFON Space Design 2.1.0
 * Prezentační vrstva pro space.sofon.cz / Twenty Twenty-Four.
 */

body.sofon-space-design {
  --space-bg: #020617;
  --space-bg-2: #071023;
  --space-surface: rgba(8, 15, 34, 0.76);
  --space-surface-strong: rgba(8, 15, 34, 0.92);
  --space-surface-soft: rgba(18, 28, 56, 0.56);
  --space-line: rgba(148, 163, 255, 0.18);
  --space-line-strong: rgba(125, 211, 252, 0.34);
  --space-text: #f8fafc;
  --space-muted: #b8c2d9;
  --space-dim: #8f9ab5;
  --space-cyan: #7dd3fc;
  --space-blue: #60a5fa;
  --space-indigo: #818cf8;
  --space-violet: #a78bfa;
  --space-pink: #e879f9;
  --space-radius-sm: 14px;
  --space-radius: 22px;
  --space-radius-lg: 30px;
  --space-shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.22);
  --space-shadow: 0 28px 85px rgba(0, 0, 0, 0.38);
  --space-focus: 0 0 0 3px rgba(125, 211, 252, 0.28);

  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 5%, rgba(96, 165, 250, 0.13), transparent 28rem),
    radial-gradient(circle at 88% 9%, rgba(167, 139, 250, 0.12), transparent 30rem),
    radial-gradient(circle at 50% 110%, rgba(14, 165, 233, 0.08), transparent 38rem),
    var(--space-bg);
  color: var(--space-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.sofon-space-design::before,
body.sofon-space-design::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body.sofon-space-design::before {
  opacity: 0.32;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,.72) 0 1px, transparent 1.5px),
    radial-gradient(circle at 23% 73%, rgba(125,211,252,.6) 0 1px, transparent 1.5px),
    radial-gradient(circle at 41% 16%, rgba(255,255,255,.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 58% 82%, rgba(167,139,250,.55) 0 1px, transparent 1.5px),
    radial-gradient(circle at 77% 28%, rgba(255,255,255,.66) 0 1px, transparent 1.5px),
    radial-gradient(circle at 91% 64%, rgba(125,211,252,.58) 0 1px, transparent 1.5px);
  background-size: 190px 190px, 270px 270px, 240px 240px, 310px 310px, 220px 220px, 290px 290px;
}

body.sofon-space-design::after {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.32));
}

body.sofon-space-design a {
  text-underline-offset: 0.2em;
}

body.sofon-space-design a:focus-visible,
body.sofon-space-design button:focus-visible,
body.sofon-space-design input:focus-visible,
body.sofon-space-design textarea:focus-visible,
body.sofon-space-design select:focus-visible {
  outline: none;
  box-shadow: var(--space-focus);
}

body.sofon-space-design .wp-site-blocks {
  overflow: clip;
}

/* ===== HEADER ===== */
body.sofon-space-design header.wp-block-template-part {
  position: relative;
  z-index: 1000;
  margin: 0;
}

body.sofon-space-design header.wp-block-template-part > .wp-block-group:first-child {
  position: sticky !important;
  top: 0;
  isolation: isolate;
  border-bottom: 1px solid var(--space-line);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

body.sofon-space-design header.wp-block-template-part > .wp-block-group:first-child::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.68), rgba(4, 9, 26, 0.90)),
    radial-gradient(circle at 18% 0%, rgba(96,165,250,.18), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(167,139,250,.14), transparent 36%);
}

body.sofon-space-design header.wp-block-template-part > .wp-block-group:first-child > .wp-block-group {
  padding-top: 14px !important;
  padding-bottom: 12px !important;
  background-size: cover !important;
  background-position: center 22% !important;
  background-blend-mode: multiply;
}

body.sofon-space-design header .wp-block-site-logo img {
  width: 54px !important;
  height: 54px !important;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(96, 165, 250, 0.22));
  transition: transform .28s ease, filter .28s ease;
}

body.sofon-space-design header .wp-block-site-logo a:hover img {
  transform: translateY(-2px) rotate(-2deg);
  filter: drop-shadow(0 10px 22px rgba(125, 211, 252, 0.34));
}

body.sofon-space-design header .wp-block-site-title {
  margin: 0;
  font-size: clamp(1.05rem, .92rem + .55vw, 1.45rem);
  font-weight: 700;
  letter-spacing: .03em;
}

body.sofon-space-design header .wp-block-site-title a {
  color: #fff;
  text-decoration: none;
  text-shadow: 0 2px 18px rgba(0,0,0,.56);
}

/* ===== NAVIGATION ===== */
body.sofon-space-design .space-navigation {
  width: 100%;
  margin-top: 10px;
}

body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
  width: 100%;
}

body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-content,
body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
  width: 100%;
}

body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

body.sofon-space-design .space-navigation .space-nav-top-item {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(148, 163, 255, 0.16);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 8px 24px rgba(0,0,0,.12);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

body.sofon-space-design .space-navigation .space-nav-top-item:hover,
body.sofon-space-design .space-navigation .space-nav-top-item:focus-within,
body.sofon-space-design .space-navigation .space-nav-top-item.current-menu-item,
body.sofon-space-design .space-navigation .space-nav-top-item.current-menu-ancestor {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.36);
  background: linear-gradient(180deg, rgba(96,165,250,.14), rgba(167,139,250,.075));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 12px 28px rgba(0,0,0,.2), 0 0 26px rgba(96,165,250,.08);
}

body.sofon-space-design .space-navigation .space-nav-top-item > .wp-block-navigation-item__content {
  display: flex;
  min-height: 58px;
  padding: 8px 22px 8px 9px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--space-text);
  text-decoration: none;
  text-align: center;
  line-height: 1.15;
  font-size: clamp(.66rem, .60rem + .14vw, .76rem);
  font-weight: 650;
}

body.sofon-space-design .space-navigation .space-nav-top-item > .wp-block-navigation-item__content .wp-block-navigation-item__label {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

body.sofon-space-design .space-nav-icon,
body.sofon-space-design .space-topic-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--space-cyan);
}

body.sofon-space-design .space-nav-icon {
  width: 22px;
  height: 22px;
}

body.sofon-space-design .space-nav-icon svg,
body.sofon-space-design .space-subnav-icon svg,
body.sofon-space-design .space-topic-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.sofon-space-design .space-nav-icon .space-icon-fill,
body.sofon-space-design .space-subnav-icon .space-icon-fill,
body.sofon-space-design .space-topic-icon .space-icon-fill {
  fill: currentColor;
  stroke: none;
}

body.sofon-space-design .space-navigation .space-nav-star .space-nav-icon { color: #f8d36d; }
body.sofon-space-design .space-navigation .space-nav-nebula .space-nav-icon { color: #c084fc; }
body.sofon-space-design .space-navigation .space-nav-galaxy .space-nav-icon { color: #a78bfa; }
body.sofon-space-design .space-navigation .space-nav-rocket .space-nav-icon { color: #7dd3fc; }
body.sofon-space-design .space-navigation .space-nav-telescope .space-nav-icon { color: #93c5fd; }
body.sofon-space-design .space-navigation .space-nav-book .space-nav-icon { color: #c4b5fd; }
body.sofon-space-design .space-navigation .space-nav-radar .space-nav-icon { color: #67e8f9; }

body.sofon-space-design .space-navigation .space-nav-top-item > .wp-block-navigation__submenu-icon {
  position: absolute;
  right: 7px;
  top: 50%;
  width: 16px;
  height: 24px;
  margin: 0;
  transform: translateY(-50%);
  color: rgba(226,232,240,.68);
}

body.sofon-space-design .space-navigation .space-nav-top-item > .wp-block-navigation__submenu-icon svg {
  width: 10px;
  height: 10px;
}

/* Desktop dropdowns */
@media (min-width: 981px) {
  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container-open,
  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container-close {
    display: none !important;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: block !important;
    position: static;
    background: transparent !important;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__submenu-container {
    min-width: 280px !important;
    padding: 10px !important;
    gap: 4px !important;
    border: 1px solid rgba(125,211,252,.22) !important;
    border-radius: 18px !important;
    background: rgba(5, 11, 28, .96) !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04) !important;
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
  }

  body.sofon-space-design .space-navigation .space-nav-top-item > .wp-block-navigation__submenu-container {
    margin-top: 8px;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    gap: 9px;
    padding: 9px 34px 9px 10px !important;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #e8eefc !important;
    background: rgba(255,255,255,.025);
    font-size: .79rem;
    font-weight: 540;
    line-height: 1.25;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
  body.sofon-space-design .space-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible {
    background: linear-gradient(90deg, rgba(96,165,250,.14), rgba(167,139,250,.08));
    border-color: rgba(125,211,252,.18);
    transform: translateX(2px);
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    color: rgba(226,232,240,.62);
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
    top: -10px !important;
    left: calc(100% + 7px) !important;
    margin: 0 !important;
  }
}

body.sofon-space-design .space-subnav-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #91c9f7;
  opacity: .9;
}

/* Mobile / tablet overlay */
@media (max-width: 980px) {
  body.sofon-space-design header.wp-block-template-part > .wp-block-group:first-child {
    position: sticky !important;
  }

  body.sofon-space-design header.wp-block-template-part > .wp-block-group:first-child > .wp-block-group {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  body.sofon-space-design .space-navigation {
    margin-top: 7px;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container-open {
    display: flex !important;
    margin: 0 auto;
    padding: 8px 14px;
    border: 1px solid rgba(125,211,252,.26);
    border-radius: 12px;
    color: #fff;
    background: rgba(15,23,42,.74);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container-open::after {
    content: "Menu";
    margin-left: 8px;
    font-size: .82rem;
    font-weight: 650;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container.is-menu-open {
    padding: 18px !important;
    color: var(--space-text) !important;
    background:
      radial-gradient(circle at 20% 0%, rgba(96,165,250,.14), transparent 35%),
      radial-gradient(circle at 80% 0%, rgba(167,139,250,.13), transparent 38%),
      rgba(2,6,23,.985) !important;
    overflow-y: auto;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container-close {
    top: 16px;
    right: 16px;
    padding: 9px;
    border: 1px solid var(--space-line);
    border-radius: 12px;
    color: #fff;
    background: rgba(255,255,255,.05);
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container-content {
    padding-top: 58px !important;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100%;
    gap: 8px;
    align-items: stretch;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container.is-menu-open .space-nav-top-item {
    width: 100%;
    border-radius: 16px;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container.is-menu-open .space-nav-top-item > .wp-block-navigation-item__content {
    min-height: 50px;
    flex-direction: row;
    justify-content: flex-start;
    padding: 11px 46px 11px 12px;
    text-align: left;
    font-size: .9rem;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container.is-menu-open .space-nav-icon {
    width: 21px;
    height: 21px;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
    width: 100% !important;
    margin: 4px 0 8px !important;
    padding: 6px !important;
    border: 1px solid rgba(148,163,255,.12) !important;
    border-radius: 13px !important;
    background: rgba(255,255,255,.025) !important;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    gap: 8px;
    padding: 8px 10px !important;
    border-radius: 10px;
    color: #dbe7fb !important;
    font-size: .82rem;
    line-height: 1.3;
    text-decoration: none;
  }

  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
    background: rgba(96,165,250,.09);
  }
}

/* ===== GLOBAL CONTENT BACKDROPS ===== */
body.sofon-space-design main.wp-block-group,
body.sofon-space-design main.wp-block-group.alignfull {
  position: relative;
  color: var(--space-text);
  background-color: rgba(2, 6, 23, 0.78) !important;
  background-blend-mode: multiply, normal;
}

body.sofon-space-design main > .wp-block-group.alignfull.has-background,
body.sofon-space-design .space-home-shell {
  background-color: rgba(2, 6, 23, 0.74) !important;
  background-blend-mode: multiply, normal;
}

body.sofon-space-design .wp-block-heading,
body.sofon-space-design .wp-block-post-title,
body.sofon-space-design .wp-block-query-title {
  color: var(--space-text);
}

body.sofon-space-design h1,
body.sofon-space-design h2,
body.sofon-space-design h3,
body.sofon-space-design h4 {
  text-wrap: balance;
}

body.sofon-space-design .wp-block-separator {
  border-color: transparent !important;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125,211,252,.38), rgba(167,139,250,.34), transparent);
  opacity: 1;
}

body.sofon-space-design .wp-element-button,
body.sofon-space-design .wp-block-button__link {
  border: 1px solid rgba(125,211,252,.25);
  border-radius: 999px;
  color: #f8fbff;
  background: linear-gradient(135deg, rgba(37,99,235,.86), rgba(109,40,217,.84));
  box-shadow: 0 10px 28px rgba(37,99,235,.18), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, border-color .2s ease;
}

body.sofon-space-design .wp-element-button:hover,
body.sofon-space-design .wp-block-button__link:hover {
  transform: translateY(-2px);
  border-color: rgba(125,211,252,.42);
  box-shadow: 0 15px 34px rgba(37,99,235,.28), inset 0 1px 0 rgba(255,255,255,.2);
  filter: brightness(1.08);
}

/* ===== HOME HERO ===== */
body.sofon-space-design.sofon-space-home .space-home-shell {
  padding-bottom: clamp(42px, 6vw, 90px) !important;
}

body.sofon-space-design .space-home-hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: clamp(28px, 4.5vw, 68px) auto clamp(46px, 6vw, 90px) !important;
  padding: clamp(26px, 4vw, 54px);
  gap: clamp(22px, 4vw, 64px);
  border: 1px solid rgba(125,211,252,.18);
  border-radius: var(--space-radius-lg);
  background:
    radial-gradient(circle at 70% 15%, rgba(125,211,252,.12), transparent 32%),
    radial-gradient(circle at 24% 85%, rgba(167,139,250,.12), transparent 34%),
    rgba(6,12,30,.72);
  box-shadow: var(--space-shadow), inset 0 1px 0 rgba(255,255,255,.055);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

body.sofon-space-design .space-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.035), transparent 35%, transparent 70%, rgba(125,211,252,.028));
}

body.sofon-space-design .space-home-hero h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 1.55rem + 2.3vw, 4.1rem) !important;
  line-height: .98;
  letter-spacing: -.035em;
  text-shadow: 0 8px 34px rgba(0,0,0,.35);
}

body.sofon-space-design .space-home-hero h1 strong,
body.sofon-space-design .space-home-hero h1 em {
  color: inherit;
}

body.sofon-space-design .space-home-hero .wp-block-image img {
  max-height: 390px;
  width: auto;
  margin-inline: auto;
  object-fit: contain;
  filter: drop-shadow(0 22px 42px rgba(96,165,250,.23));
  animation: space-float 8s ease-in-out infinite;
}

@keyframes space-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(0, -10px, 0) rotate(1deg); }
}

/* ===== HOME TOPIC CARDS ===== */
body.sofon-space-design .space-topic-card {
  position: relative;
  min-height: 180px;
  padding: 22px !important;
  border: 1px solid rgba(148,163,255,.15);
  border-radius: var(--space-radius);
  background: linear-gradient(150deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  box-shadow: var(--space-shadow-sm), inset 0 1px 0 rgba(255,255,255,.045);
  overflow: hidden;
  transition: transform .24s ease, border-color .24s ease, background .24s ease, box-shadow .24s ease;
}

body.sofon-space-design .space-topic-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -80px;
  bottom: -95px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96,165,250,.11), transparent 68%);
  pointer-events: none;
}

body.sofon-space-design .space-topic-card:hover {
  transform: translateY(-5px);
  border-color: rgba(125,211,252,.32);
  background: linear-gradient(150deg, rgba(96,165,250,.105), rgba(167,139,250,.045));
  box-shadow: 0 22px 48px rgba(0,0,0,.28), 0 0 35px rgba(96,165,250,.07);
}

body.sofon-space-design .space-topic-card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 0;
}

body.sofon-space-design .space-topic-icon {
  width: 27px;
  height: 27px;
  color: var(--space-cyan);
}

body.sofon-space-design .space-topic-card p {
  max-width: 42ch;
  margin: 12px auto 0;
  color: var(--space-muted);
  line-height: 1.65;
}

/* ===== HOME FEATURE PANELS ===== */
body.sofon-space-design .space-feature-grid {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto !important;
  gap: 20px !important;
}

body.sofon-space-design .space-feature-card {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(148,163,255,.16);
  border-radius: var(--space-radius-lg);
  background: rgba(7,14,31,.68);
  box-shadow: var(--space-shadow-sm), inset 0 1px 0 rgba(255,255,255,.04);
}

body.sofon-space-design .space-feature-card .wp-block-image img {
  border-radius: 22px !important;
  box-shadow: 0 18px 45px rgba(0,0,0,.34);
}

body.sofon-space-design .space-feature-card .wp-block-buttons {
  gap: 8px;
  justify-content: center;
}

body.sofon-space-design .space-feature-card .wp-block-button__link {
  padding: .65rem 1rem;
  font-size: .82rem;
}

body.sofon-space-design .space-universe-section {
  width: min(1060px, calc(100% - 32px));
  margin-inline: auto !important;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid rgba(148,163,255,.15);
  border-radius: var(--space-radius-lg);
  background: rgba(5,12,29,.62);
  box-shadow: var(--space-shadow-sm);
}

body.sofon-space-design .space-section-display-title {
  margin-bottom: 8px;
  background: linear-gradient(90deg, #f8fafc, #a5d8ff 46%, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  letter-spacing: -.03em;
}

/* ===== POSTS AND PAGES ===== */
body.sofon-space-design.sofon-space-single main,
body.sofon-space-design.sofon-space-page main {
  padding-bottom: clamp(42px, 7vw, 92px) !important;
}

body.sofon-space-design .space-article-hero {
  width: min(1120px, calc(100% - 32px));
  margin: clamp(24px, 4vw, 54px) auto clamp(24px, 4vw, 42px) !important;
  padding: clamp(20px, 3vw, 34px) !important;
  border: 1px solid rgba(148,163,255,.16);
  border-radius: var(--space-radius-lg);
  background: rgba(5,12,28,.70);
  box-shadow: var(--space-shadow-sm);
}

body.sofon-space-design .space-article-hero .wp-block-post-featured-image {
  margin-bottom: 22px !important;
}

body.sofon-space-design .space-article-hero .wp-block-post-featured-image img,
body.sofon-space-design.sofon-space-page main > .wp-block-group .wp-block-post-featured-image img {
  max-height: 560px;
  width: 100%;
  object-fit: contain;
  border-radius: 22px;
  background: rgba(255,255,255,.018);
  box-shadow: 0 18px 48px rgba(0,0,0,.30);
}

body.sofon-space-design .space-article-hero .wp-block-post-title,
body.sofon-space-design.sofon-space-page .wp-block-post-title {
  margin-top: 4px;
  font-size: clamp(2rem, 1.5rem + 2vw, 3.6rem) !important;
  line-height: 1.02;
  letter-spacing: -.035em;
}

body.sofon-space-design .space-article-content {
  width: min(1040px, calc(100% - 32px)) !important;
  max-width: 1040px !important;
  margin-inline: auto !important;
  padding: clamp(26px, 4vw, 52px) clamp(20px, 4vw, 56px);
  border: 1px solid rgba(148,163,255,.14);
  border-radius: var(--space-radius-lg);
  background: rgba(4,10,26,.74);
  box-shadow: var(--space-shadow-sm), inset 0 1px 0 rgba(255,255,255,.035);
}

body.sofon-space-design .space-article-content > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: 900px !important;
  margin-left: auto;
  margin-right: auto;
}

body.sofon-space-design .space-article-content p,
body.sofon-space-design .space-article-content li {
  color: #d7dfef;
  line-height: 1.78;
}

body.sofon-space-design .space-article-content p {
  margin-top: 0;
  margin-bottom: 1.12em;
}

body.sofon-space-design .space-article-content h2,
body.sofon-space-design .space-article-content h3,
body.sofon-space-design .space-article-content h4 {
  position: relative;
  margin-top: 1.6em;
  margin-bottom: .72em;
  line-height: 1.14;
  letter-spacing: -.02em;
}

body.sofon-space-design .space-article-content h2 {
  padding-bottom: .34em;
  border-bottom: 1px solid rgba(125,211,252,.15);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.3rem);
}

body.sofon-space-design .space-article-content h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 74px;
  height: 1px;
  background: linear-gradient(90deg, var(--space-cyan), var(--space-violet));
}

body.sofon-space-design .space-article-content a:not(.wp-element-button) {
  color: #9bdcff;
  text-decoration-color: rgba(125,211,252,.36);
  transition: color .18s ease, text-decoration-color .18s ease;
}

body.sofon-space-design .space-article-content a:not(.wp-element-button):hover {
  color: #c4b5fd;
  text-decoration-color: rgba(196,181,253,.62);
}

body.sofon-space-design .space-article-content .wp-block-image,
body.sofon-space-design .space-article-content .wp-block-gallery,
body.sofon-space-design .space-article-content .wp-block-video,
body.sofon-space-design .space-article-content .wp-block-embed {
  margin-top: 1.7rem;
  margin-bottom: 1.7rem;
}

body.sofon-space-design .space-article-content .wp-block-image img,
body.sofon-space-design .space-article-content .wp-block-gallery img {
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0,0,0,.30);
}

body.sofon-space-design .space-article-content figcaption {
  color: var(--space-dim);
  font-size: .82rem;
}

body.sofon-space-design .space-article-content blockquote,
body.sofon-space-design .wp-block-pullquote {
  border: 1px solid rgba(125,211,252,.18);
  border-left: 3px solid rgba(125,211,252,.62);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(96,165,250,.09), rgba(167,139,250,.055));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

body.sofon-space-design .space-article-content blockquote {
  padding: 18px 22px;
}

body.sofon-space-design .wp-block-pullquote {
  padding: clamp(20px, 3vw, 34px);
}

body.sofon-space-design .wp-block-pullquote blockquote {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.sofon-space-design .space-article-content table,
body.sofon-space-design .space-article-content .wp-block-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(148,163,255,.15);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
}

body.sofon-space-design .space-article-content th,
body.sofon-space-design .space-article-content td {
  padding: .68rem .8rem;
  border-color: rgba(148,163,255,.12);
}

body.sofon-space-design .space-article-content th {
  color: #fff;
  background: rgba(96,165,250,.10);
}

body.sofon-space-design .space-article-content code {
  padding: .12em .4em;
  border: 1px solid rgba(148,163,255,.16);
  border-radius: 6px;
  color: #c4e8ff;
  background: rgba(15,23,42,.76);
}

body.sofon-space-design .space-article-content pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid rgba(148,163,255,.16);
  border-radius: 14px;
  background: #07101f;
}

body.sofon-space-design .wp-block-post-terms.is-style-pill a {
  display: inline-flex;
  margin: 4px 3px;
  padding: 7px 11px;
  border: 1px solid rgba(125,211,252,.16);
  border-radius: 999px;
  color: #cfe9ff;
  background: rgba(96,165,250,.07);
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

body.sofon-space-design .wp-block-post-terms.is-style-pill a:hover {
  transform: translateY(-1px);
  border-color: rgba(125,211,252,.34);
  background: rgba(96,165,250,.12);
}

body.sofon-space-design .space-post-navigation {
  width: min(1040px, calc(100% - 32px));
  margin: 12px auto 0;
  gap: 16px;
}

body.sofon-space-design .space-post-navigation a {
  display: inline-flex;
  max-width: 46vw;
  padding: 11px 15px;
  border: 1px solid rgba(148,163,255,.14);
  border-radius: 13px;
  color: #dcecff;
  background: rgba(255,255,255,.035);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

body.sofon-space-design .space-post-navigation a:hover {
  transform: translateY(-2px);
  border-color: rgba(125,211,252,.30);
  background: rgba(96,165,250,.08);
}

/* Reading progress */
body.sofon-space-design .space-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  height: 3px;
  pointer-events: none;
  background: rgba(255,255,255,.025);
}

body.sofon-space-design .space-reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--space-cyan), var(--space-indigo), var(--space-violet));
  box-shadow: 0 0 14px rgba(125,211,252,.48);
}

/* ===== ARCHIVES / SEARCH / INDEX ===== */
body.sofon-space-design.sofon-space-archive main,
body.sofon-space-design.sofon-space-search main,
body.sofon-space-design.blog:not(.sofon-space-home) main {
  padding: clamp(28px, 5vw, 64px) 16px clamp(46px, 7vw, 90px);
}

body.sofon-space-design .wp-block-query-title,
body.sofon-space-design main > .wp-block-heading.alignwide {
  font-size: clamp(2rem, 1.55rem + 1.8vw, 3.4rem) !important;
  letter-spacing: -.035em;
}

body.sofon-space-design .wp-block-term-description {
  max-width: 820px !important;
  color: var(--space-muted);
  line-height: 1.7;
}

body.sofon-space-design .space-card-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)) !important;
  gap: 18px !important;
}

body.sofon-space-design .space-post-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148,163,255,.14);
  border-radius: 20px;
  background: rgba(5,12,28,.68);
  box-shadow: var(--space-shadow-sm), inset 0 1px 0 rgba(255,255,255,.03);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

body.sofon-space-design .space-post-card:hover {
  transform: translateY(-5px);
  border-color: rgba(125,211,252,.28);
  box-shadow: 0 22px 50px rgba(0,0,0,.32), 0 0 28px rgba(96,165,250,.06);
}

body.sofon-space-design .space-post-card > .wp-block-post-featured-image {
  margin: 0 !important;
  padding: 0 !important;
}

body.sofon-space-design .space-post-card > .wp-block-post-featured-image img {
  width: 100%;
  aspect-ratio: 16 / 10 !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  transition: transform .35s ease, filter .35s ease;
}

body.sofon-space-design .space-post-card:hover > .wp-block-post-featured-image img {
  transform: scale(1.025);
  filter: saturate(1.08) brightness(1.04);
}

body.sofon-space-design .space-post-card > .wp-block-group {
  margin: 0 !important;
  padding: 16px 16px 18px !important;
}

body.sofon-space-design .space-post-card .wp-block-post-title {
  margin: 0;
  font-size: clamp(1rem, .95rem + .28vw, 1.2rem) !important;
  line-height: 1.25;
}

body.sofon-space-design .space-post-card .wp-block-post-title a {
  color: #f4f8ff;
  text-decoration: none;
}

body.sofon-space-design .space-post-card .wp-block-post-excerpt {
  color: var(--space-muted);
  line-height: 1.55;
}

body.sofon-space-design .wp-block-query-pagination {
  margin-top: 26px;
}

body.sofon-space-design .wp-block-query-pagination a {
  display: inline-flex;
  padding: 9px 14px;
  border: 1px solid rgba(148,163,255,.15);
  border-radius: 12px;
  color: #dcecff;
  background: rgba(255,255,255,.035);
  text-decoration: none;
}

/* ===== SEARCH ===== */
body.sofon-space-design .wp-block-search {
  width: 100%;
}

body.sofon-space-design .wp-block-search__inside-wrapper {
  overflow: hidden;
  border: 1px solid rgba(125,211,252,.20) !important;
  border-radius: 999px;
  background: rgba(2,6,23,.64);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

body.sofon-space-design .wp-block-search__input {
  min-width: 0;
  border: 0 !important;
  color: #eef6ff;
  background: transparent !important;
}

body.sofon-space-design .wp-block-search__input::placeholder {
  color: #8492ad;
}

body.sofon-space-design .wp-block-search__button {
  margin: 4px;
  padding-inline: 18px;
  border: 1px solid rgba(125,211,252,.22) !important;
  border-radius: 999px !important;
  color: #fff;
  background: linear-gradient(135deg, rgba(37,99,235,.92), rgba(109,40,217,.86));
}

/* ===== FOOTER ===== */
body.sofon-space-design footer.wp-block-template-part {
  position: relative;
  margin: 0;
  border-top: 1px solid rgba(125,211,252,.15);
  background: #020617;
}

body.sofon-space-design footer.wp-block-template-part > .wp-block-group {
  position: relative;
  padding: clamp(34px, 5vw, 64px) 20px !important;
  background-color: rgba(2,6,23,.82) !important;
  background-blend-mode: multiply, normal;
  overflow: hidden;
}

body.sofon-space-design footer.wp-block-template-part > .wp-block-group::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 25%, rgba(96,165,250,.10), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(167,139,250,.09), transparent 34%),
    linear-gradient(180deg, rgba(3,8,22,.1), rgba(2,6,23,.76));
}

body.sofon-space-design footer.wp-block-template-part > .wp-block-group > * {
  position: relative;
  z-index: 1;
}

body.sofon-space-design footer .wp-block-heading {
  margin: 0 0 18px;
  font-size: clamp(1.7rem, 1.3rem + 1.3vw, 2.6rem) !important;
  letter-spacing: .22em !important;
  text-transform: uppercase;
}

body.sofon-space-design footer .wp-block-columns,
body.sofon-space-design footer .wp-block-buttons,
body.sofon-space-design footer .wp-block-quote {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

body.sofon-space-design footer .wp-block-quote {
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(148,163,255,.12);
  border-radius: 14px;
  color: var(--space-dim);
  background: rgba(255,255,255,.022);
}

body.sofon-space-design footer a:not(.wp-element-button) {
  color: #a8ddff;
}

/* ===== MISC BLOCK POLISH ===== */
body.sofon-space-design .wp-block-details {
  padding: 14px 16px;
  border: 1px solid rgba(148,163,255,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}

body.sofon-space-design .wp-block-details summary {
  cursor: pointer;
  color: #eef6ff;
  font-weight: 650;
}

body.sofon-space-design .wp-block-cover {
  border-radius: var(--space-radius);
  overflow: hidden;
}

body.sofon-space-design hr {
  opacity: .9;
}

/* ===== RESPONSIVE CONTENT ===== */
@media (max-width: 1180px) and (min-width: 981px) {
  body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  body.sofon-space-design .space-home-hero {
    width: min(100% - 22px, 680px);
    padding: 24px 18px;
    border-radius: 22px;
  }

  body.sofon-space-design .space-home-hero .wp-block-columns,
  body.sofon-space-design .space-feature-grid {
    gap: 16px !important;
  }

  body.sofon-space-design .space-home-hero h1 {
    font-size: clamp(2rem, 9vw, 3.2rem) !important;
  }

  body.sofon-space-design .space-home-hero .wp-block-image img {
    max-height: 250px;
  }

  body.sofon-space-design .space-topic-card {
    min-height: 0;
  }

  body.sofon-space-design .space-article-content,
  body.sofon-space-design .space-article-hero,
  body.sofon-space-design .space-post-navigation,
  body.sofon-space-design .space-feature-grid,
  body.sofon-space-design .space-universe-section {
    width: calc(100% - 22px) !important;
  }

  body.sofon-space-design .space-article-content {
    padding: 22px 16px;
    border-radius: 20px;
  }

  body.sofon-space-design .space-article-hero {
    padding: 18px !important;
    border-radius: 20px;
  }

  body.sofon-space-design .space-post-navigation {
    flex-direction: column;
  }

  body.sofon-space-design .space-post-navigation a {
    max-width: 100%;
  }

  body.sofon-space-design footer .wp-block-heading {
    letter-spacing: .12em !important;
  }
}

@media (max-width: 520px) {
  body.sofon-space-design header .wp-block-site-logo img {
    width: 45px !important;
    height: 45px !important;
  }

  body.sofon-space-design header .wp-block-site-title {
    font-size: 1rem;
  }

  body.sofon-space-design .space-card-grid {
    grid-template-columns: 1fr !important;
  }

  body.sofon-space-design .space-article-content p,
  body.sofon-space-design .space-article-content li {
    line-height: 1.7;
  }
}

/* Motion accessibility */
@media (prefers-reduced-motion: reduce) {
  body.sofon-space-design *,
  body.sofon-space-design *::before,
  body.sofon-space-design *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ==========================================================================
   PHASE 02B — header / footer / archive refinement
   ========================================================================== */

/* HEADER: remove the photographic background entirely and use a calm
   Milky-Way-inspired gradient. Both WordPress groups carry inline background
   images, therefore the overrides intentionally use !important. */
body.sofon-space-design header.wp-block-template-part > .wp-block-group:first-child {
  border-bottom-color: rgba(125, 211, 252, 0.20);
  background:
    radial-gradient(circle at 16% -20%, rgba(67, 142, 255, .22), transparent 36%),
    radial-gradient(circle at 83% 0%, rgba(137, 92, 246, .20), transparent 34%),
    linear-gradient(135deg, #020617 0%, #07142d 38%, #111b43 67%, #070b22 100%) !important;
  background-image:
    radial-gradient(circle at 16% -20%, rgba(67, 142, 255, .22), transparent 36%),
    radial-gradient(circle at 83% 0%, rgba(137, 92, 246, .20), transparent 34%),
    linear-gradient(135deg, #020617 0%, #07142d 38%, #111b43 67%, #070b22 100%) !important;
  box-shadow: 0 14px 44px rgba(0, 0, 0, .30), inset 0 -1px 0 rgba(255,255,255,.025);
  backdrop-filter: blur(22px) saturate(1.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.12);
}

body.sofon-space-design header.wp-block-template-part > .wp-block-group:first-child::before {
  opacity: 1;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(125, 211, 252, .075), transparent 46%),
    linear-gradient(90deg, rgba(255,255,255,.025), transparent 28%, transparent 72%, rgba(255,255,255,.018));
}

body.sofon-space-design header.wp-block-template-part > .wp-block-group:first-child > .wp-block-group {
  background: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
  background-blend-mode: normal !important;
}

body.sofon-space-design header .wp-block-site-title a {
  text-shadow: 0 3px 20px rgba(0,0,0,.42), 0 0 24px rgba(96,165,250,.07);
}

/* Center the navigation as a complete unit and center the icon + label inside
   every top-level button independently of the submenu toggle arrow. */
body.sofon-space-design .space-navigation {
  width: min(1880px, calc(100% - 12px));
  margin: 12px auto 0 !important;
}

body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container:not(.is-menu-open),
body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-content,
body.sofon-space-design .space-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
  margin-left: auto;
  margin-right: auto;
}

body.sofon-space-design .space-navigation .space-nav-top-item {
  background: linear-gradient(180deg, rgba(10, 21, 51, .82), rgba(4, 10, 28, .72));
  border-color: rgba(148, 188, 255, .24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.075),
    0 10px 28px rgba(0,0,0,.20),
    0 0 0 1px rgba(3,8,24,.18);
  backdrop-filter: blur(14px) saturate(1.14);
  -webkit-backdrop-filter: blur(14px) saturate(1.14);
}

body.sofon-space-design .space-navigation .space-nav-top-item:hover,
body.sofon-space-design .space-navigation .space-nav-top-item:focus-within,
body.sofon-space-design .space-navigation .space-nav-top-item.current-menu-item,
body.sofon-space-design .space-navigation .space-nav-top-item.current-menu-ancestor {
  border-color: rgba(125, 211, 252, .48);
  background: linear-gradient(180deg, rgba(29, 65, 126, .62), rgba(33, 23, 83, .58));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 14px 32px rgba(0,0,0,.26),
    0 0 30px rgba(96,165,250,.10);
}

body.sofon-space-design .space-navigation .space-nav-top-item > .wp-block-navigation-item__content {
  width: 100%;
  box-sizing: border-box;
  min-height: 64px;
  padding: 9px 28px !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f8fbff !important;
  font-weight: 720;
  text-shadow: 0 2px 10px rgba(0,0,0,.40);
}

body.sofon-space-design .space-navigation .space-nav-top-item > .wp-block-navigation-item__content .wp-block-navigation-item__label {
  width: 100%;
  text-align: center;
}

body.sofon-space-design .space-navigation .space-nav-icon {
  margin-inline: auto;
  filter: drop-shadow(0 0 7px rgba(125,211,252,.24));
}

body.sofon-space-design .space-navigation .space-nav-top-item > .wp-block-navigation__submenu-icon {
  right: 10px;
  color: rgba(226, 238, 255, .76);
}

/* HOME: the previous top margin created a full-width dark strip between the
   header and the hero. The hero now begins directly with the content area. */
body.sofon-space-design header.wp-block-template-part + main,
body.sofon-space-design .wp-site-blocks > main {
  margin-top: 0 !important;
}

body.sofon-space-design.sofon-space-home .space-home-shell {
  padding-top: 0 !important;
}

body.sofon-space-design.sofon-space-home .space-home-shell > .space-home-hero {
  margin-top: 0 !important;
}

/* ARCHIVES / CATEGORIES: category title + description use the same visual
   surface language as an article, followed by larger article preview cards. */
body.sofon-space-design.sofon-space-archive main {
  padding-top: clamp(24px, 4vw, 48px);
}

body.sofon-space-design .space-archive-intro {
  position: relative;
  width: min(1040px, calc(100% - 32px));
  box-sizing: border-box;
  margin: 0 auto clamp(28px, 4vw, 44px);
  padding: clamp(28px, 4vw, 52px) clamp(20px, 4vw, 56px);
  overflow: hidden;
  border: 1px solid rgba(148,163,255,.15);
  border-radius: var(--space-radius-lg);
  background:
    radial-gradient(circle at 88% 0%, rgba(96,165,250,.08), transparent 34%),
    radial-gradient(circle at 10% 100%, rgba(167,139,250,.07), transparent 38%),
    rgba(4,10,26,.76);
  box-shadow: var(--space-shadow-sm), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}

body.sofon-space-design .space-archive-intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(20px, 4vw, 56px);
  right: clamp(20px, 4vw, 56px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125,211,252,.48), rgba(167,139,250,.38), transparent);
  pointer-events: none;
}

body.sofon-space-design .space-archive-intro .wp-block-query-title {
  max-width: 900px;
  margin: 0 auto 18px !important;
  padding-top: 0 !important;
  text-align: center;
  line-height: 1.04 !important;
}

body.sofon-space-design .space-archive-intro .wp-block-term-description {
  max-width: 900px !important;
  margin: 0 auto !important;
  color: #d7dfef;
  font-size: clamp(1rem, .97rem + .16vw, 1.08rem);
  line-height: 1.78;
}

body.sofon-space-design .space-archive-intro .wp-block-term-description > :first-child {
  margin-top: 0;
}

body.sofon-space-design .space-archive-intro .wp-block-term-description > :last-child {
  margin-bottom: 0;
}

body.sofon-space-design .space-archive-intro .wp-block-term-description a {
  color: #9bdcff;
  text-decoration-color: rgba(125,211,252,.38);
}

body.sofon-space-design .space-archive-divider {
  display: none !important;
}

body.sofon-space-design.sofon-space-archive .space-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)) !important;
  gap: 22px !important;
}

body.sofon-space-design.sofon-space-archive .space-post-card {
  border-color: rgba(148,163,255,.16);
  background: rgba(4,10,26,.76);
  border-radius: var(--space-radius);
}

body.sofon-space-design.sofon-space-archive .space-post-card > .wp-block-group {
  padding: 18px 18px 20px !important;
}

body.sofon-space-design.sofon-space-archive .space-post-card .wp-block-post-title {
  font-size: clamp(1.04rem, .98rem + .30vw, 1.28rem) !important;
}

/* FOOTER: turn the footer into a separated glass panel. The original footer
   has an inline Milky Way background image; suppress it so blur can work on
   the page atmosphere underneath rather than on an opaque photograph. */
body.sofon-space-design footer.wp-block-template-part {
  position: relative;
  padding: clamp(26px, 4vw, 52px) 16px clamp(18px, 3vw, 34px);
  border-top: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(96,165,250,.07), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(167,139,250,.06), transparent 36%),
    linear-gradient(180deg, rgba(2,6,23,.18), rgba(2,6,23,.72));
}

body.sofon-space-design footer.wp-block-template-part::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.sofon-space-design footer.wp-block-template-part > .wp-block-group {
  width: min(1180px, 100%);
  box-sizing: border-box;
  margin: 0 auto !important;
  padding: clamp(34px, 5vw, 62px) clamp(20px, 4vw, 48px) !important;
  overflow: hidden;
  border: 1px solid rgba(148, 188, 255, .18);
  border-radius: 30px;
  background: rgba(4, 10, 28, .56) !important;
  background-image: none !important;
  background-color: rgba(4, 10, 28, .56) !important;
  box-shadow:
    0 28px 80px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 50px rgba(96,165,250,.035);
  backdrop-filter: blur(34px) saturate(1.22);
  -webkit-backdrop-filter: blur(34px) saturate(1.22);
}

body.sofon-space-design footer.wp-block-template-part > .wp-block-group::before {
  background:
    radial-gradient(circle at 14% 12%, rgba(96,165,250,.13), transparent 34%),
    radial-gradient(circle at 86% 10%, rgba(167,139,250,.12), transparent 36%),
    linear-gradient(135deg, rgba(255,255,255,.022), transparent 45%, rgba(125,211,252,.018));
}

body.sofon-space-design footer .wp-block-quote {
  border-color: rgba(148,188,255,.16);
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.sofon-space-design footer .wp-block-search__inside-wrapper {
  border-color: rgba(125,211,252,.25) !important;
  background: rgba(2,6,23,.50);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (max-width: 980px) {
  body.sofon-space-design .space-navigation {
    width: 100%;
    margin-top: 8px !important;
  }
}

@media (max-width: 780px) {
  body.sofon-space-design .space-archive-intro {
    width: calc(100% - 22px);
    padding: 24px 18px;
    border-radius: 20px;
  }

  body.sofon-space-design footer.wp-block-template-part {
    padding-inline: 11px;
  }

  body.sofon-space-design footer.wp-block-template-part > .wp-block-group {
    border-radius: 22px;
  }
}



/* ============================================================
   PHASE 02C — archive width correction
   Twenty Twenty-Four constrained layout applies its global content max-width
   to dynamically inserted archive intro. Force the same outer width used by
   article content while keeping the readable inner text width from Phase 02B.
   ============================================================ */
body.sofon-space-design.sofon-space-archive main > .space-archive-intro {
  width: min(1040px, calc(100% - 32px)) !important;
  max-width: 1040px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 780px) {
  body.sofon-space-design.sofon-space-archive main > .space-archive-intro {
    width: calc(100% - 24px) !important;
  }
}
