/* ============================================================
   GKI Docs Helper — Shared Stylesheet (Light Mode)
   Brand: GitKraken Celestial — Inter, Major Third 1.250
   Scoped to .gki-docs-page (body class added by plugin)
   ============================================================ */

/* ---------- Custom Properties (Light Mode) ------------------- */
:root {
  /* Brand primaries */
  --gki-purple: #7900C9;
  --gki-purple-hover: #5627D8;
  --gki-blue: #3F36BA;
  --gki-teal: #15777E;

  /* Accent — purple is the primary action/link color */
  --gki-accent: #7900C9;
  --gki-accent-hover: #5627D8;

  /* Text — from brand dark palette, inverted for light bg */
  --gki-text: #1C1C1C;
  --gki-text-secondary: #414141;
  --gki-text-muted: #636568;
  --gki-text-dim: #797b80;

  /* Backgrounds */
  --gki-bg: #FFFFFF;
  --gki-bg-subtle: #F5F6F8;
  --gki-bg-offset: #EDEEF1;

  /* Borders — from brand palette */
  --gki-border: #C1C2C3;
  --gki-border-light: #E0E1E3;
  --gki-border-strong: #ADB8C2;

  /* Callout colors */
  --gki-info-bg: #EEF2FF;
  --gki-info-border: #C7D2FE;
  --gki-info-text: #3F36BA;
  --gki-info-icon: #3F36BA;
  --gki-warn-bg: #FEF9EE;
  --gki-warn-border: #F0DDB8;
  --gki-warn-text: #8B6914;
  --gki-warn-icon: #B8860B;
  --gki-tip-bg: #EDFCF9;
  --gki-tip-border: #B0E6DB;
  --gki-tip-text: #0E5C63;
  --gki-tip-icon: #15777E;
  --gki-danger-bg: #FEF1F4;
  --gki-danger-border: #F5C2CE;
  --gki-danger-text: #9E2040;

  /* Spacing & shape */
  --gki-radius: 8px;
  --gki-radius-lg: 12px;
  --gki-shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --gki-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --gki-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);

  /* Typography — Inter, Major Third */
  --gki-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gki-font-mono: "SF Mono", "Cascadia Code", "Fira Code", Consolas, monospace;
}

/* ---------- Reset scope -------------------------------------- */
.gki-page * {
  box-sizing: border-box;
}
.gki-page {
  font-family: var(--gki-font);
  color: var(--gki-text);
  line-height: 1.7;
  max-width: 860px;
  margin: 0 auto;
}

/* ---------- Parsedown cleanup -------------------------------- */
.gki-page p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

/* ---------- Breadcrumb --------------------------------------- */
.gki-breadcrumb {
  display: flex !important;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--gki-text-muted);
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gki-border-light);
}
.gki-breadcrumb a {
  color: var(--gki-accent);
  text-decoration: none;
  font-weight: 500;
}
.gki-breadcrumb a:hover {
  text-decoration: underline;
}
.gki-breadcrumb .gki-crumb-sep {
  color: var(--gki-border-strong);
  user-select: none;
}
.gki-breadcrumb .gki-crumb-current {
  color: var(--gki-text-secondary);
  font-weight: 500;
}

/* ---------- Page title (Major Third scale) ------------------- */
.gki-page-title {
  font-size: 2.441rem; /* H1 per Major Third */
  font-weight: 700;
  color: var(--gki-text);
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.gki-page-updated {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--gki-text-muted);
  background: var(--gki-bg-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

/* ---------- Intro text --------------------------------------- */
.gki-intro {
  font-size: 1.08rem;
  color: var(--gki-text-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
}

/* ---------- Requirements card -------------------------------- */
.gki-requirements {
  background: var(--gki-bg-subtle);
  border: 1px solid var(--gki-border-light);
  border-left: 4px solid var(--gki-purple);
  border-radius: var(--gki-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.gki-requirements-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gki-purple);
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.gki-requirements-title svg {
  flex-shrink: 0;
}
.gki-req-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.5rem 2rem;
}
@media (max-width: 600px) {
  .gki-req-grid {
    grid-template-columns: 1fr !important;
  }
}
.gki-req-item {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.93rem;
  line-height: 1.55;
  padding: 0.25rem 0;
}
.gki-req-label {
  font-weight: 600;
  color: var(--gki-text);
  white-space: nowrap;
}
.gki-req-value {
  color: var(--gki-text-secondary);
}
.gki-req-value a {
  color: var(--gki-accent);
  text-decoration: none;
}
.gki-req-value a:hover {
  text-decoration: underline;
}

/* ---------- Hero figure -------------------------------------- */
.gki-hero-figure {
  margin: 0 0 2.5rem 0;
  padding: 0;
}
.gki-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--gki-border-light);
  border-radius: var(--gki-radius-lg);
  box-shadow: var(--gki-shadow-md);
}
.gki-hero-figure figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gki-text-muted);
  margin-top: 0.6rem;
}

