:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f0f4ff;
  --text: #162033;
  --muted: #667085;
  --line: #e5e9f2;
  --primary: #315efb;
  --primary-dark: #2346c7;
  --shadow: 0 10px 30px rgba(17, 36, 71, 0.08);
  --shadow-hover: 0 18px 40px rgba(17, 36, 71, 0.12);
  --shadow-soft: 0 26px 60px rgba(17, 36, 71, 0.08);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #f6f8fc 0%, #eef3fb 100%);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
}

.container {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted-text {
  color: var(--muted);
}

.section {
  padding: 28px 0 44px;
}

.compact-top {
  padding-top: 12px;
}

.soft-section {
  background: rgba(248, 250, 252, 0.5);
}

/* =========================
   HEADER
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 0 0;
  background: linear-gradient(180deg, rgba(246, 248, 252, 0.94) 0%, rgba(246, 248, 252, 0.84) 68%, rgba(246, 248, 252, 0) 100%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: none;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(229, 233, 242, 0.88);
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(17, 36, 71, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* =========================
   BUTTONS
========================= */

.button,
.button-primary,
.button-secondary,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.button,
.button-primary,
.search-form button {
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 14px 26px rgba(49, 94, 251, 0.2);
}

.button:hover,
.button-primary:hover,
.search-form button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(35, 70, 199, 0.24);
}

.button-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.button-secondary:hover {
  background: var(--surface-soft);
  transform: translateY(-1px);
}

/* =========================
   HERO
========================= */

.hero {
  position: relative;
  padding: 52px 0 18px;
}

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

.hero-copy,
.card-surface,
.hero-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.hero-copy {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 0 12px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.hero-actions .button-secondary {
  padding: 0 22px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(49, 94, 251, 0.16);
  background: rgba(255, 255, 255, 0.98);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.hero-actions .button-secondary:hover,
.hero-actions .button-secondary:focus-visible {
  background: rgba(243, 246, 255, 0.98);
}

.section-light {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.54) 0%, rgba(248, 251, 255, 0.96) 100%);
}

.section-head--minimal {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.eyebrow-muted {
  color: rgba(15, 23, 42, 0.6);
}

.section-light .category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.section-light .category-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  min-height: 240px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, var(--category-glow, rgba(49, 94, 251, 0.1)) 0%, transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.section-light .category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07);
  border-color: rgba(49, 94, 251, 0.16);
}

.section-light .category-card strong {
  font-size: 1.38rem;
  line-height: 1.18;
}

.section-light .category-pill {
  background: rgba(255, 255, 255, 0.9);
  color: var(--category-color, var(--primary));
  border: 1px solid rgba(229, 233, 242, 0.84);
  font-size: 0.78rem;
  padding: 5px 10px;
}

.section-head--home-discovery {
  align-items: flex-end;
}

.section-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  max-width: 38ch;
}

