:root {
  --gh-bg: #f3f7f5;
  --gh-surface: #ffffff;
  --gh-surface-soft: #eaf3ee;
  --gh-text: #16231d;
  --gh-muted: #66776f;
  --gh-border: #cfe0d7;
  --gh-accent: #16a66a;
}

body.night-mode,
[data-theme-mode="night"] {
  --gh-bg: #09130f;
  --gh-surface: #101d17;
  --gh-surface-soft: #14251d;
  --gh-text: #eff9f3;
  --gh-muted: #9eb2a8;
  --gh-border: #294238;
  --gh-accent: #31d88b;
}

.gh-page {
  min-height: calc(100vh - 64px);
  padding: 36px max(20px, calc((100vw - 1180px) / 2)) 64px;
  color: var(--gh-text);
  background: var(--gh-bg);
}

.gh-hero,
.gh-section,
.gh-split > article {
  border: 1px solid var(--gh-border);
  background: var(--gh-surface);
}

.gh-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 32px;
  align-items: end;
  padding: 48px;
  border-radius: 8px;
}

.gh-eyebrow,
.gh-tool span,
.gh-identity-card > span {
  color: var(--gh-accent);
  font-size: 12px;
  font-weight: 800;
}

.gh-hero h1 {
  max-width: 760px;
  margin: 10px 0 16px;
  color: var(--gh-text);
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: 0;
}

.gh-hero p,
.gh-tool p,
.gh-split p {
  color: var(--gh-muted);
  line-height: 1.65;
}

.gh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.gh-button,
.gh-tool a,
.gh-split a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--gh-border);
  border-radius: 7px;
  color: var(--gh-text);
  font-weight: 700;
  text-decoration: none;
}

.gh-button-primary,
.gh-tool-active > a {
  border-color: var(--gh-accent);
  color: #07110c;
  background: var(--gh-accent);
}

.gh-identity-card {
  padding: 22px;
  border-left: 3px solid var(--gh-accent);
  background: var(--gh-surface-soft);
}

.gh-identity-card strong {
  display: block;
  margin: 8px 0;
  font-size: 22px;
}

.gh-identity-status {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
  color: var(--gh-accent);
  font-weight: 700;
}

.gh-identity-status i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.gh-section {
  margin-top: 18px;
  padding: 28px;
  border-radius: 8px;
}

.gh-section > header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

.gh-section h2,
.gh-split h2 {
  margin: 5px 0 0;
  color: var(--gh-text);
  font-size: 24px;
}

.gh-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--gh-border);
  border-bottom: 1px solid var(--gh-border);
}

.gh-tool {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-content: start;
  min-height: 250px;
  padding: 24px;
}

.gh-tool + .gh-tool {
  border-left: 1px solid var(--gh-border);
}

.gh-tool-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--gh-border);
  border-radius: 7px;
  color: var(--gh-accent);
  font-size: 20px;
  font-weight: 900;
  background: var(--gh-surface-soft);
}

.gh-tool h3 {
  margin: 4px 0 8px;
  color: var(--gh-text);
  font-size: 20px;
}

.gh-tool > a,
.gh-tool > em {
  grid-column: 1 / -1;
  align-self: end;
  justify-self: start;
  margin-top: 16px;
}

.gh-tool > em {
  color: var(--gh-muted);
  font-style: normal;
  font-weight: 700;
}

.gh-tool-disabled {
  opacity: .64;
}

.gh-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.gh-split > article {
  padding: 28px;
  border-radius: 8px;
}

.gh-split a {
  margin-top: 12px;
}

.gh-panelpilot-nav-link a {
  color: var(--gh-accent) !important;
  font-weight: 800 !important;
}

@media (max-width: 900px) {
  .gh-hero,
  .gh-tool-grid,
  .gh-split {
    grid-template-columns: 1fr;
  }

  .gh-tool + .gh-tool {
    border-left: 0;
    border-top: 1px solid var(--gh-border);
  }

  .gh-tool {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .gh-page {
    padding: 18px 12px 40px;
  }

  .gh-hero,
  .gh-section,
  .gh-split > article {
    padding: 20px;
  }
}

/* Diamond copy-fit pass: keep the service name and compact navigation labels stable. */
.main-header .logo-wrapper,
.main-header .logo-wrapper .logo {
  white-space: nowrap !important;
}

.main-header .logo-wrapper .logo {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  height: 70px !important;
  max-width: 178px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

.ftabs-title,
.ftabs-sub {
  text-wrap: balance;
}