/* ---------- Sections ----------------------------------------- */
.gki-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--gki-border-light);
}
.gki-section:last-of-type {
  border-bottom: none;
}
.gki-section-title {
  font-size: 1.563rem; /* H3 per Major Third */
  font-weight: 700;
  color: var(--gki-text);
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gki-border-light);
  display: inline-block;
}
.gki-subsection-title {
  font-size: 1.25rem; /* H4 per Major Third */
  font-weight: 600;
  color: var(--gki-text);
  margin: 2rem 0 0.75rem 0;
}

/* ---------- Callout boxes ------------------------------------ */
.gki-callout {
  border-radius: var(--gki-radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.93rem;
  line-height: 1.6;
  display: flex !important;
  gap: 0.75rem;
  align-items: flex-start;
}
.gki-callout p {
  margin: 0;
}
.gki-callout p + p {
  margin-top: 0.5rem;
}
.gki-callout-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
}
.gki-callout--tip {
  background: var(--gki-tip-bg);
  border: 1px solid var(--gki-tip-border);
  color: var(--gki-tip-text);
}
.gki-callout--info {
  background: var(--gki-info-bg);
  border: 1px solid var(--gki-info-border);
  color: var(--gki-info-text);
}
.gki-callout--warn {
  background: var(--gki-warn-bg);
  border: 1px solid var(--gki-warn-border);
  color: var(--gki-warn-text);
}
.gki-callout a {
  font-weight: 600;
  text-decoration: underline;
}
.gki-callout--tip a  { color: var(--gki-teal); }
.gki-callout--info a { color: var(--gki-blue); }
.gki-callout--warn a { color: var(--gki-warn-text); }

/* ---------- Step flow ---------------------------------------- */
.gki-steps {
  counter-reset: gki-step;
  list-style: none !important;
  padding: 0 !important;
  margin: 1.25rem 0;
}
.gki-step {
  counter-increment: gki-step;
  display: flex !important;
  gap: 1rem;
  padding: 0.75rem 0;
  align-items: flex-start;
}
.gki-step + .gki-step {
  border-top: 1px dashed var(--gki-border-light);
}
.gki-step::before {
  content: counter(gki-step) !important;
  flex-shrink: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  background: var(--gki-purple) !important;
  color: #fff !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  border-radius: 50% !important;
  margin-top: 0.1rem;
}
.gki-step-content {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.65;
}
.gki-step-content strong {
  color: var(--gki-text);
}
.gki-step-content code {
  background: var(--gki-bg-offset);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--gki-font-mono);
  font-size: 0.88em;
  color: var(--gki-purple);
}