.home-discovery-note {
  max-width: none;
  color: #49556d;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero h1,
.hero-title {
  margin: 0 0 16px;
  max-width: 820px;
  font-size: clamp(2.05rem, 3.8vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-text {
  margin: 0;
  max-width: 700px;
  font-size: 1rem;
  line-height: 1.72;
  color: var(--muted);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
  padding: 10px;
  background: rgba(243, 246, 255, 0.90);
  border: 1px solid rgba(49, 94, 251, 0.14);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.search-form:focus-within {
  box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.12);
  border-color: rgba(49, 94, 251, 0.22);
}

.search-form input,
input[type="search"],
input[type="text"] {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 1rem;
}

.search-form input::placeholder {
  color: rgba(15, 23, 42, 0.5);
}

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

/* =========================
   SECTION HEAD
========================= */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2rem);
  line-height: 1.2;
}

.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(49, 94, 251, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.section-link:hover,
.section-link:focus-visible {
  background: rgba(49, 94, 251, 0.14);
}

.section-note {
  margin: 0;
  max-width: 32ch;
  color: var(--muted);
  line-height: 1.68;
}

/* =========================
   HOME PREMIUM
========================= */

body[data-page="home"] {
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(49, 94, 251, 0.06), transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, #f4f7fb 100%);
}

body[data-page="home"] .site-header {
  position: relative;
  padding-top: 16px;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body[data-page="home"] .header-inner {
  justify-content: flex-start;
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-page="home"] .brand {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 233, 242, 0.96);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(17, 36, 71, 0.06);
}

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

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

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

body[data-page="home"] .home-hero {
  min-height: 0;
  display: block;
}

body[data-page="home"] .hero::before,
body[data-page="home"] .hero::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
}

body[data-page="home"] .hero::before {
  width: 300px;
  height: 300px;
  top: 12px;
  left: max(16px, calc(50% - 640px));
  background: radial-gradient(circle, rgba(49, 94, 251, 0.1) 0%, rgba(49, 94, 251, 0) 72%);
}

body[data-page="home"] .hero::after {
  width: 280px;
  height: 280px;
  right: max(16px, calc(50% - 620px));
  bottom: 20px;
  background: radial-gradient(circle, rgba(61, 181, 149, 0.08) 0%, rgba(61, 181, 149, 0) 72%);
}

.hero-grid-home {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

body[data-page="home"] .hero-copy {
  max-width: 860px;
  margin: 0;
  text-align: left;
  padding: 18px 0 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-page="home"] .eyebrow {
  margin: 0;
}

.hero-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}

body[data-page="home"] .hero h1 {
  max-width: 10.5ch;
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

body[data-page="home"] .hero-text {
  max-width: 58ch;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.74;
  color: #44516a;
}

body[data-page="home"] .hero-actions {
  justify-content: flex-start;
}

body[data-page="home"] .hero-search-shell {
  margin-top: 26px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(49, 94, 251, 0.08) 0%, transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.98) 100%);
  border: 1px solid rgba(49, 94, 251, 0.12);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 24px 54px rgba(17, 36, 71, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.hero-search-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  text-align: left;
}

.hero-search-copy {
  min-width: 0;
  max-width: 42ch;
}

.hero-search-kicker {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-search-note {
  margin: 0;
  color: #44516a;
  font-size: 0.96rem;
  line-height: 1.62;
}

.hero-proof-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.hero-proof-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  min-width: 0;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(49, 94, 251, 0.12);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.hero-proof-pill strong {
  margin-right: 6px;
  color: var(--primary);
}

body[data-page="home"] .search-form {
  width: 100%;
  margin: 0;
  padding: 10px;
  background: #ffffff;
  border-color: rgba(49, 94, 251, 0.14);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 34px rgba(17, 36, 71, 0.08);
}

body[data-page="home"] .search-form input {
  min-height: 60px;
  padding: 0 24px;
  font-size: 1.04rem;
}

body[data-page="home"] .search-form button {
  min-width: 148px;
  min-height: 60px;
  border-radius: 18px;
  font-size: 1rem;
  box-shadow: 0 16px 28px rgba(49, 94, 251, 0.18);
}

.hero-quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hero-quick-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 92px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 249, 255, 0.98) 100%);
  border: 1px solid rgba(229, 233, 242, 0.96);
  color: var(--text);
  box-shadow: 0 8px 22px rgba(17, 36, 71, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.hero-quick-link-top {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hero-quick-link-label {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hero-quick-link-arrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(49, 94, 251, 0.08);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.hero-quick-link-meta {
  color: #5b6880;
  font-size: 0.84rem;
  line-height: 1.45;
}

.hero-quick-link:hover,
.hero-quick-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(49, 94, 251, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(242, 247, 255, 1) 100%);
  box-shadow: 0 14px 28px rgba(17, 36, 71, 0.08);
}

.hero-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  text-align: left;
}

.hero-support-text {
  margin: 0;
  color: #4b5871;
  font-size: 0.95rem;
  line-height: 1.6;
}

.hero-support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(49, 94, 251, 0.08);
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.18s ease;
}

.hero-support-link:hover,
.hero-support-link:focus-visible {
  background: rgba(49, 94, 251, 0.14);
  transform: translateY(-1px);
}

/* =========================
   HOME / SEARCH CARDS
========================= */

.card-grid,
.cards-grid,
.search-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.problem-card,
.search-result-card,
.feature-card,
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 100%;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.problem-card:hover,
.search-result-card:hover,
.feature-card:hover,
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(49, 94, 251, 0.18);
}

.problem-card-link,
.search-result-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.card-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  min-height: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #f4f7fb 100%);
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.card-image,
.feature-card-image,
.search-card-image,
.card-cover,
.problem-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 16px;
  background: #ffffff;
}

.card-image-wrap {
  overflow: hidden;
  border-radius: 18px;
}

.card-content,
.feature-card-body,
.search-card-body,
.card-body {
  display: flex;
  flex-direction: column;
  min-height: 170px;
  padding: 15px;
}

