/* ==========================================================================
   site.css — GeneradorAPA.mx design system ("Jade & Cempasúchil")
   Rule: every selector starts with a g- class, so nothing here can reach
   the citation tool (index.html .tool-wrap, css/style.css).
   ========================================================================== */

/* ── 2.1 Tokens ─────────────────────────────────────────────────────────── */
.g-root, .g-page, .g-header, .g-footer, .g-skip {
  --g-jade:          #0F5C4D;  /* buttons, links, active states, H2 bar */
  --g-jade-dark:     #0A4238;  /* button hover, footer background */
  --g-jade-tint:     #E3F0EC;  /* tip callouts, soft panels */
  --g-marigold:      #E08A1E;  /* fills only — never text on white */
  --g-marigold-tint: #FDF1E0;  /* "Nota para México" callouts */
  --g-paper:         #FAF7F2;  /* page background */
  --g-surface:       #FFFFFF;  /* cards, citation boxes */
  --g-ink:           #1B1F24;  /* body text */
  --g-muted:         #5A6169;  /* meta text, captions */
  --g-line:          #E5DFD5;  /* borders, table lines */
  --g-ok:            #1E7F4F;
  --g-ok-tint:       #E8F5EE;
  --g-ok-text:       #186A41;  /* --g-ok darkened so text on --g-ok-tint passes AA */
  --g-error:         #B42318;
  --g-error-tint:    #FDECEA;
  --g-radius:        10px;
  --g-shadow:        0 1px 2px rgba(27,31,36,.06), 0 4px 16px rgba(27,31,36,.05);

  --g-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --g-sans:  Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ── 2.2 Base typography ────────────────────────────────────────────────── */
.g-page {
  margin: 0;
  background: var(--g-paper);
  color: var(--g-ink);
  font-family: var(--g-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.g-root {
  color: var(--g-ink);
  font-family: var(--g-sans);
  font-size: 17px;
  line-height: 1.7;
}
.g-page *, .g-page *::before, .g-page *::after,
.g-root *, .g-root *::before, .g-root *::after { box-sizing: border-box; }

.g-page h1, .g-root h1,
.g-page h2, .g-root h2,
.g-page h3, .g-root h3 {
  font-family: var(--g-serif);
  font-weight: 600;
  color: var(--g-ink);
  line-height: 1.25;
  letter-spacing: -.005em;
}
.g-page h1, .g-root h1 { font-size: 40px; margin: 0 0 .5rem; }
.g-page h2, .g-root h2 {
  font-size: 28px;
  margin: 2.6rem 0 1rem;
  padding-left: 14px;
  border-left: 4px solid var(--g-jade);   /* H2 accent: jade bar, used everywhere */
  scroll-margin-top: 88px;                /* clears the sticky header */
}
.g-page h3, .g-root h3 { font-size: 21px; margin: 1.8rem 0 .6rem; scroll-margin-top: 88px; }
.g-page p, .g-root p { margin: 0 0 1rem; }
.g-page ul, .g-page ol, .g-root ul, .g-root ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.g-page li, .g-root li { margin-bottom: .35rem; }

.g-page a, .g-root a {
  color: var(--g-jade);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.g-page a:hover, .g-root a:hover { color: var(--g-jade-dark); text-decoration-thickness: 2px; }
.g-page :focus-visible, .g-root :focus-visible,
.g-header :focus-visible, .g-footer :focus-visible {
  outline: 3px solid var(--g-jade);
  outline-offset: 2px;
  border-radius: 4px;
}
.g-page code, .g-root code {
  font-size: .9em;
  background: var(--g-jade-tint);
  padding: .1em .35em;
  border-radius: 4px;
}

.g-small { font-size: 14px; color: var(--g-muted); }
.g-lead  { font-size: 19px; color: var(--g-ink); }

@media (max-width: 640px) {
  .g-page h1, .g-root h1 { font-size: 30px; }
  .g-page h2, .g-root h2 { font-size: 24px; }
  .g-page h3, .g-root h3 { font-size: 19px; }
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.g-container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.g-article   { max-width: 720px; min-width: 0; }

/* Guide layout. Source order: .g-intro → .g-toc → .g-body (so on phones the
   TOC sits between the intro and the article body). On desktop the TOC
   moves to a sticky right column spanning both rows. */
.g-layout { display: block; padding: 24px 0 64px; }
.g-intro, .g-body { max-width: 720px; min-width: 0; }
@media (min-width: 1024px) {
  .g-layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) 260px;
    grid-template-rows: auto 1fr;
    grid-template-areas: "intro toc" "body toc";
    justify-content: space-between;
    column-gap: 56px;
  }
  .g-intro { grid-area: intro; }
  .g-body  { grid-area: body; }
  .g-layout > .g-toc { grid-area: toc; align-self: start; }
}

/* Skip link (first element in <body>) */
.g-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  background: var(--g-jade);
  color: #fff;
  font-family: var(--g-sans);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
}
.g-skip:focus { top: 0; }

/* ── Breadcrumbs ────────────────────────────────────────────────────────── */
.g-breadcrumbs { font-size: 14px; color: var(--g-muted); margin: 0 0 16px; }
.g-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.g-breadcrumbs li { margin: 0; }
.g-breadcrumbs li + li::before { content: "›"; margin: 0 .5em; color: var(--g-muted); }
.g-breadcrumbs a { color: var(--g-muted); text-decoration: none; }
.g-breadcrumbs a:hover { color: var(--g-jade); text-decoration: underline; }
.g-breadcrumbs [aria-current="page"] { color: var(--g-ink); }

/* ── Byline ─────────────────────────────────────────────────────────────── */
.g-byline {
  font-size: 14px;
  color: var(--g-muted);
  margin: 0 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: .25em .6em;
}
.g-byline-sep { color: var(--g-line); }

/* ── Quick answer box (first thing under the H1 on guides) ──────────────── */
.g-answer {
  background: var(--g-surface);
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius);
  box-shadow: var(--g-shadow);
  padding: 20px 22px;
  margin: 0 0 28px;
}
.g-answer-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--g-ink);
  background: var(--g-marigold);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 10px;
}
.g-pattern {
  font-family: var(--g-serif);
  color: var(--g-muted);
  margin: 0 0 12px;
}

