/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */
:root {
  /* Colors */
  --teal-50:  #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-800: #115e59;

  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;

  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;

  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --green-400: #4ade80;
  --rose-400:  #fb7185;
  --cyan-300:  #67e8f9;

  /* Semantic tokens */
  --color-bg:        var(--slate-50);
  --color-surface:   #ffffff;
  --color-surface-2: var(--slate-100);
  --color-primary:   var(--teal-600);
  --color-primary-d: var(--teal-700);
  --color-primary-l: var(--teal-500);
  --color-secondary: var(--violet-500);
  --color-text:      var(--slate-800);
  --color-text-2:    var(--slate-600);
  --color-text-3:    var(--slate-400);
  --color-border:    var(--slate-200);
  --color-border-2:  var(--slate-300);

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Layout */
  --header-height: 68px;
  --max-width:     1480px;
  --content-max:   960px;
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Transitions */
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-md: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

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

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
a:hover { color: var(--color-primary-d); }
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

ul, ol { list-style: none; }

/* Scroll offset for sticky header */
h1, h2, h3, h4, h5, h6,
[id] {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

/* ==========================================================================
   SKIP LINK
   ========================================================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius);
  z-index: 9999;
  font-weight: 600;
  text-decoration: none;
}

/* ==========================================================================
   SITE HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover { opacity: 0.85; }
.site-logo:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.logo-img { flex-shrink: 0; }

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo-brand {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--teal-600), var(--violet-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}
.logo-tagline {
  font-size: 0.7rem;
  color: var(--color-text-2);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Desktop nav */
.site-nav {
  margin-left: auto;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-2);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--teal-50);
  color: var(--color-primary);
}
.nav-link.active {
  background: var(--teal-50);
  color: var(--color-primary-d);
  font-weight: 600;
}
.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.8;
}

/* Mobile hamburger */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: none;
  cursor: pointer;
  color: var(--color-text);
  transition: all var(--transition);
  margin-left: auto;
}
.mobile-menu-btn:hover {
  background: var(--color-surface-2);
  border-color: var(--color-border-2);
}
.hamburger-icon, .close-icon { width: 20px; height: 20px; }
.close-icon { display: none; }
.mobile-menu-btn[aria-expanded="true"] .hamburger-icon { display: none; }
.mobile-menu-btn[aria-expanded="true"] .close-icon { display: block; }

/* Mobile nav drawer */
.mobile-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem 1rem 1rem;
}
.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-2);
  text-decoration: none;
  transition: all var(--transition);
}
.mobile-nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.mobile-nav-link:hover, .mobile-nav-link.active {
  background: var(--teal-50);
  color: var(--color-primary);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  background: linear-gradient(160deg, #f0fdfa 0%, #eff6ff 50%, #f5f3ff 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 5rem 1.5rem 4rem;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13,148,136,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(13,148,136,0.1);
  color: var(--teal-700);
  border: 1px solid rgba(13,148,136,0.2);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.hero-badge svg { width: 14px; height: 14px; }

.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  color: var(--slate-900);
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--teal-600) 0%, var(--blue-500) 50%, var(--violet-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-2);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-subtitle strong { color: var(--color-text); }

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-md);
  cursor: pointer;
  border: none;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--teal-600), var(--teal-700));
  color: white;
  box-shadow: 0 0 0 0 rgba(13,148,136,0.3), var(--shadow-md);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-800));
  box-shadow: 0 0 0 4px rgba(13,148,136,0.15), var(--shadow-lg);
  color: white;
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-2);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--color-surface-2);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Hero stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--teal-600), var(--violet-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-2);
  max-width: 140px;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border-2);
}

/* ==========================================================================
   SECTION CARDS (HOME PAGE)
   ========================================================================== */
.sections-grid {
  padding: 5rem 1.5rem;
  background: var(--color-surface);
}
.sections-grid-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
}
.section-subheading {
  text-align: center;
  color: var(--color-text-2);
  font-size: 1rem;
  margin-bottom: 3rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.section-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-md);
  position: relative;
  overflow: hidden;
}
.section-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card-teal::before { background: linear-gradient(90deg, var(--teal-400), var(--teal-600)); }
.card-blue::before { background: linear-gradient(90deg, var(--blue-400), var(--blue-600)); }
.card-violet::before { background: linear-gradient(90deg, var(--violet-400), var(--violet-600)); }

.section-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--color-border-2);
}

