/* ==========================================================================
   Gradien shared public site system (new-positioning branch)
   Loaded on every route. Extends design-system.css; does not redeclare it.
   Covers: nav overrides for the simplified 3-item Resources menu, the footer
   statement, the cookie-settings control, the consent banner, and a few
   cross-page primitives (active nav state, quiet source dots) reused by the
   homepage / how-it-works / resources / contact page-specific stylesheets.
   ========================================================================== */

/* ---------- Header: simplified single-column Resources dropdown ---------- */
.gr-header__submenu--resources {
  min-width: 480px;
  max-width: 560px;
  left: auto;
  right: 0;
}
.gr-header__submenu--resources a { padding-block: var(--space-2); }

/* ---------- Active nav state (How it works / Resources / Contact) ---------- */
.gr-header__link.is-active,
.gr-header__menu-trigger.is-active {
  color: var(--ink);
  font-weight: var(--weight-medium);
}
/* :not(.gr-header__menu-trigger) matters here: the Resources trigger
   carries .gr-header__link too (for shared link styling), so without the
   exclusion this rule would also match it and collide with its chevron
   below. */
.gr-header__link.is-active:not(.gr-header__menu-trigger)::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--signal-blue);
  border-radius: 2px;
}
/* .gr-header__menu-trigger already owns ::after for its chevron (see
   design-system.css), so its active-state underline uses ::before
   instead — both classes share position: relative via .gr-header__link. */
.gr-header__menu-trigger.is-active::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--signal-blue);
  border-radius: 2px;
}
.gr-header__link { position: relative; }
.gr-header__mobile-nav a[aria-current="page"],
.gr-header__mobile-group-trigger[aria-current="page"] { color: var(--ink); font-weight: var(--weight-medium); }

/* ---------- Footer logo + statement + cookie settings ---------- */
.gr-footer__logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.gr-footer__logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.gr-footer__logo-name { font-size: 20px; font-weight: var(--weight-medium); color: var(--white); letter-spacing: -0.01em; }
.gr-footer__logo-by { font-size: 11px; color: var(--text-inverse-tertiary); letter-spacing: 0.01em; }
.gr-footer__statement {
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-heading);
  color: var(--white);
  max-width: 20ch;
  margin: 0;
}
.gr-footer__cookie-settings {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--text-inverse-tertiary);
  cursor: pointer;
  text-align: left;
}
.gr-footer__cookie-settings:hover,
.gr-footer__cookie-settings:focus-visible { color: var(--white); }

/* ---------- Consent banner ---------- */
.gr-consent {
  position: fixed;
  left: var(--space-3);
  bottom: var(--space-3);
  z-index: 90;
  max-width: 480px;
  width: calc(100% - (var(--space-3) * 2));
}
.gr-consent[hidden] { display: none; }
.gr-consent__panel {
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3);
}
.gr-consent__heading { font-weight: var(--weight-medium); font-size: var(--text-body-lg); margin: 0 0 var(--space-1); }
.gr-consent__body { font-size: var(--text-sm); color: var(--text-secondary); line-height: var(--leading-body); margin: 0 0 var(--space-2); }
.gr-consent__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.gr-consent__link { font-size: var(--text-sm); color: var(--text-link); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 640px) {
  .gr-consent { left: 0; right: 0; bottom: 0; max-width: none; width: 100%; padding: 0 env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0); }
  .gr-consent__panel { border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: none; }
  .gr-consent__actions { flex-direction: column; align-items: stretch; }
  .gr-consent__actions .gr-btn { width: 100%; }
}

/* ---------- Mobile menu scroll lock ---------- */
html.gr-menu-open, html.gr-menu-open body { overflow: hidden; }

/* ---------- Shared quiet source/status primitives reused across new pages ---------- */
.gr-quiet-list { list-style: none; margin: 0; padding: 0; }
.gr-thin-rule { border: none; border-top: 1px solid var(--border-subtle); margin: var(--space-3) 0; }

/* ---------- 404 / error visual ---------- */
.gr-errorvisual { display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-6) 0; }
.gr-errorvisual__node { width: 12px; height: 12px; border-radius: 50%; background: var(--border-strong); }
.gr-errorvisual__node--broken { background: var(--danger-soft); border: 2px solid var(--danger); }
.gr-errorvisual__line { width: 64px; height: 1px; background: var(--border-subtle); position: relative; }
.gr-errorvisual__line::after { content: ''; position: absolute; inset: 0; border-top: 1px dashed var(--border-strong); }

.error-page { padding-top: clamp(64px, 10vw, 120px); text-align: center; }
.error-page__inner { max-width: 520px; margin: 0 auto; }
.error-page h1 { font-size: var(--text-h2); font-weight: var(--weight-medium); margin: var(--space-2) 0; }
.error-page p { color: var(--text-secondary); margin-bottom: var(--space-4); }
.error-page__actions { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
