/* Shared chrome. The outer bars span the viewport and the contents share one gutter. */
.site-header, .site-footer {
  box-sizing: border-box;
  width: 100%;
  background: #fcfdfb;
  color: #162032;
}
.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid #c8d7d3;
}
.site-footer { margin-top: 3rem; border-top: 1px solid #c8d7d3; }
.site-header-inner, .site-footer-inner {
  box-sizing: border-box;
  width: min(100%, 1204px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .75rem;
}
.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .65rem;
  padding-block: 1.1rem;
  font: .9rem/1.5 system-ui, sans-serif;
}
.site-footer-inner p { margin: 0; }
.refract-release-status { display: none; }
.refract-release-status:target { display: block; }
.site-header-inner > .brand-wrap { min-width: 0; overflow-wrap: anywhere; }
.site-footer-inner :is(nav, p, span) { min-width: 0; overflow-wrap: anywhere; }
.site-footer-inner .footer-directory a { color: #174e72; text-decoration: underline; }
code.inline-code-token, code.inline-code-scroll {
  display: inline-block;
  box-sizing: border-box;
  max-inline-size: 100%;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
code.inline-code-scroll { overflow-x: auto; vertical-align: middle; }

/* The viewport chooses the navigation before the first paint. */
.site-header-inner > .brand-wrap { color: inherit; text-decoration: none; }
.site-header .header-actions a { min-height: 44px; box-sizing: border-box; }
.report-navigation .brand-wrap, .report-navigation .header-actions, .report-navigation .preset-btn {
  display: flex; align-items: center; gap: .65rem;
}
.report-navigation .brand-title { font-size: 1.25rem; font-weight: 700; color: #162032; }
.report-navigation .brand-glyph { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9px; background: #e9f4ef; }
.report-navigation .preset-btn { justify-content: center; padding: .4rem .65rem; text-decoration: none; color: inherit; font-size: .92rem; border: 1px solid transparent; border-radius: 8px; }
.report-navigation .preset-btn:hover, .report-navigation .preset-btn[aria-current] { background: #e8f3ee; }
.site-header .landing-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border: 1px solid #718883;
  border-radius: var(--radius-sm, 8px);
  background: #FFFFFF;
  color: var(--ink-sumi, #162032);
  font: 700 0.875rem "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}

.landing-menu-toggle::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-0.12em) rotate(45deg);
}

.landing-menu[open] > .landing-menu-toggle::after {
  transform: translateY(0.12em) rotate(225deg);
}

.landing-menu {
  display: none;
}

@media (max-width: 53.75em) {
  .site-header .site-header-inner > .header-actions {
    display: none;
  }

  .landing-menu {
    display: block;
  }

  .landing-menu .header-actions {
    position: absolute;
    inset: 100% 0 auto;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.4rem;
    max-block-size: calc(100dvh - 4.5rem);
    overflow-y: auto;
    padding: 0.6rem var(--landing-gutter, 1rem);
    border-block: 1px solid var(--landing-rule, #c8d7d3);
    background: #FCFDFB;
    box-shadow: var(--shadow-paper, 0 7px 18px #20343922);
  }

  .landing-menu .header-actions > a {
    grid-column: span 2;
    border-color: #718883;
    background: #FFFFFF;
    overflow-wrap: anywhere;
  }

  .landing-menu .header-actions > :nth-child(-n + 2) {
    grid-column: span 3;
  }

  .landing-menu:not([open]) .header-actions {
    display: none;
  }
}


.tool-notice { margin-block: 0 1rem; padding: 1rem; border: 1px solid #b39a64; border-radius: 8px; color: #382e19; background: #fff8e6; }
.tool-notice a { color: #174e72; text-decoration: underline; }

.footer-directory {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1rem;
  align-items: center;
}

.refract-directory { padding-inline: max(1rem, calc((100% - 1172px) / 2)); }
.footer-directory a { color: inherit; text-underline-offset: .2em; }
.footer-directory a:hover { text-decoration: underline; }

.code-token {
  display: inline-block;
  max-inline-size: 100%;
  word-break: normal;
  overflow-wrap: anywhere;
}

.section-jumper { display: none; }

@media (max-width: 40em) {
  .section-jumper {
    display: block;
    position: sticky;
    top: 0;
    z-index: 8;
    height: 44px;
    margin-block: 0 .65rem;
    color: #162032;
    font: 600 .9rem/1.3 system-ui, sans-serif;
  }

  .section-jumper summary {
    display: list-item;
    height: 44px;
    padding: 11px 14px;
    border: 1px solid #718883;
    border-radius: 8px;
    background: #fcfdfb;
    box-sizing: border-box;
    cursor: pointer;
  }

  .section-jumper-links {
    position: absolute;
    inset: 100% 0 auto;
    display: grid;
    max-height: min(60vh, 24rem);
    overflow-y: auto;
    padding: .25rem;
    border: 1px solid #718883;
    border-radius: 8px;
    background: #fcfdfb;
    box-shadow: 0 7px 18px #20343933;
  }

  .section-jumper details:not([open]) .section-jumper-links { display: none; }
  .section-jumper-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: .25rem .6rem;
    color: #174e72;
  }
  main:has(.section-jumper) :is(section, h2, nav, fieldset, div)[id] { scroll-margin-top: 52px; }
}