.card-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}
.card-icon-wrap svg { width: 26px; height: 26px; }
.card-icon-teal   { background: var(--teal-50); color: var(--teal-600); }
.card-icon-blue   { background: #eff6ff;         color: var(--blue-600); }
.card-icon-violet { background: #f5f3ff;         color: var(--violet-600); }

.card-body { display: flex; flex-direction: column; flex: 1; }

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--color-text-2);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.card-links {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.card-links li::before { content: ""; }
.card-links a {
  font-size: 0.875rem;
  color: var(--color-text-2);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition);
  padding: 0.1rem 0;
}
.card-links a::before {
  content: "→";
  font-size: 0.8rem;
  opacity: 0.5;
  transition: opacity var(--transition), transform var(--transition);
}
.card-links a:hover {
  color: var(--color-primary);
}
.card-links a:hover::before {
  opacity: 1;
  transform: translateX(2px);
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: auto;
  transition: gap var(--transition);
}
.card-teal .card-cta   { color: var(--teal-600); }
.card-blue .card-cta   { color: var(--blue-600); }
.card-violet .card-cta { color: var(--violet-600); }
.card-cta svg { width: 16px; height: 16px; transition: transform var(--transition); }
.card-cta:hover { text-decoration: underline; }
.card-cta:hover svg { transform: translateX(4px); }

/* ==========================================================================
   HOME INTRO
   ========================================================================== */
.home-intro {
  padding: 5rem 1.5rem;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}
.home-intro-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.intro-text h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1.25rem;
  line-height: 1.3;
}
.intro-text p {
  color: var(--color-text-2);
  margin-bottom: 1rem;
  font-size: 0.975rem;
}

.intro-highlights {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.highlight-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.highlight-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.highlight-icon svg { width: 20px; height: 20px; }
.highlight-teal   { background: var(--teal-50);  color: var(--teal-600); }
.highlight-blue   { background: #eff6ff;          color: var(--blue-600); }
.highlight-violet { background: #f5f3ff;          color: var(--violet-600); }

.highlight-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 0.3rem;
}
.highlight-item p {
  font-size: 0.875rem;
  color: var(--color-text-2);
  line-height: 1.6;
}
.highlight-item code {
  background: var(--color-surface-2);
  padding: 0.05em 0.35em;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: "Fira Code", "Cascadia Code", "Consolas", monospace;
  color: var(--teal-700);
}

/* ==========================================================================
   PAGE LAYOUT (CONTENT PAGES)
   ========================================================================== */
.page-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Breadcrumbs, article, child-pages, back-link all fill the layout width */
.page-layout > * {
  width: 100%;
  max-width: 1100px;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
  margin-bottom: 2rem;
}
.breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.85rem;
  color: var(--color-text-2);
}
.breadcrumbs li {
  display: flex;
  align-items: center;
}
.breadcrumbs li + li::before {
  content: "/";
  margin: 0 0.5rem;
  color: var(--color-text-3);
}
.breadcrumbs a {
  color: var(--color-text-2);
  text-decoration: none;
  transition: color var(--transition);
}
.breadcrumbs a:hover { color: var(--color-primary); text-decoration: underline; }
.breadcrumbs [aria-current="page"] {
  color: var(--color-primary-d);
  font-weight: 500;
}

/* ==========================================================================
   PAGE CONTENT (ARTICLE)
   ========================================================================== */
.page-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-sm);
}

/* ─── Inline links inside content articles ────────────────────────────────── */
.page-content p a,
.page-content li a,
.page-content blockquote a {
  color: var(--teal-700);
  text-decoration: none;
  font-weight: 500;
  background-image: linear-gradient(var(--teal-400), var(--teal-400));
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% 2px;
  padding-bottom: 1px;
  transition: color var(--transition), background-size var(--transition-md);
}

.page-content p a:hover,
.page-content li a:hover,
.page-content blockquote a:hover {
  color: var(--teal-800);
  background-size: 100% 2px;
}

.page-content p a:focus-visible,
.page-content li a:focus-visible,
.page-content blockquote a:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: 2px;
  background-size: 100% 2px;
}


/* Headings */
.page-content h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.75px;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--teal-700) 0%, var(--blue-600) 60%, var(--violet-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-content h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--slate-800);
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
  letter-spacing: -0.3px;
}

.page-content h3 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  color: var(--slate-700);
  margin-top: 2rem;
  margin-bottom: 0.7rem;
}