/* ── Featured image ─────────────────────────────────────────────────────── */
.g-figure { margin: 0 0 28px; }
.g-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--g-radius);
  border: 1px solid var(--g-line);
  background: var(--g-paper);
}
.g-figure figcaption { font-size: 14px; color: var(--g-muted); margin-top: 8px; }

/* ── Citation example (.g-cite) ─────────────────────────────────────────── */
.g-cite {
  position: relative;
  background: var(--g-surface);
  border: 1px solid var(--g-line);
  border-left: 4px solid var(--g-jade);
  border-radius: var(--g-radius);
  padding: 16px 112px 16px 20px;   /* room for the Copiar button */
  margin: 0 0 1.25rem;
  box-shadow: var(--g-shadow);
}
.g-cite-label {
  display: block;
  font-family: var(--g-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--g-muted);
  margin-bottom: 4px;
}
.g-cite-text {
  font-family: var(--g-serif);
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  padding-left: 2.2em;     /* hanging indent, as in an APA reference list */
  text-indent: -2.2em;
  overflow-wrap: anywhere;
}
.g-cite-text em { font-style: italic; }

.g-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--g-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--g-jade);
  background: var(--g-surface);
  border: 1.5px solid var(--g-jade);
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 36px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.g-copy:hover { background: var(--g-jade-tint); }
.g-copy.g-copied { background: var(--g-jade); color: #fff; }

@media (max-width: 640px) {
  .g-cite { padding: 52px 16px 16px 16px; }
  .g-cite-text { font-size: 17px; }
}

/* ── Wrong vs right (.g-compare) ────────────────────────────────────────── */
.g-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 1.5rem;
}
.g-wrong, .g-right {
  border-radius: var(--g-radius);
  padding: 14px 16px;
  border: 1px solid transparent;
  min-width: 0;
}
.g-wrong { background: var(--g-error-tint); border-color: #F5C2BC; }
.g-right { background: var(--g-ok-tint);    border-color: #BFE3CF; }
.g-compare-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--g-sans);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
}
.g-wrong .g-compare-label { color: var(--g-error); }
.g-right .g-compare-label { color: var(--g-ok-text); }
.g-compare-text {
  font-family: var(--g-serif);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
  overflow-wrap: anywhere;
}
.g-compare-why { font-size: 14px; color: var(--g-ink); margin: 8px 0 0; }
.g-mark { background: rgba(224,138,30,.28); border-radius: 3px; padding: 0 2px; }
@media (max-width: 720px) {
  .g-compare { grid-template-columns: 1fr; }
}