/* ---------- Screenshot figures ------------------------------- */
.gki-figure {
  margin: 1.5rem 0;
  padding: 0;
}
.gki-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--gki-border-light);
  border-radius: var(--gki-radius);
  box-shadow: var(--gki-shadow-sm);
}
.gki-figure figcaption {
  text-align: center;
  font-size: 0.83rem;
  color: var(--gki-text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ---------- Inline lists ------------------------------------- */
.gki-list {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
  line-height: 1.75;
}
.gki-list li {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}
.gki-list li strong {
  color: var(--gki-text);
}

/* ---------- Collapsible details/summary ---------------------- */
.gki-details {
  border: 1px solid var(--gki-border-light);
  border-radius: var(--gki-radius);
  margin: 1.25rem 0;
  overflow: hidden;
}
.gki-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: var(--gki-bg-subtle);
  cursor: pointer;
  font-family: var(--gki-font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gki-text);
  list-style: none;
  transition: background 0.15s ease;
}
.gki-summary::-webkit-details-marker {
  display: none;
}
.gki-summary::marker {
  display: none;
  content: "";
}
.gki-summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--gki-text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.gki-details[open] .gki-summary::after {
  transform: rotate(180deg);
}
.gki-summary:hover {
  background: var(--gki-bg-offset);
}
.gki-details-body {
  padding: 1rem 1.15rem;
}

/* ---------- Related pages card grid -------------------------- */
.gki-related {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}
.gki-related-title {
  font-size: 1.563rem;
  font-weight: 700;
  color: var(--gki-text);
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gki-border-light);
  display: inline-block;
}
.gki-card-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 1rem !important;
}
@media (max-width: 768px) {
  .gki-card-grid {
    grid-template-columns: 1fr !important;
  }
}
/* Hide Parsedown-injected junk */
.gki-card-grid > br,
.gki-card-grid > p {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}
.gki-card {
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  background: var(--gki-bg) !important;
  border: 1px solid var(--gki-border-light) !important;
  border-radius: var(--gki-radius) !important;
  padding: 1.25rem !important;
  min-height: 140px;
  aspect-ratio: 1.2 / 1;
  text-decoration: none;
  color: var(--gki-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  box-shadow: var(--gki-shadow-sm);
}
.gki-card > br {
  display: none !important;
}
.gki-card:hover {
  border-color: var(--gki-purple) !important;
  box-shadow: 0 4px 16px -2px rgba(121,0,201,0.15), 0 2px 4px -2px rgba(0,0,0,0.06);
  transform: translateY(-3px);
  background: var(--gki-bg-subtle) !important;
}
.gki-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gki-text);
  margin: 0 0 0.3rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.gki-card-arrow {
  flex-shrink: 0;
  color: var(--gki-text-dim);
  transition: color 0.15s ease, transform 0.15s ease;
}
.gki-card:hover .gki-card-arrow {
  color: var(--gki-purple);
  transform: translateX(2px);
}
.gki-card-desc {
  font-size: 0.83rem;
  color: var(--gki-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ---------- Links (global in gki-page) ----------------------- */
.gki-page a {
  color: var(--gki-accent);
}
.gki-page a:hover {
  color: var(--gki-accent-hover);
}

/* ---------- Exploration notes -------------------------------- */
.exploration-notes {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--gki-bg-subtle);
  border: 1px solid var(--gki-border-light);
  color: var(--gki-text-secondary);
  border-radius: var(--gki-radius);
}
.exploration-notes h2 {
  font-size: 1.1rem;
  margin-top: 0;
  color: var(--gki-text);
}

/* ============================================================
   ELEMENTOR / THEME OVERRIDES
   These rules use high-specificity selectors + !important to
   beat Elementor and theme CSS that fades headings or breaks
   our layout.
   ============================================================ */

/* Kill the dark theme background — Elementor kit paints body dark */
body.gki-docs-page {
  background: #FFFFFF !important;
  color: #1C1C1C !important;
}

/* Force all heading colors — Elementor themes override h1-h4 */
.gki-docs-page .gki-page h1,
.gki-docs-page .gki-page h2,
.gki-docs-page .gki-page h3,
.gki-docs-page .gki-page h4 {
  color: #1C1C1C !important;
  font-family: var(--gki-font) !important;
}

/* Named heading classes — extra specificity to be safe */
.gki-docs-page .gki-page-title {
  color: #1C1C1C !important;
}
.gki-docs-page .gki-section-title {
  color: #1C1C1C !important;
}
.gki-docs-page .gki-subsection-title {
  color: #1C1C1C !important;
}
.gki-docs-page .gki-related-title {
  color: #1C1C1C !important;
}

/* Force body text readable */
.gki-docs-page .gki-page p {
  color: #414141 !important;
}
.gki-docs-page .gki-intro {
  color: #414141 !important;
}

/* Force link colors */
.gki-docs-page .gki-page a {
  color: var(--gki-accent) !important;
}
.gki-docs-page .gki-page a:hover {
  color: var(--gki-accent-hover) !important;
}

/* Content area background */
.gki-docs-page .elementor-widget-theme-post-content .elementor-widget-container {
  background: var(--gki-bg);
  padding: 2rem;
  border-radius: var(--gki-radius-lg);
}

/* Force ALL links in sidebars dark — Elementor kit paints links pink */
body.gki-docs-page .gki-sidebar a,
body.gki-docs-page .gki-sidebar a:link,
body.gki-docs-page .gki-sidebar a:visited,
body.gki-docs-page .gki-nav-item a,
body.gki-docs-page .gki-nav-item a:link,
body.gki-docs-page .gki-nav-item a:visited,
body.gki-docs-page .gki-nav-list a,
body.gki-docs-page .gki-nav-list a:link,
body.gki-docs-page .gki-nav-list a:visited {
  color: #414141 !important;
}
body.gki-docs-page .gki-sidebar a:hover,
body.gki-docs-page .gki-nav-item a:hover,
body.gki-docs-page .gki-nav-list a:hover {
  color: #1C1C1C !important;
}
body.gki-docs-page .gki-nav-item--active a,
body.gki-docs-page .gki-nav-item--active a:link,
body.gki-docs-page .gki-nav-item--active a:visited,
body.gki-docs-page .gki-nav-list .current-menu-item > a {
  color: #1C1C1C !important;
}

/* Force TOC links dark */
body.gki-docs-page .gki-toc-link,
body.gki-docs-page .gki-toc-link:link,
body.gki-docs-page .gki-toc-link:visited {
  color: #414141 !important;
}
body.gki-docs-page .gki-toc-link:hover {
  color: #1C1C1C !important;
}
body.gki-docs-page .gki-toc-link.gki-toc-active {
  color: #1C1C1C !important;
}

/* Force nav title dark */
body.gki-docs-page .gki-nav-title,
body.gki-docs-page .gki-nav-title:link,
body.gki-docs-page .gki-nav-title:visited {
  color: #1C1C1C !important;
}

/* Footer in our template context */
body.gki-docs-page #site-footer {
  background: #FFFFFF !important;
}