.card-meta {
  display: inline-block;
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

.card-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.card-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(49, 94, 251, 0.1);
  color: var(--primary);
  border: 1px solid rgba(49, 94, 251, 0.12);
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1;
}

.card-chip-muted {
  background: #f8fafc;
  color: var(--text);
  border-color: var(--line);
}

.card-category {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.card-supporting-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.card-supporting-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1;
}

.problem-card-link h3,
.search-result-card-link h3,
.card-title,
.feature-card-title,
.search-card-title {
  margin: 0 0 10px;
  font-size: 1.02rem;
  line-height: 1.32;
  color: var(--text);
}

.problem-card-link p,
.search-result-card-link p,
.card-text,
.feature-card-text,
.search-card-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
  font-size: 0.9rem;
}

.card-link-text,
.result-link-text {
  display: inline-block;
  margin-top: auto;
  padding-top: 16px;
  font-weight: 700;
  color: var(--primary);
}

.result-link-text::after {
  content: '\2192';
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.search-result-card:hover .result-link-text::after,
.card:hover .result-link-text::after {
  transform: translateX(3px);
}

/* =========================
   ADS
========================= */

.ad-box {
  background: var(--surface);
  border: 1px dashed #c8d4f3;
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  color: var(--muted);
}

/* =========================
   CATEGORIES
========================= */

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 150px;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.category-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  border-color: rgba(49, 94, 251, 0.18);
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--category-accent, rgba(49, 94, 251, 0.38));
}

.category-card--email {
  --category-accent: linear-gradient(90deg, #315efb 0%, #5f8bff 100%);
  --category-glow: rgba(49, 94, 251, 0.12);
  --category-color: #315efb;
}

.category-card--spid {
  --category-accent: linear-gradient(90deg, #2563eb 0%, #16a34a 100%);
  --category-glow: rgba(22, 163, 74, 0.11);
  --category-color: #1d4ed8;
}

.category-card--documents {
  --category-accent: linear-gradient(90deg, #ea580c 0%, #f59e0b 100%);
  --category-glow: rgba(245, 158, 11, 0.12);
  --category-color: #c2410c;
}

.category-card strong {
  display: block;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
  color: var(--text);
}

.category-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--category-color, var(--primary));
  border: 1px solid rgba(229, 233, 242, 0.88);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.category-pill-muted {
  background: #f3f4f6;
  color: #6b7280;
}

.category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-card-body {
  display: grid;
  gap: 10px;
}

.category-card-summary {
  margin: 0;
  color: #45536c;
  line-height: 1.7;
  font-size: 1rem;
}

.category-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17, 36, 71, 0.04);
  border: 1px solid rgba(17, 36, 71, 0.08);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.category-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.category-service-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(49, 94, 251, 0.1);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}

.category-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 4px;
  padding-top: 2px;
}

.category-card-link-text {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  color: var(--primary);
}

.category-card-link-text::after {
  content: '\2192';
  margin-left: 8px;
  font-size: 0.94rem;
  transition: transform 0.18s ease;
}

.category-card:hover .category-card-link-text::after {
  transform: translateX(3px);
}

.category-card-link {
  width: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.category-card.category-card-link {
  display: flex;
  height: 100%;
}

.disabled-card {
  opacity: 0.92;
}

/* =========================
   SEARCH PAGE
========================= */

.page-intro {
  margin-bottom: 24px;
}

.page-intro h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.1;
}

.search-page-form {
  margin-bottom: 24px;
}

.search-summary {
  margin: 12px 0 0;
  color: var(--muted);
}

.search-active-filters {
  margin-top: 12px;
}

.search-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.search-filter-pill,
.search-filter-clear {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-size: 0.84rem;
  text-decoration: none;
}

.search-filter-pill {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 6px 14px rgba(17, 36, 71, 0.035);
}

.search-filter-clear {
  color: var(--primary);
  border-color: rgba(49, 94, 251, 0.16);
}

.search-filter-clear:hover {
  border-color: rgba(49, 94, 251, 0.3);
  background: rgba(49, 94, 251, 0.04);
}

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

.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* =========================
   PROBLEM PAGE
========================= */

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.problem-article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 20px 0;
}