/* ── Callouts ───────────────────────────────────────────────────────────── */
.g-callout {
  border-radius: var(--g-radius);
  padding: 14px 18px;
  margin: 0 0 1.5rem;
  border-left: 4px solid;
}
.g-callout > :last-child { margin-bottom: 0; }
.g-callout-label {
  display: block;
  font-family: var(--g-sans);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--g-ink);
}
.g-tip     { background: var(--g-jade-tint);     border-left-color: var(--g-jade); }
.g-mistake { background: var(--g-error-tint);    border-left-color: var(--g-error); }
.g-mistake .g-callout-label { color: var(--g-error); }
.g-mx      { background: var(--g-marigold-tint); border-left-color: var(--g-marigold); }

/* ── Tool button + "Genera tu referencia" box ───────────────────────────── */
.g-btn-tool, .g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  font-family: var(--g-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: var(--g-jade);
  border: none;
  border-radius: 10px;
  padding: 13px 22px;
  min-height: 48px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.g-page a.g-btn-tool, .g-root a.g-btn-tool,
.g-page a.g-btn, .g-root a.g-btn { color: #fff; text-decoration: none; }
.g-btn-tool:hover, .g-btn:hover,
.g-page a.g-btn-tool:hover, .g-root a.g-btn-tool:hover { background: var(--g-jade-dark); color: #fff; }
.g-btn-tool:active, .g-btn:active { transform: translateY(1px); }

.g-tool-box {
  background: var(--g-jade-tint);
  border-radius: var(--g-radius);
  padding: 24px;
  margin: 2.5rem 0;
  text-align: center;
}
.g-tool-box-title {
  font-family: var(--g-serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
}
.g-tool-box p { margin-bottom: 16px; }

/* ── Numbered steps (marigold numbers) ──────────────────────────────────── */
.g-steps { list-style: none; counter-reset: g-step; padding: 0; margin: 0 0 1.5rem; }
.g-steps > li {
  counter-increment: g-step;
  position: relative;
  padding: 2px 0 0 52px;
  margin: 0 0 18px;
  min-height: 36px;
}
.g-steps > li::before {
  content: counter(g-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--g-marigold);
  color: var(--g-ink);
  font-weight: 700;
  font-size: 16px;
  display: grid;
  place-items: center;
}
.g-steps strong { display: block; }

/* ── Table of contents ──────────────────────────────────────────────────── */
.g-toc {
  background: var(--g-surface);
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius);
  margin: 0 0 28px;
  font-size: 15px;
}
.g-toc > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.g-toc > summary::-webkit-details-marker { display: none; }
.g-toc > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--g-ink);
  border-bottom: 2px solid var(--g-ink);
  transform: rotate(45deg) translateY(-3px);
  transition: transform .15s;
}
.g-toc[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
.g-toc ol { list-style: none; margin: 0; padding: 0 8px 12px; }
.g-toc li { margin: 0; }
.g-toc a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--g-ink);
  text-decoration: none;
  line-height: 1.4;
  border-left: 3px solid transparent;
}
.g-toc a:hover { background: var(--g-paper); color: var(--g-jade); }
.g-toc a[aria-current="true"] {
  color: var(--g-jade);
  font-weight: 600;
  border-left-color: var(--g-jade);
  background: var(--g-jade-tint);
}
@media (min-width: 1024px) {
  .g-toc {
    position: sticky;
    top: 88px;               /* below the 64px sticky header */
    max-height: calc(100vh - 110px);
    overflow: auto;
    margin: 0;
    background: transparent;
    border: none;
  }
  .g-toc > summary {
    pointer-events: none;   /* always open on desktop (site.js sets [open]) */
    padding: 0 10px 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--g-muted);
  }
  .g-toc > summary::after { display: none; }
  .g-toc ol { padding: 0; }
}

