:root {
  --navy: #10233f;
  --blue: #2457c5;
  --blue-soft: #eaf1ff;
  --teal: #117a7a;
  --green: #1f7a55;
  --amber: #b87416;
  --ink: #152033;
  --muted: #667085;
  --line: #dbe3ef;
  --panel: #ffffff;
  --wash: #f5f7fb;
  --shadow: 0 16px 42px rgba(16, 35, 63, .1);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(820px, calc(100% - 32px));
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 20;
  background: #fff;
  padding: 10px 14px;
  border: 1px solid var(--line);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.05rem;
}

.brand:hover,
.admin-brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(16, 35, 63, .16);
}

.site-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  position: absolute;
  left: 16px;
  right: 16px;
  top: 72px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.site-nav.open {
  display: flex;
}

.site-nav a {
  color: var(--ink);
  font-weight: 650;
  padding: 8px 6px;
}

.nav-toggle {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 9px 12px;
  font-weight: 700;
  color: var(--navy);
}

.hero,
.page-hero,
.guide-hero {
  background: linear-gradient(180deg, #fff 0%, var(--wash) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  gap: 28px;
  padding: 42px 0 30px;
}

.hero-copy h1,
.page-hero h1,
.guide-hero h1 {
  margin: 8px 0 14px;
  color: var(--navy);
  line-height: 1.08;
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  letter-spacing: 0;
}

.guide-hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
}

.hero-copy p,
.page-hero p,
.guide-hero p {
  color: #3d4a5f;
  font-size: 1.08rem;
  max-width: 720px;
}

.hero-media {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid #cfd8e6;
  background: var(--wash);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.eyebrow {
  color: var(--teal);
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 20px rgba(36, 87, 197, .18);
}

.btn-secondary {
  color: var(--navy);
  background: var(--blue-soft);
  border-color: #c7d7ff;
}

.btn-ghost {
  color: var(--navy);
  background: #fff;
  border-color: var(--line);
}

.btn-danger {
  color: #fff;
  background: #b42318;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.band {
  background: var(--wash);
  border-block: 1px solid var(--line);
  padding: 28px 0;
}

.feature-grid,
.category-grid,
.related-grid,
.stat-grid {
  display: grid;
  gap: 16px;
}

.feature-grid article,
.category-card,
.guide-card,
.related-card,
.summary-box,
.cta-panel,
.installer-card,
.login-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 35, 63, .06);
}

.feature-grid article,
.category-card,
.guide-card,
.related-card {
  padding: 18px;
}

.feature-grid h2,
.category-card h3,
.guide-card h2,
.guide-card h3 {
  margin: 0 0 8px;
  color: var(--navy);
  line-height: 1.2;
}

.feature-grid p,
.category-card p,
.guide-card p,
.related-card span {
  margin: 0;
  color: var(--muted);
}

.section {
  padding: 42px 0;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 6px 0 0;
  color: var(--navy);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  letter-spacing: 0;
}

.guide-list {
  display: grid;
  gap: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #1d4eb5;
  font-size: .78rem;
  font-weight: 800;
}

.badge-success {
  background: #e7f7ef;
  color: var(--green);
}

.badge-warning {
  background: #fff3d8;
  color: var(--amber);
}

.badge-danger {
  background: #fee4e2;
  color: #b42318;
}

.page-hero,
.guide-hero {
  padding: 46px 0 38px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: .92rem;
}

.article-layout {
  display: grid;
  gap: 24px;
  padding: 34px 0 54px;
}

.article-aside {
  order: 2;
}

.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
}

.toc h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1rem;
}

.toc a {
  display: block;
  padding: 7px 0;
  color: #344054;
  border-top: 1px solid #eef2f7;
}

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

.summary-box,
.article-section,
.cta-panel {
  margin-bottom: 22px;
}

.summary-box {
  padding: 20px;
  background: #f9fbff;
}

.summary-box h2,
.article-section h2,
.cta-panel h2 {
  color: var(--navy);
  margin-top: 0;
  line-height: 1.2;
  letter-spacing: 0;
}

.summary-box dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.summary-box dl div {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.summary-box dt {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}

.summary-box dd {
  margin: 0;
}

.article-section {
  font-size: 1.02rem;
}

.article-section blockquote {
  margin: 16px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  background: #f2fbfa;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.content-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.content-table th,
.content-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.content-table th {
  color: var(--navy);
  background: #f6f8fc;
  width: 32%;
}

.checklist ul,
.references ul {
  padding-left: 20px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fff;
}

.faq-list summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 800;
}

.cta-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  background: #f8fbff;
}

.page-content {
  padding: 42px 0;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.search-form input,
.stack-form input,
.stack-form textarea,
.stack-form select,
.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.search-form input {
  flex: 1 1 240px;
}

.site-footer {
  background: var(--navy);
  color: #dbe7ff;
  padding: 34px 0 90px;
}

.footer-grid {
  display: grid;
  gap: 24px;
}

.site-footer h2 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 8px;
}

.site-footer a {
  display: block;
  color: #dbe7ff;
  padding: 3px 0;
}

.mobile-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
}

.mobile-sticky-cta .btn {
  min-height: 40px;
  padding: 9px 10px;
  font-size: .92rem;
}

.whatsapp-float {
  position: fixed;
  right: 16px;
  bottom: 76px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.installer-page,
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--wash);
  padding: 24px;
}

.installer-card,
.login-card {
  width: min(760px, 100%);
  padding: 28px;
}

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

.stack-form h2 {
  color: var(--navy);
  margin: 16px 0 0;
}

.stack-form label {
  display: grid;
  gap: 6px;
  font-weight: 750;
}

.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 14px 0;
  background: #f8fbff;
}

.notice.success {
  background: #e7f7ef;
  border-color: #b7e2c9;
  color: #0f5132;
}

.notice.warning {
  background: #fff8e8;
  border-color: #f2d28b;
  color: #84520b;
}

.notice.danger {
  background: #fff1f0;
  border-color: #f5b8b3;
  color: #9f1f17;
}

.empty-state,
.muted {
  color: var(--muted);
}

@media (min-width: 760px) {
  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .nav-toggle {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 470px);
    align-items: center;
    padding: 58px 0 40px;
  }

  .feature-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
  }

  .article-aside {
    position: sticky;
    top: 94px;
    order: 0;
  }

  .cta-panel {
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
  }

  .mobile-sticky-cta {
    display: none;
  }

  .site-footer {
    padding-bottom: 34px;
  }
}

@media (min-width: 1040px) {
  .guide-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
