@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --sp-accent: #2f7d4a;
  --sp-accent-strong: #14532d;
  --sp-accent-soft: #eaf4ed;
  --sp-bg: #ffffff;
  --sp-surface: #ffffff;
  --sp-surface-alt: #f2f6f3;
  --sp-text: #17201a;
  --sp-muted: #5f6f63;
  --sp-line: #dbe5de;
  --sp-button-bg: #14532d;
  --sp-button-text: #ffffff;
  --sp-emphasis-bg: #14532d;
  --sp-shadow: 0 18px 55px rgba(26, 67, 40, 0.1);
  --sp-page-art:
    radial-gradient(circle at 12% 2%, color-mix(in srgb, var(--sp-accent) 13%, transparent) 0, transparent 30%),
    radial-gradient(circle at 88% 42%, color-mix(in srgb, var(--sp-accent-soft) 64%, transparent) 0, transparent 34%),
    repeating-radial-gradient(circle at 8% 18%, transparent 0 94px, color-mix(in srgb, var(--sp-accent) 7%, transparent) 95px 96px, transparent 97px 162px),
    radial-gradient(color-mix(in srgb, var(--sp-accent) 20%, transparent) 0.8px, transparent 0.8px);
  --sp-page-art-size: auto, auto, auto, 28px 28px;
  --sp-container: 1240px;
  --sp-reading: 760px;
  --sp-radius: 16px;
  --sp-control-radius: 12px;
  --sp-header-height: 72px;
  --sp-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] {
  --sp-accent: #68b77d;
  --sp-accent-strong: #8dd19e;
  --sp-accent-soft: #1c3825;
  --sp-bg: #0c120e;
  --sp-surface: #131b16;
  --sp-surface-alt: #18231c;
  --sp-text: #edf4ee;
  --sp-muted: #adbbb0;
  --sp-line: #2d3a31;
  --sp-button-bg: #285f3a;
  --sp-button-text: #eef5f0;
  --sp-emphasis-bg: #101a13;
  --sp-shadow: 0 18px 55px rgba(2, 12, 5, 0.26);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --sp-accent: #68b77d;
    --sp-accent-strong: #8dd19e;
    --sp-accent-soft: #1c3825;
    --sp-bg: #0c120e;
    --sp-surface: #131b16;
    --sp-surface-alt: #18231c;
    --sp-text: #edf4ee;
    --sp-muted: #adbbb0;
    --sp-line: #2d3a31;
    --sp-button-bg: #285f3a;
    --sp-button-text: #eef5f0;
    --sp-emphasis-bg: #101a13;
    --sp-shadow: 0 18px 55px rgba(2, 12, 5, 0.26);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--sp-bg);
  background-image: var(--sp-page-art);
  background-position: center top, center center, center top, 0 0;
  background-size: var(--sp-page-art-size);
  background-attachment: fixed;
  color: var(--sp-text);
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
[type="button"],
[type="submit"] {
  cursor: pointer;
}

a {
  color: var(--sp-accent-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--sp-accent);
}

:focus-visible {
  outline: 3px solid var(--sp-accent);
  outline-offset: 3px;
}

::selection {
  background: var(--sp-accent-strong);
  color: var(--sp-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.7em;
  color: var(--sp-text);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.035em;
}

p {
  margin: 0 0 1.25em;
}

.sp-container,
.sp-container-narrow {
  width: min(calc(100% - 40px), var(--sp-container));
  margin-inline: auto;
}

.sp-container-narrow {
  width: min(calc(100% - 40px), var(--sp-reading));
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus,
.skip-link:focus {
  position: fixed !important;
  z-index: 1000;
  top: 12px;
  right: 12px;
  width: auto;
  height: auto;
  padding: 10px 16px;
  clip: auto;
  background: var(--sp-accent-strong);
  color: var(--sp-bg);
  border-radius: var(--sp-control-radius);
}

.site-header {
  position: relative;
  z-index: 30;
  width: 100%;
  min-height: var(--sp-header-height);
  border-bottom: 1px solid var(--sp-line);
  background: color-mix(in srgb, var(--sp-bg) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.has-sticky-header .site-header {
  position: sticky;
  top: 0;
}

.admin-bar.has-sticky-header .site-header {
  top: 32px;
}

.site-header-inner {
  display: grid;
  grid-template-columns: minmax(170px, auto) minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--sp-header-height);
  gap: 28px;
}

.site-branding {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.custom-logo-link {
  flex: 0 0 auto;
}

.custom-logo {
  width: auto;
  max-height: 44px;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sp-text);
  font-size: 1.3rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.botstory-logo-mark {
  flex: 0 0 auto;
  width: 29px;
  height: 39px;
}

.botstory-logo-green {
  fill: #18c76f;
}

.botstory-logo-ink {
  fill: #0b0f0d;
  transition: fill 180ms var(--sp-ease);
}

.site-description {
  margin: 0;
  overflow: hidden;
  color: var(--sp-muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-navigation {
  min-width: 0;
}

.primary-menu,
.primary-menu ul,
.footer-navigation ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.5vw, 34px);
}

.primary-menu > li {
  position: relative;
  flex: 0 0 auto;
}

.primary-menu a {
  display: block;
  padding: 20px 0;
  color: var(--sp-text);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
  color: var(--sp-accent-strong);
}

.primary-menu ul {
  position: absolute;
  z-index: 10;
  top: calc(100% - 6px);
  right: -18px;
  min-width: 210px;
  padding: 10px;
  visibility: hidden;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: var(--sp-surface);
  box-shadow: var(--sp-shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms var(--sp-ease), transform 180ms var(--sp-ease), visibility 180ms;
}

.primary-menu ul ul {
  top: -10px;
  right: calc(100% + 8px);
}

.primary-menu li:hover > ul,
.primary-menu li:focus-within > ul {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.primary-menu ul a {
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 0.88rem;
}

.primary-menu ul a:hover {
  background: var(--sp-surface-alt);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-button,
.menu-toggle,
.search-close {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-control-radius);
  background: transparent;
  color: var(--sp-text);
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 180ms var(--sp-ease), background-color 180ms var(--sp-ease), border-color 180ms var(--sp-ease), transform 180ms var(--sp-ease);
}

.text-button:hover,
.menu-toggle:hover,
.search-close:hover {
  border-color: var(--sp-accent);
  background: var(--sp-accent-soft);
  color: var(--sp-accent-strong);
}

.text-button:active,
.menu-toggle:active,
.button-link:active,
button[type="submit"]:active {
  transform: translateY(1px);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
}

.menu-toggle-lines {
  display: grid;
  width: 18px;
  gap: 5px;
}

.menu-toggle-lines i {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 180ms var(--sp-ease);
}

.menu-open .menu-toggle-lines i:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-open .menu-toggle-lines i:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.search-dialog {
  width: min(calc(100% - 40px), 680px);
  padding: 0;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: var(--sp-surface);
  color: var(--sp-text);
  box-shadow: var(--sp-shadow);
}

.search-dialog::backdrop {
  background: rgba(8, 22, 12, 0.62);
  backdrop-filter: blur(6px);
}

.search-dialog-inner {
  padding: clamp(24px, 5vw, 48px);
}

.search-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.search-dialog-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.search-form label,
.newsletter-form label,
.comment-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--sp-text);
  font-size: 0.86rem;
  font-weight: 750;
}

.search-form-fields,
.newsletter-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-control-radius);
  background: var(--sp-bg);
  color: var(--sp-text);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--sp-muted);
  opacity: 0.88;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--sp-accent);
  outline: 3px solid color-mix(in srgb, var(--sp-accent) 25%, transparent);
  outline-offset: 1px;
}