/* ── Data table ─────────────────────────────────────────────────────────── */
.g-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.5rem;
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius);
  background: var(--g-surface);
}
.g-table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 520px; }
.g-table caption { text-align: left; font-size: 14px; color: var(--g-muted); padding: 10px 14px; caption-side: bottom; }
.g-table th, .g-table td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--g-line);
}
.g-table thead th {
  background: var(--g-jade);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}
.g-table tbody tr:nth-child(even) { background: var(--g-paper); }
.g-table tbody tr:last-child td, .g-table tbody tr:last-child th { border-bottom: none; }

/* ── Related guides / cards ─────────────────────────────────────────────── */
.g-related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.g-related > li { margin: 0; }
.g-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--g-surface);
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius);
  padding: 16px 18px;
  box-shadow: var(--g-shadow);
  transition: border-color .15s, transform .15s;
}
.g-page a.g-card, .g-root a.g-card { color: var(--g-ink); text-decoration: none; }
.g-card:hover { border-color: var(--g-jade); transform: translateY(-2px); }
.g-card-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--g-muted);
  margin-bottom: 6px;
}
.g-card-title {
  font-family: var(--g-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--g-ink);
  margin: 0 0 6px;
}
.g-card-text { font-size: 15px; color: var(--g-muted); line-height: 1.5; margin: 0; }
.g-card-more { margin-top: auto; padding-top: 10px; font-size: 15px; font-weight: 600; color: var(--g-jade); }

/* ── FAQ accordion ──────────────────────────────────────────────────────── */
.g-faq { margin: 0 0 1.5rem; border-top: 1px solid var(--g-line); }
.g-faq details { border-bottom: 1px solid var(--g-line); }
.g-faq summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 16px 44px 16px 0;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.45;
}
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary::before,
.g-faq summary::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 2px;
  background: var(--g-jade);
  transition: transform .2s;
}
.g-faq summary::after { transform: rotate(90deg); }
.g-faq details[open] summary::after { transform: rotate(0deg); }
.g-faq summary:hover { color: var(--g-jade); }
.g-faq-answer { padding: 0 0 16px; }
.g-faq-answer > :last-child { margin-bottom: 0; }

/* ── Sources list ───────────────────────────────────────────────────────── */
.g-sources { font-size: 15px; color: var(--g-muted); }
.g-sources li { margin-bottom: .5rem; }

/* ── Preview-only helpers (used on guias/_plantilla.html) ───────────────── */
.g-demo-note {
  font-size: 14px;
  background: var(--g-surface);
  border: 1px dashed var(--g-line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--g-muted);
  margin: 0 0 24px;
}
.g-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.g-swatches > li { margin: 0; font-size: 13px; line-height: 1.35; }
.g-swatch { display: block; height: 52px; border-radius: 8px; border: 1px solid var(--g-line); margin-bottom: 6px; }

@media (prefers-reduced-motion: reduce) {
  .g-card, .g-btn-tool, .g-btn, .g-copy, .g-faq summary::after, .g-toc > summary::after { transition: none; }
  .g-card:hover { transform: none; }
}

/* Component lists must not inherit the article list indent (.g-page ul/ol) */
.g-page .g-related, .g-root .g-related,
.g-page .g-swatches, .g-root .g-swatches,
.g-page .g-steps, .g-root .g-steps { padding-left: 0; list-style: none; }

/* ── Homepage sections (Part 5) ─────────────────────────────────────────── */
.g-root { background: var(--g-paper); padding: 8px 0 72px; }
.g-root .g-section { max-width: 1120px; margin: 0 auto; padding: 56px 20px 0; }
.g-root .g-section > h2:first-child { margin-top: 0; }
.g-prose { max-width: 760px; }
.g-compare-text.g-hanging { padding-left: 2.2em; text-indent: -2.2em; }
.g-card-icon { font-size: 28px; line-height: 1; margin-bottom: 10px; }

