/* ==========================================================================
   GAIN access guide — styles.css
   Plain CSS, mobile-first. Palette from GAIN branding:
   deep navy + steel blue + white, one stylesheet, no preprocessor.
   ========================================================================== */

:root {
  /* Brand palette */
  --navy:        #1d2d44;  /* primary dark — header text, hero, footer */
  --navy-deep:   #142033;  /* deeper shade */
  --steel:       #5b85a8;  /* brand steel blue — accents, spine line */
  --steel-dark:  #3a5f80;  /* AA-contrast steel for links/text on white */
  --accent:      #b9892f;  /* warm gold accent */
  --accent-dark: #8a6620;  /* AA-contrast gold for text on white */

  /* Neutrals */
  --ink:         #1a2230;
  --ink-soft:    #44505f;
  --paper:       #ffffff;
  --surface:     #f4f6f9;
  --surface-2:   #e8edf3;
  --line:        #d4dbe4;

  /* Type & layout */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 76rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 32, 51, .06), 0 6px 20px rgba(20, 32, 51, .07);
  --shot-maxw: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* keep anchored sections clear of any sticky chrome */
:target { scroll-margin-top: 1.25rem; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--steel-dark); }
a:hover { color: var(--navy); }

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

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: .65rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  padding-block: .85rem;
}
.nav__brand { display: inline-flex; align-items: center; }
.nav__logo { height: 26px; width: auto; }
.nav__links { display: flex; align-items: center; gap: .35rem; }
/* base styles for plain text nav links only — never override .btn colors */
.nav__links a:not(.btn) {
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
  padding: .5rem .7rem;
  border-radius: 8px;
}
.nav__links a:not(.btn):hover { background: var(--surface-2); }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}
.btn--sm { padding: .5rem .9rem; font-size: .95rem; }
.btn--lg { padding: .95rem 1.7rem; font-size: 1.1rem; }
.btn--primary { background: var(--navy); color: #fff; border-color: var(--navy); }
/* hover lifts to a lighter slate-blue — clearly distinct from the navy base, still AA (white ~7.5:1) */
.btn--primary:hover { background: #34557e; color: #fff; border-color: #34557e; }
/* light secondary button — visible by default, not just on hover */
.btn--secondary { background: var(--surface); color: var(--navy); border-color: var(--line); }
.btn--secondary:hover { background: var(--surface-2); color: var(--navy); border-color: var(--steel); }
/* ghost reads on the navy hero */
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn__icon { font-size: 1.05em; line-height: 1; }

/* ---------- Hero (navy band, no image) ---------- */
.hero {
  background: var(--navy);
  color: #eaf0f6;
  padding-block: 3rem;
  border-bottom: 4px solid var(--steel);
}
.hero__eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9db8d2;
  margin: 0 0 .6rem;
}
.hero__title {
  font-size: clamp(2rem, 6vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: 0 0 .9rem;
  color: #fff;
}
.hero__lead {
  font-size: 1.18rem;
  max-width: 40rem;
  margin: 0;
  color: #d4deea;
}
.hero .btn--primary { background: #fff; color: var(--navy); border-color: #fff; }
.hero .btn--primary:hover { background: #e7eef5; color: var(--navy); }
.hero__quiet { margin: 1rem 0 0; font-size: .95rem; }
.hero__quiet a { color: #bcd0e4; }
.hero__quiet a:hover { color: #fff; }

/* ==========================================================================
   Layout: on-page nav rail + content
   ========================================================================== */
.layout { padding-block: 0 1rem; }

/* ---------- On-page nav (mobile: sticky horizontal scroll bar) ---------- */
.pagenav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  margin-inline: -1.25rem;       /* bleed to viewport edges on mobile */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pagenav__list {
  display: flex;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: .5rem 1.25rem;
  white-space: nowrap;
}
.pagenav__list a {
  display: inline-block;
  padding: .45rem .8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  color: var(--navy);
}
.pagenav__list a:hover { background: var(--surface-2); }
.pagenav__list a[aria-current="location"] {
  background: var(--surface-2);
  color: var(--navy);
  box-shadow: inset 3px 0 0 var(--steel);
}

/* ---------- Sections (alternating full-width chapter bands) ---------- */
.section {
  padding: 3.25rem 1.25rem;
  margin-inline: -1.25rem;            /* mobile: bleed band to viewport edges */
  background: var(--paper);           /* default chapter: clean white */
}
.section:nth-of-type(even) {
  background: var(--surface);         /* alternate chapter: soft neutral gray */
}
/* Constrain the readable measure and centre each chapter's content (~68 cpl). */
.section > * { max-width: 42rem; margin-inline: auto; }

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.2;
  margin: 0 0 .75rem;
  color: var(--navy);
}
/* consistent kicker rule above every chapter heading */
.section > h2::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-bottom: .9rem;
  background: var(--steel);
  border-radius: 2px;
}
h3 { font-size: 1.18rem; color: var(--navy); margin: 0 0 .4rem; }
.section__intro { color: var(--ink-soft); }
.lead-note { color: var(--ink-soft); font-style: italic; }

/* ---------- Checklist ---------- */
.checklist { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .7rem; max-width: 40rem; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before {           /* glyph + text, never color alone */
  content: "\2713";
  position: absolute;
  left: 0; top: 0;
  font-weight: 700;
  color: var(--steel-dark);
}

/* ---------- Quick check callout (decision gate — distinct from steps) ---------- */
.gate {
  max-width: 42rem;
  margin-inline: auto;
  margin-block: 2.75rem;
  background: var(--surface-2);
  border: 2px solid var(--steel);
  border-left: 6px solid var(--steel);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
}
.gate__label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--steel-dark);
}
.gate__icon { font-size: 1rem; }
.gate__q { font-weight: 600; font-size: 1.2rem; color: var(--navy); margin: 0 0 .85rem; }
.gate__opts { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.gate__opts li { display: flex; align-items: baseline; gap: .5rem; }
.gate__no { color: var(--steel-dark); font-weight: 700; }
.gate__skip {
  font-weight: 700;
  text-decoration: none;
  color: var(--steel-dark);
  border-bottom: 2px solid var(--steel);
}
.gate__skip:hover { color: var(--navy); border-color: var(--navy); }

/* ---------- Numbered progress spine ---------- */
.spine {
  list-style: none;
  counter-reset: step;
  margin: 1.25rem 0 0;
  padding: 0;
}
.spine__step {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.75rem 3.4rem;
}
/* vertical connecting line */
.spine__step::after {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 2.4rem;
  bottom: -.25rem;
  width: 2px;
  background: var(--line);
}
.spine__step:last-child::after { display: none; }
/* number badge */
.spine__step::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  z-index: 1;
}
.spine__title { margin-top: .25rem; }
.spine__step p { margin: .5rem 0; }

/* ---------- Notes / callouts (glyph + label, not color alone) ---------- */
.note {
  border-radius: 8px;
  padding: .8rem 1rem;
  margin: .8rem 0;
  font-size: .98rem;
  border-left: 4px solid;
  max-width: 46rem;
}
.note--warn { background: #fbf3e6; border-color: var(--accent-dark); color: #5e4410; }
.note--warn::before { content: "\26A0  Important — "; font-weight: 700; }
.note--info { background: #eef3f8; border-color: var(--steel-dark); color: #243b4f; }
.note--info::before { content: "\2139  Note — "; font-weight: 700; }

/* ---------- Screenshots (uniform figures) ---------- */
.shot {
  margin: 1rem 0 0;
  max-width: var(--shot-maxw);
  border: 0.5px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}
.shot a { display: block; }
.shot a:focus-visible { outline-offset: -3px; }
.shot img { width: 100%; }
.shot figcaption {
  font-size: .85rem;
  color: var(--ink-soft);
  padding: .5rem .75rem;
  border-top: 0.5px solid var(--line);
  background: var(--paper);
}
.shot-grid { display: grid; gap: 1rem; }

/* ---------- FAQ (native <details>, no JS) ---------- */
.faq { display: grid; gap: .75rem; margin: 1.25rem 0; max-width: 46rem; }
.faq__item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq__q {
  font-weight: 700;
  color: var(--navy);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { background: var(--surface); }
.faq__icon { font-size: 1.5rem; line-height: 1; color: var(--steel-dark); transition: transform .2s ease; }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__a { padding: 0 1.25rem 1.25rem; margin: 0; color: var(--ink-soft); }

/* ---------- Help ---------- */
.help__issue { margin-top: 1.6rem; }
.help__issue:first-of-type { margin-top: .5rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #c4cedb;
  padding-block: 2.5rem;
  margin-top: 1.5rem;
}
.site-footer a { color: #d9e6f2; }
.site-footer p { margin: .4rem 0; }
.site-footer__brand { color: #fff; font-weight: 700; font-size: 1.05rem; }

/* ---------- Redirect page ---------- */
.redirect { padding-block: 4rem; text-align: center; }

/* ==========================================================================
   Responsive — desktop: sticky left rail beside content
   ========================================================================== */
@media (min-width: 60rem) {  /* ~960px */
  .layout {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
    padding-top: 1rem;
  }
  .pagenav {
    position: sticky;
    top: 1.5rem;
    margin-inline: 0;
    background: transparent;
    border: 0;
    overflow: visible;
  }
  .pagenav__list {
    display: block;
    padding: 0;
    border-left: 2px solid var(--line);
  }
  .pagenav__list li { white-space: normal; }
  .pagenav__list a {
    display: block;
    border-radius: 0;
    padding: .4rem .9rem;
    margin-left: -2px;
    border-left: 2px solid transparent;
    color: var(--ink-soft);
  }
  .pagenav__list a:hover { background: transparent; color: var(--navy); }
  .pagenav__list a[aria-current="location"] {
    background: transparent;
    border-left-color: var(--steel);
    color: var(--navy);
    box-shadow: none;
  }
  .shot-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  /* Desktop: bands fill the reading column and bleed to the container's right
     edge; the sticky left rail keeps its own gutter, unchanged. */
  .section {
    margin-inline: 0 -1.25rem;
    padding: 3.75rem 1.25rem 3.75rem 0;
  }
}
