/* GBG brand: DM Sans, Hyacinth Blue primary, Hot Peach accent, Charcoal text.
   See the gbg-brand skill. Muted text uses C500 (not C400) to meet WCAG AA on white. */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&display=swap");

:root {
  color-scheme: light;
  --bg: #f1f1f3;          /* C100 */
  --surface: #ffffff;
  --text: #0c0c0e;        /* C700P */
  --muted: #3b3b44;       /* C500 */
  --border: #e3e3e8;      /* C200 */
  --accent: #4d4dff;      /* B400P */
  --accent-text: #ffffff;
  --accent-soft: #e5e5ff; /* B100 */
  --peach: #ff9d73;       /* HP400P */
  --peach-soft: #ffede5;  /* HP100 */
}
/* Dark theme: when chosen explicitly, or when "System" and the device is in dark mode. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c0e;          /* C700P */
  --surface: #232329;     /* C600 */
  --text: #ffffff;
  --muted: #adadb8;       /* C300 */
  --border: #3b3b44;      /* C500 */
  --accent: #b2b2ff;      /* B200 (on dark) */
  --accent-text: #12123c; /* B700 */
  --accent-soft: #12123c; /* B700 */
  --peach: #ff9d73;
  --peach-soft: #461b08;  /* HP700 */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0c0e;          /* C700P */
    --surface: #232329;     /* C600 */
    --text: #ffffff;
    --muted: #adadb8;       /* C300 */
    --border: #3b3b44;      /* C500 */
    --accent: #b2b2ff;      /* B200 (on dark) */
    --accent-text: #12123c; /* B700 */
    --accent-soft: #12123c; /* B700 */
    --peach: #ff9d73;
    --peach-soft: #461b08;  /* HP700 */
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 "DM Sans", Arial, sans-serif;
}
a { color: var(--accent); }

/* Site header with the GBG logo (clear space = logo height) */
.site-header {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 24px max(16px, calc((100% - 1040px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { height: 24px; width: auto; display: block; }
/* Logo variant follows the theme: primary on light, mono white on dark. */
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}

.theme-picker { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.theme-picker select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
}
.theme-picker select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.brand .product { font-weight: 600; padding-left: 12px; border-left: 1px solid var(--border); }
.brand .product.product-plain { padding-left: 0; border-left: 0; }

main { max-width: 760px; margin: 0 auto; padding: 40px 16px 64px; }
main.wide { max-width: 1040px; }
header p.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}
h1 { margin: 0 0 12px; font-size: clamp(28px, 5vw, 42px); line-height: 1.12; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-weight: 700; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 32px; }

.steps { display: grid; gap: 12px; padding: 0; margin: 0 0 32px; list-style: none; counter-reset: s; }
.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 16px 16px 60px;
  position: relative;
  counter-increment: s;
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 16px; top: 15px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--peach); color: #0c0c0e; /* C700P on HP400P: 9.61:1 */
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.steps strong { display: block; }
.steps span { color: var(--muted); }
.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 600;
}
.button[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.button-secondary { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.sign-in-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
footer { margin-top: 48px; color: var(--muted); font-size: 14px; }

.userbar { margin-left: auto; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.userbar img { border-radius: 50%; }
.userbar a { color: var(--accent); font-weight: 600; text-decoration: none; }
.userbar a:hover { text-decoration: underline; }

[hidden] { display: none !important; }

/* Inactivity warning (session.js) */
.session-warning {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: min(560px, calc(100% - 32px)); z-index: 100;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-top: 4px solid var(--peach); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(12, 12, 14, .18);
  padding: 16px 20px; display: grid; gap: 12px;
}
.session-warning p { margin: 0; }
.session-warning div { display: flex; gap: 16px; align-items: center; }
.session-warning button {
  font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 8px; border: 0;
  background: var(--accent); color: var(--accent-text); cursor: pointer;
}
.session-warning a { color: var(--accent); font-weight: 600; }

/* ---------- Phones: compact header */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  .site-header { padding: 12px 16px; gap: 10px 14px; }
  .brand { gap: 10px; }
  .brand .product { font-size: 14px; padding-left: 10px; }
  .userbar { gap: 12px; font-size: 14px; }
  .userbar > span { display: none; }              /* "Signed in as …": the avatar says it */
  .theme-picker > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .theme-picker select { padding: 4px 6px; font-size: 14px; }
  main { padding-top: 24px; }
  .lead { font-size: 16px; }
}

/* Build identification footer (footer.js) */
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  font-variant-numeric: tabular-nums;
}
body.journey-fullscreen .site-footer { display: none; }
/* Keep the footer at the bottom of the screen on short pages */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