button[type="submit"],
.button-link,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid var(--sp-button-bg);
  border-radius: var(--sp-control-radius);
  background: var(--sp-button-bg);
  color: var(--sp-button-text);
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms var(--sp-ease), color 180ms var(--sp-ease), transform 180ms var(--sp-ease);
}

button[type="submit"]:hover,
.button-link:hover,
.wp-block-button__link:hover {
  background: var(--sp-accent);
  color: #f7f9f7;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.site-main {
  min-height: 52vh;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  min-height: min(720px, calc(100dvh - var(--sp-header-height)));
  gap: clamp(38px, 6vw, 88px);
  padding-block: clamp(56px, 8vw, 92px);
}

.hero-copy {
  max-width: 650px;
}

.hero-kicker {
  margin-bottom: 22px;
  color: var(--sp-muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.entry-category {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--sp-accent-strong);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.home-hero h1 {
  max-width: none;
  margin-bottom: 20px;
  font-size: clamp(2.35rem, 4.2vw, 4rem);
  line-height: 1.22;
  text-wrap: balance;
}

.home-hero h1 a {
  color: inherit;
  text-decoration: none;
}

.hero-excerpt {
  max-width: 54ch;
  margin-bottom: 28px;
  color: var(--sp-muted);
  font-size: clamp(1rem, 1.6vw, 1.14rem);
}

.hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--sp-muted);
  font-size: 0.78rem;
}

.entry-meta a {
  color: inherit;
  text-decoration: none;
}

.hero-visual {
  min-width: 0;
}

.post-thumbnail {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--sp-radius);
  background: var(--sp-surface-alt);
}

.post-thumbnail a {
  display: block;
  height: 100%;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--sp-ease), filter 700ms var(--sp-ease);
}

.hero-media {
  aspect-ratio: 5 / 6;
  max-height: 650px;
  box-shadow: var(--sp-shadow);
}

.hero-media img {
  transform: scale(1.015);
}

.post-thumbnail-fallback {
  aspect-ratio: 3 / 2;
  background:
    radial-gradient(circle at 82% 20%, color-mix(in srgb, var(--sp-accent) 32%, transparent), transparent 34%),
    linear-gradient(145deg, var(--sp-accent-soft), var(--sp-surface-alt));
}

.post-thumbnail-fallback a {
  display: grid;
  place-items: end start;
  padding: 24px;
  color: var(--sp-accent-strong);
  text-decoration: none;
}

.post-thumbnail-fallback span {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 1;
  opacity: 0.33;
}

.category-rail {
  display: grid;
  grid-template-areas: "label track cue";
  grid-template-columns: auto minmax(0, 1fr) 52px;
  align-items: stretch;
  overflow: hidden;
  margin-bottom: clamp(72px, 10vw, 132px);
  border: 1px solid var(--sp-line);
  border-radius: 18px;
  background: var(--sp-surface-alt);
  box-shadow: 0 10px 30px rgba(24, 72, 40, 0.05);
}

.category-rail-label {
  grid-area: label;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 168px;
  padding-inline: 24px;
  background: var(--sp-button-bg);
  color: var(--sp-button-text);
  position: relative;
  z-index: 1;
}

.category-rail-label strong {
  font-size: 1rem;
  font-weight: 900;
}

.category-rail-icon {
  display: grid;
  place-items: center;
  opacity: 0.88;
}

.category-rail-track {
  grid-area: track;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-inline: 8px;
  scrollbar-width: none;
}

.category-rail-track::-webkit-scrollbar {
  display: none;
}

.category-rail a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 138px;
  min-height: 66px;
  padding: 14px 22px;
  border-left: 1px solid var(--sp-line);
  color: var(--sp-text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 180ms var(--sp-ease), color 180ms var(--sp-ease), transform 180ms var(--sp-ease);
}

.category-rail a::after {
  position: absolute;
  right: 22px;
  bottom: 0;
  left: 22px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--sp-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--sp-ease);
}

.category-rail a:hover,
.category-rail a:focus-visible {
  background: var(--sp-accent-soft);
  color: var(--sp-accent-strong);
}

.category-rail a:hover::after,
.category-rail a:focus-visible::after {
  transform: scaleX(1);
}

.category-rail-count {
  color: var(--sp-muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  transition: color 180ms var(--sp-ease);
}

.category-rail a:hover .category-rail-count,
.category-rail a:focus-visible .category-rail-count {
  color: var(--sp-accent-strong);
}

.category-rail-cue {
  grid-area: cue;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--sp-line);
  color: var(--sp-accent-strong);
}

.latest-posts,
.related-posts {
  padding-bottom: clamp(90px, 12vw, 160px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section-heading h2,
.related-posts > h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.section-heading > a {
  flex: 0 0 auto;
  color: var(--sp-muted);
  font-weight: 700;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 64px) clamp(22px, 3vw, 36px);
}

.sp-archive-columns-2 .post-grid:not(.related-grid) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-card {
  min-width: 0;
}

.post-card .post-thumbnail {
  aspect-ratio: 3 / 2;
  margin-bottom: 22px;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.045);
}

.post-card-content .entry-category {
  margin-bottom: 9px;
}

.post-card-title {
  margin-bottom: 10px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.5;
  text-wrap: balance;
}

.post-card-title a {
  color: inherit;
  text-decoration: none;
}

.post-card-content > p {
  display: -webkit-box;
  min-height: 3.7em;
  margin-bottom: 16px;
  overflow: hidden;
  color: var(--sp-muted);
  font-size: 0.93rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pagination {
  margin-top: 64px;
}

.pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  padding: 8px 12px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-control-radius);
  color: var(--sp-text);
  text-decoration: none;
}

.pagination .current,
.pagination a:hover {
  border-color: var(--sp-accent-strong);
  background: var(--sp-accent-strong);
  color: var(--sp-bg);
}

.archive-shell {
  padding-block: 30px clamp(90px, 12vw, 150px);
}

.breadcrumbs {
  margin-bottom: clamp(32px, 5vw, 56px);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0;
  color: var(--sp-muted);
  font-size: 0.76rem;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-right: 7px;
  color: var(--sp-line);
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.archive-header {
  max-width: 780px;
  margin-bottom: clamp(48px, 8vw, 88px);
}

.archive-header h1 {
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 1.15;
  text-wrap: balance;
}

.archive-description {
  color: var(--sp-muted);
  font-size: 1.06rem;
}

.archive-description p:last-child {
  margin-bottom: 0;
}

.search-header > p {
  margin-bottom: 6px;
  color: var(--sp-muted);
  font-weight: 700;
}

.search-header .search-form {
  max-width: 640px;
  margin-top: 30px;
}

.search-results-list {
  max-width: 980px;
}

.search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 32px;
  padding-block: 28px;
  border-bottom: 1px solid var(--sp-line);
}

.search-result:first-child {
  border-top: 1px solid var(--sp-line);
}

.search-result h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.search-result h2 a {
  color: inherit;
  text-decoration: none;
}

.search-result p {
  margin-bottom: 12px;
  color: var(--sp-muted);
}

.search-result-image {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--sp-radius);
}

.search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-main {
  padding-top: clamp(30px, 5vw, 64px);
}

.single-header {
  text-align: center;
}

.single-header .breadcrumbs {
  text-align: right;
}

.single-header h1 {
  margin: 10px auto 24px;
  font-size: clamp(2.35rem, 6vw, 5rem);
  line-height: 1.25;
  text-wrap: balance;
}

.single-header .entry-meta {
  justify-content: center;
}

.single-featured {
  margin-top: clamp(40px, 7vw, 76px);
  margin-bottom: clamp(56px, 8vw, 96px);
}

.single-featured img {
  width: 100%;
  max-height: 760px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--sp-radius);
}

.single-featured figcaption {
  max-width: var(--sp-reading);
  margin: 12px auto 0;
  color: var(--sp-muted);
  font-size: 0.78rem;
}

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--sp-reading)) minmax(220px, 300px);
  justify-content: center;
  align-items: start;
  gap: clamp(48px, 8vw, 110px);
}

