/* Gizlen Global — cache-safe layout recovery and discovery pass.
   This file is intentionally loaded last. It restores the complete navigation,
   prevents partial-width desktop sections, and locks responsive composition. */

:root {
  --gg-content-max: 1210px;
  --gg-shell-max: 1450px;
  --gg-layout-gutter: clamp(20px, 3vw, 34px);
}

/* The header needs a wider shell than article content once Book and Tools are
   present. Content sections retain the more readable 1210px measure. */
body.gg-refined .gg-nav-row {
  width: min(calc(100% - (2 * var(--gg-layout-gutter))), var(--gg-shell-max)) !important;
}

body.gg-refined .gg-primary-nav {
  gap: clamp(13px, 1.25vw, 22px) !important;
}

body.gg-refined .gg-primary-nav a {
  white-space: nowrap !important;
}

/* About: the second portrait was removed. The remaining founder profile is a
   deliberate editorial split, never the old 210px photo/text grid. */
body.page-about .section .container.founder.founder-text-only {
  display: block !important;
  width: min(calc(100% - (2 * var(--gg-layout-gutter))), var(--gg-content-max)) !important;
  max-width: var(--gg-content-max) !important;
}

body.page-about .founder-text-only .founder-profile-copy {
  display: grid !important;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr) !important;
  column-gap: clamp(44px, 6vw, 82px) !important;
  row-gap: 14px !important;
  width: 100% !important;
}

body.page-about .founder-text-only .founder-profile-copy > :is(.eyebrow, h2, .lead) {
  grid-column: 1 !important;
  min-width: 0 !important;
}

body.page-about .founder-text-only .founder-profile-aside {
  grid-column: 2 !important;
  grid-row: 1 / span 3 !important;
  min-width: 0 !important;
}

body.page-about .founder-text-only .service-crosslink {
  grid-column: 1 / -1 !important;
}

/* Workflow advisory: three concepts read as one compact system. */
body.page-workflow .plain-language-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
  width: 100% !important;
  align-items: stretch !important;
}

body.page-workflow .plain-language-card {
  min-height: 0 !important;
  height: 100% !important;
  padding: clamp(24px, 2.4vw, 32px) !important;
}

/* One case study should be a composed feature, not a half-empty two-column
   parent with a stranded card. */
body.page-workflow .case-study {
  display: block !important;
  width: min(100%, 1040px) !important;
  margin-inline: auto !important;
}

body.page-workflow .case-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, .97fr) !important;
  column-gap: clamp(38px, 5vw, 68px) !important;
  row-gap: 18px !important;
  width: 100% !important;
  max-width: none !important;
  padding: clamp(32px, 4vw, 48px) !important;
}

body.page-workflow .case-panel > :is(.tag, h2, p, .button) {
  grid-column: 1 !important;
}

body.page-workflow .case-panel .case-stat {
  grid-column: 2 !important;
  grid-row: 1 / span 4 !important;
  align-self: center !important;
  margin: 0 !important;
}

body.page-workflow .case-panel .button {
  justify-self: start !important;
  margin-top: 8px !important;
}

/* This page intentionally offers two starting points; use the complete content
   width rather than leaving a phantom third card column. */
body.page-workflow .pricing-program-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px !important;
  width: 100% !important;
  align-items: stretch !important;
}

body.page-workflow .pricing-program-grid > .program-card {
  height: 100% !important;
}

/* Insights has exactly two free tools. Treat them as a matched pair. */
body.page-insights .section-tight.surface-alt .card-grid-3 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px !important;
  width: 100% !important;
  align-items: stretch !important;
}

body.page-insights .section-tight.surface-alt .card-grid-3 > .card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
}

body.page-insights .section-tight.surface-alt .card-grid-3 > .card .text-link {
  margin-top: auto !important;
  padding-top: 22px !important;
}

/* Diagnostics itself is a full-width, equal-height two-card decision pair. */
body.page-diagnostics .tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100% !important;
  align-items: stretch !important;
}

body.page-diagnostics .tool-grid > .tool-card {
  height: 100% !important;
}

/* Keep large inner-page headings persuasive without letting a short page
   become a mostly empty viewport. */
body.gg-refined .page-hero {
  min-height: 0 !important;
}

@media (max-width: 1240px) {
  body.gg-refined .gg-primary-nav {
    gap: 12px !important;
  }

  body.gg-refined .gg-primary-nav a {
    font-size: .78rem !important;
  }
}

@media (max-width: 980px) {
  body.page-workflow .plain-language-grid,
  body.page-workflow .pricing-program-grid,
  body.page-insights .section-tight.surface-alt .card-grid-3,
  body.page-diagnostics .tool-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.page-workflow .case-panel {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.page-workflow .case-panel > :is(.tag, h2, p, .button),
  body.page-workflow .case-panel .case-stat {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  body.page-workflow .case-panel .case-stat {
    margin: 10px 0 4px !important;
  }
}

@media (max-width: 820px) {
  body.page-about .founder-text-only .founder-profile-copy {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }

  body.page-about .founder-text-only .founder-profile-copy > :is(.eyebrow, h2, .lead),
  body.page-about .founder-text-only .founder-profile-aside,
  body.page-about .founder-text-only .service-crosslink {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}

@media (max-width: 600px) {
  body.page-workflow .case-panel {
    padding: 24px !important;
  }

  body.page-workflow .case-panel .case-stat {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  body.page-workflow .case-panel .case-stat .arrow {
    transform: rotate(90deg);
    justify-self: center;
  }
}
