/* QuadFacet public styling. Layouts adapted from Modern Business (MIT).
   Inner wrappers and ruled headings adapted from Forty (CC BY 3.0). */

@font-face {
  font-family: QFG Sans;
  src: url('/assets/qfg-sans-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: QFG Sans;
  src: url('/assets/qfg-sans-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --night: #0a1d36;
  --deep: #0c2c56;
  --blue: #0e3b6e;
  --ice: #afdbfc;
  --pale: #d7edfe;
  --white: #fff;
  --ink: #0f1928;
  --muted: #40536b;
  --line: #d2dfed;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  color: var(--white);
  background: var(--night);
  font: 1rem/1.55 'QFG Sans', 'Liberation Sans', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2 { line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(2.55rem, 5.2vw, 5rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.5rem); letter-spacing: -.035em; }
h3 { font-size: 1.18rem; line-height: 1.25; }
p { max-width: 62ch; }
a { color: inherit; text-underline-offset: .21em; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #69b9f6; outline-offset: 4px; }
::selection { color: var(--night); background: var(--ice); }
.skip { position: absolute; top: .75rem; left: .75rem; z-index: 5; padding: .7rem 1rem; background: var(--white); color: var(--deep); transform: translateY(-180%); }
.skip:focus { transform: none; }

#wrapper { display: flex; flex-direction: column; min-height: 100vh; }
#main { flex: 1; background-color: var(--deep); }
#main > * + * { border-top: 1px solid rgb(175 219 252 / 20%); }
#wrapper > * > .inner, #main > * > .inner {
  width: min(100% - 2 * var(--gutter), 76rem);
  margin-inline: auto;
}

header.major { width: fit-content; max-width: 100%; margin-bottom: 1.3rem; }
header.major > :first-child { margin-bottom: 0; }
header.major > :first-child::after {
  content: '';
  display: block;
  width: min(100%, 3.5rem);
  height: 2px;
  margin: .55em 0 0;
  background: currentColor;
}

#header { background: var(--night); border-bottom: 1px solid rgb(175 219 252 / 24%); }
#header .inner { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; min-height: 4.75rem; }
.logo { display: inline-flex; flex: none; gap: .7rem; align-items: center; font-size: 1.12rem; font-weight: 700; white-space: nowrap; }
.logo img { width: 54px; height: auto; }
#header a { text-decoration: none; }
#header nav { display: flex; align-self: stretch; justify-content: end; gap: clamp(.85rem, 2vw, 1.75rem); }
#header nav a { position: relative; display: flex; align-items: center; color: var(--pale); font-size: .93rem; }
#header nav a:hover, #header nav a[aria-current] { color: var(--white); }
#header nav a[aria-current]::after { content: ''; position: absolute; bottom: 0; inset-inline: 0; height: 2px; background: var(--ice); }
.mobile-menu-toggle { display: none; }

#banner {
  background: linear-gradient(115deg, #0b2444 35%, #10386a 100%);
}
#banner > .inner { padding-block: clamp(2.85rem, 5vw, 5.2rem); }
.banner-row { display: grid; grid-template-columns: minmax(0, 1.24fr) minmax(0, .76fr); gap: 1rem clamp(1rem, 4vw, 4rem); align-items: center; }
#banner h1 { text-wrap: initial; }
#banner header.major > :first-child::after { width: min(100%, 5rem); color: var(--ice); }
.lead { max-width: 42ch; color: var(--pale); font-size: clamp(1.07rem, 1.65vw, 1.25rem); }
.archive-hero { min-width: 0; }
.archive-spread { width: min(100%, 29rem); aspect-ratio: 1.13; position: relative; margin-inline: auto; }
.archive-spread img { position: absolute; width: 47%; height: auto; box-shadow: 0 1.2rem 2.8rem rgb(4 16 33 / 46%); border-radius: 3px; }
.archive-primary { top: 1%; left: 41%; transform: rotate(7deg); }
.archive-secondary { bottom: 1%; left: 11%; transform: rotate(-10deg); }
.archive-hero figcaption { color: var(--pale); text-align: center; margin-top: 1.1rem; font-size: .83rem; }

.lookup { margin-top: 1.65rem; max-width: 29rem; }
.lookup label, .stack label { display: block; font-weight: 700; }
.lookup-row { display: flex; align-items: stretch; margin-top: .42rem; }
input, textarea, button, .button { font: inherit; border-radius: 0; }
input, textarea { display: block; width: 100%; min-width: 0; padding: .7rem .8rem; border: 1px solid #a3b9d0; background: var(--white); color: var(--ink); }
input::placeholder { color: #5c6b7d; }
.lookup input { font-variant-numeric: tabular-nums; letter-spacing: .13em; border: 1px solid var(--white); caret-color: var(--deep); }
button, .button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.9rem; padding: .65rem 1rem; border: 1px solid transparent; background: var(--ice); color: var(--night); font-weight: 700; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--pale); }
.lookup button { flex: none; }
.hint { margin-top: .5rem; color: var(--pale); font-size: .9rem; }

.page-banner { background: linear-gradient(110deg, var(--deep), var(--blue)); }
.page-banner > .inner { padding-block: clamp(2.7rem, 4.5vw, 4.5rem); }
.page-banner h1 { font-size: clamp(2.45rem, 5.5vw, 4.5rem); overflow-wrap: anywhere; }
.page-banner .lead { max-width: 62ch; }
.page-links { display: flex; flex-wrap: wrap; gap: .7rem 1.6rem; margin-top: 1.25rem; font-weight: 700; }
.status-page .button { margin-top: 1.5rem; }
.paper { background: #fff; color: var(--ink); }
.paper > .inner { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.paper h2 { color: var(--deep); margin-bottom: 1rem; }
.paper p { color: var(--muted); }
.paper p + p { margin-top: 1rem; }
.paper a { color: var(--blue); }
.paper.tinted, .paper.facets-section { background: #f0f6fc; }
.paper.tinted, .paper.facets-section, .paper.resource-section { border-color: var(--line); }
.text-link { display: inline-block; margin-top: 1rem; font-weight: 700; }
.text-link::after, .home-paths h2 a::after { content: ''; display: inline-block; width: .5em; height: .5em; border: solid currentColor; border-width: 1.5px 1.5px 0 0; margin-left: .5em; vertical-align: .12em; transform: rotate(45deg); }
.home-paths .inner { padding-block: clamp(1.45rem, 2.75vw, 2.8rem); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-paths article { padding-inline: clamp(.85rem, 2.5vw, 2.45rem); }
.home-paths article:first-child { padding-left: 0; }
.home-paths article + article { border-left: 1px solid var(--line); }
.home-paths h2 { font-size: clamp(1.12rem, 2.1vw, 1.55rem); margin-bottom: .38rem; text-wrap: initial; }
.home-paths h2 a { text-decoration: none; }
.home-paths h2 a:hover { text-decoration: underline; }
.home-paths h2 a::after { font-size: .8em; }
.split-feature, .reference-layout, .guide-layout { display: grid; gap: clamp(1.75rem, 5vw, 5rem); }
.split-feature { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; }
.facets-section .split-feature { grid-template-columns: minmax(0, .63fr) minmax(0, 1.37fr); align-items: start; }
.facet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 2rem; }
.facet-grid > div { border-top: 1px solid #a6c3dd; padding-top: .68rem; }
.facet-grid dt { margin-bottom: .24rem; color: var(--deep); font-weight: 700; font-size: 1.18rem; }
.facet-grid dd { color: var(--muted); }
.photo-feature { background: #12335b; }
.photo-feature .inner { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.photo-feature h2 { margin-bottom: 1rem; }
.photo-feature p, .photo-feature figcaption { color: var(--pale); }
.photo-feature img { width: 100%; height: auto; border-radius: 4px; }
figcaption { margin-top: .65rem; font-size: .86rem; }
.archive-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; align-items: start; }
.archive-pair img { max-height: 325px; width: auto; justify-self: center; }
.archive-pair figcaption { grid-column: 1 / -1; }
.section-top, .submission-strip .inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.1rem 2rem; }
.section-top h2 { margin-bottom: .5rem; }
.section-top .text-link { margin-top: 0; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); margin-top: 1.65rem; }
.guide-card { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.guide-image { display: grid; height: 11rem; place-items: center; background: #dbe8f4; overflow: hidden; }
.guide-image img { width: auto; max-width: 87%; max-height: 9.3rem; object-fit: contain; }
.guide-body { padding: 1.2rem; }
.guide-body .guide-category { margin-bottom: .45rem; color: var(--blue); font-weight: 700; font-size: .84rem; }
.guide-body h3 { margin-bottom: .45rem; }
.guide-body h3 a { text-decoration: none; }
.guide-body h3 a:hover { text-decoration: underline; }
.submission-strip { background: var(--blue); }
.submission-strip .inner { padding-block: clamp(1.85rem, 4vw, 3rem); }
.submission-strip h2 { margin-bottom: .45rem; }
.submission-strip p { color: var(--pale); }
.document-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.6rem clamp(2.5rem, 7vw, 7rem); }
.reference-layout { grid-template-columns: minmax(0, .58fr) minmax(0, 1.42fr); }
.reference-layout aside h3, .prose h3 { margin-block: 1.4rem .45rem; color: var(--deep); }
.grade-reference, .faq { border-top: 1px solid #a6c3dd; }
.grade-reference > div { display: grid; grid-template-columns: minmax(9rem, .75fr) minmax(0, 1.25fr); align-items: start; gap: .65rem 1rem; padding-block: .75rem; border-bottom: 1px solid var(--line); }
.grade-reference dt { display: flex; align-items: baseline; gap: .6rem; font-weight: 700; color: var(--deep); }
.grade-reference dt span { min-width: 2.5rem; text-align: center; background: #d9eafa; font-variant-numeric: tabular-nums; }
.grade-reference .half-grade dt span { background: var(--white); }
.grade-reference dd { color: var(--muted); }
.workflow { margin: 0; padding: 0 0 0 1.65rem; }
.workflow li { padding: 0 0 1.2rem .48rem; margin: 0 0 1.2rem; border-bottom: 1px solid var(--line); }
.workflow li::marker { color: var(--blue); font-weight: 700; }
.workflow h2, .workflow h3 { margin-bottom: .42rem; color: var(--deep); }
.workflow h2 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); }
.guide-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); }
.guide-layout aside h2 { font-size: 1.4rem; margin-block: 1.4rem 0; }
.guide-layout aside .text-link { display: block; }
.guide-illustration { background: #eef5fc; padding: 1rem; }
.guide-illustration img { max-height: 26rem; height: auto; width: auto; margin-inline: auto; }
.guide-illustration figcaption { text-align: center; color: var(--muted); }
.faq details { border-bottom: 1px solid var(--line); padding: .8rem 0; }
.faq summary { font-weight: 700; color: var(--deep); cursor: pointer; }
.faq details p { margin: .55rem 0 0 1rem; }
.prose p, .prose li { max-width: 69ch; }
.prose p + h2, .prose ul + h2 { margin-top: 2rem; }
.reading-list { padding-left: 1.2rem; }
.reading-list li + li { margin-top: .45rem; }
.verify-banner .split-feature { gap: 1.55rem 3rem; }
.lookup-panel { padding: clamp(1rem, 2.5vw, 1.75rem); border: 1px solid #668caf; background: #0b2545; border-radius: 5px; }
.lookup-panel .lookup { margin-top: 0; }
.inquiry-panel { background: #f2f7fd; border: 1px solid var(--line); padding: clamp(1rem, 3vw, 2rem); border-radius: 6px; }
.inquiry-panel h2 { font-size: 1.5rem; }
.stack { display: grid; gap: 1.1rem; align-content: start; }
.stack input, .stack textarea { margin-top: .35rem; font-weight: 400; }
.stack textarea { resize: vertical; }
.stack button { justify-self: start; background: var(--blue); color: var(--white); }
.stack button:hover { background: var(--deep); }

.cert-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.eyebrow { margin-bottom: .45rem; color: var(--ice); font-weight: 700; }
.grade-box { display: grid; justify-items: center; min-width: 5rem; padding: .65rem .9rem; border: 1px solid var(--ice); }
.grade-box strong { font-size: clamp(1.65rem, 5vw, 3.3rem); line-height: 1.05; }
.cert-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; gap: 2rem; }
.cert-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cert-photos a { display: block; background: white; border: 1px solid var(--line); }
.cert-photos img { width: 100%; aspect-ratio: 5 / 7; object-fit: contain; }
.cert-photos figcaption { margin-top: .45rem; color: var(--muted); }
.facts > div { border-top: 1px solid var(--line); padding: .65rem 0; }
.facts dt { color: var(--deep); font-weight: 700; }
.card-description { margin-top: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }

#footer { border-top: 1px solid rgb(175 219 252 / 20%); }
#footer > .inner { padding-block: clamp(2rem, 4vw, 3rem) 1.1rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); gap: 1.6rem clamp(1rem, 3vw, 3rem); }
.footer-grid h2 { font-size: 1.05rem; letter-spacing: 0; margin-bottom: .72rem; }
.footer-grid div > a:not(.logo) { display: block; color: var(--pale); width: fit-content; text-decoration: none; margin-top: .45rem; font-size: .92rem; overflow-wrap: anywhere; }
.footer-grid div > a:hover { text-decoration: underline; }
.footer-grid .logo { text-decoration: none; }
.footer-brand p { color: var(--pale); margin-top: .65rem; max-width: 26ch; }
.footer-base { display: flex; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; margin-top: 2rem; padding-top: .9rem; border-top: 1px solid rgb(175 219 252 / 25%); color: var(--pale); font-size: .87rem; }

@media (max-width: 64rem) {
  #header .inner { flex-wrap: wrap; gap: .45rem .75rem; padding-block: .55rem; }
  #header nav { flex-basis: 100%; justify-content: start; flex-wrap: wrap; gap: 0 1.1rem; }
  #header nav a { min-height: 2.7rem; font-size: .88rem; }
  #header .mobile-menu-toggle:not([hidden]) { display: inline-flex; gap: .55rem; align-items: center; background: transparent; border: 1px solid #7292b3; color: var(--white); padding-inline: .65rem; border-radius: 4px; font-size: .88rem; }
  #header .menu-icon { width: 1.1rem; height: 14px; background: repeating-linear-gradient(to bottom, currentColor 0 2px, transparent 2px 6px); }
  #header .mobile-menu-toggle:not([hidden]) + nav { flex-direction: column; gap: 0; border-top: 1px solid rgb(175 219 252 / 24%); }
  #header .mobile-menu-toggle[aria-expanded="false"]:not([hidden]) + nav { display: none; }
  #header .mobile-menu-toggle:not([hidden]) + nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--ice); }
  #header .mobile-menu-toggle:not([hidden]) + nav a[aria-current]::after { display: none; }
}

@media (max-width: 46rem) {
  .banner-row, .split-feature, .facets-section .split-feature, .document-grid, .cert-grid, .reference-layout, .guide-layout { grid-template-columns: minmax(0, 1fr); }
  #banner h1 { font-size: clamp(1.95rem, 8.5vw, 3.15rem); }
  .archive-hero { margin-top: .45rem; }
  .archive-spread { width: min(70%, 16rem); }
  .archive-hero figcaption { margin-top: .5rem; }
  .home-paths .inner { grid-template-columns: 1fr; }
  .home-paths article, .home-paths article:first-child { padding: .8rem 0; }
  .home-paths article + article { border-left: 0; border-top: 1px solid var(--line); }
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-card { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1fr); }
  .guide-image { height: 100%; min-height: 8.5rem; }
  .guide-image img { max-height: 7.5rem; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 24rem) {
  #header .inner { column-gap: .45rem; }
  #header .logo { gap: .5rem; font-size: .95rem; }
  #header .logo img { width: 38px; }
  #header .mobile-menu-toggle:not([hidden]) { padding-inline: .45rem; }
  .lookup-row button { padding-inline: .65rem; font-size: .88rem; }
  #header nav { column-gap: .75rem; }
  .facet-grid, .grade-reference > div { grid-template-columns: minmax(0, 1fr); }
  .guide-card { display: block; }
}