.sp-sidebar-left .entry-content-wrap {
  grid-column: 2;
}

.sp-sidebar-left .single-aside {
  grid-column: 1;
  grid-row: 1;
}

.sp-sidebar-none .single-layout {
  grid-template-columns: minmax(0, var(--sp-reading));
}

.entry-content {
  min-width: 0;
  color: var(--sp-text);
  font-size: clamp(1.02rem, 1.5vw, 1.12rem);
  line-height: 2.05;
}

.entry-content > * {
  max-width: 100%;
}

.entry-content > * + * {
  margin-top: 1.45em;
}

.entry-content h2 {
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  scroll-margin-top: calc(var(--sp-header-height) + 28px);
}

.entry-content h3 {
  margin-top: 2.2em;
  margin-bottom: 0.7em;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  scroll-margin-top: calc(var(--sp-header-height) + 28px);
}

.entry-content a:not(.wp-block-button__link) {
  font-weight: 650;
}

.entry-content blockquote,
.wp-block-quote {
  margin-inline: 0;
  padding: 6px 24px 6px 0;
  border-right: 4px solid var(--sp-accent);
  color: var(--sp-muted);
  font-size: 1.18em;
}

.entry-content blockquote cite {
  display: block;
  margin-top: 12px;
  color: var(--sp-text);
  font-size: 0.78em;
  font-style: normal;
  font-weight: 700;
}

.entry-content ul,
.entry-content ol {
  padding-right: 1.4em;
}

.entry-content li + li {
  margin-top: 0.48em;
}

.entry-content pre,
.entry-content code,
.wp-block-code {
  direction: ltr;
  font-family: Consolas, Monaco, monospace;
  text-align: left;
}

.entry-content code {
  padding: 0.12em 0.35em;
  border-radius: 6px;
  background: var(--sp-surface-alt);
  font-size: 0.88em;
}

.entry-content pre,
.wp-block-code {
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: var(--sp-surface);
}

.entry-content pre code,
.wp-block-code code {
  padding: 0;
  background: transparent;
}

.entry-content table,
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.entry-content th,
.entry-content td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sp-line);
  text-align: right;
}

.entry-content th {
  background: var(--sp-surface-alt);
  font-weight: 800;
}

.wp-block-image img,
.wp-block-cover,
.wp-block-media-text__media img,
.page-featured img {
  border-radius: var(--sp-radius);
}

.wp-block-image figcaption,
.wp-block-gallery figcaption {
  color: var(--sp-muted);
  font-size: 0.78rem;
  text-align: center;
}

.alignwide {
  width: min(100vw - 40px, var(--sp-container));
  max-width: none !important;
  margin-right: 50%;
  transform: translateX(50%);
}

.alignfull {
  width: 100vw;
  max-width: none !important;
  margin-right: 50%;
  transform: translateX(50%);
}

.entry-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 30px;
  margin-top: 50px;
  border-top: 1px solid var(--sp-line);
}

.entry-footer > span {
  width: 100%;
  color: var(--sp-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.entry-footer a {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--sp-accent-soft);
  color: var(--sp-accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.single-aside {
  position: sticky;
  top: calc(var(--sp-header-height) + 28px);
}

.table-of-contents {
  padding: 22px;
  margin-bottom: 30px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: var(--sp-surface);
}

.table-of-contents:empty {
  display: none;
}

.table-of-contents h2 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.table-of-contents ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

.table-of-contents li + li {
  margin-top: 9px;
}

.table-of-contents li.toc-h3 {
  padding-right: 13px;
}

.table-of-contents a {
  display: block;
  color: var(--sp-muted);
  font-size: 0.78rem;
  line-height: 1.65;
  text-decoration: none;
}

.table-of-contents a:hover {
  color: var(--sp-accent-strong);
}

.sidebar-widgets {
  display: grid;
  gap: 24px;
}

.widget {
  padding-top: 20px;
  border-top: 1px solid var(--sp-line);
  color: var(--sp-muted);
  font-size: 0.86rem;
}

.widget-title {
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.widget ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.widget li + li {
  margin-top: 9px;
}

.widget a {
  color: var(--sp-text);
  text-decoration: none;
}

.post-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-block: 34px;
  margin-top: 52px;
  border-block: 1px solid var(--sp-line);
}

.post-navigation > div:last-child {
  text-align: left;
}

.post-navigation a {
  color: var(--sp-text);
  font-weight: 750;
  text-decoration: none;
}

.post-navigation span {
  display: block;
  margin-bottom: 5px;
  color: var(--sp-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.author-box {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 22px;
  padding: 28px;
  margin-top: 48px;
  border-radius: var(--sp-radius);
  background: var(--sp-surface-alt);
}

.author-box-avatar img {
  border-radius: 50%;
}

.author-box-label {
  margin-bottom: 2px;
  color: var(--sp-muted);
  font-size: 0.72rem;
}

.author-box h2 {
  margin-bottom: 7px;
  font-size: 1.25rem;
}

.author-box p {
  margin-bottom: 8px;
  color: var(--sp-muted);
  font-size: 0.88rem;
}

.author-box a {
  font-size: 0.82rem;
  font-weight: 750;
}

.related-posts {
  padding-top: clamp(80px, 11vw, 140px);
}

.related-posts > h2 {
  margin-bottom: 36px;
}

.comments-area {
  max-width: var(--sp-reading);
  padding-bottom: clamp(80px, 11vw, 140px);
  margin-inline: auto;
}

.comments-title,
.comment-reply-title {
  font-size: clamp(1.6rem, 4vw, 2.35rem);
}

.comment-list,
.comment-list .children {
  padding: 0;
  list-style: none;
}

.comment-list .children {
  padding-right: 34px;
}

.comment-body {
  padding-block: 24px;
  border-bottom: 1px solid var(--sp-line);
}

.comment-meta {
  margin-bottom: 14px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-author img {
  border-radius: 50%;
}

.comment-metadata {
  padding-right: 68px;
  margin-top: -12px;
  color: var(--sp-muted);
  font-size: 0.72rem;
}

.comment-content {
  padding-right: 68px;
}

.reply {
  padding-right: 68px;
  font-size: 0.8rem;
  font-weight: 750;
}

.comment-respond {
  margin-top: 52px;
}

.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.comment-form-cookies-consent input {
  margin-top: 8px;
}

.comment-form-cookies-consent label {
  margin: 0;
  font-weight: 500;
}

.page-main {
  padding-block: 30px clamp(90px, 12vw, 150px);
}

.page-header h1 {
  margin-bottom: clamp(36px, 7vw, 70px);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.2;
  text-wrap: balance;
}

.page-featured {
  margin: 0 0 50px;
}

.page-featured img {
  width: 100%;
}

.page-article-wide .entry-content {
  width: 100%;
}

.error-page {
  padding-block: clamp(56px, 9vw, 110px) clamp(100px, 14vw, 170px);
  text-align: center;
}

.error-page .breadcrumbs {
  text-align: right;
}

.error-code {
  color: var(--sp-accent-soft);
  font-size: clamp(7rem, 22vw, 14rem);
  font-weight: 900;
  line-height: 0.9;
}

.error-page h1 {
  margin-top: -0.15em;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.error-page > p {
  max-width: 48ch;
  margin-inline: auto;
  color: var(--sp-muted);
}

.error-page .search-form {
  margin: 34px auto 22px;
  text-align: right;
}

.empty-state {
  max-width: 680px;
  padding: clamp(32px, 6vw, 64px);
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: var(--sp-surface);
}

.empty-state h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.empty-state > p {
  color: var(--sp-muted);
}

.newsletter {
  position: relative;
  display: grid;
  grid-template-areas: "icon copy form";
  grid-template-columns: 58px minmax(0, 1.2fr) minmax(340px, 0.88fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  min-height: 250px;
  padding: clamp(36px, 5vw, 66px);
  overflow: hidden;
  border: 1px solid rgba(124, 224, 159, 0.3);
  border-radius: 22px;
  background: linear-gradient(115deg, #06472d 0%, #0b5a39 52%, #064329 100%);
  color: #f4f8f5;
  direction: rtl;
}

.newsletter::before {
  position: absolute;
  inset: -80px auto auto -80px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(157, 232, 179, 0.15);
  border-radius: 42% 58% 61% 39% / 36% 45% 55% 64%;
  content: "";
  transform: rotate(18deg);
}

.newsletter-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(170, 237, 190, 0.28);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.06);
  color: #a7edbb;
}

.newsletter-copy {
  grid-area: copy;
}

.newsletter h2 {
  max-width: 22ch;
  margin: 0 0 12px;
  color: #f4f8f5;
  font-size: clamp(2rem, 3.1vw, 3.15rem);
  line-height: 1.25;
  text-wrap: balance;
}

.newsletter-copy p {
  max-width: 48ch;
  margin: 0;
  color: #cfdfd2;
}

.newsletter-form label,
.newsletter .form-note {
  color: #edf4ee;
}

.newsletter-form {
  grid-area: form;
  position: relative;
  z-index: 2;
}

.newsletter-fields {
  direction: ltr;
}

.newsletter-fields input {
  min-height: 54px;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(247, 249, 247, 0.08);
  color: #f7f9f7;
  direction: ltr;
  text-align: left;
}

.newsletter-fields input::placeholder {
  color: #cad8cd;
}

.newsletter-fields button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 142px;
  border-color: #9aebaf;
  background: #9aebaf;
  color: #073b26;
  font-weight: 850;
  direction: rtl;
}

.newsletter-fields button:hover {
  border-color: #bcf4ca;
  background: #bcf4ca;
  color: #052f1e;
}

.newsletter-dots {
  position: absolute;
  right: 26px;
  bottom: 24px;
  width: 90px;
  height: 48px;
  background-image: radial-gradient(rgba(169, 237, 188, 0.68) 1.5px, transparent 1.5px);
  background-size: 12px 12px;
  opacity: 0.7;
}

.form-note {
  margin: 9px 0 0;
  color: var(--sp-muted);
  font-size: 0.72rem;
}

.site-footer {
  position: relative;
  padding-block: clamp(42px, 5vw, 72px) 26px;
  overflow: hidden;
  border-top: 1px solid var(--sp-line);
  background: var(--sp-bg);
}

.site-footer::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sp-accent-soft) 24%, transparent), transparent 48%);
  content: "";
  opacity: 0.65;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 62%);
  mask-image: linear-gradient(180deg, #000, transparent 62%);
}

.site-footer > .sp-container {
  position: relative;
  z-index: 1;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(270px, 1.45fr) repeat(3, minmax(150px, 0.78fr));
  gap: 0;
  padding-block: clamp(52px, 6vw, 82px);
  border-bottom: 1px solid var(--sp-line);
}

.footer-brand {
  min-width: 0;
  padding-left: clamp(30px, 4vw, 64px);
}

.footer-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.footer-brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--sp-accent);
}

