/* RedM Natives — "cyanotype" drawing set.
   Dark = blueprint (Prussian blue, chalk lines). Light = blueline print (white paper, blue ink).
   Redline = the reviser's red pencil: community guesses and revision notes only. */

:root {
  --paper: #f4f7fb;
  --sheet: #ffffff;
  --deep: #e8eef6;
  --ink: #143a63;
  --ink-2: #4a6788;
  --ink-3: #7d93ad;
  --rule: rgba(20, 58, 99, 0.16);
  --rule-strong: rgba(20, 58, 99, 0.42);
  --grid: rgba(20, 58, 99, 0.05);
  --link: #0d5aa7;
  --redline: #c2372c;
  --redline-bg: rgba(194, 55, 44, 0.07);
  --tick: #143a63;
  --code-str: #8a4b08;
  --code-num: #0b6e75;
  --code-kw: #143a63;
  --code-fn: #0d5aa7;
  --code-com: #7d93ad;
  --shadow: 0 18px 50px rgba(10, 30, 55, 0.18);
  --font-display: 'League Gothic', 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Libre Franklin', 'Franklin Gothic', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --radius: 3px;
  --gutter: clamp(16px, 3vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0f2a4a;
    --sheet: #12325a;
    --deep: #0a2140;
    --ink: #e6eef6;
    --ink-2: #b4c6da;
    --ink-3: #8299b5;
    --rule: rgba(214, 228, 244, 0.16);
    --rule-strong: rgba(214, 228, 244, 0.45);
    --grid: rgba(214, 228, 244, 0.045);
    --link: #a9d4ff;
    --redline: #ff8a76;
    --redline-bg: rgba(255, 138, 118, 0.1);
    --tick: #e6eef6;
    --code-str: #ffd9a0;
    --code-num: #9fe3ff;
    --code-kw: #ffffff;
    --code-fn: #c6e4ff;
    --code-com: #7f98b6;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #0f2a4a;
  --sheet: #12325a;
  --deep: #0a2140;
  --ink: #e6eef6;
  --ink-2: #b4c6da;
  --ink-3: #8299b5;
  --rule: rgba(214, 228, 244, 0.16);
  --rule-strong: rgba(214, 228, 244, 0.45);
  --grid: rgba(214, 228, 244, 0.045);
  --link: #a9d4ff;
  --redline: #ff8a76;
  --redline-bg: rgba(255, 138, 118, 0.1);
  --tick: #e6eef6;
  --code-str: #ffd9a0;
  --code-num: #9fe3ff;
  --code-kw: #ffffff;
  --code-fn: #c6e4ff;
  --code-com: #7f98b6;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 76px;
}
body {
  margin: 0;
  background-color: var(--paper);
  /* the drafting grid: 8px minor, 40px major */
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  overflow-x: hidden;
}
a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.86em;
}
code {
  overflow-wrap: anywhere;
}
kbd {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-size: 11px;
  line-height: 18px;
  color: var(--ink-2);
}
h1,
h2,
h3 {
  margin: 0;
}
.muted {
  color: var(--ink-3);
}
.visually-hidden,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  background: var(--sheet);
  padding: 8px 12px;
}
.eyebrow,
.cell-label,
.source-tag,
.crumbs,
.section-head p,
th {
  font: 600 11px/1.3 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow {
  margin: 0 0 10px;
}

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-strong);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--ink);
  font: 400 19px/1 var(--font-display);
  letter-spacing: 0.02em;
}
.brand-name {
  font: 400 24px/1 var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.topsearch {
  position: relative;
  flex: 1 1 320px;
  max-width: 440px;
}
.topsearch svg,
.palette-field svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.6;
}
.topsearch input {
  width: 100%;
  height: 36px;
  padding: 0 64px 0 34px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--sheet);
  color: var(--ink);
  font: 400 14px var(--font-body);
}
.topsearch .hint {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}
.mainnav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
}
.mainnav a {
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  padding: 18px 0 16px;
  border-bottom: 2px solid transparent;
}
.mainnav a:hover,
.mainnav a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.iconbtn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.iconbtn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.iconbtn.menu {
  display: none;
}

