/* ---------------------------------------------------------------------------
   508 Guidehouse — theme styles
   Enqueued from functions.php. Also loaded into the block editor.

   White page, green, grey accents. The greens are reserved for brand moments
   — bands, buttons, the rail bar, links — and the quiet surfaces are neutral
   grey so the green reads as a choice rather than as the background.

   --brand (#1B7F4A) is the logo green: fills, bands, buttons.
   --brand-bright (#176D40) is for TEXT; the logo green drops below AA on the
   pale washes.
   --sage (#4A9270) is decorative only — 3.73 on white, never body text.
   --line-strong (#7F868A) clears 3:1 for control borders.
   ------------------------------------------------------------------------ */

/* Layout concept: document-grade. One measure column, a standards rail for
   technical detail, restrained rules instead of card soup. */

:root {
  /* Color — warm-neutral ground, forest brand, clay for deadlines */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-sunk: #EFF1F2;
  --ink: #1A1F21;
  --ink-soft: #596165;
  --line: #D7DBDD;
  --line-strong: #7F868A;
  --brand: #1B7F4A;
  --brand-bright: #176D40;
  --brand-wash: #E6F0EC;
  --sage: #4A9270;   /* decorative only — 3.73 on white, fails AA for body text */
  --flag: #8A4B1F;
  --flag-wash: #FAF0E6;

  /* Type */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Scale */
  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: 2.75rem;
  --measure: 68ch;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101314;
    --surface: #181C1E;
    --surface-sunk: #141719;
    --ink: #E8ECEE;
    --ink-soft: #A2AAAE;
    --line: #2C3134;
    --line-strong: #5A6166;
    --brand: #75D2A0;
    --brand-bright: #8CD9B0;
    --brand-wash: #17271E;
    --sage: #4A9270;
    --flag: #E0A878;
    --flag-wash: #241A12;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #101314;
  --surface: #181C1E;
  --surface-sunk: #141719;
  --ink: #E8ECEE;
  --ink-soft: #A2AAAE;
  --line: #2C3134;
  --line-strong: #5A6166;
  --brand: #75D2A0;
  --brand-bright: #8CD9B0;
  --brand-wash: #17271E;
    --sage: #4A9270;
  --flag: #E0A878;
  --flag-wash: #241A12;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.gh-prose h1, .gh-prose h2, .gh-prose h3, .gh-prose h4,
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.2;
  text-wrap: balance;
  margin: 0;
  font-weight: 600;
}

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

a { color: var(--brand-bright); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }

:focus-visible {
  outline: 3px solid var(--brand-bright);
  outline-offset: 2px;
  border-radius: 2px;
}

.gh-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.gh-skip:focus { left: 0; color: #fff; }

/* ---------- Shell ---------- */

.gh-wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.gh-band { background: var(--bg); }
.gh-band--sunk { background: var(--surface-sunk); }
.gh-band--brand { background: var(--brand); color: #fff; }
.gh-band--brand h2, .gh-band--brand h3 { color: #fff; }

.gh-section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.gh-section--tight { padding-block: clamp(2rem, 4vw, 3rem); }

/* ---------- Header ---------- */

.gh-masthead {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
}

.gh-masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: 0.875rem;
}

.gh-brandmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1875rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.gh-brandmark:hover { color: var(--ink); }

.gh-brandmark__tile {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 3px;
  flex: none;
  display: block;
}

.nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.gh-nav__list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.gh-nav__list a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}
.gh-nav__list a:hover { color: var(--brand-bright); }
.gh-nav__list a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--brand-bright);
}

/* ---------- Buttons ---------- */

