:root {
  /* ── Refreshing Summer Fun palette ─────────────────────────── */
  --sky:         #8ecae6;   /* Sky Blue – backgrounds, borders   */
  --ocean:       #219ebc;   /* Blue Green – brand, links         */
  --navy:        #023047;   /* Deep Space Blue – text, header    */
  --amber:       #ffb703;   /* Amber Flame – accents, hover      */
  --tangerine:   #fb8500;   /* Tiger Orange – CTAs, active       */

  /* ── Semantic aliases ───────────────────────────────────────── */
  --bg:          #eef7fb;   /* sky-tinted page background        */
  --surface:     #ffffff;
  --text:        #023047;   /* --navy                            */
  --muted:       #3a6a80;
  --border:      #b6dff0;   /* soft sky                          */
  --brand:       #219ebc;   /* --ocean                           */
  --brand-soft:  #d0edf7;   /* pale sky                          */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  color: var(--tangerine);
  text-decoration: underline;
}

.container {
  width: min(1240px, 95vw);
  margin: 0 auto;
}

/* ── Site Header ──────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  border-bottom: 1px solid rgba(142, 202, 230, 0.15);
  box-shadow: 0 2px 20px rgba(2, 48, 71, 0.45);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Full-bleed header — override the global container cap */
.site-header .container {
  max-width: none;
  width: 100%;
  padding: 0 2rem;
}

.header-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

/* ── Brand ────────────────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--sky);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.2s;
}

.brand-logo {
  display: block;
  flex-shrink: 0;
  border-radius: 8px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand:hover {
  color: var(--amber);
  text-decoration: none;
}

.brand:hover .brand-logo {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 0 14px rgba(255, 183, 3, 0.45);
}

/* ── Primary nav ──────────────────────────────────────────────── */
.primary-nav {
  flex: 1;
  overflow: hidden;
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  position: relative;
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  color: rgba(142, 202, 230, 0.8);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

/* Animated underline bar */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(142, 202, 230, 0.1);
  text-decoration: none;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link--active {
  color: #fff;
  background: rgba(142, 202, 230, 0.12);
}

.nav-link--active::after {
  transform: scaleX(1);
  background: var(--tangerine);
}

/* ── Search pill button ───────────────────────────────────────── */
.nav-search-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 183, 3, 0.12);
  border: 1px solid rgba(255, 183, 3, 0.35);
  color: var(--amber);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.18s;
}

.nav-search-btn:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--navy);
  box-shadow: 0 0 16px rgba(255, 183, 3, 0.4);
  transform: translateY(-1px);
  text-decoration: none;
}

.page-content {
  flex: 1;
  padding: 2rem 0 4rem;
}

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

.breadcrumbs li + li::before {
  content: ">";
  margin: 0 0.35rem 0 0.15rem;
  color: var(--ocean);
}

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

.content-layout.no-sidebar {
  grid-template-columns: 1fr;
}

.side-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ocean);
  border-radius: 12px;
  padding: 0.9rem;
  position: sticky;
  top: 4.3rem;
}

.side-nav h2 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

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

.side-nav li {
  margin: 0.15rem 0;
}

.sub-nav {
  margin: 0.35rem 0 0.4rem 0.8rem;
  border-left: 2px solid var(--sky);
  padding-left: 0.7rem;
}

.side-nav a.active {
  font-weight: 600;
  color: var(--tangerine);
}

.doc-content {
  min-width: 0;
}

.doc-content > h1 {
  position: relative;
  margin: 0 0 1.4rem;
  padding: 0 0 0.9rem;
  color: var(--navy);
  font-size: clamp(2rem, 3.4vw, 3rem);
  letter-spacing: -0.03em;
}

.doc-content > h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(180px, 36vw);
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ocean), var(--amber), var(--tangerine));
}

.doc-content :is(h2, h3, h4) {
  color: var(--navy);
  line-height: 1.25;
  scroll-margin-top: 5.5rem;
}

.doc-content h2 {
  margin-top: 2.6rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.9rem;
  border-left: 4px solid var(--ocean);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, rgba(142, 202, 230, 0.22), rgba(142, 202, 230, 0.04));
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

.doc-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--amber);
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
}

.doc-content h4 {
  margin-top: 1.6rem;
  margin-bottom: 0.65rem;
  color: var(--ocean);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero {
  padding: 2rem;
  border: 1px solid var(--sky);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy) 0%, #034d74 100%);
  color: #fff;
}

.hero--landing {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 2rem;
  padding: 2.4rem;
  border: 1px solid rgba(142, 202, 230, 0.35);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 183, 3, 0.18), transparent 30%),
    radial-gradient(circle at bottom left, rgba(33, 158, 188, 0.2), transparent 32%),
    linear-gradient(135deg, #01293e 0%, #023047 50%, #034d74 100%);
  box-shadow: 0 18px 50px rgba(2, 48, 71, 0.22);
}

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