.problem-cover-wrap {
  width: 100%;
  background: #f8fafc;
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.problem-cover {
  width: 100%;
  max-height: 155px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.problem-content {
  padding: 32px;
  max-width: 840px;
  margin: 0 auto;
}

.problem-title {
  margin: 0 0 28px;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  line-height: 1.08;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.problem-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 36px;
  font-weight: 400;
}

.problem-description {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 24px;
}

.problem-content p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 18px;
}

.problem-section {
  margin-top: 56px;
  margin-bottom: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.problem-section + .problem-section {
  margin-top: 44px;
}

.problem-section-title {
  margin: 0 0 24px;
  font-size: 1.75rem;
  line-height: 1.25;
  color: var(--text);
  font-weight: 600;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  display: inline-block;
  letter-spacing: -0.01em;
}

.section-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 32px;
  font-weight: 400;
  padding: 20px 24px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 3px solid var(--primary);
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.step-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 34px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.step-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.step-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-title {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.005em;
}

.step-description {
  font-size: 1.08rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.7;
}

.step-text {
  margin-bottom: 24px;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text);
}

.step-image-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.step-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
}

@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;
  }
}

.info-box {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
  box-shadow: none;
  position: relative;
  margin-bottom: 20px;
}

.info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 8px 8px 0 0;
}

.problem-list {
  margin: 0;
  padding-left: 20px;
}

.problem-list li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: var(--text);
  position: relative;
}

.problem-list li::marker {
  color: var(--primary);
  font-weight: 600;
}

.info-card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.info-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.info-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
}

.info-card-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--text);
  font-weight: 600;
}

.info-card-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.info-card-meta {
  margin: 16px 0 0;
  color: var(--text);
  line-height: 1.5;
  font-size: 0.9rem;
  font-weight: 500;
}

.compact-list {
  margin-top: 14px;
}

.compact-list li:last-child {
  margin-bottom: 0;
}

/* =========================
   SIDEBAR / RELATED
========================= */

.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.related-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-guide-link {
  display: block;
  padding: 14px 16px;
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.related-guide-link:hover {
  border-color: var(--primary);
  background: var(--surface-soft);
  color: var(--primary);
}

/* =========================
   FOOTER
========================= */

.site-footer {
  margin-top: 26px;
  padding: 28px 0 34px;
  color: rgba(255, 255, 255, 0.74);
  background:
    radial-gradient(circle at top left, rgba(49, 94, 251, 0.18) 0%, rgba(49, 94, 251, 0) 28%),
    linear-gradient(180deg, #0d1833 0%, #0f1729 100%);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 0.95fr) minmax(0, 1.4fr);
  align-items: start;
  gap: 18px;
}

.footer-brand {
  max-width: 360px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.footer-brand p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.site-footer .brand-text {
  color: #ffffff;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.footer-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.footer-disclaimer {
  margin: 0;
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* =========================
   RESPONSIVE
========================= */

@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,
  .info-card {
    padding: 20px;
  }

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

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

  .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;
  }
}

/* =========================
   HOME MOBILE TUNING
========================= */

@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;
  }
}

.problem-summary {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 24px;
  font-weight: 500;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.problem-warning-box {
  background: #fefce8;
  border: 1px solid #eab308;
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
}

.problem-warning-box::before {
  content: '⚠️';
  position: absolute;
  top: -10px;
  left: 16px;
  background: white;
  border: 1px solid #eab308;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.problem-warning-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.problem-warning-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: #eab308;
  border-radius: 1px;
}

.problem-disclaimer-box {
  background: #f8fafc;
  border: 1px solid #d7dee8;
}

.timing-box p + p {
  margin-top: 10px;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
}

.cookie-banner-inner {
  max-width: 1120px;
  margin: 0 auto;
  background: #111827;
  color: #ffffff;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.cookie-banner-copy p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.85);
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.cookie-modal {
  width: min(680px, 100%);
  background: #ffffff;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24);
}

.cookie-modal h2 {
  margin-top: 0;
}

.cookie-modal-text {
  color: #475569;
}

.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid #e5e7eb;
}

.cookie-option small {
  display: block;
  color: #64748b;
  margin-top: 4px;
}

.cookie-option.is-disabled {
  opacity: 0.8;
}

@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%;
  }
}

/* =========================
   GUIDE EXTENSIONS
========================= */

.problem-summary {
  margin: 20px 0 28px;
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text);
  font-weight: 500;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.problem-warning-box {
  margin: 0 0 24px;
  padding: 18px 20px;
  background: #fff7e8;
  border: 1px solid #f1d08d;
  border-radius: 18px;
}

.problem-warning-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.breadcrumbs {
  margin-bottom: 18px;
}

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