/* ------------------------------------------------------------------ frame */
.frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  gap: 40px;
}
.frame.has-sidebar {
  grid-template-columns: 220px minmax(0, 1fr);
}
.frame.has-sidebar.has-aside {
  grid-template-columns: 220px minmax(0, 1fr) 200px;
}
.main {
  min-width: 0;
  overflow-wrap: break-word;
  padding: 36px 0 80px;
}
.sidebar {
  position: sticky;
  top: 60px;
  align-self: start;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 28px 4px 40px 0;
  scrollbar-width: thin;
}
.nsnav ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}
.nsnav a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 8px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  font: 500 13px/1.6 var(--font-mono);
}
.nsnav a:hover {
  color: var(--ink);
  background: var(--deep);
}
.nsnav a[aria-current='page'] {
  color: var(--ink);
  border-left-color: var(--ink);
  background: var(--deep);
}
.nsnav .count {
  color: var(--ink-3);
  font-weight: 400;
}
.nsfilter,
.listfilter {
  width: 100%;
  height: 32px;
  margin: 0 0 18px;
  padding: 0 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--sheet);
  color: var(--ink);
  font: 400 13px var(--font-body);
}
.listfilter {
  max-width: 360px;
}
.aside {
  position: sticky;
  top: 60px;
  align-self: start;
  padding: 36px 0;
}
.aside .eyebrow {
  margin-top: 4px;
}
.toc {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  font-size: 13.5px;
}
.toc a {
  display: block;
  padding: 2px 0;
  color: var(--ink-2);
  text-decoration: none;
}
.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ------------------------------------------------------------------ type */
.display {
  font: 400 clamp(56px, 9vw, 112px) / 0.9 var(--font-display);
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.display.small {
  font-size: clamp(44px, 6vw, 72px);
  margin-bottom: 18px;
}
.native-name {
  font: 400 clamp(34px, 5vw, 60px) / 0.98 var(--font-display);
  letter-spacing: 0.015em;
  overflow-wrap: anywhere;
  margin: 6px 0 14px;
}
.native-name.unofficial {
  text-decoration: underline wavy var(--redline) 2px;
  text-underline-offset: 8px;
}
.lede {
  max-width: 68ch;
  overflow-wrap: anywhere;
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
}
.sheet h2 {
  margin: 44px 0 14px;
  padding-top: 10px;
  border-top: 1px solid var(--rule-strong);
  font: 400 30px/1.1 var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.prose h2 {
  margin-top: 40px;
}
.prose h3 {
  margin: 24px 0 8px;
  font-size: 17px;
}
.prose p,
.prose li {
  max-width: 72ch;
}
.prose img {
  max-width: 100%;
  height: auto;
}
.crumbs {
  display: flex;
  gap: 8px;
}
.crumbs a {
  color: var(--ink-3);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--ink);
}

/* ------------------------------------------------------------------ the title block (signature) */
.titleblock {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--sheet) 70%, transparent);
  margin: 0 0 22px;
}
.cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 14px 12px;
  /* inner rules: every cell draws its right and bottom edge, the frame hides the outer ones */
  box-shadow: inset -1px -1px 0 var(--rule);
}
.cell.wide {
  grid-column: 1 / -1;
}
.cell-value {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  min-width: 0;
}
.cell-value code {
  font-size: 14px;
}
.copy-inline,
.copy {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-3);
  font: 600 10px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 6px;
  cursor: pointer;
}
.copy-inline {
  position: absolute;
  top: 7px;
  right: 7px;
}
.copy-inline:hover,
.copy:hover {
  color: var(--ink);
  border-color: var(--rule-strong);
}
.copied {
  color: var(--ink) !important;
  border-color: var(--ink) !important;
}
.redline {
  color: var(--redline);
}
.flag {
  border-left: 3px solid var(--redline);
  background: var(--redline-bg);
  padding: 8px 12px;
  font-size: 14px;
}

