/* Responsive: media queries raccolte in un unico file */

@media (max-width: 1220px) {
  .site-header.editorial-header .header-inner.editorial-header-shell {
    grid-template-columns: auto 1fr;
  }

  .editorial-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 4px;
  }

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

@media (max-width: 1080px) {
  .search-layout,
  body[data-page="guide"] .guide-layout {
    grid-template-columns: 1fr;
  }

  body[data-page="guide"] .guide-sidebar {
    position: static;
  }

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

@media (max-width: 820px) {
  body:not([data-page="home"]) .container {
    width: min(100%, calc(100% - 24px));
    padding: 0 12px;
  }

  .site-header.editorial-header .header-inner.editorial-header-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 14px 12px 16px;
  }

  .editorial-nav {
    order: 2;
    grid-column: auto;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 6px;
    overflow-x: visible;
    padding-bottom: 0;
    padding-top: 2px;
  }

  .editorial-header-actions {
    order: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .editorial-search,
  .editorial-cta {
    width: 100%;
  }

  .editorial-nav-link {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.9rem;
  }

  .editorial-nav-link--caret {
    padding-right: 18px;
  }

  .editorial-nav-link--caret::before {
    right: 8px;
  }

  .editorial-footer-shell,
  .editorial-footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .search-editorial-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-filter-tabs {
    justify-content: flex-start;
  }

  body[data-page="guide"] .guide-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .editorial-brand-tagline {
    display: none;
  }

  .search-article-card {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 540px) {
  .editorial-topic-item,
  .editorial-category-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .editorial-topic-count,
  .editorial-category-count {
    grid-column: 2;
  }
}

@media (max-width: 900px) {
  .problem-cover {
    max-height: 140px;
  }

  .problem-content {
    padding: 24px;
    max-width: 100%;
  }

  .step-card {
    padding: 28px;
  }

  .step-header {
    gap: 12px;
  }

  .step-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 620px) {
  .problem-cover {
    max-height: 125px;
  }

  .problem-content {
    padding: 20px;
  }

  .step-list {
    gap: 32px;
  }

  .step-card {
    padding: 22px;
  }

  .step-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .step-number {
    min-width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .step-title {
    font-size: 1.2rem;
  }

  .step-text {
    font-size: 1.02rem;
  }

  .step-image-wrap {
    padding: 12px;
  }
}

@media (max-width: 1024px) {
  .card-grid,
  .cards-grid,
  .search-results,
  .content-layout {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .hero-proof-pills {
    justify-content: flex-start;
  }

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

@media (max-width: 768px) {
  .hero {
    padding: 24px 0 10px;
  }

  .hero-copy,
  .card-surface,
  .hero-card {
    padding: 22px 14px;
  }


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

  .site-header {
    padding-top: 10px;
  }

  .header-inner {
    min-height: 72px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .problem-content,
  .empty-state {
    padding: 24px;
  }

  .problem-section {
    padding: 20px;
    margin-top: 32px;
  }

  .problem-section-title {
    font-size: 1.4rem;
  }

  .step-card {
  padding: 20px;
   }

  .step-text,
  .problem-lead,
  .problem-description,
  .problem-content p,
  .problem-list li,
  .hero-text,
  .category-card span:last-child,
  .problem-card-link p,
  .search-result-card-link p {
    font-size: 15.5px;
  }

  .search-form {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    box-shadow: none;
  }

  .search-form input,
  input[type="search"],
  input[type="text"] {
    min-height: 48px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
    border-radius: 20px;
  }

  .search-form button {
    width: 100%;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 20px;
  }

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

  .hero-actions {
    margin-top: 16px;
  }

  .hero-actions .button-secondary {
    width: 100%;
    max-width: none;
  }

  .hero h1,
  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.2rem);
  }

  .hero-text {
    font-size: 1rem;
    line-height: 1.75;
  }

  .card-grid,
  .category-grid {
    gap: 18px;
  }

  .section-link {
    width: auto;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .footer-nav a {
    justify-content: center;
    padding: 0 12px;
  }

  .footer-disclaimer {
    font-size: 0.96rem;
    line-height: 1.75;
  }

  .section {
    padding: 22px 0 36px;
  }

  .section-head--minimal {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .section-head--minimal a {
    align-self: flex-start;
  }

  .section-note {
    max-width: none;
  }

  .section-light .category-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .section-light .category-card {
    min-height: 0;
    padding: 18px;
    gap: 14px;
  }

  .card-image-wrap {
    aspect-ratio: 4 / 3;
    padding: 10px;
  }

  .card-content {
    min-height: 0;
    padding: 14px;
  }

  .hero-grid-home {
    gap: 16px;
  }

  body[data-page="home"] .hero-copy {
    padding: 12px 0 10px;
    border-radius: 0;
  }

  .hero-topline {
    gap: 8px;
  }

  body[data-page="home"] .hero h1 {
    max-width: 12ch;
    font-size: clamp(2.1rem, 9.5vw, 2.9rem);
  }

  body[data-page="home"] .hero-search-shell {
    margin-top: 20px;
    padding: 18px;
    border-radius: 24px;
  }
}

@media (max-width: 768px) {
  body[data-page="home"] {
    background:
      radial-gradient(circle at top, rgba(49, 94, 251, 0.06), transparent 26%),
      linear-gradient(180deg, #fbfcff 0%, #f4f7fb 100%);
  }

  body[data-page="home"] .container {
    width: min(var(--container), calc(100% - 24px));
    padding: 0;
  }

  body[data-page="home"] .site-header {
    padding-top: 12px;
  }

  body[data-page="home"] .header-inner {
    min-height: 54px;
    padding: 8px 16px;
  }

  body[data-page="home"] .brand {
    gap: 9px;
  }

  body[data-page="home"] .brand-logo {
    width: 34px;
    height: 34px;
  }

  body[data-page="home"] .brand-text {
    font-size: 1.04rem;
    letter-spacing: 0;
  }

  body[data-page="home"] #main-content {
    min-height: auto;
    display: block;
  }

  body[data-page="home"] .hero {
    padding: 8px 0 0;
    overflow: hidden;
  }

  body[data-page="home"] .hero::before {
    width: 180px;
    height: 180px;
    top: -16px;
    left: -54px;
    opacity: 0.55;
  }

  body[data-page="home"] .hero::after {
    width: 160px;
    height: 160px;
    right: -58px;
    bottom: 4px;
    opacity: 0.45;
  }

  body[data-page="home"] .hero-copy {
    padding: 8px 0 6px;
    border-radius: 0;
  }

  body[data-page="home"] .hero-topline {
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
  }

  body[data-page="home"] .eyebrow {
    margin: 0;
    font-size: 0.66rem;
    line-height: 1.1;
    letter-spacing: 0;
  }

  body[data-page="home"] .hero-status-pill {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.72rem;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  body[data-page="home"] .hero h1 {
    margin-bottom: 10px;
    font-size: clamp(2rem, 10vw, 2.45rem);
    line-height: 1.02;
    letter-spacing: 0;
  }

  body[data-page="home"] .hero-text {
    max-width: 30ch;
    font-size: 0.97rem;
    line-height: 1.6;
  }

  .hero-search-header {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
  }

  .hero-search-kicker {
    font-size: 0.7rem;
  }

  .hero-search-note {
    font-size: 0.92rem;
  }

  .hero-proof-pills {
    justify-content: flex-start;
    gap: 8px;
  }

  .hero-proof-pill {
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.8rem;
    white-space: normal;
  }

  body[data-page="home"] .search-form {
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    margin-top: 0;
    padding: 8px;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(17, 36, 71, 0.08);
  }

  body[data-page="home"] .search-form input {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
    font-size: 0.95rem;
  }

  body[data-page="home"] .search-form button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    font-size: 0.9rem;
    box-shadow: 0 8px 16px rgba(49, 94, 251, 0.16);
  }

  body[data-page="home"] .hero-quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 8px;
    width: 100%;
    margin: 12px auto 0;
  }

  body[data-page="home"] .hero-quick-link {
    min-height: 88px;
    padding: 12px;
    border-radius: 16px;
  }

  .hero-quick-link-label {
    font-size: 0.94rem;
  }

  .hero-quick-link-meta {
    font-size: 0.8rem;
  }

  .hero-support {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 12px;
  }

  .hero-support-link {
    width: 100%;
  }

  .section-head-actions {
    align-items: flex-start;
    max-width: none;
  }

  .category-card-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .section-light .category-card strong {
    font-size: 1.22rem;
  }

  .category-card-summary {
    font-size: 0.94rem;
  }

  body[data-page="home"] .site-footer {
    margin-top: 10px;
    padding: 18px 0 20px;
  }

  body[data-page="home"] .footer-inner {
    gap: 10px;
  }

  body[data-page="home"] .footer-brand {
    max-width: none;
    padding: 12px;
    border-radius: 16px;
  }

  body[data-page="home"] .footer-brand-link {
    gap: 9px;
  }

  body[data-page="home"] .site-footer .brand-logo {
    width: 30px;
    height: 30px;
  }

  body[data-page="home"] .site-footer .brand-text {
    font-size: 0.98rem;
  }

  body[data-page="home"] .footer-brand p {
    margin-top: 6px;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  body[data-page="home"] .footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    margin-inline: auto;
  }

  body[data-page="home"] .footer-nav a {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 30px;
    padding: 0 6px;
    font-size: 0.74rem;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  body[data-page="home"] .footer-disclaimer {
    padding-top: 8px;
    font-size: 0.78rem;
    line-height: 1.48;
  }
}

@media (max-width: 380px) {
  body[data-page="home"] .hero h1 {
    font-size: 1.82rem;
  }

  body[data-page="home"] .hero-text {
    font-size: 0.88rem;
  }

  body[data-page="home"] .search-form button {
    min-width: 68px;
    padding: 0 10px;
  }

  body[data-page="home"] .footer-nav a {
    font-size: 0.76rem;
  }
}

@media (max-width: 800px) {
  .cookie-banner-inner {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .cookie-banner-inner {
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  }

  .cookie-banner-copy strong {
    font-size: 0.92rem;
  }

  .cookie-banner-copy p {
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .cookie-banner .cookie-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
  }

  .cookie-banner [data-cookie-accept-banner] {
    grid-column: auto;
  }

  .cookie-banner .button-primary,
  .cookie-banner .button-secondary {
    width: auto;
    max-width: 100%;
    flex: 0 1 auto;
    min-width: 0;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    line-height: 1.1;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 340px) {
  .cookie-banner .cookie-actions {
    align-items: stretch;
  }

  .cookie-banner .button-primary,
  .cookie-banner .button-secondary {
    width: 100%;
  }
}

@media (max-width: 800px) {
  .toc-list {
    columns: 1;
  }

  .problem-cta-box {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 1000px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .guide-page {
    padding: 14px 0 34px;
  }

  body[data-page="guide"] {
    background:
      radial-gradient(circle at top left, rgba(49, 94, 251, 0.07), transparent 26%),
      linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
  }

  body[data-page="guide"] .section {
    padding: 16px 0 34px;
  }

  body[data-page="guide"] .site-header {
    background: rgba(16, 24, 45, 0.96);
    border-bottom-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 24px rgba(6, 10, 20, 0.12);
  }

  body[data-page="guide"] .header-inner {
    min-height: 68px;
    gap: 12px;
    align-items: stretch;
  }

  body[data-page="guide"] .brand {
    min-height: 44px;
  }

  body[data-page="guide"] .guide-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  

  .guide-context-tags {
    gap: 6px;
    margin-bottom: 14px;
  }

  .guide-context-tag {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.8rem;
  }

  .guide-hero {
    grid-template-columns: 1fr;
    gap: 0;
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(17, 36, 71, 0.08);
  }

  .guide-hero-media {
    padding: 16px;
  }

  .guide-hero-image-shell {
    width: min(100%, 420px);
    aspect-ratio: 16 / 11;
    padding: 12px;
    border-radius: 20px;
  }

  .guide-hero-content h1 {
    margin-bottom: 10px;
    font-size: clamp(1.55rem, 7.6vw, 2rem);
    line-height: 1.02;
  }

  .guide-hero-content {
    padding: 18px 18px 20px;
  }

  .guide-intro {
    font-size: 0.94rem;
    line-height: 1.62;
  }

  .guide-meta {
    gap: 8px;
    margin-top: 14px;
  }

  .guide-meta p {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .guide-layout {
    gap: 16px;
  }

  .guide-main > .guide-section,
  .guide-info-grid .guide-section,
  .guide-extra-grid .guide-section,
  .guide-sidebar-card {
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(17, 36, 71, 0.05);
  }

  .guide-main > .guide-section {
    padding: 20px 18px;
    margin-bottom: 20px;
  }

  .guide-main > .guide-section h2 {
    margin-bottom: 14px;
    font-size: 1.22rem;
  }

  .guide-main > .guide-section p,
  .guide-main > .guide-section li,
  .guide-info-grid .guide-section p,
  .guide-info-grid .guide-section li,
  .guide-extra-grid .guide-section p,
  .guide-extra-grid .guide-section li {
    font-size: 0.96rem;
    line-height: 1.66;
  }

  .guide-sidebar {
    gap: 10px;
  }

  .guide-sidebar-card {
    padding: 16px;
  }

  .guide-sidebar-card h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .guide-cta-button {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 13px;
    font-size: 0.95rem;
  }

  .step-item {
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 8px 20px rgba(17, 36, 71, 0.045);
  }

  .step-number {
    align-self: flex-start;
    width: 32px;
    height: 32px;
    font-size: 0.84rem;
    box-shadow: 0 8px 18px rgba(47, 102, 246, 0.18);
  }

  .step-content h3 {
    font-size: 1rem;
    line-height: 1.3;
  }

  .step-content p {
    margin-bottom: 14px;
    font-size: 0.95rem;
    line-height: 1.64;
  }

  .step-image {
    margin-top: 10px;
    padding: 8px;
    border-radius: 16px;
  }

  .faq-item {
    border-radius: 16px;
  }

  .faq-question {
    padding: 15px 16px;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .faq-answer {
    padding: 0 16px 15px;
  }

  .guide-related-list {
    gap: 9px;
  }

  .related-guide-card {
    align-items: start;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 9px;
    padding: 10px 12px;
    min-height: 72px;
    border-radius: 15px;
  }

  .related-guide-card::before {
    top: 10px;
    bottom: 10px;
    width: 3px;
  }

  .related-guide-thumb {
    width: 48px;
    padding: 3px;
    border-radius: 11px;
  }

  .related-guide-thumb-image {
    border-radius: 9px;
  }

  .related-guide-body {
    gap: 4px;
    min-height: 48px;
  }

  .related-guide-card strong {
    font-size: 0.87rem;
    line-height: 1.24;
  }

  .related-guide-overline {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
  }

  .related-guide-meta {
    display: none;
  }

  .related-guide-card::after {
    display: none;
  }
}

@media (max-width: 768px) {
  body[data-page="guide"].guide-theme-spid {
    background:
      radial-gradient(circle at top left, rgba(49, 94, 251, 0.12), transparent 24%),
      radial-gradient(circle at bottom right, rgba(58, 181, 138, 0.08), transparent 28%),
      linear-gradient(180deg, #f7faff 0%, #eff4fb 100%);
  }

  body[data-page="guide"].guide-theme-spid .section {
    padding-top: 12px;
  }

  body[data-page="guide"].guide-theme-spid .container {
    width: min(var(--container), calc(100% - 16px));
  }

  body[data-page="guide"].guide-theme-spid .site-header {
    background: rgba(16, 24, 45, 0.96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 24px rgba(6, 10, 20, 0.12);
  }

  body[data-page="guide"].guide-theme-spid .guide-container {
    gap: 16px;
  }

  body[data-page="guide"].guide-theme-spid .guide-hero {
    border-color: rgba(49, 94, 251, 0.1);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.98) 100%);
    box-shadow:
      0 18px 38px rgba(17, 36, 71, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.86);
  }

  body[data-page="guide"].guide-theme-spid .guide-hero-media {
    padding: 14px 14px 8px;
    background:
      radial-gradient(circle at top center, rgba(49, 94, 251, 0.16), transparent 42%),
      linear-gradient(180deg, #f6faff 0%, #eef4fb 100%);
  }

  body[data-page="guide"].guide-theme-spid .guide-hero-media::before {
    opacity: 0.18;
    filter: blur(32px) saturate(1.08);
  }

  body[data-page="guide"].guide-theme-spid .guide-hero-image-shell {
    width: min(100%, 390px);
    aspect-ratio: 15 / 11;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      0 22px 34px rgba(17, 36, 71, 0.12);
  }

  body[data-page="guide"].guide-theme-spid .guide-hero-content {
    padding: 16px 16px 18px;
  }

  body[data-page="guide"].guide-theme-spid .guide-category {
    margin-bottom: 8px;
    font-size: 0.63rem;
    letter-spacing: 0.15em;
  }

  body[data-page="guide"].guide-theme-spid .guide-context-tags {
    margin-bottom: 12px;
  }

  body[data-page="guide"].guide-theme-spid .guide-context-tag {
    min-height: 28px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(49, 94, 251, 0.1);
    box-shadow: 0 8px 18px rgba(17, 36, 71, 0.035);
  }

  body[data-page="guide"].guide-theme-spid .guide-context-tag-strong {
    background: linear-gradient(180deg, rgba(49, 94, 251, 0.12) 0%, rgba(58, 181, 138, 0.12) 100%);
  }

  body[data-page="guide"].guide-theme-spid .guide-hero-content h1 {
    font-size: clamp(1.48rem, 7.2vw, 1.92rem);
    line-height: 1.01;
    letter-spacing: -0.045em;
  }

  body[data-page="guide"].guide-theme-spid .guide-intro {
    max-width: 30ch;
    font-size: 0.92rem;
    line-height: 1.6;
  }

  body[data-page="guide"].guide-theme-spid .guide-meta {
    gap: 6px;
    margin-top: 12px;
  }

  body[data-page="guide"].guide-theme-spid .guide-meta p {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(49, 94, 251, 0.08);
    box-shadow: 0 6px 16px rgba(17, 36, 71, 0.035);
  }

  body[data-page="guide"].guide-theme-spid .guide-main > .guide-section,
  body[data-page="guide"].guide-theme-spid .guide-info-grid .guide-section,
  body[data-page="guide"].guide-theme-spid .guide-extra-grid .guide-section,
  body[data-page="guide"].guide-theme-spid .guide-sidebar-card,
  body[data-page="guide"].guide-theme-spid .faq-item,
  body[data-page="guide"].guide-theme-spid .step-item {
    border-color: rgba(49, 94, 251, 0.08);
  }

  body[data-page="guide"].guide-theme-spid .guide-main > .guide-section,
  body[data-page="guide"].guide-theme-spid .guide-info-grid .guide-section,
  body[data-page="guide"].guide-theme-spid .guide-extra-grid .guide-section,
  body[data-page="guide"].guide-theme-spid .guide-sidebar-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 251, 255, 0.98) 100%);
  }

  body[data-page="guide"].guide-theme-spid .guide-warning {
    background: linear-gradient(180deg, #fffce9 0%, #fff9dd 100%);
  }

  body[data-page="guide"].guide-theme-spid .guide-cta-button {
    background: linear-gradient(180deg, #2f66f6 0%, #4f86ff 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.26),
      0 12px 24px rgba(47, 102, 246, 0.24);
  }

  body[data-page="guide"].guide-theme-spid .guide-cta-button::after {
  content: "\2192";
    margin-left: 8px;
    font-size: 0.95rem;
  }

  body[data-page="guide"].guide-theme-spid .steps-container {
    gap: 16px;
  }

  body[data-page="guide"].guide-theme-spid .step-item {
    padding: 14px;
    border-radius: 20px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.98) 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.86),
      0 10px 24px rgba(17, 36, 71, 0.05);
  }

  body[data-page="guide"].guide-theme-spid .step-number {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    box-shadow: 0 8px 18px rgba(47, 102, 246, 0.18);
  }

  body[data-page="guide"].guide-theme-spid .step-image {
    aspect-ratio: 4 / 3;
    padding: 10px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f9fbff 0%, #f2f6fb 100%);
  }

  body[data-page="guide"].guide-theme-spid .faq-item {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 20px rgba(17, 36, 71, 0.035);
  }

  body[data-page="guide"].guide-theme-spid .faq-question {
    position: relative;
    padding-right: 42px;
  }

  body[data-page="guide"].guide-theme-spid .faq-question::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(49, 94, 251, 0.1);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
  }

  body[data-page="guide"].guide-theme-spid .faq-item[open] .faq-question::after {
    content: "\2212";
  }

  body[data-page="guide"].guide-theme-spid .related-guide-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 255, 0.98) 100%);
  }
}

@media (max-width: 768px) {
  .guide-info-grid,
  .guide-extra-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .guide-links-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body[data-page="home"] .site-header {
    padding-top: 20px;
  }

  body[data-page="home"] .brand-logo {
    width: 42px;
    height: 42px;
  }

  body[data-page="home"] .brand-text {
    font-size: 1.35rem;
  }

  body[data-page="home"] .home-hero {
    padding: 28px 0 40px;
  }

  body[data-page="home"] .hero-copy {
    max-width: 100%;
  }

  body[data-page="home"] .hero h1 {
    max-width: 8ch;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(1.9rem, 10vw, 2.8rem);
  }

  body[data-page="home"] .hero-text {
    max-width: 30ch;
    font-size: 0.98rem;
  }

  body[data-page="home"] .search-form input {
    font-size: 0.96rem;
  }

  body[data-page="home"] .search-form {
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    padding: 8px;
    border-radius: 24px;
  }

  body[data-page="home"] .search-form input {
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
  }

  body[data-page="home"] .search-form button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    border-radius: 16px;
  }

  .home-popular {
    margin-top: 18px;
  }

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

  .home-popular-guide-card {
    border-radius: 20px;
  }

  .home-popular-guide-media {
    aspect-ratio: 4 / 3;
    padding: 8px;
  }

  .home-popular-guide-image {
    border-radius: 14px;
  }

  .home-popular-guide-body {
    gap: 4px;
    padding: 12px;
  }

  .home-popular-guide-kicker {
    font-size: 0.66rem;
  }

  .home-popular-guide-title {
    font-size: 0.9rem;
  }
}

@media (max-width: 430px) {
  .home-popular-guides {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .home-popular-guides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-section-intro--catalog {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-section-button {
    align-self: flex-start;
  }
}

@media (max-width: 768px) {
  body[data-page="home"] .site-header {
    padding-top: 14px;
  }

  body[data-page="home"] .header-inner {
    justify-content: center;
  }

  body[data-page="home"] .brand {
    margin-inline: auto;
  }

  .home-hero {
    padding: 42px 0 14px;
  }

  .home-hero::before {
    width: 220px;
    height: 220px;
    top: -40px;
    left: -54px;
  }

  .home-hero::after {
    width: 180px;
    height: 180px;
    right: -46px;
    bottom: -18px;
  }

  .home-hero-copy h1 {
    font-size: clamp(2.2rem, 10vw, 3.3rem);
  }

  .home-hero-text {
    max-width: 26ch;
    margin-top: 14px;
    font-size: 0.95rem;
    line-height: 1.6;
  }

  body[data-page="home"] .home-search-form {
    grid-template-columns: 1fr;
    gap: 8px;
    width: min(100%, 360px);
    margin-top: 24px;
    padding: 8px;
    border-radius: 26px;
  }

  body[data-page="home"] .home-search-form input {
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
  }

  body[data-page="home"] .home-search-form button {
    width: 100%;
    min-width: 0;
    min-height: 52px;
  }

  .home-popular-section {
    padding-top: 8px;
  }

  .home-section-intro--compact {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    text-align: center;
  }

  .home-popular-guides {
    gap: 14px;
  }

  .home-popular-guide-card {
    border-radius: 22px;
  }

  .home-popular-guide-media {
    padding: 0;
  }

  .home-popular-guide-image {
    border-radius: 0;
  }

  .home-popular-guide-body {
    padding: 15px 15px 17px;
  }

  .home-catalog-section {
    padding-top: 22px;
    padding-bottom: 58px;
  }

  .home-section-copy h2 {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }

  body[data-page="home"] #home-categories {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  body[data-page="home"] .category-card {
    min-height: 0;
    padding: 20px;
    border-radius: 24px;
  }

  body[data-page="home"] .footer-inner {
    gap: 14px;
  }

  body[data-page="home"] .footer-brand {
    text-align: center;
  }

  body[data-page="home"] .footer-brand-link {
    justify-content: center;
  }

  body[data-page="home"] .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    gap: 8px;
  }

  body[data-page="home"] .footer-nav a {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 540px) {
  .home-popular-guides {
    grid-template-columns: 1fr;
  }

  .home-hero-copy h1 {
    max-width: 8ch;
    margin-left: auto;
    margin-right: auto;
  }

  body[data-page="home"] .footer-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 12px;
    padding-right: 12px;
  }

  .header-inner,
  .search-shell,
  .static-shell,
  .contact-shell,
  .contact-hero,
  .contact-grid,
  .contact-notes,
  .guide-container,
  .guide-layout,
  .problem-content,
  .steps-container,
  .faq-container,
  .home-hero-container {
    min-width: 0;
    max-width: 100%;
  }

  img,
  svg,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }

  .button,
  .button-primary,
  .button-secondary {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .container,
  body[data-page="home"] .container,
  body[data-page="guide"].guide-theme-spid .container {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding-left: 12px;
    padding-right: 12px;
  }

  .header-inner,
  .search-shell,
  .static-shell,
  .contact-shell,
  .contact-hero,
  .contact-grid,
  .contact-notes,
  .guide-container,
  .guide-layout,
  .problem-content,
  .steps-container,
  .faq-container,
  .home-hero-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-inline: auto;
  }

  body[data-page="home"] .footer-nav {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
  }

  img,
  svg,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }

  .button,
  .button-primary,
  .button-secondary {
    max-width: 100%;
  }
}