.hero--landing::before {
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 183, 3, 0.24), transparent 68%);
}

.hero--landing::after {
  bottom: -90px;
  left: -70px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(142, 202, 230, 0.18), transparent 68%);
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(142, 202, 230, 0.35);
  border-radius: 999px;
  background: rgba(142, 202, 230, 0.1);
  color: var(--sky);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero--landing h1 {
  max-width: 12ch;
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #f5fbff;
}

.hero-lead {
  max-width: 62ch;
  margin: 0;
  color: #d7eef8;
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.hero-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  flex-shrink: 0;
}

.hero-cta--primary {
  background: linear-gradient(135deg, var(--amber), #ffc83d);
  color: var(--navy);
  box-shadow: 0 10px 24px rgba(255, 183, 3, 0.28);
}

.hero-cta--primary .hero-cta__icon {
  background: rgba(2, 48, 71, 0.12);
  color: var(--navy);
}

.hero-cta--primary:hover {
  color: var(--navy);
  box-shadow: 0 14px 28px rgba(255, 183, 3, 0.34);
}

.hero-cta--secondary {
  background: rgba(142, 202, 230, 0.1);
  border-color: rgba(142, 202, 230, 0.35);
  color: #f5fbff;
}

.hero-cta--secondary .hero-cta__icon {
  background: rgba(33, 158, 188, 0.2);
  color: var(--sky);
}

.hero-cta--secondary:hover {
  background: rgba(142, 202, 230, 0.16);
  border-color: rgba(142, 202, 230, 0.48);
  color: #fff;
  box-shadow: 0 12px 24px rgba(2, 48, 71, 0.24);
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-highlights li {
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(142, 202, 230, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7eef8;
  font-size: 0.88rem;
}

.hero-panel {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-panel__orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
}

.hero-panel__orb--one {
  top: 16px;
  right: 34px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(255, 183, 3, 0.45), transparent 68%);
}

.hero-panel__orb--two {
  bottom: 10px;
  left: 14px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(33, 158, 188, 0.4), transparent 68%);
}

.hero-panel__card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 190px;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.hero-panel__card--accent {
  top: 18px;
  left: 28px;
  background: linear-gradient(145deg, rgba(255, 183, 3, 0.95), rgba(251, 133, 0, 0.92));
  color: var(--navy);
  box-shadow: 0 18px 34px rgba(251, 133, 0, 0.24);
}

.hero-panel__card--glass {
  right: 18px;
  bottom: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(142, 202, 230, 0.22);
  color: #eef9ff;
  box-shadow: 0 18px 34px rgba(2, 48, 71, 0.18);
}

.hero-panel__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.88;
}

.hero-panel__card strong,
.hero-panel__card p {
  margin: 0;
  font-size: 1rem;
}

.hero h1 {
  color: var(--sky);
  margin-top: 0;
}

.hero p {
  color: #c8e8f5;
}

.hero a {
  color: var(--amber);
  font-weight: 600;
}

.hero a:hover {
  color: var(--tangerine);
}

/* Landing hero CTA buttons must override the generic .hero link colors */
.hero--landing .hero-cta--primary,
.hero--landing .hero-cta--primary:hover,
.hero--landing .hero-cta--primary:visited {
  color: var(--navy);
}

.hero--landing .hero-cta--secondary,
.hero--landing .hero-cta--secondary:visited {
  color: #f5fbff;
}

.hero--landing .hero-cta--secondary:hover {
  color: #fff;
}

@media (max-width: 920px) {
  .hero--landing {
    grid-template-columns: 1fr;
  }

  .hero--landing h1 {
    max-width: none;
  }

  .hero-panel {
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  .hero--landing {
    padding: 1.6rem;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .hero-panel {
    min-height: 220px;
  }

  .hero-panel__card--accent {
    left: 0;
  }

  .hero-panel__card--glass {
    right: 0;
  }
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h2 {
  margin-top: 2rem;
}


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

/* ── CTA Cards ──────────────────────────────────────────────── */
.cta-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}

.cta-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--card-color, var(--ocean));
  border-radius: 14px;
  padding: 1.3rem 1.2rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-top-color 0.18s ease;
}

.cta-card:hover {
  box-shadow: 0 6px 24px rgba(2, 48, 71, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
  border-top-color: var(--card-color, var(--amber));
}

.cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  flex-shrink: 0;
}

.cta-icon--sm {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
}

.cta-icon--sm svg {
  width: 20px;
  height: 20px;
}

.cta-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--navy);
}

.cta-title--sm {
  font-size: 0.95rem;
}

.cta-tagline {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.cta-arrow {
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--card-color, var(--ocean));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--ocean);
  border-radius: 12px;
  padding: 1rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  border-top-color: var(--amber);
  box-shadow: 0 4px 18px rgba(2, 48, 71, 0.1);
}