.ticks {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}
.ticks i {
  width: 7px;
  height: 14px;
  border: 1.5px solid var(--tick);
  opacity: 0.35;
}
.ticks i.on {
  background: var(--tick);
  opacity: 1;
}
.coverage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 12px var(--font-mono);
  color: var(--ink-2);
}
.coverage-bar {
  position: relative;
  width: 64px;
  height: 6px;
  border: 1px solid var(--rule-strong);
}
.coverage-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--ink);
}

/* ------------------------------------------------------------------ code */
.code {
  position: relative;
  margin: 0 0 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--deep);
}
.code figcaption {
  padding: 7px 12px;
  border-bottom: 1px solid var(--rule);
  font: 600 11px/1.3 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.6;
  tab-size: 4;
}
.code .copy {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--deep);
  opacity: 0;
  transition: opacity 0.15s;
}
.code:hover .copy,
.code .copy:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .code .copy {
    opacity: 1;
  }
}
.hl .hljs-keyword,
.hl .hljs-built_in,
.hl .hljs-literal {
  color: var(--code-kw);
  font-weight: 600;
}
.hl .hljs-string,
.hl .hljs-template-string {
  color: var(--code-str);
}
.hl .hljs-number {
  color: var(--code-num);
}
.hl .hljs-comment {
  color: var(--code-com);
  font-style: italic;
}
.hl .hljs-title,
.hl .hljs-title.function_,
.hl .hljs-function .hljs-title {
  color: var(--code-fn);
}
.hl .hljs-type,
.hl .hljs-params {
  color: var(--ink-2);
}
a.xref {
  color: inherit;
  text-decoration: underline dotted var(--ink-3) 1px;
}
a.xref:hover {
  text-decoration-style: solid;
  color: var(--link);
}

/* ------------------------------------------------------------------ tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1.5px solid var(--rule-strong);
  white-space: nowrap;
}
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
td p {
  margin: 0;
}
td {
  overflow-wrap: anywhere;
}
.params td:first-child {
  white-space: nowrap;
}
code.unknown {
  color: var(--ink-3);
}
code.type {
  color: var(--ink-2);
}
.returns {
  margin: 14px 0 0;
}
.natives td {
  padding: 7px 10px;
}
.natives .col-name a {
  font: 500 13.5px/1.4 var(--font-mono);
  overflow-wrap: anywhere;
  text-decoration: none;
}
.natives .col-name a:hover {
  text-decoration: underline;
}
.natives a.unofficial {
  color: var(--ink);
}
.natives .ns {
  color: var(--ink-3);
}
.row-summary {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.45;
}
.col-hash code,
.col-sig code {
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}
.col-sig code {
  white-space: normal;
}
.col-doc {
  width: 1%;
}
.tablefilter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 8px 0 12px;
  font-size: 14px;
}
.tablefilter input[type='search'] {
  flex: 1 1 280px;
  max-width: 460px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--sheet);
  color: var(--ink);
  font: 400 14px var(--font-body);
}
.tablefilter button,
.herosearch button,
.btn {
  display: inline-block;
  height: 36px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font: 600 14px/33px var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
}
.tablewrap {
  overflow-x: auto;
}
.reftable td {
  font-size: 13.5px;
}
.reftable code {
  font-size: 12.5px;
  cursor: copy;
}
.col-idx {
  width: 1%;
  text-align: right;
}
.kv {
  display: inline-block;
  margin-right: 14px;
}
.kv .k {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.members td:nth-child(2),
.members td:nth-child(3) {
  white-space: nowrap;
}
.pager {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  font-size: 14px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.tabs a {
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font: 500 13px var(--font-mono);
  text-decoration: none;
}
.tabs a[aria-current='page'] {
  border-color: var(--ink);
  color: var(--ink);
}

/* ------------------------------------------------------------------ native page details */
.desc + .desc {
  margin-top: 22px;
}
.source-tag {
  margin: 0 0 8px;
}
.source-tag a {
  color: inherit;
}
.desc-femga {
  border-left: 1px dashed var(--rule-strong);
  padding-left: 14px;
}
.revision {
  margin-top: 44px;
  padding: 2px 18px 8px;
  border: 1.5px solid var(--redline);
  border-radius: var(--radius);
  background: var(--redline-bg);
}
.revision h2 {
  border-top: 0;
  margin-top: 16px;
  color: var(--redline);
}
.more {
  margin: 0 0 16px;
}
.more > summary {
  cursor: pointer;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-2);
}
.callnotes {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-2);
}
.callnotes li + li {
  margin-top: 6px;
}
.linklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.linklist li {
  padding: 5px 0;
  border-bottom: 1px solid var(--rule);
}
.sources p {
  margin: 0 0 6px;
}