.gh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  border: 1.5px solid transparent;
  cursor: pointer;
  line-height: 1.3;
}
.gh-btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.gh-btn--primary:hover { background: var(--brand-bright); border-color: var(--brand-bright); color: #fff; }
.gh-btn--ghost { color: var(--brand-bright); border-color: var(--line-strong); background: transparent; }
.gh-btn--ghost:hover { border-color: var(--brand-bright); color: var(--brand-bright); }
.gh-btn--onbrand { background: #fff; color: var(--brand); border-color: #fff; }
.gh-btn--onbrand:hover { background: var(--brand-wash); color: var(--brand); }

.gh-btn-row { display: flex; gap: 0.875rem; flex-wrap: wrap; }

/* ---------- Type helpers ---------- */

.gh-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-bright);
  margin: 0 0 0.75rem;
}
.gh-band--brand .gh-eyebrow { color: var(--brand-wash); }

.gh-lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: var(--measure);
  line-height: 1.6;
}

.gh-prose { max-width: var(--measure); display: grid; gap: 1.1rem; }
.gh-prose h2 { font-size: var(--step-2); margin-top: 1.25rem; }
.gh-prose h3 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 700; margin-top: 0.75rem; }
.gh-prose ul, .gh-prose ol { padding-left: 1.25rem; display: grid; gap: 0.5rem; }

.entry-content h1, .gh-hero h1 { font-size: var(--step-4); letter-spacing: -0.02em; }
.entry-content h2 { font-size: var(--step-3); letter-spacing: -0.015em; }
.entry-content h3 { font-size: var(--step-2); }

.gh-stack { display: grid; gap: 1.25rem; }
.gh-stack--sm { display: grid; gap: 0.75rem; }

/* ---------- Hero ---------- */

.gh-hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 5vw, 4rem); }
.gh-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) { .gh-hero__grid { grid-template-columns: 1fr; } }

.gh-hero h1 { margin-bottom: 1.25rem; }

/* Standards rail — the technical register, set apart from the plain one */
.gh-rail {
  border-left: 3px solid var(--brand);
  background: var(--surface);
  padding: 1.5rem 1.5rem 1.5rem 1.4rem;
  min-width: 0;
}
.gh-rail__title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}
.gh-rail dl { margin: 0; display: grid; gap: 0.875rem; }
.gh-rail dt {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.gh-rail dd { margin: 0.1rem 0 0; font-size: 0.875rem; color: var(--ink-soft); }

/* ---------- Grids ---------- */

.gh-grid { display: grid; gap: 1.5rem; }
.gh-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.gh-grid--3 { grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); }
.gh-grid--4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.gh-svc {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding-top: 1.25rem;
  border-top: 2px solid var(--brand);
  min-width: 0;
}
.gh-svc h3 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 700; }
.gh-svc p { color: var(--ink-soft); font-size: 0.9375rem; }
.gh-svc__link { font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.gh-svc__link:hover { text-decoration: underline; }
.gh-svc__link::after { content: " \2192"; }

.gh-note {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}
.gh-note h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; }
.gh-note p { color: var(--ink-soft); font-size: 0.9375rem; }

/* ---------- Steps (a real sequence, so numbered) ---------- */

.gh-steps { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; list-style: none; margin: 0; padding: 0; }
.gh-steps li { display: grid; gap: 0.5rem; align-content: start; min-width: 0; }
.gh-steps li::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brand-bright);
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
}
.gh-steps h3 { font-size: 1.0625rem; font-family: var(--font-body); font-weight: 700; }
.gh-steps p { color: var(--ink-soft); font-size: 0.9375rem; }

/* ---------- Tables ---------- */