.footer-branding .custom-logo-link {
  display: inline-flex;
}

.footer-branding .custom-logo {
  max-height: 56px;
  width: auto;
}

.footer-branding .site-title {
  gap: 14px;
  color: var(--sp-text);
  font-size: clamp(1.8rem, 2.4vw, 2.55rem);
}

.footer-branding .botstory-logo-mark {
  width: 37px;
  height: 50px;
}

.footer-tagline {
  margin: 2px 0 0;
  color: var(--sp-muted);
  font-size: 0.84rem;
}

.footer-brand .footer-about {
  max-width: 39ch;
  margin: 0 0 20px;
  color: var(--sp-muted);
  font-size: 0.92rem;
  line-height: 2.05;
}

.footer-signature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sp-accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.footer-signature::before {
  width: 24px;
  height: 1px;
  background: currentColor;
  content: "";
}

.footer-column {
  min-width: 0;
  padding-inline: clamp(24px, 3vw, 48px);
  border-right: 1px solid var(--sp-line);
  direction: rtl;
  text-align: right;
}

.footer-column h2 {
  position: relative;
  margin: 0 0 20px;
  padding-bottom: 12px;
  color: var(--sp-text);
  font-size: 1rem;
}

.footer-column h2::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: var(--sp-accent);
  content: "";
}

.footer-column ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 3px;
  color: var(--sp-muted);
  font-size: 0.88rem;
  font-weight: 620;
  text-decoration: none;
  transition: color 180ms var(--sp-ease), transform 180ms var(--sp-ease);
}

.footer-column a::before {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sp-accent);
  content: "";
  opacity: 0.55;
}

.footer-column a:hover,
.footer-column a:focus-visible {
  color: var(--sp-accent-strong);
  transform: translateX(-3px);
}

.footer-column a span {
  margin-right: auto;
  color: var(--sp-muted);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.74;
}

.footer-quick-links,
.footer-quick-links ul,
.footer-quick-links li,
.footer-quick-links a {
  direction: rtl;
  text-align: right;
}

.footer-quick-links ul {
  justify-items: start;
}

.footer-quick-links li {
  width: 100%;
}

.footer-quick-links a {
  justify-content: flex-start;
  width: 100%;
}

.footer-social ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.footer-social a {
  justify-content: flex-start;
  padding: 8px 10px;
  border: 1px solid var(--sp-line);
  border-radius: 10px;
  background: var(--sp-surface-alt);
}

.footer-social > p {
  margin: 0 0 20px;
  color: var(--sp-muted);
  font-size: 0.84rem;
  line-height: 1.9;
}

.footer-social-line {
  display: block;
  width: 74px;
  height: 1px;
  background: linear-gradient(90deg, var(--sp-accent), transparent);
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 6vw, 70px);
  padding-block: 52px;
  border-bottom: 1px solid var(--sp-line);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
}

.footer-future {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--sp-muted);
  font-size: 0.76rem;
}

.footer-future > span {
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: var(--sp-accent);
}

.footer-identity p {
  margin: 0;
  color: var(--sp-muted);
  font-size: 0.78rem;
}

.footer-identity p span {
  color: var(--sp-text);
  font-weight: 750;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--sp-text);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 180ms var(--sp-ease), color 180ms var(--sp-ease), transform 180ms var(--sp-ease);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: var(--sp-accent-strong);
  transform: translateY(-2px);
}

.js .sp-reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition: opacity 700ms var(--sp-ease), transform 700ms var(--sp-ease);
}

.js .sp-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.js .sp-reveal .post-thumbnail img {
  transform: scale(1.035);
}

.js .sp-reveal.is-visible .post-thumbnail img {
  transform: scale(1);
}

.js .post-card:hover .post-thumbnail img {
  transform: scale(1.045);
}

@media (max-width: 1100px) {
  .site-description,
  .search-toggle span {
    display: none;
  }

  .site-header-inner {
    gap: 18px;
  }

  .primary-menu {
    gap: 18px;
  }

  .single-layout {
    grid-template-columns: minmax(0, var(--sp-reading)) 230px;
    gap: 54px;
  }

  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand,
  .footer-column {
    padding: 34px;
    border-bottom: 1px solid var(--sp-line);
  }

  .footer-column:nth-child(odd) {
    border-right: 0;
  }
}