.breadcrumbs li + li::before {
  content: '/';
  margin-right: 8px;
  color: #94a3b8;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.problem-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0 32px;
  padding: 0;
}

.problem-meta-strip span,
.related-guide-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  background: #f1f5f9;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
}

.problem-toc {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 1;
}

.toc-list li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.toc-list a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: block;
  font-weight: 500;
}

.toc-list a:hover {
  background: var(--surface-soft);
  color: var(--primary);
  transform: translateX(4px);
}

.problem-link-list {
  margin: 0;
  padding-left: 18px;
}

.problem-link-list li {
  margin-bottom: 10px;
}

.problem-link-list small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.step-description {
  margin: 0 0 10px;
  color: var(--muted);
}

.faq-summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.5;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding-top: 12px;
}

.related-guide-link {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.related-guide-link strong {
  line-height: 1.5;
}

.related-guide-link:hover {
  border-color: rgba(49, 94, 251, 0.25);
  box-shadow: var(--shadow);
}

.problem-cta-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 32px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--primary);
  margin: 40px 0 32px;
}

.problem-cta-box p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.ad-box-inline {
  margin: 24px 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -50px;
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 10001;
}

.skip-link:focus {
  top: 12px;
}

/* =========================
   FINAL BLOCK
========================= */

.final-block {
  margin: 48px 0 32px;
  padding: 32px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.final-block-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 24px;
  text-align: center;
}

.final-block-content {
  display: grid;
  gap: 32px;
}

.final-block-section {
  background: white;
  border-radius: 8px;
  padding: 24px;
  border: 1px solid #e2e8f0;
}

.final-block-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-guides-grid {
  display: grid;
  gap: 12px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(49, 94, 251, 0.35);
  outline-offset: 3px;
}

.legal-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 22px 0 0;
}

.legal-quick-links a {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  font-weight: 700;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: #fff;
}

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

.contact-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
}

.contact-check input {
  width: auto;
  min-height: 0;
  margin-top: 4px;
}

.form-message {
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef7ee;
  border: 1px solid #b9dfb9;
  color: #215d21;
}

.footer-disclaimer {
  margin-top: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.94rem;
}

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

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

/* =========================
   GUIDE PAGE STYLES
========================= */

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 32px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(17, 36, 71, 0.06);
}

.guide-hero-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 22px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  overflow: hidden;
}

.guide-hero-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--guide-hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.04);
  opacity: 0.14;
  transform: scale(1.08);
}

.guide-hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(49, 94, 251, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 100%);
}

.guide-hero-image-shell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 520px);
  aspect-ratio: 4 / 3;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 18px 34px rgba(17, 36, 71, 0.1);
}

.guide-hero-image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}