.gh-table-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.gh-table-scroll table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; min-width: 480px; }
.gh-table-scroll caption { text-align: left; padding: 0.875rem 1rem; font-size: 0.875rem; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.gh-table-scroll th, .gh-table-scroll td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.gh-table-scroll thead th { background: var(--surface-sunk); font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.gh-table-scroll tbody tr:last-child td { border-bottom: 0; }
td.gh-num, th.gh-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Callout ---------- */

.gh-callout {
  border-left: 3px solid var(--flag);
  background: var(--flag-wash);
  padding: 1.25rem 1.35rem;
  display: grid;
  gap: 0.5rem;
  max-width: var(--measure);
}
.gh-callout h3 { font-size: 1.0625rem; font-family: var(--font-body); font-weight: 700; color: var(--flag); }
.gh-callout p { font-size: 0.9375rem; color: var(--ink); }

.gh-pending {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--flag-wash);
  color: var(--flag);
  border: 1px solid var(--flag);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  vertical-align: middle;
}

/* ---------- Credential strip ---------- */

.gh-creds { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; list-style: none; margin: 0; padding: 0; }
.gh-creds li {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
}

/* ---------- Pricing ---------- */

.gh-price-head { display: flex; align-items: baseline; gap: 0.4rem; }
.gh-price-head .gh-amount {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 600;
  color: var(--brand-bright);
  font-variant-numeric: tabular-nums;
}
.gh-price-head .gh-unit { font-size: 0.9375rem; color: var(--ink-soft); font-weight: 600; }

.gh-tier {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  padding: 1.5rem;
  min-width: 0;
}
.gh-tier h3 { font-size: 1.125rem; font-family: var(--font-body); font-weight: 700; }
.gh-tier p { font-size: 0.9375rem; color: var(--ink-soft); }
.gh-tier ul { margin: 0; padding-left: 1.1rem; font-size: 0.875rem; color: var(--ink-soft); display: grid; gap: 0.3rem; }

/* ---------- FAQ ---------- */

.gh-faq { max-width: var(--measure); display: grid; gap: 0; }
.gh-faq details { border-bottom: 1px solid var(--line); }
.gh-faq summary {
  cursor: pointer;
  padding: 1.1rem 0;
  font-weight: 700;
  font-size: 1.0625rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.gh-faq summary::-webkit-details-marker { display: none; }
.gh-faq summary::after { content: "+"; color: var(--brand-bright); font-size: 1.25rem; font-weight: 400; flex: none; }
.gh-faq details[open] summary::after { content: "\2212"; }
.gh-faq details > div { padding-bottom: 1.25rem; color: var(--ink-soft); display: grid; gap: 0.75rem; max-width: 62ch; }

/* ---------- CTA ---------- */

.gh-cta__inner { display: grid; gap: 1.25rem; max-width: 62ch; }
.gh-cta__inner p { color: var(--brand-wash); }

/* ---------- Footer ---------- */

.gh-foot { border-top: 1px solid var(--line); background: var(--surface); }
.gh-foot__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2rem;
  padding-block: 3rem 1.5rem;
}
.gh-foot h2 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.875rem;
}
.gh-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.gh-foot a { color: var(--ink-soft); text-decoration: none; font-size: 0.9375rem; }
.gh-foot a:hover { color: var(--brand-bright); text-decoration: underline; }
.gh-foot__legal {
  border-top: 1px solid var(--line);
  padding-block: 1.25rem 2rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.gh-foot__legal p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Before / after proof ---------- */

.gh-ba { display: grid; gap: 0; border: 1px solid var(--line); background: var(--surface); margin-bottom: 1.5rem; }
.gh-ba__head { padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--line); background: var(--surface-sunk); }
.gh-ba__head h3 { font-size: 1.0625rem; font-family: var(--font-body); font-weight: 700; }
.gh-ba__head p { font-size: 0.875rem; color: var(--ink-soft); margin-top: 0.25rem; }
.gh-ba__cols { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .gh-ba__cols { grid-template-columns: 1fr; } }
.gh-ba__col { padding: 1.25rem 1.35rem; min-width: 0; }
.gh-ba__col + .gh-ba__col { border-left: 1px solid var(--line); }
@media (max-width: 700px) { .gh-ba__col + .gh-ba__col { border-left: 0; border-top: 1px solid var(--line); } }
.gh-ba__label {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 0.75rem; display: inline-block; padding: 0.15rem 0.5rem; border-radius: 2px;
}
.gh-ba__label--before { background: var(--flag-wash); color: var(--flag); border: 1px solid var(--flag); }
.gh-ba__label--after { background: var(--brand-wash); color: var(--brand); border: 1px solid var(--brand); }
.gh-ba__col ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.45rem; font-size: 0.9375rem; color: var(--ink-soft); }
.gh-ba__foot { padding: 0.9rem 1.35rem; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-soft); display: flex; gap: 1.5rem; flex-wrap: wrap; }
.gh-ba__foot strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Tag-tree sample, for showing document structure */
.gh-tree {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem; line-height: 1.7; color: var(--ink-soft);
  background: var(--surface-sunk); border: 1px solid var(--line);
  padding: 0.9rem 1rem; overflow-x: auto; margin: 0;
}
.gh-tree .gh-ok { color: var(--brand-bright); font-weight: 600; }
.gh-tree .gh-bad { color: var(--flag); font-weight: 600; }