@media (max-width: 900px) {
  .admin-bar.has-sticky-header .site-header {
    top: 46px;
  }

  .site-header-inner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-navigation {
    position: fixed;
    z-index: 25;
    inset: var(--sp-header-height) 0 auto;
    max-height: calc(100dvh - var(--sp-header-height));
    padding: 22px 20px 38px;
    visibility: hidden;
    overflow-y: auto;
    border-bottom: 1px solid var(--sp-line);
    background: var(--sp-bg);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 220ms var(--sp-ease), transform 220ms var(--sp-ease), visibility 0s linear 220ms;
  }

  .menu-open .primary-navigation {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .primary-menu {
    display: block;
    width: min(100%, var(--sp-container));
    margin-inline: auto;
  }

  .primary-menu > li {
    border-bottom: 1px solid var(--sp-line);
  }

  .primary-menu a {
    padding: 14px 4px;
    font-size: 1rem;
  }

  .primary-menu ul {
    position: static;
    min-width: 0;
    padding: 0 16px 10px 0;
    visibility: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
    min-height: auto;
    gap: 38px;
  }

  .home-hero h1 {
    font-size: clamp(2.25rem, 6vw, 3.6rem);
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .single-layout,
  .sp-sidebar-left .single-layout {
    grid-template-columns: minmax(0, var(--sp-reading));
  }

  .sp-sidebar-left .entry-content-wrap,
  .sp-sidebar-left .single-aside {
    grid-column: auto;
    grid-row: auto;
  }

  .single-aside {
    position: static;
  }

  .sidebar-widgets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 48px;
  }

  .newsletter {
    grid-template-areas:
      "icon copy"
      "form form";
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
  }

  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  :root {
    --sp-header-height: 64px;
  }

  body {
    background-attachment: scroll;
  }

  .hero-shell,
  .editorial-section,
  .showcase-shell,
  .popular-shell,
  .site-footer {
    background-attachment: scroll;
  }

  .sp-container,
  .sp-container-narrow {
    width: min(calc(100% - 28px), var(--sp-container));
  }

  .site-header-inner {
    width: min(calc(100% - 24px), var(--sp-container));
  }

  .custom-logo {
    max-width: 150px;
    max-height: 38px;
  }

  .site-title {
    font-size: 1.1rem;
  }

  .theme-toggle {
    display: none;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 42px 56px;
  }

  .footer-main,
  .footer-widgets {
    grid-template-columns: 1fr;
  }

  .footer-main {
    gap: 34px;
    padding-block: 44px;
  }

  .footer-brand,
  .footer-column {
    padding: 0 0 32px;
    border-right: 0;
    border-bottom: 1px solid var(--sp-line);
  }

  .hero-copy {
    max-width: none;
  }

  .hero-kicker {
    margin-bottom: 14px;
  }

  .home-hero h1 {
    max-width: none;
    font-size: clamp(2.15rem, 11vw, 3.35rem);
  }

  .hero-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-media {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  .category-rail {
    margin-bottom: 76px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-grid,
  .sp-archive-columns-2 .post-grid:not(.related-grid),
  .footer-widgets,
  .sidebar-widgets {
    grid-template-columns: 1fr;
  }

  .post-card-content > p {
    min-height: 0;
  }

  .archive-header h1,
  .single-header h1,
  .page-header h1 {
    font-size: clamp(2.2rem, 12vw, 3.65rem);
  }

  .single-header {
    text-align: right;
  }

  .single-header .entry-meta {
    justify-content: flex-start;
  }

  .single-featured {
    width: 100%;
  }

  .single-featured img {
    aspect-ratio: 4 / 3;
    border-radius: 0;
  }

  .entry-content {
    font-size: 1rem;
    line-height: 1.95;
  }

  .alignwide {
    width: calc(100vw - 28px);
  }

  .search-result {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 18px;
  }

  .search-result p {
    display: none;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .post-navigation > div:last-child {
    text-align: right;
  }

  .author-box {
    grid-template-columns: 54px minmax(0, 1fr);
    padding: 22px;
  }

  .comment-list .children {
    padding-right: 14px;
  }

  .comment-metadata,
  .comment-content,
  .reply {
    padding-right: 0;
  }

  .newsletter {
    grid-template-areas:
      "icon copy"
      "form form";
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 22px 14px;
    min-height: 0;
    padding: 28px 22px;
  }

  .newsletter-icon {
    width: 46px;
    height: 46px;
  }

  .newsletter h2 {
    font-size: clamp(1.7rem, 8vw, 2.25rem);
  }

  .newsletter-fields,
  .search-form-fields {
    grid-template-columns: 1fr;
  }

  .newsletter-fields button,
  .search-form-fields button {
    width: 100%;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-navigation ul {
    justify-content: flex-start;
  }
}

@media (max-width: 400px) {
  .search-toggle {
    display: none;
  }

  .menu-toggle-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .sp-reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .single-aside,
  .post-navigation,
  .related-posts,
  .comments-area,
  .breadcrumbs {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
    font-size: 12pt;
  }

  .single-layout {
    display: block;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

/* Editorial magazine homepage — Botstory 1.1 */
.magazine-home {
  overflow: clip;
}

.news-ticker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  gap: 20px;
  border-bottom: 1px solid var(--sp-line);
}

.news-ticker > strong {
  position: relative;
  padding-inline-start: 16px;
  color: var(--sp-accent-strong);
  font-size: 0.78rem;
  white-space: nowrap;
}

.news-ticker > strong::before {
  position: absolute;
  top: 50%;
  right: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sp-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--sp-accent) 16%, transparent);
  content: "";
  transform: translateY(-50%);
}

.news-ticker-track {
  display: flex;
  min-width: 0;
  gap: 0;
  overflow: hidden;
}

.news-ticker-track a {
  flex: 0 0 auto;
  max-width: 34ch;
  padding-inline: 18px;
  overflow: hidden;
  border-inline-start: 1px solid var(--sp-line);
  color: var(--sp-muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-shell {
  position: relative;
  padding-block: clamp(28px, 3.5vw, 50px);
  overflow: hidden;
  border-block: 1px solid var(--sp-line);
  background: var(--sp-surface-alt);
}

.hero-shell::after {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--sp-accent) 14%, transparent) 0.8px, transparent 0.8px);
  background-size: 28px 28px;
  content: "";
  opacity: 0.28;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 5%, #000 42%, transparent 92%);
  mask-image: linear-gradient(90deg, transparent 5%, #000 42%, transparent 92%);
}

.magazine-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(320px, 0.82fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--sp-line);
  border-radius: 18px;
  background: var(--sp-surface);
  box-shadow: 0 20px 60px rgba(20, 83, 45, 0.08);
  direction: ltr;
}

.magazine-hero > * {
  min-width: 0;
  direction: rtl;
}

.hero-feature {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: clip;
  border: 0;
  border-right: 1px solid var(--sp-line);
  border-radius: 0;
  background: var(--sp-surface);
  box-shadow: none;
}

.hero-media-frame {
  position: relative;
  margin: 10px 10px 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--sp-accent-soft);
}

.hero-feature .hero-media {
  width: 100%;
  height: auto;
  margin: 0;
  aspect-ratio: 16 / 7.25;
  border-radius: inherit;
  box-shadow: none;
}

.hero-feature .hero-media::after {
  content: none;
}

.hero-media-index {
  position: absolute;
  left: 18px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding-inline: 11px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(11, 24, 15, 0.72);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 196px;
  align-items: center;
  gap: clamp(22px, 2.7vw, 38px);
  width: auto;
  min-height: 232px;
  padding: clamp(24px, 2.75vw, 38px);
  background: var(--sp-surface);
  color: var(--sp-text);
}

.hero-card-copy {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  column-gap: 18px;
  min-width: 0;
}

.hero-card .hero-kicker {
  position: relative;
  margin: 0;
  padding-right: 34px;
  color: var(--sp-accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
}

.hero-card .hero-kicker::before {
  position: absolute;
  top: 50%;
  right: 0;
  width: 24px;
  height: 2px;
  background: var(--sp-accent);
  content: "";
  transform: translateY(-50%);
}

.hero-card .entry-category {
  margin: 0;
}

.hero-card .entry-category,
.hero-card .entry-meta,
.hero-card .entry-meta a {
  color: var(--sp-muted);
}

.hero-card h1 {
  grid-column: 1 / -1;
  max-width: none;
  margin: 14px 0 10px;
  overflow: hidden;
  color: var(--sp-text);
  font-size: clamp(1.75rem, 2.15vw, 2.45rem);
  line-height: 1.38;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-card h1 a {
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: inherit;
}

.hero-card .hero-excerpt {
  grid-column: 1 / -1;
  display: -webkit-box;
  max-width: 58ch;
  margin: 0;
  overflow: hidden;
  color: var(--sp-muted);
  font-size: 0.96rem;
  line-height: 1.9;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hero-card .hero-footer {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-width: 0;
  min-height: 145px;
  padding-right: clamp(22px, 2.4vw, 32px);
  border-right: 1px solid var(--sp-line);
  text-align: center;
}

.hero-card .hero-footer .entry-meta {
  display: grid;
  justify-items: center;
  width: 100%;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-meta-item {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  color: var(--sp-muted);
  line-height: 1.45;
  white-space: nowrap;
}

.hero-meta-item svg {
  flex: 0 0 auto;
  color: var(--sp-accent-strong);
}

.hero-card .hero-footer .entry-meta > span[aria-hidden="true"] {
  display: none;
}

.hero-card .hero-footer .button-link {
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
}

.button-link-light {
  border-color: var(--sp-button-bg);
  background: var(--sp-button-bg);
  color: var(--sp-button-text);
}

.hero-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(22px, 2.2vw, 30px);
  border: 0;
  border-radius: 0;
  background: var(--sp-surface);
  color: var(--sp-text);
}

.hero-side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sp-line);
}

.hero-side-heading-copy {
  display: grid;
  gap: 5px;
}

.hero-side-heading-copy > span {
  color: var(--sp-accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  order: 2;
}

.hero-side-heading h2 {
  margin: 0;
  color: var(--sp-text);
  font-size: clamp(1.65rem, 2vw, 2rem);
  line-height: 1.2;
}

.hero-pulse-icon {
  flex: 0 0 auto;
  color: var(--sp-accent);
}

.compact-story {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 34px;
  align-items: center;
  min-width: 0;
  flex: 1 1 0;
  gap: 15px;
  min-height: 126px;
  margin-top: 8px;
  padding: 16px 14px;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--sp-line);
  border-radius: 10px;
  background: transparent;
  color: var(--sp-text);
  font: inherit;
  text-align: right;
  direction: rtl;
  cursor: pointer;
  transition: background 180ms var(--sp-ease), border-color 180ms var(--sp-ease), transform 180ms var(--sp-ease);
}

.hero-side .compact-story:last-of-type {
  border-bottom: 0;
}

.compact-story-number {
  padding-right: 10px;
  border-right: 1px solid var(--sp-line);
  color: var(--sp-muted);
  font-size: 1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.compact-story-copy {
  min-width: 0;
}

.compact-story .entry-category {
  margin-bottom: 4px;
  font-size: 0.7rem;
}

.compact-story-title {
  display: -webkit-box;
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--sp-text);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-story-thumb {
  display: block;
  width: 70px;
  height: 78px;
  overflow: hidden;
  border-radius: 10px;
}

.compact-story-thumb-fallback {
  display: grid;
  place-items: center;
  background: var(--sp-accent-soft);
  color: var(--sp-accent-strong);
  font-size: 1.3rem;
  font-weight: 900;
}

.compact-story-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-side .compact-story {
  grid-template-columns: 70px minmax(0, 1fr) 34px;
  border-color: var(--sp-line);
  border-top-color: transparent;
  border-right-color: transparent;
  border-left-color: transparent;
}

.hero-side .compact-story-number,
.hero-side .entry-category {
  color: var(--sp-accent-strong);
}

.hero-side .compact-story-title {
  color: var(--sp-text);
}

.hero-side .compact-story-thumb {
  width: 70px;
  height: 78px;
  border: 1px solid var(--sp-line);
}

.hero-side .compact-story:hover,
.hero-side .compact-story:focus-visible,
.hero-side .compact-story[aria-pressed="true"] {
  border-radius: 10px;
  background: var(--sp-accent-soft);
  border-color: color-mix(in srgb, var(--sp-accent) 62%, var(--sp-line));
}

.hero-side .compact-story:hover,
.hero-side .compact-story:focus-visible {
  transform: translateX(-2px);
}

.hero-side .compact-story[aria-pressed="true"] {
  position: relative;
}

.hero-side .compact-story[aria-pressed="true"]::after {
  position: absolute;
  inset-block: 14px;
  right: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--sp-accent);
  content: "";
}

.hero-side .compact-story:disabled {
  cursor: wait;
  opacity: 0.68;
}

.magazine-hero.is-loading .hero-feature {
  opacity: 0.66;
}

.hero-feature-enter {
  animation: hero-feature-in 420ms var(--sp-ease) both;
}

@keyframes hero-feature-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.magazine-home .category-rail {
  margin-bottom: 0;
}

.category-rail-wrap + .editorial-section {
  padding-top: clamp(26px, 3vw, 42px);
}

.home-section {
  padding-block: clamp(54px, 6vw, 82px);
}

.magazine-heading {
  align-items: end;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.magazine-heading > div > p:last-child {
  max-width: 52ch;
  margin: 8px 0 0;
  color: var(--sp-muted);
}

.section-eyebrow {
  margin-bottom: 6px !important;
  color: var(--sp-accent-strong) !important;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.magazine-heading h2 {
  font-size: clamp(1.9rem, 3.2vw, 3.25rem);
}

.magazine-heading > a {
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}

.editorial-section {
  background: var(--sp-bg);
  color: var(--sp-text);
}

.editorial-panel {
  position: relative;
  padding-block: 0;
  color: var(--sp-text);
}

.editorial-panel .magazine-heading {
  border-top: 1px solid var(--sp-line);
  padding-top: 22px;
}

.editorial-panel .section-eyebrow,
.editorial-panel .magazine-heading > a {
  color: var(--sp-accent-strong) !important;
}

.editorial-panel .magazine-heading > div > p:last-child {
  color: var(--sp-muted) !important;
}

.editorial-panel .magazine-heading > a {
  border-color: color-mix(in srgb, var(--sp-accent) 42%, transparent);
}

.editorial-feature {
  min-width: 0;
}

.editorial-lead {
  display: grid;
  grid-template-areas: "media copy";
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  min-width: 0;
  min-height: 450px;
  overflow: hidden;
  border: 1px solid var(--sp-line);
  border-radius: 22px;
  background: var(--sp-surface-alt);
  box-shadow: var(--sp-shadow);
  direction: ltr;
}

.editorial-lead-media {
  grid-area: media;
  width: 100%;
  height: 100%;
  min-height: 450px;
  margin: 0;
  border-radius: 21px 0 0 21px;
}

.editorial-lead-copy {
  grid-area: copy;
  align-self: center;
  padding: clamp(28px, 4vw, 52px);
  direction: rtl;
}

.editorial-lead-copy h3 {
  max-width: 17ch;
  margin-bottom: 12px;
  color: var(--sp-text);
  font-size: clamp(1.75rem, 2.55vw, 2.8rem);
  line-height: 1.35;
}

.editorial-lead-copy h3 a,
.showcase-card h3 a {
  color: inherit;
  text-decoration: none;
}

.editorial-lead-copy > p {
  display: -webkit-box;
  max-width: 56ch;
  margin-bottom: 18px;
  overflow: hidden;
  color: var(--sp-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.editorial-lead-copy .entry-category,
.editorial-lead-copy .entry-meta {
  color: var(--sp-accent-strong);
}

.editorial-support-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-top: clamp(28px, 3.5vw, 44px);
}

.editorial-card {
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--sp-line);
}

.editorial-card-media {
  aspect-ratio: 3 / 2;
  margin-bottom: 16px;
  border: 1px solid var(--sp-line);
  border-radius: 16px;
}

.editorial-card .entry-category,
.editorial-card .entry-meta {
  color: var(--sp-accent-strong);
}

.editorial-card h3 {
  margin: 6px 0 10px;
  color: var(--sp-text);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.55;
}

.editorial-card h3 a {
  color: inherit;
  text-decoration: none;
}

.showcase-shell {
  padding-block: clamp(58px, 7vw, 88px);
  background: var(--sp-surface-alt);
}

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 18px;
}

.showcase-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 20px;
  background: #092f1d;
}

.showcase-card-lead {
  grid-row: span 3;
  min-height: 540px;
}

.showcase-card .post-thumbnail {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.showcase-card .post-thumbnail::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 26%, rgba(3, 26, 14, 0.9));
  content: "";
}

.showcase-card-copy {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: clamp(20px, 3vw, 38px);
}

.showcase-card .entry-category,
.showcase-card .entry-meta,
.showcase-card h3 {
  color: #fff;
}

.showcase-card h3 {
  margin-bottom: 8px;
  font-size: clamp(1.1rem, 1.8vw, 1.75rem);
}

.showcase-card-lead h3 {
  max-width: 20ch;
  font-size: clamp(2rem, 3.8vw, 3.65rem);
}

.popular-shell {
  padding-block: clamp(58px, 7vw, 88px);
  background: var(--sp-bg);
  color: var(--sp-text);
}

.popular-shell .section-eyebrow,
.popular-shell .magazine-heading > a {
  color: var(--sp-accent-strong) !important;
}

.popular-shell .magazine-heading > div > p:last-child {
  color: var(--sp-muted) !important;
}

.popular-shell .magazine-heading {
  border-top: 1px solid var(--sp-line);
  padding-top: 22px;
}

.popular-layout {
  display: grid;
  grid-template-areas: "list lead";
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.2fr);
  gap: clamp(28px, 4vw, 58px);
  direction: ltr;
}

.popular-layout-single {
  grid-template-areas: "lead";
  grid-template-columns: minmax(0, 760px);
  justify-content: end;
}

.popular-lead {
  grid-area: lead;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--sp-line);
  border-radius: 22px;
  background: var(--sp-surface-alt);
  box-shadow: var(--sp-shadow);
  direction: rtl;
}