.guide-hero-content {
  padding: 24px 26px 24px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guide-category {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.guide-context-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.guide-context-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(49, 94, 251, 0.08);
  border: 1px solid rgba(49, 94, 251, 0.14);
  color: var(--primary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.guide-context-tag:hover {
  transform: translateY(-1px);
  border-color: rgba(49, 94, 251, 0.24);
  background: rgba(49, 94, 251, 0.12);
}

.guide-context-tag-muted {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--text);
}

.guide-context-tag-strong {
  background: linear-gradient(180deg, rgba(49, 94, 251, 0.12) 0%, rgba(106, 165, 255, 0.18) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.guide-hero-content h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 2.6vw, 2.45rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text);
}

.guide-intro {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.66;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.guide-meta p {
  margin: 0;
  padding: 7px 11px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.88rem;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 300px;
  gap: 28px;
  align-items: start;
}

.guide-main {
  min-width: 0;
}

.guide-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guide-section {
  margin-bottom: 32px;
}

.guide-section h2 {
  margin: 0 0 20px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.guide-section p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.guide-sidebar-card {
  margin-bottom: 0;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(17, 36, 71, 0.055);
}

.guide-sidebar-card h2 {
  margin-bottom: 14px;
  font-size: 1.48rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.guide-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  transition: 0.2s ease;
}

.guide-cta-button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.guide-warning {
  background: #fefce8;
  border: 1px solid #eab308;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 32px;
}

.guide-warning h2 {
  margin: 0 0 12px;
  color: #a16207;
}

.guide-list {
  margin: 0;
  padding-left: 20px;
}

.guide-list li {
  margin-bottom: 10px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.guide-list li small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.92rem;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.step-content p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.step-image {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 14px;
  margin-top: 14px;
  display: block;
  padding: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f6fb 100%);
  border: 1px solid #e2e8f0;
}

.timing-info p + p {
  margin-top: 8px;
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.faq-question {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 700;
  color: var(--text);
}

.faq-question::-webkit-details-marker {
  display: none;
}

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

.source-link {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.guide-related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-guide-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 12px 40px 12px 16px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 8px 22px rgba(17, 36, 71, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  overflow: hidden;
}

.related-guide-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2f66f6 0%, #6aa5ff 100%);
}

.related-guide-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  aspect-ratio: 1 / 1;
  padding: 6px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  border: 1px solid rgba(47, 102, 246, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.related-guide-thumb-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 12px;
  background: #ffffff;
}

.related-guide-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-height: 72px;
  min-width: 0;
}

.related-guide-card strong {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.34;
  letter-spacing: -0.01em;
  display: block;
  overflow: visible;
  white-space: normal;
  text-wrap: pretty;
}

.related-guide-overline {
  display: block;
  max-width: 100%;
  color: var(--primary);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.related-guide-meta {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.related-guide-card::after {
  content: '\2192';
  position: absolute;
  right: 14px;
  top: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.62;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.related-guide-card:hover {
  border-color: rgba(47, 102, 246, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: 0 10px 22px rgba(17, 36, 71, 0.075);
  transform: translateY(-1px);
}

.related-guide-card:hover::after {
  transform: translateX(3px);
  opacity: 1;
}

.guide-closing {
  padding: 20px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
}

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

  .guide-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  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(248, 250, 253, 0.94);
    border-bottom-color: rgba(15, 23, 42, 0.06);
    box-shadow: 0 8px 24px rgba(17, 36, 71, 0.06);
  }

  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;
  }

  .search-filter-row {
    gap: 6px;
  }

  .search-filter-pill,
  .search-filter-clear {
    min-height: 30px;
    padding: 0 11px;
    font-size: 0.8rem;
  }

  .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(249, 251, 255, 0.88);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 28px rgba(17, 36, 71, 0.07);
  }

  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%);
  }
}

.guide-main > .guide-section,
.guide-main > .guide-info-grid,
.guide-main > .guide-extra-grid {
  margin-bottom: 32px;
}

.guide-info-grid,
.guide-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.guide-info-grid .guide-section,
.guide-extra-grid .guide-section {
  margin-bottom: 0;
  height: 100%;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(17, 36, 71, 0.04);
}

.guide-info-grid .guide-section h2,
.guide-extra-grid .guide-section h2 {
  margin-bottom: 14px;
  font-size: 1.1rem;
  line-height: 1.2;
}

.guide-info-grid .guide-section p,
.guide-extra-grid .guide-section p,
.guide-info-grid .guide-section li,
.guide-extra-grid .guide-section li {
  font-size: 0.98rem;
  line-height: 1.7;
}

.guide-main > .guide-section {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.guide-main > .guide-section:has(.guide-list) {
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(17, 36, 71, 0.04);
}

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

.guide-main > .guide-section.guide-closing {
  padding: 20px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.guide-main > .guide-section.guide-warning {
  padding: 20px;
  background: #fefce8;
  border: 1px solid #eab308;
  border-radius: 16px;
}

.guide-main > .guide-section .guide-list {
  padding-left: 20px;
}

.guide-main > .guide-section .guide-list li + li {
  margin-top: 8px;
}

.guide-main > .guide-section .source-link {
  font-weight: 700;
}

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

.guide-main > .guide-section {
  margin-bottom: 32px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(17, 36, 71, 0.05);
}

.guide-main > .guide-section h2 {
  margin: 0 0 18px;
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.guide-main > .guide-section p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.guide-main > .guide-section .guide-list {
  margin: 0;
  padding-left: 20px;
}

.guide-main > .guide-section .guide-list li {
  margin-bottom: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.guide-main > .guide-section .guide-list li small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.guide-main > .guide-section .source-link {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.guide-main > .guide-section .source-link:hover {
  text-decoration: underline;
}

/* Come funziona */
.guide-main > .guide-section:first-of-type:not(.guide-warning) {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border: 1px solid #dbe7ff;
}

/* Download e link utili */
.guide-main > .guide-section .guide-list .source-link {
  display: inline-block;
  margin-bottom: 2px;
}

.guide-main > .guide-section:has(.guide-list) {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

/* Checklist finale */
.guide-main > .guide-section h2 + .guide-list li {
  position: relative;
}

/* Errori da evitare */
.guide-main > .guide-section h2 {
  scroll-margin-top: 100px;
}

.guide-explanation-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe7ff;
}

.guide-links-section {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.guide-checklist-section {
  background: linear-gradient(180deg, #ffffff 0%, #f6fdf7 100%);
  border-color: #d9f0dc;
}

.guide-checklist-section .guide-list li::marker {
  color: #1f9d55;
}

.guide-errors-section {
  background: linear-gradient(180deg, #ffffff 0%, #fff8f8 100%);
  border-color: #f1d4d4;
}

.guide-errors-section .guide-list li::marker {
  color: #dc2626;
}

.guide-notes-section {
  background: linear-gradient(180deg, #ffffff 0%, #fffdf7 100%);
  border-color: #f3e7bf;
}

.guide-disclaimer-section {
  background: #f8fafc;
  border-style: dashed;
  border-color: #d7dee8;
}

.guide-disclaimer-section p {
  color: var(--muted);
}

.guide-links-grid-section {
  padding: 26px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(17, 36, 71, 0.05);
}

.guide-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.guide-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-link-card {
  padding: 14px 15px;
  background: #ffffff;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(17, 36, 71, 0.04);
}

.guide-link-card .source-link {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  line-height: 1.45;
}

.guide-link-card .source-link:hover {
  text-decoration: underline;
}

.guide-link-card small {
  display: block;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

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

/* =========================
   HOME SIMPLE
========================= */

body[data-page="home"] {
  background: linear-gradient(180deg, #f8fbff 0%, #f2f6fc 100%);
  overflow-x: hidden;
}

body[data-page="home"] .site-header {
  position: relative;
  padding-top: 28px;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body[data-page="home"] .header-inner {
  justify-content: center;
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-page="home"] .brand {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

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

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

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

body[data-page="home"] .hero::before,
body[data-page="home"] .hero::after,
body[data-page="home"] .hero-topline {
  display: none;
}

body[data-page="home"] .hero-grid-home {
  gap: 0;
}

body[data-page="home"] .hero-copy {
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

body[data-page="home"] .hero h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

body[data-page="home"] .hero-text {
  max-width: 42ch;
  margin: 14px auto 0;
  font-size: 1.04rem;
  line-height: 1.7;
  color: #55627a;
}

body[data-page="home"] .hero-search-shell {
  margin-top: 30px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

body[data-page="home"] .hero-search-header,
body[data-page="home"] .hero-support,
body[data-page="home"] .hero-quick-links,
body[data-page="home"] .home-discovery-section {
  display: none;
}

body[data-page="home"] .search-form {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 8px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(17, 36, 71, 0.08);
}

body[data-page="home"] .search-form input {
  min-height: 60px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  font-size: 1.04rem;
}

body[data-page="home"] .search-form button {
  min-width: 142px;
  min-height: 60px;
  border-radius: 999px;
  font-size: 0.98rem;
  box-shadow: 0 12px 24px rgba(49, 94, 251, 0.16);
}

.home-popular {
  width: min(980px, 100%);
  margin: 26px auto 0;
}

.home-popular-title {
  margin: 0 0 14px;
  color: #5d6982;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.home-popular-guide-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(229, 233, 242, 0.96);
  color: var(--text);
  box-shadow: 0 12px 26px rgba(17, 36, 71, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.home-popular-guide-card:hover,
.home-popular-guide-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(49, 94, 251, 0.18);
  box-shadow: 0 18px 34px rgba(17, 36, 71, 0.08);
}

.home-popular-guide-media {
  display: block;
  aspect-ratio: 16 / 10;
  padding: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f6fc 100%);
  border-bottom: 1px solid rgba(229, 233, 242, 0.92);
}

.home-popular-guide-image {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: #ffffff;
  object-fit: contain;
}

.home-popular-guide-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 15px 16px;
  text-align: left;
}

.home-popular-guide-kicker {
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-popular-guide-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.34;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@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;
  }
}

/* =========================
   HOME EDITORIAL REFRESH
========================= */

body[data-page="home"] {
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(49, 94, 251, 0.06) 0%, rgba(49, 94, 251, 0) 28%),
    linear-gradient(180deg, #fbfcff 0%, #f5f8fc 52%, #f9fbfe 100%);
}

body[data-page="home"] .site-header {
  position: relative;
  top: auto;
  padding: 18px 0 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body[data-page="home"] .header-inner {
  min-height: auto;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-page="home"] .brand {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

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

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

.home-page {
  padding-bottom: 12px;
}

.home-hero {
  position: relative;
  padding: 70px 0 28px;
}

.home-hero::before,
.home-hero::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.home-hero::before {
  width: 360px;
  height: 360px;
  top: -96px;
  left: max(20px, calc(50% - 760px));
  background: radial-gradient(circle, rgba(49, 94, 251, 0.08) 0%, rgba(49, 94, 251, 0) 72%);
}

.home-hero::after {
  width: 320px;
  height: 320px;
  right: max(12px, calc(50% - 700px));
  bottom: -70px;
  background: radial-gradient(circle, rgba(34, 102, 227, 0.07) 0%, rgba(34, 102, 227, 0) 72%);
}

.home-hero-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-hero-copy {
  width: 100%;
  max-width: 820px;
}

.home-hero-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
  color: #11233f;
}

.home-hero-text {
  max-width: 39ch;
  margin: 16px auto 0;
  font-size: 1.03rem;
  line-height: 1.68;
  color: #516079;
}

body[data-page="home"] .home-search-form {
  width: min(760px, 100%);
  margin: 32px auto 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  box-shadow:
    0 18px 42px rgba(17, 36, 71, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

body[data-page="home"] .home-search-form input {
  min-height: 62px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  font-size: 1.05rem;
}

body[data-page="home"] .home-search-form input::placeholder {
  color: rgba(17, 35, 63, 0.48);
}

body[data-page="home"] .home-search-form button {
  min-width: 138px;
  min-height: 62px;
  border-radius: 999px;
  font-size: 0.98rem;
  box-shadow: 0 14px 28px rgba(49, 94, 251, 0.18);
}

.home-popular-section {
  padding-top: 14px;
  padding-bottom: 24px;
}

.home-section-intro--compact {
  margin-bottom: 18px;
}

.home-section-label {
  margin: 0;
  color: #4863ad;
}

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

.home-popular-guide-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.92);
  color: var(--text);
  box-shadow: 0 18px 38px rgba(17, 36, 71, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-popular-guide-card:hover,
.home-popular-guide-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(49, 94, 251, 0.18);
  box-shadow: 0 24px 46px rgba(17, 36, 71, 0.1);
}

.home-popular-guide-media {
  display: block;
  aspect-ratio: 16 / 10;
  padding: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.home-popular-guide-image {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: #eef3f9;
  object-fit: cover;
  object-position: center center;
}

.home-popular-guide-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 20px;
  text-align: left;
}

.home-popular-guide-kicker {
  color: #4f67af;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-popular-guide-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-catalog-section {
  padding-top: 28px;
  padding-bottom: 74px;
}

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

.home-section-copy {
  max-width: 60ch;
}

.home-section-copy h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  color: #11233f;
}

.home-section-text {
  margin: 14px 0 0;
  color: #53627a;
  line-height: 1.72;
}

.home-section-button {
  flex-shrink: 0;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
}

body[data-page="home"] #home-categories {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

body[data-page="home"] .category-card {
  min-height: 286px;
  padding: 24px;
  gap: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, var(--category-glow, rgba(49, 94, 251, 0.08)) 0%, transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid rgba(226, 232, 240, 0.94);
  box-shadow: 0 18px 38px rgba(17, 36, 71, 0.06);
}

body[data-page="home"] .category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 46px rgba(17, 36, 71, 0.1);
  border-color: rgba(49, 94, 251, 0.16);
}

body[data-page="home"] .category-card::before {
  height: 4px;
}

body[data-page="home"] .category-card strong {
  font-size: 1.44rem;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

body[data-page="home"] .category-card-summary {
  color: #53627a;
  font-size: 0.99rem;
  line-height: 1.72;
}

body[data-page="home"] .category-count {
  min-height: 30px;
  padding: 0 11px;
  background: rgba(17, 36, 71, 0.05);
}

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

body[data-page="home"] .category-service-pill {
  min-height: 30px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(49, 94, 251, 0.12);
}

body[data-page="home"] .category-card-footer {
  margin-top: auto;
}

.category-card--immigration {
  --category-accent: linear-gradient(90deg, #0f766e 0%, #14b8a6 100%);
  --category-glow: rgba(20, 184, 166, 0.12);
  --category-color: #0f766e;
}

body[data-page="home"] .site-footer {
  margin-top: 0;
}

@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;
  }
}