/* Image zoom/expand on click */
.gki-page img {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gki-page img:hover {
  box-shadow: var(--gki-shadow-md);
}
.gki-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  cursor: zoom-out;
  padding: 2rem;
  animation: gki-fade-in 0.2s ease;
}
.gki-lightbox img {
  max-width: 95%;
  max-height: 95vh;
  border-radius: var(--gki-radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  cursor: zoom-out;
  object-fit: contain;
}
@keyframes gki-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   LAYOUT — 3-Column Custom Template
   ============================================================ */

.gki-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 860px) 220px;
  justify-content: center;
  gap: 0 2.5rem;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 2rem 2rem;
  font-family: var(--gki-font);
  color: var(--gki-text);
  background: var(--gki-bg);
  min-height: calc(100vh - 80px);
}

/* --- Left sidebar --- */
.gki-sidebar--left {
  position: sticky;
  top: 2rem;
  align-self: start;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gki-border-light) transparent;
}

.gki-nav-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gki-text);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--gki-border-light);
}
.gki-nav-title:hover {
  color: var(--gki-accent);
}

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

.gki-nav-item {
  margin: 0;
}

.gki-nav-item a {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.87rem;
  color: var(--gki-text-secondary);
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  line-height: 1.4;
}

.gki-nav-item a:hover {
  color: var(--gki-text);
  background: var(--gki-bg-subtle);
}

.gki-nav-item--active a {
  color: var(--gki-text);
  font-weight: 600;
  background: var(--gki-bg-subtle);
  border-left-color: var(--gki-purple);
}

/* WP menu sub-menu compatibility */
.gki-nav-list .sub-menu {
  list-style: none;
  padding-left: 1rem;
  margin: 0;
}
.gki-nav-list .current-menu-item > a {
  color: var(--gki-text);
  font-weight: 600;
  background: var(--gki-bg-subtle);
  border-left-color: var(--gki-purple);
}

/* --- Content area --- */
.gki-content-main {
  min-width: 0;
  background: var(--gki-bg);
}

/* In template mode, .gki-page width is controlled by the grid */
.gki-content-main .gki-page {
  max-width: none;
}

/* --- Right sidebar --- */
.gki-sidebar--right {
  position: sticky;
  top: 2rem;
  align-self: start;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gki-border-light) transparent;
}

/* Sidebar TOC styling */
.gki-sidebar-toc .gki-toc {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}

