
/* =========================================================
   1. DESIGN TOKENS AND PAGE BASE
   ========================================================= */

.g {
  --g-ink: #07384a;
  --g-muted: #536971;
  --g-accent: #a68c52;
  --g-line: #dce6e9;
  --g-wash: #f3f7f8;
  --g-code: #092b39;

  color: #233c45;
  background: #fff;
}

.g .container {
  max-width: 1320px;
}

.g a {
  transition:
    color .15s ease,
    background-color .15s ease,
    border-color .15s ease;
}


/* =========================================================
   2. TYPOGRAPHY AND SECTION SPACING
   ========================================================= */

.g-sec {
  padding: 2.4rem 0;
  scroll-margin-top: 100px;
}

.g-sec:first-child {
  padding-top: 0;
  border-top: 0;
}

.g h2 {
  margin-bottom: .8rem;
  color: var(--g-ink);
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  font-weight: 750;
  letter-spacing: -.025em;
}

.g h3 {
  margin: 1.65rem 0 .6rem;
  color: var(--g-ink);
  font-size: 1.05rem;
  font-weight: 750;
}

.g-sec p,
.g-sec li {
  line-height: 1.75;
}

.g-sec p {
  color: #405861;
}

.g .small.text-muted {
  line-height: 1.65;
}

.g label {
  margin-bottom: .4rem;
  color: var(--g-ink);
  font-size: .82rem;
  font-weight: 750;
}

.g :not(pre) > code {
  padding: .12rem .38rem;
  border-radius: 5px;
  background: #edf4f5;
  color: var(--g-ink);
  font-size: .87em;
  overflow-wrap: anywhere;
}


/* =========================================================
   CONTENTS NAVIGATION
   ========================================================= */

.g-toc-heading {
  margin: 0 0 0.75rem;
  color: var(--g-ink);
  font-size: 0.78rem;
  font-weight: 800;     
  letter-spacing: .08em;
  text-transform: uppercase;
}

.g-toc ul {  margin: 0;
  padding: 0;
  border-left: 2px solid var(--g-line);
  list-style: none;
}

.g-toc li {
  margin: 0;
  padding: 0;
}

.g-toc a {
  display: block;
  margin-left: -2px;
  padding: .48rem .8rem .48rem 1rem;
  border-left: 2px solid transparent;
  border-radius: 0 7px 7px 0;
  color: #5a7078;
  font-size: .9rem;
  line-height: 1.35;
  text-decoration: none;
}

.g-toc a:hover,
.g-toc a:focus {
  border-left-color: var(--g-accent);
  background: #f4f7f7;
  color: var(--g-ink);
  text-decoration: none;
}

/*
 * JS uses aria-current="location".
 * Match the attribute regardless of its valid value.
 */
.g-toc a[aria-current] {
  border-left-color: var(--g-accent);
  background: var(--g-wash);
  color: var(--g-ink);
  font-weight: 700;
}

.g-toc-short {
  display: none;
}