.topic-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.3rem;
}

.pagination-nav {
  margin-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.pagination-nav a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  color: var(--ocean);
  font-weight: 500;
}

.pagination-nav a:hover {
  background: var(--brand-soft);
  color: var(--navy);
  text-decoration: none;
}

.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.7rem;
  border-radius: 8px;
  border: 2px solid var(--sky);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}

.search-input:focus {
  border-color: var(--ocean);
}

.search-results {
  margin-top: 1rem;
}

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

  .side-nav {
    position: static;
  }
}

.page-content > article,
.page-content > section,
.page-content > ul,
.page-content > ol,
.page-content > p,
.page-content > pre,
.page-content > table,
.page-content > blockquote {
  background: var(--surface);
}

/* ── FAQ & Common Mistakes/Pitfalls styling ───────────────────── */

/* Base: move leading bold labels onto their own line */
.doc-content p > strong:first-child,
.doc-content li > strong:first-child,
.doc-content li > p > strong:first-child {
  display: block;
  margin-bottom: 0.3rem;
}

/* Shared visual style for FAQ and Common Mistakes/Pitfalls entries.
   Apply one consistent treatment to all supported markup variants:
   - FAQ paragraphs: p > strong
   - Pitfall lists: li > strong
   - Pitfall lists: li > p > strong */
.doc-content > :is(h2, h3, h4) + p:has(> strong:first-child):not(:has(+ ul, + ol)) > strong:first-child,
.doc-content > p:has(> strong:first-child) + p:has(> strong:first-child) > strong:first-child,
.doc-content > :is(h2, h3, h4) + :is(ul, ol) li > strong:first-child,
.doc-content > :is(h2, h3, h4) + :is(ul, ol) li > p > strong:first-child {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--brand-soft);
  border-left: 3px solid var(--ocean);
  border-radius: 0 6px 6px 0;
  padding: 0.45rem 0.7rem;
  margin-bottom: 0.4rem;
}

/* Mistakes/pitfalls lists: cover both HTML variants
   - li > strong (common in many pages)
   - li > p > strong (generated on some pages)
   The selector is structural, not title-based, so it works with
   "Common Mistakes", "Common Pitfalls", and similar headings. */
.doc-content > :is(h2, h3, h4) + :is(ul, ol):has(> li > strong:first-child, > li > p > strong:first-child) {
  margin-left: 0;
  padding-left: 0;
  padding-inline-start: 0;
}

.doc-content > :is(h2, h3, h4) + :is(ul, ol) li:has(> strong:first-child, > p > strong:first-child) {
  list-style: none;
  margin-bottom: 0.8rem;
}

.doc-content > :is(h2, h3, h4) + :is(ul, ol) li:last-child:has(> strong:first-child, > p > strong:first-child) {
  margin-bottom: 0;
}

.doc-content > :is(h2, h3, h4) + :is(ul, ol) li > p:has(> strong:first-child) {
  margin: 0;
}

pre,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.93em;
}

/* Inline code */
:not(pre) > code {
  background: #d0edf7;
  color: #023047;
  border: 1px solid #b6dff0;
  border-radius: 4px;
  padding: 0.15em 0.4em;
}

/* Prism block wrapper
   Uses Deep Space Blue (#023047) so blocks feel native to the palette
   rather than an alien dark rectangle on the sky-blue background.    */
pre[class*="language-"],
pre {
  padding: 1.1rem 1.2rem;
  border-radius: 10px;
  border: 1px solid #1a5f7a;
  border-top: 3px solid #219ebc;   /* ocean accent line */
  overflow-x: auto;
  background: #023047;
  color: #cde9f5;
  line-height: 1.6;
  margin: 1.2rem 0;
  box-shadow: 0 2px 12px rgba(2, 48, 71, 0.15);
}

/* ── Prism "Summer Palette" tokens on Deep Space Blue bg ────────
   Keywords:   Tiger Orange  #fb8500
   Strings:    Amber Flame   #ffb703
   Functions:  Sky Blue      #8ecae6
   Numbers:    Blue Green    #219ebc  (brighter variant)
   Comments:   muted sky
   Operators:  pale sky
   ─────────────────────────────────────────────────────────────── */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata            { color: #5d9ab5; font-style: italic; }

.token.punctuation      { color: #89c4de; }

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol           { color: #4ecdc4; }

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

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

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

.token.function         { color: #8ecae6; }

.token.regex,
.token.important        { color: #ffd166; }

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

.token.deleted          { color: #e07070; }
.token.inserted         { color: #ffb703; }

.site-footer {
  border-top: 2px solid var(--sky);
  background: var(--navy);
  color: var(--sky);
  padding: 1.2rem 0 2rem;
}

.site-footer a {
  color: var(--amber);
}

.site-footer a:hover {
  color: var(--tangerine);
}