/* ------------------------------------------------------------------ home */
.hero {
  padding: 36px 0 34px;
}
.hero .display {
  margin: 0 0 22px;
}
.hero-sub {
  max-width: 62ch;
  margin: 0 0 26px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
}
.herosearch {
  display: flex;
  max-width: 760px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--sheet);
}
.herosearch input {
  flex: 1;
  min-width: 0;
  height: 60px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 500 20px var(--font-mono);
}
.herosearch input:focus {
  outline: none;
}
.herosearch:focus-within {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 35%, transparent);
}
.herosearch button {
  height: auto;
  border: 0;
  border-radius: 0;
  padding: 0 26px;
  font-size: 15px;
}
.herosearch.compact {
  margin: 0 0 24px;
}
.herosearch.compact input {
  height: 46px;
  font-size: 16px;
}
.live-results {
  list-style: none;
  max-width: 760px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-top: 0;
  background: var(--sheet);
}
.tries {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}
.tries a {
  margin-left: 10px;
  text-decoration: none;
}
.tries a:hover code {
  border-color: var(--ink);
}
.tries code {
  padding: 2px 6px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink-2);
}
.home-block {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.home-block .cell-value {
  font: 400 34px/1 var(--font-display);
  letter-spacing: 0.02em;
}
.home-block .cell-value a {
  color: inherit;
  text-decoration: none;
}
.ai-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin: 48px 0;
  padding: 26px 28px;
  border: 1.5px dashed var(--rule-strong);
  border-radius: var(--radius);
}
.ai-strip h2 {
  font: 400 34px/1.05 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.ai-strip p {
  margin: 0 0 14px;
  color: var(--ink-2);
}
.ai-strip .code {
  margin: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1.5px solid var(--rule-strong);
  padding-top: 10px;
  margin-bottom: 18px;
}
.section-head h2 {
  font: 400 34px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.section-head p {
  margin: 0;
}
.nsgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}
.nsgrid a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 12px 14px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}
.nsgrid a:hover {
  background: var(--deep);
}
.nsgrid-name {
  font: 600 13.5px var(--font-mono);
  overflow-wrap: anywhere;
}
.nsgrid-count {
  font: 400 13px var(--font-mono);
  color: var(--ink-3);
}
.nsgrid .coverage {
  grid-column: 1 / -1;
}
.nstable td {
  font-family: var(--font-mono);
  font-size: 13.5px;
}

.cardlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}
.cardlist a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
}
.cardlist a:hover {
  background: var(--deep);
}
.card-title {
  font: 600 13.5px/1.4 var(--font-mono);
  overflow-wrap: anywhere;
}
.cardlist .muted {
  font-size: 13px;
}
.cardlist.dense {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.refcat h2 {
  font-size: 24px;
  margin-top: 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: end;
}
@media (min-width: 1180px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}
.specimen {
  margin: 0;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--sheet);
  box-shadow: var(--shadow);
  /* pinned to the drafting table */
  transform: rotate(-0.6deg);
}
.specimen-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
}
.specimen-name {
  padding: 14px 14px 10px;
  font: 400 34px/1 var(--font-display);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
.specimen .titleblock {
  margin: 0 14px 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.specimen .code {
  margin: 0 14px 12px;
}
.specimen pre {
  white-space: pre-wrap;
  word-break: break-all;
}
.specimen .callnotes {
  margin: 0 14px 14px;
  font-size: 13px;
}
.specimen-foot {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}

/* ------------------------------------------------------------------ palette */
.palette {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10vh 16px 16px;
  background: color-mix(in srgb, #06121f 55%, transparent);
}
.palette[hidden] {
  display: none;
}
.palette-panel {
  width: min(720px, 100%);
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--sheet);
  box-shadow: var(--shadow);
}
.palette-field {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--rule-strong);
}
.palette-field input {
  flex: 1;
  height: 54px;
  padding: 0 14px 0 36px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 500 17px var(--font-mono);
}
.palette-field input:focus {
  outline: none;
}
.palette-field kbd {
  margin-right: 12px;
}
.palette-results,
.live-results {
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 4px 0;
}
.palette-results li a,
.live-results li a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 8px 14px;
  color: var(--ink);
  text-decoration: none;
}
.palette-results li[aria-selected='true'] a,
.palette-results li a:hover,
.live-results li[aria-selected='true'] a,
.live-results li a:hover {
  background: var(--deep);
  box-shadow: inset 2px 0 0 var(--ink);
}
.r-name {
  font: 500 14px/1.4 var(--font-mono);
  overflow-wrap: anywhere;
}
.r-name .ns {
  color: var(--ink-3);
}
.r-meta {
  font: 400 12px/1.4 var(--font-mono);
  color: var(--ink-3);
  text-align: right;
}
.r-sum {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.r-kind {
  font: 600 10px var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  padding: 1px 4px;
  margin-right: 6px;
}
.r-empty {
  padding: 14px;
  color: var(--ink-3);
  font-size: 14px;
}
.palette-foot {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 8px 14px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 30px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px var(--gutter) 40px;
  border-top: 1px solid var(--rule-strong);
  font-size: 13.5px;
  color: var(--ink-2);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1200px) {
  .frame.has-sidebar.has-aside {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .aside {
    display: none;
  }
}
@media (max-width: 980px) {
  .mainnav a:nth-child(n + 4) {
    display: none;
  }
}
@media (max-width: 860px) {
  .frame.has-sidebar,
  .frame.has-sidebar.has-aside {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    z-index: 30;
    width: min(300px, 86vw);
    max-height: none;
    padding: 20px 16px;
    background: var(--paper);
    border-right: 1px solid var(--rule-strong);
    box-shadow: var(--shadow);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .sidebar.open {
    transform: none;
  }
  body:has(#sidebar) .iconbtn.menu {
    display: grid;
  }
  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    row-gap: 0;
  }
  .topsearch {
    flex: 1 1 160px;
  }
  .mainnav {
    order: 5;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .mainnav a {
    padding: 10px 0 8px;
  }
  .mainnav a:nth-child(n + 4) {
    display: inline;
  }
  .sidebar {
    top: 0;
    z-index: 40;
  }
  .topsearch .hint {
    display: none;
  }
  .topsearch input {
    padding-right: 10px;
  }
  .ai-strip {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 16px;
  }
  .col-sig {
    display: none;
  }
}
@media (max-width: 560px) {
  .brand-name {
    display: none;
  }
  .topbar {
    gap: 10px;
  }
  .col-hash {
    display: none;
  }
  .herosearch input {
    height: 52px;
    font-size: 16px;
  }
  .herosearch button {
    padding: 0 14px;
  }
  .titleblock {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cell-value code {
    font-size: 12px;
  }
  .palette {
    padding-top: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