/* Desktop left-hand sticky contents panel */
@media (min-width: 992px) {
  .g-toc {
    position: sticky;
    top: 140px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .g-toc ul {
    position: static;
  }
}

/* Tablet and mobile contents pills */
@media (max-width: 991.98px) {
  .g-toc {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .g-toc ul {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: 0;
    border: 0;
  }

  .g-toc li {
    max-width: 100%;
  }

  .g-toc a {
    margin: 0;
    padding: .4rem .7rem;
    border: 1px solid var(--g-line);
    border-radius: 999px;
    background: #fff;
    color: var(--g-ink);
    font-size: .82rem;
    line-height: 1.3;
  }

  .g-toc a:hover,
  .g-toc a:focus,
  .g-toc a[aria-current] {
    border-color: var(--g-accent);
    background: var(--g-wash);
  }
}

@media (max-width: 575.98px) {
  .g-toc-full {
    display: none;
  }

  .g-toc-short {
    display: inline;
  }
}

/* =========================================================
   4. PANELS, FORMS AND INPUTS
   ========================================================= */

.g-panel {
  padding: clamp(1rem, 2.5vw, 1.7rem);
  border: 1px solid #d9e4e7;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(7, 56, 74, .09);
}

.g .form-control {
  min-height: 44px;
  border-color: #cbd9de;
  border-radius: 9px;
  color: #193d49;
}

.g .form-control:focus {
  border-color: #7c9da7;
  box-shadow: 0 0 0 .2rem rgba(7, 56, 74, .12);
}


/* =========================================================
   5. CODE BLOCKS AND COPY CONTROLS
   ========================================================= */

.g-code {
  position: relative;
  margin: .8rem 0 1rem;
  padding: 1rem 4.6rem 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid #163f4e;
  border-radius: 11px;
  background: var(--g-code);
  color: #e0edf1;
  font: .82rem/1.7 ui-monospace, SFMono-Regular, Menlo,
    Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

.g-code code {
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  overflow-wrap: anywhere;
}

.g-code b {
  color: #e8d49b;
  font-weight: 650;
}

.g-copy {
  position: absolute;
  top: .55rem;
  right: .55rem;
  padding: .42rem .65rem;
  border: 1px solid #52717d;
  border-radius: 7px;
  background: #123b4a;
  color: #e0edf1;
  font-family: inherit;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.g-copy:hover,
.g-copy:focus {
  border-color: #fff;
  background: #fff;
  color: var(--g-ink);
}


/* =========================================================
   6. BUTTONS AND ALTERNATIVE ROUTES
   ========================================================= */

.g-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .68rem 1.15rem;
  border: 1px solid var(--g-ink);
  border-radius: 9px;
  background: var(--g-ink);
  color: #fff !important;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
}

.g-btn:hover {
  border-color: #0b5265;
  background: #0b5265;
}

.g-btn[aria-disabled="true"] {
  opacity: .45;
  pointer-events: none;
}

.g-route {
  position: relative;
  display: block;
  padding: 1rem 2rem 1rem 0;
  border-bottom: 1px solid var(--g-line);
  color: var(--g-muted);
  text-decoration: none;
}

.g-route::after {
  position: absolute;
  top: 1.2rem;
  right: .35rem;
  color: var(--g-accent);
  font-size: 1.25rem;
  content: "\2192";
  font-weight:bold;
}

.g-route:hover {
  color: var(--g-muted);
  text-decoration: none;
}

.g-route strong {
  display: block;
  margin-bottom: .2rem;
  color: var(--g-ink);
  font-size: 1rem;
}

.g-route:hover strong {
  color: #8a713a;
}


/* =========================================================
   7. STEPS, DISCLOSURES AND REFERENCE CHIPS
   ========================================================= */

.g-steps {
  padding: 0;
  counter-reset: s;
  list-style: none;
}

.g-steps li {
  position: relative;
  margin-bottom: 1rem;
  padding-left: 2.5rem;
  color: #405861;
  counter-increment: s;
}

.g-steps li::before {
  position: absolute;
  top: .08rem;
  left: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
  background: #eaf1f3;
  color: var(--g-ink);
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.7rem;
  text-align: center;
  content: counter(s);
}

.g details {
  border-bottom: 1px solid var(--g-line);
}

.g summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--g-ink);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.g summary::-webkit-details-marker {
  display: none;
}

.g summary::after {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  flex: 0 0 1.6rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--g-line);
  border-radius: 50%;
  color: var(--g-ink);
  font-weight: 500;
  content: "+";
}

.g details[open] summary::after {
  background: var(--g-wash);
  content: "−";
}

.g details > div {
  padding: 0 0 1.1rem;
  color: #405861;
  line-height: 1.7;
}

.g-chip {
  display: inline-block;
  margin: .15rem .25rem .15rem 0;
  padding: .2rem .65rem;
  border-radius: 6px;
  background: #edf3f4;
  color: var(--g-ink);
  font-size: .78rem;
  font-weight: 700;
}

.g-chip.hot {
  background: #f2ead7;
  color: #6f5724;
}

.g-stat {
  height: 100%;
  margin-bottom: 1rem;
  padding: .8rem .9rem;
  border: 1px solid var(--g-line);
  border-radius: 10px;
  background: #fff;
  color: var(--g-muted);
  font-size: .85rem;
}

.g-stat strong {
  display: block;
  margin-bottom: .15rem;
  color: var(--g-ink);
  font-size: 1.2rem;
}


/* =========================================================
   8. TABS
   ========================================================= */

.g .nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.g .nav-pills .nav-link {
  padding: .5rem .85rem;
  border: 1px solid var(--g-line);
  border-radius: 8px;
  color: var(--g-ink);
  font-size: .85rem;
  font-weight: 700;
}

.g .nav-pills .nav-link.active {
  border-color: var(--g-ink);
  background: var(--g-ink);
  color: #fff;
}

.g .tab-content {
  margin-top: .5rem;
  padding: 1rem;
  border: 1px solid var(--g-line);
  border-radius: 12px;
  background: #fbfcfc;
}


/* =========================================================
   9. SEARCH BAR
   ========================================================= */

.g-search-wrap {
  padding: .7rem 1rem;
  border-top: 1px solid rgba(7, 56, 74, .18);
  border-bottom: 1px solid rgba(7, 56, 74, .18);
  background: rgba(250, 252, 252, .96);
}

.g-search-wrap.row {
  margin-right: 0;
  margin-left: 0;
}

.g-search {
  display: flex;
  max-width: 1320px;
  align-items: center;
  gap: .7rem;
  margin: 0 auto;
}

.g-search label {
  margin: 0;
  white-space: nowrap;
}

.g-search input {
  min-width: 0;
  max-width: 38rem;
  flex: 1 1 auto;
}

.g-search-count {
  min-width: 5.5rem;
  color: var(--g-muted);
  font-size: .82rem;
  text-align: right;
}

.g-search-clear {
  padding: .55rem .8rem;
  border: 1px solid #cbd9de;
  border-radius: 8px;
  background: #fff;
  color: var(--g-ink);
  font-size: .85rem;
  font-weight: 650;
}

.g-search-clear:hover {
  background: #edf4f5;
}

.g-sec.g-search-match {
  border-radius: 10px;
}


/* =========================================================
   10. ACCESSIBILITY AND MOTION
   ========================================================= */

.g a:focus-visible,
.g button:focus-visible,
.g input:focus-visible,
.g select:focus-visible,
.g summary:focus-visible {
  outline: 3px solid #c5a65d;
  outline-offset: 3px;
}


/* =========================================================
   12. SMALL PHONES
   ========================================================= */

@media (max-width: 575.98px) {
  .g .title-banner-secondary {
    padding: 2.1rem 1rem 2.3rem !important;
  }

  .g-sec {
    padding: 2rem 0;
  }

  .g-code {
    padding: 2.7rem .8rem .9rem;
    font-size: .76rem;
  }

  .g-copy {
    top: .5rem;
    right: auto;
    left: .5rem;
  }

  .g .tab-content {
    padding: .7rem;
  }

  /* Use shorter labels to keep the contents pills compact. */
  .g-toc-full {
    display: none;
  }

  .g-toc-short {
    display: inline;
  }

  /* Let the search controls occupy multiple lines when needed. */
  .g-search-wrap {
    padding: .6rem .75rem;
  }

  .g-search {
    flex-wrap: wrap;
    gap: .45rem;
  }

  .g-search label {
    width: 100%;
  }

  .g-search input {
    flex: 1 1 60%;
  }

  .g-search-count {
    min-width: 0;
  }

  .g .title-banner {
    padding: 2rem 1rem 2.7rem;
  }
}


/* =========================================================
   13. REDUCED-MOTION PREFERENCE
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .g a {
    transition: none;
  }

  .g * {
    scroll-behavior: auto !important;
  }
}
