:root {
  color-scheme: light;
  --navy: #152854;
  --cobalt: #233bb8;
  --gold: #ffdc62;
  --paper: #fffcf5;
  --panel: #fffefa;
  --sidebar: #fbf3de;
  --chart: #faf5e8;
  --rule: #ded5c5;
  --text: #222846;
  --muted: #59586a;
  --rail: 16.125rem;
  --inset: 2.5rem;
  --mono: Consolas, 'Liberation Mono', monospace;
  font: 100%/1.5 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--paper); }
h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.visually-hidden, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { position: absolute; z-index: 2; top: .5rem; left: .5rem; padding: .5rem 1rem; background: var(--gold); color: var(--navy); }

.masthead { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 4.75rem; color: white; background: var(--navy); }
.masthead a:focus-visible, .section-bar a:focus-visible { outline-color: var(--gold); }
.brand { display: flex; align-items: center; padding: .8rem 1.625rem; border-right: 1px solid #405078; }
.brand img { display: block; width: 11.125rem; max-width: 100%; height: auto; }
.mast-content { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-inline: var(--inset); font-size: .9375rem; font-weight: 600; }
.mast-content a { text-decoration: none; }
.mast-content .mast-end { text-decoration: underline; text-decoration-color: #adbce2; }
.layout { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-rows: 1fr auto; min-height: calc(100vh - 4.75rem); }
.sidebar { grid-row: 1 / 3; display: flex; flex-direction: column; align-items: stretch; padding: 2rem 1.3rem 1.55rem; background: var(--sidebar); border-right: 1px solid var(--rule); }
.eyebrow { font: 700 .8125rem/1.35 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--cobalt); }
.side-label { margin: 0 .65rem .65rem; color: #655e50; font-size: .75rem; font-weight: 400; }
.sidebar a { text-decoration: none; }
.side-items a, .side-extra a { display: flex; align-items: center; gap: .6rem; min-height: 2.45rem; padding: .38rem .65rem; font-size: .875rem; font-weight: 550; }
.side-items a[aria-current], .side-extra a[aria-current] { color: var(--navy); background: var(--gold); font-weight: 700; }
.side-items a:hover:not([aria-current]), .side-extra a:hover:not([aria-current]) { background: #f3e8ce; }
.nav-mark { display: inline-grid; flex: 0 0 .6875rem; width: .6875rem; height: .6875rem; place-content: center; }
.nav-mark::before { content: ''; width: .25rem; height: .25rem; border-radius: 50%; background: #a29481; }
.nav-mark-all::before { width: .64rem; height: .64rem; border-radius: 0; background: radial-gradient(circle at 1px 1px, currentColor 1px, transparent 1.2px) 0 0 / 3px 3px; }
.side-extra { margin-top: 1.55rem; padding-top: .9rem; border-top: 1px solid var(--rule); }
.site-address { margin: auto .65rem 0; padding-top: .9rem; border-top: 1px solid var(--rule); color: #655e50; font: .8125rem/1.4 var(--mono); }
.main { width: 100%; max-width: 98rem; min-width: 0; padding: 2.4rem var(--inset) 2.75rem; }
.site-footer { grid-column: 2; width: 100%; max-width: 98rem; padding: 0 var(--inset) 1.45rem; color: var(--muted); font-size: .875rem; }
.site-footer p { border-top: 1px solid var(--rule); padding-top: .85rem; }
.site-footer a { color: var(--cobalt); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-top: .6rem; }

.home-intro h1, .entry-head h1 { color: var(--cobalt); font-size: clamp(2.05rem, 3.5vw, 2.6875rem); line-height: 1.12; font-weight: 650; letter-spacing: -.043em; }
.home-intro p { margin-top: .7rem; color: var(--muted); }
.searchbox { display: flex; align-items: center; min-height: 3.3125rem; gap: .75rem; margin: 1.65rem 0 1.375rem; border: 1px solid #b3aebc; background: var(--panel); }
.searchbox:focus-within { border-color: var(--cobalt); }
.searchbox input { flex: 1 1 0; width: 0; min-width: 0; min-height: 3.15rem; padding: .5rem .125rem; color: var(--text); background: transparent; border: 0; }
.searchbox input:focus { outline: none; }
.searchbox input::placeholder { opacity: 1; color: var(--muted); }
.search-icon { position: relative; display: block; flex: 0 0 .875rem; width: .875rem; height: .875rem; margin-left: 1rem; color: var(--cobalt); border: 1.6px solid; border-radius: 50%; }
.search-icon::after { position: absolute; content: ''; width: .36rem; height: 1.6px; top: .66rem; left: .62rem; transform: rotate(45deg); background: currentColor; }
.button { align-self: stretch; padding: 0 1.5rem; border: 0; background: var(--cobalt); color: #fff; font-size: .9375rem; font-weight: 650; }
.button:hover { background: var(--navy); }

.catalogue-grid { display: grid; grid-template-columns: 1.04fr 1fr; gap: 1.25rem; align-items: start; }
.pane { min-width: 0; border: 1px solid var(--rule); background: var(--panel); }
.pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding: 1rem 1.05rem .85rem; }
.pane-head h2, .section-bar h2 { font-size: 1.1875rem; line-height: 1.3; font-weight: 650; letter-spacing: -.022em; }
.context, .model-topic, .source-kind, .archive-kind { font: .8125rem/1.4 var(--mono); color: var(--muted); }
.context { text-align: right; }
.model-list li { border-top: 1px solid var(--rule); }
.model-link { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) 6.8rem; min-height: 4.0625rem; gap: .75rem; padding: .55rem 1.05rem; text-decoration: none; }
.model-link:hover { background: #f8f1df; }
.model-link.featured { background: #fff2bf; box-shadow: inset 3px 0 #c59924; }
.model-link.featured strong, .model-link:hover strong { color: var(--cobalt); }
.model-link strong { display: block; font-size: .975rem; line-height: 1.25; font-weight: 650; }
.model-link .usage { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-top: .2rem; color: var(--muted); font-size: .875rem; line-height: 1.35; }
.model-topic { text-align: right; }
.more { display: block; padding: .7rem 1rem; width: 100%; border: 0; border-top: 1px solid var(--rule); color: var(--cobalt); background: transparent; text-align: left; font-size: .875rem; font-weight: 650; }
.more:hover { background: var(--sidebar); }
.no-results { padding: 1rem; border-top: 1px solid var(--rule); color: var(--muted); }

.preview { padding: 1.05rem 1.125rem 1rem; }
.preview h2 { margin: .25rem 0 .45rem; font-size: 2rem; line-height: 1.25; font-weight: 650; letter-spacing: -.035em; }
.preview h2 a { text-decoration: none; }
.preview h2 a:hover { text-decoration: underline; }
.preview-summary { color: var(--muted); font-size: .9375rem; max-width: 25rem; }
.plot { min-width: 0; margin-top: 1rem; padding: .65rem .75rem .55rem; border: 1px solid var(--rule); background: var(--chart); }
.plot figcaption { color: #584f4b; font: .8125rem/1.45 var(--mono); }
.plot canvas { display: block; width: 100%; height: 13.0625rem; }
.plot-key { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; margin-top: .15rem; padding: .4rem .125rem 0; border-top: 1px solid var(--rule); color: var(--muted); font-size: .875rem; }
.plot-key span { display: inline-flex; align-items: center; gap: .4rem; }
.plot-swatch { width: 1.125rem; height: 2px; background: var(--cobalt); }
.plot-swatch.alt { background: repeating-linear-gradient(to right, #a74d39 0 5px, transparent 5px 8px); }
.text-link { color: var(--cobalt); font-weight: 600; }
.preview-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin-top: .7rem; font-size: .8625rem; }

.section-wrap { margin-top: 1.65rem; }
.section-bar { display: flex; justify-content: space-between; align-items: center; gap: .7rem; min-height: 2.75rem; padding: .6rem 1rem; background: var(--navy); color: #fff; }
.section-bar a { font-size: .875rem; font-weight: 600; text-decoration-color: #adbce2; }
.archive-list li { border-bottom: 1px solid var(--rule); }
.archive-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .72rem 1rem; font-size: .9375rem; text-decoration: none; }
.archive-list a:hover { background: var(--sidebar); }
.about { max-width: 48rem; margin-top: 2rem; }
.about h2 { font-size: 1.125rem; margin-bottom: .4rem; }
.about p { color: var(--muted); font-size: .9375rem; }
.reading-page { max-width: 58rem; }
.reading-page h1 { color: var(--cobalt); font-size: clamp(2rem, 4vw, 3.125rem); line-height: 1.15; letter-spacing: -.04em; }
.reading-page h2 { margin-top: 1.4rem; font-size: 1.3rem; }
.reading-page p { margin-top: .65rem; }
.reading-page p a { color: var(--cobalt); overflow-wrap: anywhere; }
.reading-page .archive-list { margin-top: .9rem; border-top: 1px solid var(--rule); }
.reading-page .archive-list a { padding-inline: .25rem; color: var(--cobalt); font-weight: 600; }
.reading-page .archive-list small { color: var(--muted); font-weight: 400; }
.legacy-anchor { scroll-margin-top: 1rem; }

.model-page .main { padding-top: 1.8rem; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .65rem; margin-bottom: 1.45rem; color: var(--muted); font-size: .875rem; }
.breadcrumbs a { color: var(--cobalt); }
.entry-head { margin-bottom: 1.7rem; padding-bottom: 1.45rem; border-bottom: 1px solid var(--rule); }
.entry-head h1 { font-size: clamp(2.1rem, 4.25vw, 3.375rem); }
.entry-head p { max-width: 55rem; margin-top: .8rem; color: var(--muted); font-size: 1.075rem; line-height: 1.5; }
.entry-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 1fr); align-items: start; gap: 1.65rem; }
.entry-single { max-width: 55rem; }
.entry-body > section + section, .entry-sidebar > section + section { margin-top: 1.55rem; }
.entry-body h2 { margin-bottom: .5rem; font-size: 1.4rem; line-height: 1.2; font-weight: 650; letter-spacing: -.025em; }
.entry-body p { line-height: 1.55; }
.entry-body section > p + p, .entry-body section > p + ul,
.entry-body section > .table-scroll + p { margin-top: .7rem; }
.table-scroll { overflow-x: auto; }
.entry-body .plot canvas { height: 14.75rem; }
.example-comparison { margin-top: .75rem; width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
.example-comparison th, .example-comparison td { padding: .5rem .55rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.example-comparison thead { color: var(--navy); background: var(--sidebar); }
.numeric { text-align: right; font-family: var(--mono); }
.prose-list { padding-left: 1.3rem; list-style: disc; }
.prose-list li + li { margin-top: .4rem; }
.entry-sidebar .section-bar h2 { font-size: 1.0625rem; }
.material { border: 1px solid var(--rule); background: var(--panel); }
.material.editorial .section-bar { background: var(--gold); color: var(--navy); }
.material .resource { padding: .8rem 1rem .9rem; }
.material .resource + .resource { border-top: 1px solid var(--rule); }
.resources-inline { border-top: 1px solid var(--rule); }
.resources-inline .resource { padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.resource a { color: var(--cobalt); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.resource .source-kind { margin-top: .45rem; }

@media (max-width: 1190px) {
  :root { --rail: 14rem; --inset: 1.6rem; }
  .sidebar { padding-inline: 1rem; }
  .entry-grid { gap: 1.15rem; }
}

@media (max-width: 900px) {
  :root { --rail: 12.5rem; --inset: 1.15rem; }
  .catalogue-grid, .entry-grid { grid-template-columns: 1fr; }
  .entry-sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
  .entry-sidebar > section + section { margin: 0; }
}

@media (max-width: 690px) {
  :root { --inset: 1rem; }
  .masthead { display: flex; align-items: stretch; justify-content: space-between; min-height: 3.6rem; }
  .brand { padding-inline: 1rem .55rem; border: 0; }
  .brand img { width: 8.6rem; }
  .mast-content { padding-left: .4rem; }
  .mast-content a:first-child { display: none; }
  .mast-content .mast-end { margin-left: auto; font-size: .8125rem; text-align: right; }
  .layout { display: block; min-height: 0; }
  .sidebar { gap: .5rem; padding: .65rem 0 .5rem; border-right: 0; border-bottom: 1px solid var(--rule); }
  .side-label, .site-address, .nav-mark { display: none; }
  .side-items, .side-extra { display: flex; gap: .3rem; padding-inline: var(--inset); }
  .side-items { overflow-x: auto; padding-block: .25rem; }
  .side-items li, .side-extra li { flex: none; }
  .side-items a, .side-extra a { min-height: 2rem; white-space: nowrap; }
  .side-extra { margin: 0; border: 0; }
  .main { padding-top: 1.7rem; }
  .searchbox { gap: .5rem; }
  .search-icon { margin-left: .65rem; }
  .button { padding-inline: .85rem; }
  .section-bar { align-items: flex-start; }
  .section-bar > a { max-width: 13rem; text-align: right; }
  .entry-head { padding-bottom: 1rem; margin-bottom: 1.25rem; }
}

@media (max-width: 430px) {
  .model-link { grid-template-columns: minmax(0, 1fr) 5.25rem; }
  .archive-list a { gap: .55rem; }
  .archive-kind { font-size: .75rem; }
  .section-bar h2 { font-size: 1rem; }
  .section-bar > a { font-size: .8125rem; }
  .plot { padding-inline: .4rem; }
}