.popular-lead-media {
  aspect-ratio: 16 / 10;
  border-radius: 21px 21px 0 0;
}

.popular-lead-copy {
  position: relative;
  padding: clamp(30px, 4vw, 50px);
}

.popular-lead .popular-number {
  position: absolute;
  top: -42px;
  right: 30px;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0;
  border: 1px solid var(--sp-line);
  border-radius: 18px 18px 0 0;
  background: var(--sp-surface-alt);
  color: var(--sp-accent-strong);
  font-size: 2.4rem;
  line-height: 1;
}

.popular-lead .entry-category {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--sp-accent-strong);
}

.popular-lead h3 {
  max-width: 21ch;
  margin-bottom: 12px;
  color: var(--sp-text);
  font-size: clamp(1.55rem, 2.4vw, 2.45rem);
  line-height: 1.4;
}

.popular-lead h3 a,
.popular-row h3 a {
  color: inherit;
  text-decoration: none !important;
  transition: color 180ms var(--sp-ease);
}

.popular-lead-copy > p {
  display: -webkit-box;
  margin: 0 0 18px;
  overflow: hidden;
  color: var(--sp-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.popular-list {
  grid-area: list;
  min-width: 0;
  direction: rtl;
}

.popular-row {
  display: grid;
  grid-template-columns: 66px minmax(120px, 170px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  min-width: 0;
  padding-block: 18px;
  border-top: 1px solid var(--sp-line);
  direction: ltr;
  transition: transform 200ms var(--sp-ease);
}

.popular-number {
  color: var(--sp-muted);
  font-size: clamp(1.65rem, 2.7vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color 180ms var(--sp-ease), transform 180ms var(--sp-ease);
}

.popular-row-media {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--sp-line);
  border-radius: 14px;
}

.popular-row-copy {
  min-width: 0;
  direction: rtl;
}

.popular-row .entry-category {
  color: var(--sp-accent-strong);
}

.popular-row h3 {
  display: -webkit-box;
  margin: 5px 0 9px;
  overflow: hidden;
  color: var(--sp-text);
  font-size: clamp(1rem, 1.3vw, 1.28rem);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.popular-lead:hover h3 a,
.popular-lead:focus-within h3 a,
.popular-row:hover h3 a,
.popular-row:focus-within h3 a {
  color: var(--sp-accent-strong);
  text-decoration: none !important;
}

.popular-row:hover,
.popular-row:focus-within {
  transform: translateX(4px);
}

.popular-row:hover .popular-number,
.popular-row:focus-within .popular-number {
  color: var(--sp-accent-strong);
  transform: translateY(-2px);
}

.magazine-home .latest-posts {
  padding-bottom: clamp(70px, 8vw, 108px);
}

/* Keep the global editorial artwork visible across every full-width section. */
.hero-shell,
.editorial-section,
.showcase-shell,
.popular-shell,
.site-footer {
  background-image: var(--sp-page-art);
  background-position: center top, center center, center top, 0 0;
  background-size: var(--sp-page-art-size);
  background-attachment: fixed;
}

.hero-shell::after {
  content: none;
}

.js .hero-feature:hover .hero-media img,
.js .hero-feature:focus-within .hero-media img,
.js .compact-story:hover .compact-story-thumb img,
.js .compact-story:focus-within .compact-story-thumb img,
.js .editorial-lead:hover .editorial-lead-media img,
.js .editorial-lead:focus-within .editorial-lead-media img,
.js .editorial-card:hover .editorial-card-media img,
.js .editorial-card:focus-within .editorial-card-media img,
.js .popular-lead:hover .popular-lead-media img,
.js .popular-lead:focus-within .popular-lead-media img,
.js .popular-row:hover .popular-row-media img,
.js .popular-row:focus-within .popular-row-media img,
.js .showcase-card:hover .post-thumbnail img,
.js .showcase-card:focus-within .post-thumbnail img,
.js .post-card:hover .post-thumbnail img,
.js .post-card:focus-within .post-thumbnail img {
  filter: saturate(1.04) contrast(1.025);
  transform: scale(1.045);
}

.editorial-card h3 a,
.showcase-card h3 a,
.post-card-title a,
.compact-story h3 a {
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 180ms var(--sp-ease), text-decoration-color 180ms var(--sp-ease);
}

.editorial-card:hover h3 a,
.editorial-card:focus-within h3 a,
.showcase-card:hover h3 a,
.showcase-card:focus-within h3 a,
.post-card:hover .post-card-title a,
.post-card:focus-within .post-card-title a,
.compact-story:hover h3 a,
.compact-story:focus-within h3 a {
  color: var(--sp-accent);
  text-decoration-color: currentColor;
}

@media (max-width: 1100px) {
  .magazine-hero {
    grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.7fr);
  }

  .editorial-support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-lead {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  }

  .popular-layout {
    grid-template-areas:
      "lead"
      "list";
    grid-template-columns: 1fr;
  }

  .popular-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 26px;
  }

  .popular-row {
    grid-template-columns: 54px 112px minmax(0, 1fr);
  }
}

@media (max-width: 1020px) and (min-width: 821px) {
  .magazine-hero {
    grid-template-columns: 1fr;
  }

  .hero-feature {
    border-right: 0;
    border-bottom: 1px solid var(--sp-line);
  }

  .hero-side {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .hero-side-heading {
    grid-column: 1 / -1;
  }

  .hero-side .compact-story {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .hero-side .compact-story-number {
    display: none;
  }

  .hero-side .compact-story-thumb {
    width: 58px;
    height: 66px;
  }
}

@media (max-width: 820px) {
  .news-ticker-track a:nth-child(n + 3) {
    display: none;
  }

  .magazine-hero {
    grid-template-columns: 1fr;
  }

  .hero-feature {
    min-height: 500px;
    border-right: 0;
    border-bottom: 1px solid var(--sp-line);
  }

  .hero-side {
    display: flex;
    gap: 0;
  }

  .hero-side-heading {
    width: 100%;
  }

  .showcase-grid {
    grid-template-columns: 1fr 1fr;
  }

  .showcase-card-lead {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 520px;
  }

  .popular-list {
    gap: 0 18px;
  }

  .popular-row {
    grid-template-columns: 46px 92px minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 700px) {
  .hero-shell,
  .editorial-section,
  .showcase-shell,
  .popular-shell,
  .site-footer {
    background-attachment: scroll;
  }

  .category-rail {
    display: flex;
    direction: rtl;
  }

  .category-rail-label {
    flex: 0 0 124px;
    min-width: 124px;
    gap: 8px;
    padding-inline: 15px;
  }

  .category-rail-track {
    flex: 1 1 auto;
    width: 0;
    padding-inline: 0;
  }

  .category-rail a {
    min-width: 118px;
    min-height: 58px;
    padding: 12px 16px;
  }

  .category-rail-cue {
    display: none;
  }

  .news-ticker {
    width: min(calc(100% - 24px), var(--sp-container));
    gap: 10px;
  }

  .news-ticker-track a {
    max-width: 27ch;
    padding-inline: 10px;
  }

  .news-ticker-track a:nth-child(n + 2) {
    display: none;
  }

  .hero-shell {
    padding-block: 18px 30px;
  }

  .magazine-hero {
    width: min(calc(100% - 24px), var(--sp-container));
    gap: 0;
    border-radius: 14px;
  }

  .hero-feature {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-media-frame {
    margin: 8px 8px 0;
    border-radius: 9px;
  }

  .hero-feature .hero-media {
    width: 100%;
    height: auto;
    margin: 0;
    aspect-ratio: 16 / 10;
  }

  .hero-media-index {
    left: 12px;
    bottom: 12px;
  }

  .hero-card {
    grid-template-columns: 1fr;
    width: auto;
    max-width: none;
    padding: 24px;
  }

  .hero-card .hero-footer {
    align-items: flex-start;
    min-width: 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--sp-line);
    border-right: 0;
  }

  .hero-card h1 {
    max-width: none;
    overflow-wrap: anywhere;
    font-size: clamp(1.35rem, 6.5vw, 1.9rem);
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-card .hero-excerpt {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hero-card .hero-footer {
    gap: 14px;
  }

  .hero-side {
    display: block;
    padding: 18px;
  }

  .editorial-lead {
    grid-template-areas:
      "media"
      "copy";
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .editorial-lead-media {
    min-height: 0;
    aspect-ratio: 16 / 10;
    border-radius: 21px 21px 0 0;
  }

  .editorial-panel .magazine-heading {
    align-items: start;
  }

  .editorial-lead-copy {
    padding: 24px;
    transform: none;
  }

  .editorial-lead-copy h3 {
    font-size: clamp(1.55rem, 7.5vw, 2.15rem);
  }

  .editorial-lead-copy > p {
    -webkit-line-clamp: 3;
  }

  .editorial-support-grid {
    grid-template-columns: 1fr;
  }

  .compact-story {
    grid-template-columns: 62px minmax(0, 1fr) 30px;
    gap: 12px;
    min-height: 108px;
    padding-inline: 10px;
  }

  .compact-story-thumb {
    width: 62px;
    height: 68px;
  }

  .hero-side .compact-story {
    grid-template-columns: 62px minmax(0, 1fr) 30px;
  }

  .hero-side .compact-story-thumb {
    width: 62px;
    height: 68px;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .showcase-card,
  .showcase-card-lead {
    grid-column: auto;
    min-height: 360px;
  }

  .showcase-card:not(.showcase-card-lead) {
    min-height: 260px;
  }

  .popular-list {
    grid-template-columns: 1fr;
  }

  .popular-row {
    grid-template-columns: 48px 96px minmax(0, 1fr);
    padding-block: 16px;
  }

  .popular-lead-copy {
    padding: 28px 22px 24px;
  }

  .popular-lead .popular-number {
    top: -34px;
    right: 22px;
    width: 68px;
    height: 68px;
    font-size: 1.9rem;
  }

  .magazine-heading h2 {
    font-size: clamp(2rem, 11vw, 3.3rem);
  }
}

/* Responsive hardening layer.
 * Kept last so plugin styles and earlier component rules cannot restore a
 * desktop grid on phones or compact tablets. */
@media screen and (max-width: 1020px) {
  html,
  body,
  #page,
  .site {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .site-header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-branding,
  .site-title,
  .hero-card,
  .hero-card-copy,
  .hero-side,
  .editorial-panel,
  .popular-layout,
  .showcase-grid,
  .post-grid,
  .footer-main {
    min-width: 0;
  }

  .magazine-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-feature {
    grid-column: 1;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--sp-line);
  }

  .hero-side {
    grid-column: 1;
    width: 100%;
  }

  .editorial-lead {
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.85fr);
  }

  .popular-layout {
    grid-template-areas:
      "lead"
      "list";
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 700px) {
  .site-header-inner {
    gap: 10px;
  }

  .site-branding {
    overflow: hidden;
  }

  .site-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .magazine-hero,
  .hero-feature,
  .hero-card,
  .hero-side,
  .editorial-lead,
  .editorial-support-grid,
  .showcase-grid,
  .popular-layout,
  .popular-list,
  .post-grid,
  .sp-archive-columns-2 .post-grid:not(.related-grid),
  .single-layout,
  .sidebar-widgets,
  .footer-main,
  .footer-widgets {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-feature {
    display: flex;
    flex-direction: column;
  }

  .hero-media-frame,
  .hero-feature .hero-media,
  .hero-card,
  .hero-card-copy,
  .hero-card .hero-footer,
  .hero-side,
  .editorial-lead,
  .editorial-lead-media,
  .editorial-lead-copy,
  .showcase-card,
  .popular-lead,
  .popular-list,
  .post-card,
  .newsletter,
  .footer-main {
    width: 100%;
    max-width: 100%;
  }

  .hero-card .hero-footer,
  .section-heading,
  .footer-bottom {
    align-items: stretch;
  }

  .button-link,
  .newsletter-fields button {
    justify-content: center;
  }

  .editorial-lead {
    grid-template-areas:
      "media"
      "copy";
  }

  .showcase-card,
  .showcase-card-lead {
    grid-column: 1;
    grid-row: auto;
  }

  .footer-brand,
  .footer-column {
    grid-column: 1;
  }
}

@media screen and (max-width: 430px) {
  .sp-container,
  .sp-container-narrow,
  .site-header-inner,
  .magazine-hero,
  .news-ticker {
    width: calc(100% - 20px);
  }

  .hero-card,
  .hero-side,
  .editorial-lead-copy,
  .popular-lead-copy {
    padding-inline: 20px;
  }

  .hero-entry-meta {
    width: 100%;
    justify-content: center;
  }

  .hero-card .button-link {
    width: 100%;
  }

  .popular-row {
    grid-template-columns: 40px 82px minmax(0, 1fr);
    gap: 10px;
  }
}