.page-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Anchor links on headings */
.page-content h2 .header-anchor,
.page-content h3 .header-anchor,
.page-content h4 .header-anchor {
  opacity: 0;
  font-size: 0.8em;
  color: var(--color-text-3);
  margin-left: 0.4em;
  text-decoration: none;
  transition: opacity var(--transition);
}
.page-content h2:hover .header-anchor,
.page-content h3:hover .header-anchor,
.page-content h4:hover .header-anchor { opacity: 1; }
.page-content .header-anchor:focus { opacity: 1; }

/* Paragraphs */
.page-content p {
  margin-bottom: 1.1rem;
  color: var(--color-text);
  font-size: 0.975rem;
  line-height: 1.75;
}

/* Inline code */
.page-content :not(pre) > code {
  background: var(--teal-50);
  color: var(--teal-800);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: "Fira Code", "Cascadia Code", "Consolas", "Monaco", monospace;
  border: 1px solid var(--teal-100);
}

/* Lists */
.page-content ul,
.page-content ol {
  margin: 0.5rem 0 1.1rem 1.25rem;
}
.page-content ul { list-style: none; }
.page-content ul > li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.4rem;
  font-size: 0.975rem;
  color: var(--color-text);
  line-height: 1.7;
}
.page-content ul > li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--teal-500);
  font-size: 0.8em;
}
.page-content ol { list-style: decimal; }
.page-content ol > li {
  padding-left: 0.25rem;
  margin-bottom: 0.4rem;
  font-size: 0.975rem;
  color: var(--color-text);
  line-height: 1.7;
}