/* Two panels side by side ("Lo hace el generador" / "Lo revisas tú") */
.g-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 1.5rem; }
.g-panel {
  background: var(--g-surface);
  border: 1px solid var(--g-line);
  border-top: 4px solid var(--g-jade);
  border-radius: var(--g-radius);
  padding: 18px 20px;
}
.g-panel-you { border-top-color: var(--g-marigold); }
.g-panel-title { font-family: var(--g-serif); font-size: 19px; font-weight: 600; margin: 0 0 8px; }
.g-root .g-panel ul, .g-page .g-panel ul { margin: 0; }
@media (max-width: 720px) {
  .g-split { grid-template-columns: 1fr; }
  .g-root .g-section { padding-top: 44px; }
}

/* ── Guides hub (/guias/) ───────────────────────────────────────────────── */
.g-hub { padding: 28px 0 72px; }
.g-hub .g-lead { max-width: 760px; }
.g-hub-section { padding-top: 16px; scroll-margin-top: 72px; }  /* /guias/#cluster links clear the sticky header */
.g-root .g-section { scroll-margin-top: 72px; }
.g-hub-section > p { max-width: 760px; }
.g-soon {
  display: inline-block;
  font-size: 15px;
  color: var(--g-muted);
  background: var(--g-surface);
  border: 1px dashed var(--g-line);
  border-radius: 8px;
  padding: 8px 14px;
}

/* ── Simple pages (trust pages, 404) ────────────────────────────────────── */
.g-narrow { max-width: 760px; margin: 0 auto; padding: 28px 0 72px; }
.g-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 8px; }
.g-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1.5px solid var(--g-jade);
  border-radius: 10px;
  font-family: var(--g-sans);
  font-size: 16px;
  font-weight: 600;
  background: var(--g-surface);
}
.g-page a.g-btn-secondary, .g-root a.g-btn-secondary { color: var(--g-jade); text-decoration: none; }
.g-page a.g-btn-secondary:hover, .g-root a.g-btn-secondary:hover { background: var(--g-jade-tint); color: var(--g-jade-dark); }

/* ==========================================================================
   Part 4 — Header and footer (identical on every page)
   Selectors are doubled (.g-header .g-x) so they outrank the tool's global
   rules in style.css (* reset, a, a:hover) on the homepage.
   ========================================================================== */

/* Anchor just before the tool: /#generador lands with the tool card
   below the sticky header (the card overlaps the hero by 24px). */
.g-anchor { display: block; height: 0; scroll-margin-top: 100px; }

/* ── Brand (logo mark + wordmark) ───────────────────────────────────────── */
.g-header .g-brand, .g-footer .g-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.g-header .g-brand:hover, .g-footer .g-brand:hover { text-decoration: none; }
.g-header .g-brand img, .g-footer .g-brand img { display: block; width: 32px; height: 32px; border-radius: 7px; }
.g-header .g-brand-name, .g-footer .g-brand-name {
  font-family: var(--g-serif);
  font-weight: 600;
  font-size: 21px;
  line-height: 1;
  letter-spacing: -.005em;
  color: var(--g-ink);
}
.g-header .g-brand-tld { color: var(--g-jade); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.g-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--g-surface);
  border-bottom: 1px solid var(--g-line);
  font-family: var(--g-sans);
}
.g-header .g-header-inner {
  max-width: 1120px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.g-header .g-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: flex-end;
}
.g-header .g-nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0 auto;           /* centres the links between logo and button */
  padding: 0;
}
.g-header .g-nav-list > li { position: relative; margin: 0; }
.g-header .g-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--g-ink);
  text-decoration: none;
  white-space: nowrap;
}
.g-header .g-nav-link:hover,
.g-header .g-has-sub:focus-within > .g-nav-link { color: var(--g-jade); background: var(--g-jade-tint); text-decoration: none; }
.g-header .g-caret {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

/* Dropdown (desktop: hover or keyboard focus) */
.g-header .g-sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--g-surface);
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius);
  box-shadow: 0 10px 30px rgba(27,31,36,.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.g-header .g-has-sub::after {          /* hover bridge between link and menu */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 8px;
}
.g-header .g-has-sub:hover > .g-sub,
.g-header .g-has-sub:focus-within > .g-sub { opacity: 1; visibility: visible; transform: translateY(8px); }
.g-header .g-sub li { margin: 0; }
.g-header .g-sub a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 15px;
  color: var(--g-ink);
  text-decoration: none;
}
.g-header .g-sub a:hover, .g-header .g-sub a:focus-visible { background: var(--g-jade-tint); color: var(--g-jade); text-decoration: none; }