.gki-sidebar-toc .gki-toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gki-text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gki-border-light);
}

.gki-sidebar-toc .gki-toc-link {
  font-size: 0.83rem;
  line-height: 1.35;
  padding: 0.3rem 0 0.3rem 0.75rem;
}

.gki-sidebar-toc .gki-toc-link.gki-toc-active {
  color: var(--gki-text);
  border-left-color: var(--gki-purple);
  font-weight: 500;
}

/* --- Responsive layout --- */
@media (max-width: 1100px) {
  .gki-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    padding: 1.5rem 2rem;
  }
  .gki-sidebar--right {
    display: none;
  }
}

@media (max-width: 768px) {
  .gki-layout {
    grid-template-columns: 1fr;
    padding: 1rem 1.5rem;
  }
  .gki-sidebar--left {
    position: static;
    max-height: none;
    overflow: visible;
    border-bottom: 1px solid var(--gki-border-light);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
  /* Show nav as horizontal scroll on mobile */
  .gki-nav-list {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  .gki-nav-item a {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 4px 4px 0 0;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
  }
  .gki-nav-item--active a {
    color: var(--gki-text);
    border-bottom-color: var(--gki-purple);
    border-left: none;
  }
}

/* ============================================================
   MARKDOWN ELEMENT STYLING (V1 / Markdown-based content)
   ============================================================ */

/* Headings rendered from Markdown ## / ### */
.gki-page > h2:not([class]),
.gki-page > h3:not([class]),
.gki-page > h4:not([class]) {
  font-family: var(--gki-font);
}
.gki-page > h2:not([class]) {
  font-size: 1.563rem;
  font-weight: 700;
  color: var(--gki-text);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gki-border-light);
  display: inline-block;
}
.gki-page > h3:not([class]) {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gki-text);
  margin: 1.5rem 0 0.75rem 0;
}
.gki-page > h4:not([class]) {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gki-text);
  margin: 1.25rem 0 0.5rem 0;
}

/* Paragraphs from Markdown */
.gki-page > p:not([class]):not(:empty) {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--gki-text-secondary);
  margin-bottom: 1rem;
}

/* Blockquotes → styled info boxes */
.gki-page > blockquote {
  background: var(--gki-bg-subtle);
  border-left: 4px solid var(--gki-purple);
  border-radius: 0 var(--gki-radius) var(--gki-radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.93rem;
  color: var(--gki-text-secondary);
}
.gki-page > blockquote p {
  margin: 0 0 0.25rem 0;
}

/* Ordered lists from Markdown → numbered step circles */
.gki-page > ol:not([class]) {
  counter-reset: gki-md-step;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}
.gki-page > ol:not([class]) > li {
  counter-increment: gki-md-step;
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem 0;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.65;
  border-top: 1px dashed var(--gki-border-light);
}
.gki-page > ol:not([class]) > li:first-child {
  border-top: none;
}
.gki-page > ol:not([class]) > li::before {
  content: counter(gki-md-step);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--gki-purple);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  margin-top: 0.1rem;
}

/* Unordered lists from Markdown */
.gki-page > ul:not([class]) {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
  line-height: 1.75;
}
.gki-page > ul:not([class]) > li {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

/* Horizontal rules */
.gki-page > hr {
  border: none;
  height: 1px;
  background: var(--gki-border-light);
  margin: 2rem 0;
}

/* Inline code from Markdown */
.gki-page code:not([class]) {
  background: var(--gki-bg-offset);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--gki-font-mono);
  font-size: 0.88em;
  color: var(--gki-purple);
}

/* Kbd elements (V1 uses for "Last updated") */
.gki-page kbd {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--gki-text-muted);
  background: var(--gki-bg-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-family: var(--gki-font);
  margin-bottom: 1.5rem;
}

/* Figures from Markdown (without gki-figure class) */
.gki-page > figure:not([class]) {
  margin: 1.5rem 0;
  padding: 0;
}
.gki-page > figure:not([class]) img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--gki-border-light);
  border-radius: var(--gki-radius);
  box-shadow: var(--gki-shadow-sm);
}
.gki-page > figure:not([class]) figcaption {
  text-align: center;
  font-size: 0.83rem;
  color: var(--gki-text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}