/* Nested lists */
.page-content ul ul, .page-content ul ol,
.page-content ol ul, .page-content ol ol {
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

/* Strong */
.page-content strong { font-weight: 700; color: var(--slate-800); }

/* Horizontal rule */
.page-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* Blockquote */
.page-content blockquote {
  border-left: 4px solid var(--teal-400);
  padding: 0.75rem 1.25rem;
  background: var(--teal-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  color: var(--slate-700);
  font-style: italic;
}
.page-content blockquote p { margin-bottom: 0; }

/* ==========================================================================
   CODE BLOCKS
   ========================================================================== */
.page-content pre {
  position: relative;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--teal-100);
  background: linear-gradient(180deg, #fbfffe 0%, #f7fbff 100%);
  box-shadow: var(--shadow-md);
}

/* Language label */
.page-content pre::before {
  content: attr(data-language);
  position: absolute;
  top: 0.55rem;
  left: 0.75rem;
  right: auto;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--teal-700);
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: var(--radius-sm);
  font-family: "Fira Code", monospace;
}

.page-content pre code {
  display: block;
  padding: 2.35rem 1.25rem 1.25rem;
  font-family: "Fira Code", "Cascadia Code", "Consolas", "Monaco", monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  tab-size: 2;
  background: none;
  border: none;
  color: inherit;
}

/* Copy button */
.code-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.3rem 0.5rem;
  background: #ffffff;
  border: 1px solid var(--teal-200, #99f6e4);
  border-radius: var(--radius-sm);
  color: var(--teal-700);
  font-size: 0.7rem;
  font-family: -apple-system, sans-serif;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 1;
  white-space: nowrap;
}
.code-copy-btn svg { width: 13px; height: 13px; }
.code-copy-btn:hover {
  background: var(--teal-50);
  color: var(--teal-800);
  border-color: var(--teal-300);
}
.code-copy-btn.copied {
  color: #15803d;
  border-color: #86efac;
  background: #f0fdf4;
}

/* ==========================================================================
   SYNTAX HIGHLIGHTING (Prism custom theme — light)
   ========================================================================== */
code[class*="language-"],
pre[class*="language-"] {
  background: #f7fbff;
  color: #1e293b;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #64748b;
  font-style: italic;
}

.token.punctuation   { color: #475569; }
.token.namespace      { opacity: 0.7; }
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted        { color: #c2410c; }

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted       { color: #0f766e; }

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string  { color: #0d9488; }

.token.atrule,
.token.attr-value,
.token.keyword        { color: #2563eb; }

.token.function,
.token.class-name     { color: #7c3aed; }

.token.regex,
.token.important,
.token.variable       { color: #b45309; }

.token.important,
.token.bold   { font-weight: bold; }
.token.italic          { font-style: italic; }
.token.entity          { cursor: help; }

/* YAML specific */
.language-yaml .token.key,
.language-yml .token.key { color: #2563eb; }
.language-yaml .token.string { color: #0f766e; }

/* Bash / shell */
.language-bash .token.function { color: #2563eb; }
.language-bash .token.string   { color: #0f766e; }

/* ==========================================================================
   TABLES
   ========================================================================== */
.page-content .table-wrap,
.page-content table {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  display: block;
}
.page-content table {
  border-collapse: collapse;
  min-width: 500px;
  font-size: 0.9rem;
}
.page-content thead th {
  background: var(--slate-800);
  color: var(--slate-100);
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--slate-700);
}
.page-content tbody td {
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-border);
  vertical-align: top;
  line-height: 1.6;
}
.page-content tbody tr:nth-child(even) td { background: var(--slate-50); }
.page-content tbody tr:hover td { background: var(--teal-50); }

/* ==========================================================================
   TASK LISTS / CHECKBOXES
   ========================================================================== */
.page-content .task-list-item {
  list-style: none;
  padding-left: 0.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.page-content .task-list-item::before { display: none; }
.page-content .task-list-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 2px solid var(--color-border-2);
  border-radius: 3px;
  background: white;
  cursor: pointer;
  margin-top: 0.25rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.page-content .task-list-item input[type="checkbox"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
  background-size: contain;
}
.page-content .task-list-item input[type="checkbox"]:hover {
  border-color: var(--color-primary);
}

/* ==========================================================================
   FAQ ACCORDION STYLES (applied via JS)
   ========================================================================== */
.page-content .faq-accordion {
  margin: 1.25rem 0 1.75rem;
  display: grid;
  gap: 0.65rem;
}

.page-content .faq-item {
  border: 1px solid var(--teal-100);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fcfffe 0%, #f8fcff 100%);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.page-content .faq-item[open] {
  border-color: var(--teal-300);
  box-shadow: var(--shadow-sm);
}

.page-content .faq-question-header {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  color: var(--teal-800);
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.9rem 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.page-content .faq-question-header::after {
  content: "+";
  color: var(--teal-700);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}

.page-content .faq-item[open] .faq-question-header::after {
  content: "-";
  color: var(--teal-800);
}

.page-content .faq-answer {
  padding: 0 1.05rem 1rem;
  border-top: 1px solid var(--teal-100);
}

.page-content .faq-answer > *:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   CHILD PAGES / IN THIS SECTION
   ========================================================================== */
.child-pages {
  margin-top: 2.5rem;
}
.child-pages-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-2);
  margin-bottom: 1rem;
  border: none;
  padding: 0;
}
.child-pages-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.child-page-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--slate-700);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}
.child-page-card:hover {
  border-color: var(--teal-400);
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
}
.child-page-title { flex: 1; }
.child-page-arrow {
  width: 16px;
  height: 16px;
  color: var(--color-text-3);
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}
.child-page-card:hover .child-page-arrow {
  transform: translateX(3px);
  color: var(--color-primary);
}

/* Back link */
.back-link-wrap {
  margin-top: 2rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-2);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  border: 1px solid transparent;
}
.back-link svg { width: 16px; height: 16px; transition: transform var(--transition); }
.back-link:hover {
  color: var(--color-primary);
  background: var(--teal-50);
  border-color: var(--teal-100);
}
.back-link:hover svg { transform: translateX(-3px); }

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer {
  background: var(--slate-900);
  color: var(--slate-400);
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  transition: opacity var(--transition);
}
.footer-logo:hover { opacity: 0.8; color: white; }

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--slate-500);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-nav-col h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--slate-300);
  margin-bottom: 0.85rem;
}
.footer-nav-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-nav-col a {
  font-size: 0.85rem;
  color: var(--slate-500);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav-col a:hover { color: var(--teal-400); }

.footer-bottom {
  border-top: 1px solid var(--slate-800);
  text-align: center;
  padding: 1.25rem 1.5rem;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--slate-600);
}

/* ==========================================================================
   RESPONSIVE — TABLET  (≤ 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .home-intro-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-nav {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   RESPONSIVE — MOBILE  (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {
  :root { --header-height: 60px; }

  .site-nav { display: none; }
  .mobile-menu-btn { display: flex; }

  .hero { padding: 3rem 1.25rem 2.5rem; }
  .hero-stats { gap: 1.25rem; }
  .stat-divider { display: none; }

  .sections-grid { padding: 3rem 1.25rem; }
  .home-intro { padding: 3rem 1.25rem; }

  .footer-nav { grid-template-columns: 1fr 1fr; }

  .page-layout { padding: 1.25rem 1rem 3rem; }
  .page-content { padding: 1.25rem; }
}

/* ==========================================================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .cards-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr; }
  .child-pages-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   WIDESCREEN (≥ 1600px)
   ========================================================================== */
@media (min-width: 1600px) {
  :root { --max-width: 1560px; }
}