.g-header .g-header-cta { padding: 10px 18px; min-height: 42px; font-size: 15px; flex-shrink: 0; }
.g-header a.g-header-cta, .g-header a.g-header-cta:hover { color: #fff; text-decoration: none; }

/* Hamburger (hidden on desktop) */
.g-header .g-menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 12px;
  min-height: 44px;
  background: none;
  border: 1px solid var(--g-line);
  border-radius: 8px;
  font: 600 15px/1 var(--g-sans);
  color: var(--g-ink);
  cursor: pointer;
}
.g-header .g-menu-icon,
.g-header .g-menu-icon::before,
.g-header .g-menu-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--g-ink);
  border-radius: 2px;
  transition: transform .2s, background .2s;
}
.g-header .g-menu-icon { position: relative; }
.g-header .g-menu-icon::before,
.g-header .g-menu-icon::after { content: ""; position: absolute; left: 0; }
.g-header .g-menu-icon::before { top: -6px; }
.g-header .g-menu-icon::after  { top: 6px; }
.g-header .g-menu-toggle[aria-expanded="true"] .g-menu-icon { background: transparent; }
.g-header .g-menu-toggle[aria-expanded="true"] .g-menu-icon::before { transform: translateY(6px) rotate(45deg); }
.g-header .g-menu-toggle[aria-expanded="true"] .g-menu-icon::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 899px) {
  .g-header .g-menu-toggle { display: inline-flex; }
  .g-header .g-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: block;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 8px 20px 20px;
    background: var(--g-surface);
    border-bottom: 1px solid var(--g-line);
    box-shadow: 0 16px 30px rgba(27,31,36,.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .g-header .g-nav.g-open { opacity: 1; visibility: visible; transform: none; }
  .g-header .g-nav-list { display: block; margin: 0 0 12px; }
  .g-header .g-nav-list > li { border-bottom: 1px solid var(--g-line); }
  .g-header .g-nav-link { display: flex; padding: 14px 4px; font-size: 17px; border-radius: 0; }
  .g-header .g-nav-link:hover,
  .g-header .g-has-sub:focus-within > .g-nav-link { background: none; }
  .g-header .g-caret { display: none; }
  .g-header .g-has-sub::after { display: none; }
  .g-header .g-sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 10px 12px;
    min-width: 0;
  }
  .g-header .g-has-sub:hover > .g-sub,
  .g-header .g-has-sub:focus-within > .g-sub { transform: none; }
  .g-header .g-sub a { padding: 9px 8px; color: var(--g-muted); }
  .g-header .g-header-cta { display: flex; width: 100%; min-height: 48px; font-size: 16px; }
}
@media (max-width: 380px) {
  .g-header .g-brand-name { font-size: 19px; }
  .g-header .g-menu-label { display: none; }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.g-footer {
  background: var(--g-jade-dark);
  color: rgba(255,255,255,.86);
  font-family: var(--g-sans);
  font-size: 15px;
  line-height: 1.6;
}
.g-footer .g-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 20px 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.g-footer .g-brand img { box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.g-footer .g-brand-name { color: #fff; }
.g-footer .g-brand-tld { color: #A8DCCB; }
.g-footer .g-footer-about { margin: 14px 0 0; max-width: 300px; color: rgba(255,255,255,.86); }
.g-footer .g-footer-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}
.g-footer .g-footer-col ul { list-style: none; margin: 0; padding: 0; }
.g-footer .g-footer-col li { margin: 0 0 8px; }
.g-footer .g-footer-col a { color: rgba(255,255,255,.86); text-decoration: none; }
.g-footer .g-footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.g-footer .g-footer-bottom { border-top: 1px solid rgba(255,255,255,.14); }
.g-footer .g-footer-bottom p {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px 24px;
  font-size: 14px;
  color: rgba(255,255,255,.78);
}
@media (max-width: 899px) {
  .g-footer .g-footer-inner { grid-template-columns: 1fr 1fr; }
  .g-footer .g-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .g-footer .g-footer-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .g-header .g-sub, .g-header .g-nav, .g-header .g-menu-icon,
  .g-header .g-menu-icon::before, .g-header .g-menu-icon::after { transition: none; }
}