/* Placeholder slot for a real screenshot */
.gh-shot {
  border: 2px dashed var(--line-strong); background: var(--surface-sunk);
  padding: 1.5rem 1rem; text-align: center; font-size: 0.8125rem; color: var(--ink-soft);
  margin-bottom: 0.9rem;
}


/* ---------- White-page adjustments ---------- */
/* The rail and the credential chips were white-filled; on a white page they
   need the grey to read as panels, and flip back inside a grey band. */
.gh-rail { background: var(--surface-sunk); }
.gh-band--sunk .gh-rail { background: var(--surface); }
.gh-creds li { background: var(--surface-sunk); }
.gh-band--sunk .gh-creds li { background: var(--surface); }


/* ---------------------------------------------------------------------------
   Astra integration
   ------------------------------------------------------------------------ */

.ast-container, .site-content .ast-container { max-width: var(--wrap); }
.site { background: var(--bg); }
.entry-content a:not(.gh-btn):not(.gh-svc__link) { text-decoration: underline; }
.site :focus-visible { outline: 3px solid var(--brand-bright); outline-offset: 2px; }

/* Container width, hardened. Astra's full-width template overrides max-width
   with far higher specificity than a single class; without this the bands
   span correctly but their contents run edge to edge. */
.entry-content .gh-wrap,
.site-content .gh-wrap,
.ast-page-builder-template .gh-wrap,
.ast-separate-container .gh-wrap {
  max-width: var(--wrap) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.entry-content > .gh-band,
.site-content .gh-band { width: 100%; max-width: none; }
.ast-page-builder-template .entry-content > .gh-band { margin-left: 0; margin-right: 0; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; word-wrap: normal;
}
.screen-reader-text:focus {
  background: var(--brand); color: #fff; clip: auto; clip-path: none;
  display: block; font-size: 0.9375rem; height: auto; width: auto;
  padding: 0.75rem 1.25rem; left: 5px; top: 5px; z-index: 100000;
}

.has-gh-brand-color { color: var(--brand-bright) !important; }
.has-gh-brand-background-color { background-color: var(--brand) !important; }
.has-gh-brand-wash-background-color { background-color: var(--brand-wash) !important; }
.has-gh-sage-background-color { background-color: var(--sage) !important; }
.has-gh-ink-color { color: var(--ink) !important; }
.has-gh-ink-soft-color { color: var(--ink-soft) !important; }
.has-gh-flag-color { color: var(--flag) !important; }

.site-branding img, .ast-site-identity img, .custom-logo-link img {
  height: 44px; width: auto; max-width: 100%;
}
@media (max-width: 600px) {
  .site-branding img, .ast-site-identity img, .custom-logo-link img { height: 36px; }
}
.gh-header-brand { background: var(--brand); }
.gh-header-brand .site-title a, .gh-header-brand .main-header-menu a { color: #fff; }

.editor-styles-wrapper { background: var(--bg); color: var(--ink); font-family: var(--font-body); }
