.reference-page { --ref-base: #0b0c11; --ref-panel: #101118; --ref-muted: #a8a8b8; --ref-line: rgb(203 197 226 / 17%); --ref-line-bright: rgb(203 197 226 / 29%); --ref-accent: #c1afff; background: var(--ref-base); }
.reference-page [hidden] { display: none !important; }
.reference-page .nav-links [aria-current="page"] { color: var(--fg); background: rgb(255 255 255 / 5%); }
.reference-page .nav svg { fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.reference-shell { width: min(1432px, calc(100% - 2 * clamp(16px, 3.7vw, 64px))); margin-inline: auto; padding: 113px 0 26px; }
.reference-heading { margin-bottom: 26px; }
.reference-heading h1 { font-size: clamp(47px, 6.2vw, 78px); line-height: .98; font-weight: 540; letter-spacing: -.077em; overflow-wrap: anywhere; }
.reference-heading p { margin-top: 11px; color: var(--ref-muted); font-size: clamp(14px, 1.35vw, 17px); line-height: 1.5; }
.ref-mono { font: 11px/1.45 var(--mono); color: var(--ref-muted); }
.ref-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 6px 12px; color: var(--fg); background: #171821; border: 1px solid var(--ref-line); border-radius: 7px; font-size: 12px; font-weight: 560; line-height: 1.25; text-align: center; white-space: nowrap; }
.ref-button:hover:not(:disabled) { background: #21222e; border-color: var(--ref-line-bright); }
.ref-button.primary { color: #19142a; background: #b8a3fa; border-color: transparent; }
.ref-button.primary:hover { background: #c8b6ff; }
.ref-button:disabled { opacity: .45; cursor: default; }
.ref-button:focus-visible, .reference-back:focus-visible, .profile-memory summary:focus-visible { outline: 2px solid var(--ref-accent); outline-offset: 3px; }
.reference-status { color: var(--ref-muted); font-size: 13px; line-height: 1.5; }
.reference-status:is([data-error="true"],[data-tone="error"]) { color: #ffc8d2; }
.reference-panel-head, .profile-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.reference-panel-head h2, .profile-section-head h2 { font-size: 17px; font-weight: 565; letter-spacing: -.025em; }
.reference-footer { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding-top: 16px; color: var(--ref-muted); font-size: 11.5px; }
.reference-footer a:hover, .reference-back:hover { color: var(--ref-accent); }

.registry-metrics { border-block: 1px solid var(--ref-line); margin-bottom: 22px; }
.registry-metrics dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.registry-metrics dl div { padding: 12px clamp(10px, 1.5vw, 23px); border-left: 1px solid var(--ref-line); }
.registry-metrics dl div:first-child { padding-left: 0; border-left: 0; }
.registry-metrics dt { color: var(--ref-muted); font-size: 12.5px; }
.registry-metrics dd { margin: 5px 0 0; color: #f0ebfd; font: 25px/1.15 var(--mono); font-variant-numeric: tabular-nums; }
.registry-metrics[data-error="true"] dd { font-size: 13px; }
.directory, .registry-owners { overflow: clip; border: 1px solid var(--ref-line); border-radius: 12px; background: #0f1016; }
.directory > .reference-panel-head, .registry-owners > .reference-panel-head { padding: 14px 18px; border-bottom: 1px solid var(--ref-line); }
.directory > .reference-status, .registry-owners > .reference-status { padding: 12px 17px; }
.registry-search { display: grid; grid-template-columns: minmax(205px, 1.6fr) repeat(3, minmax(113px, .68fr)) auto; align-items: end; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--ref-line); }
.registry-search label { display: grid; gap: 5px; min-width: 0; color: var(--ref-muted); font-size: 11px; font-weight: 560; }
.registry-search :is(input,select) { width: 100%; min-width: 0; height: 37px; border: 1px solid var(--ref-line); border-radius: 7px; padding: 0 9px; background: #151620; color: var(--fg); font-family: inherit; font-size: 13px; line-height: 1.35; color-scheme: dark; }
.registry-search input::placeholder { color: #9293a4; }
.registry-search :is(input,select):focus { outline: 1px solid var(--ref-accent); outline-offset: 0; }
.registry-search button { height: 37px; }
.directory-empty { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); align-items: center; min-height: 300px; }
.directory-empty > div:first-child { padding: 26px clamp(20px, 4vw, 62px); }
.directory-empty h3 { max-width: 515px; color: var(--fg); font-size: clamp(29px, 3.6vw, 51px); font-weight: 530; line-height: 1.02; letter-spacing: -.058em; }
.directory-empty p { margin: 13px 0 18px; max-width: 42ch; color: var(--ref-muted); font-size: 14px; line-height: 1.55; }
.directory-instrument { overflow: hidden; display: grid; align-items: center; justify-items: center; position: relative; min-height: 300px; height: 100%; isolation: isolate; background-color: #0c0d14; border-left: 1px solid var(--ref-line); background-image: linear-gradient(to right,#1a1a26 1px,transparent 1px),linear-gradient(to bottom,#1a1a26 1px,transparent 1px); background-size: 40px 40px; background-position: center; }
.directory-instrument::before { position: absolute; content: ''; inset: 17px; border: 1px solid rgb(170 147 237 / 19%); border-radius: 3px; pointer-events: none; }
.directory-instrument img { position: absolute; width: min(78%, 350px); max-height: 93%; height: auto; object-fit: contain; opacity: .88; }
.registry-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.registry-cards:empty { display: none; }
.registry-file { display: flex; flex-direction: column; min-width: 0; padding: 16px; border-bottom: 1px solid var(--ref-line); border-right: 1px solid var(--ref-line); }
.registry-file:nth-child(3n) { border-right: 0; }
.registry-file-visual { display: flex; align-items: center; justify-content: center; height: 129px; margin-bottom: 12px; background: #0c0d14; border: 1px solid var(--ref-line); border-radius: 6px; }
.registry-file-visual img { width: 145px; height: 120px; object-fit: contain; }
.registry-file h3 { margin-bottom: 4px; font-size: 20px; letter-spacing: -.039em; font-weight: 570; overflow-wrap: anywhere; }
.registry-file .ref-mono { font-size: 10px; overflow-wrap: anywhere; }
.registry-file .file-purpose { color: #d0cedc; margin-block: 10px; font-size: 13px; line-height: 1.45; }
.registry-file dl { margin-bottom: 13px; }
.registry-file dl > div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 12px; border-top: 1px solid var(--ref-line); padding-block: 5px; }
.registry-file dt { color: var(--ref-muted); font-size: 11px; }
.registry-file dd { max-width: 100%; color: #e4deee; font-size: 11.5px; overflow-wrap: anywhere; }
.registry-file > a { align-self: flex-start; margin-top: auto; }
.registry-owners { margin-top: 17px; }
.registry-owners > .reference-panel-head { border-bottom: 0; }
.registry-owners .reference-panel-head p { color: var(--ref-muted); margin-top: 4px; font-size: 12px; }
.owner-rows { list-style: none; }
.owner-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--ref-line); }
.owner-row .ref-mono { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.owner-label { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.owner-label strong { color: var(--fg); font-size: 14px; overflow-wrap: anywhere; }
.owner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.reference-chip { display: inline-flex; flex: none; color: #d7c9f6; background: #1b1628; border: 1px solid #423551; border-radius: 5px; padding: 3px 7px; font: 10.5px/1.35 var(--mono); white-space: nowrap; }
.reference-pagination { display: flex; flex-wrap: wrap; gap: 7px 10px; align-items: center; justify-content: flex-end; padding: 10px 17px; border-top: 1px solid var(--ref-line); }

.reference-back { display: inline-flex; gap: 7px; color: var(--ref-muted); font-size: 12px; margin-bottom: 13px; }
.profile-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.profile-heading h1 { font-size: clamp(42px, 5.55vw, 72px); }
.reference-heading #profile-id { overflow-wrap: anywhere; font-size: 12px; }
.preview-notice { margin-bottom: 14px; padding: 9px 12px; border: 1px solid #403551; color: #d7c9f0; background: #171522; border-radius: 7px; font-size: 12.5px; }
.profile-message { min-height: 290px; padding: clamp(23px,4vw,56px); border: 1px solid var(--ref-line); border-radius: 11px; background: var(--ref-panel); }
.profile-message h1 { color: var(--fg); font-size: clamp(32px,4.6vw,56px); line-height: 1.06; letter-spacing: -.058em; }
.profile-message p { color: var(--ref-muted); margin: 10px 0 16px; font-size: 14px; }
.profile-workspace { display: grid; grid-template-columns: minmax(260px,.83fr) minmax(0,1.17fr); border: 1px solid var(--ref-line); border-radius: 12px; overflow: clip; background: #0e0f16; }
.profile-identity, .profile-core { padding: clamp(14px,1.7vw,23px); min-width: 0; }
.profile-core { border-left: 1px solid var(--ref-line); }
.profile-core .lab-viewport { height: clamp(280px, 29vw, 408px); }
.profile-core h2 { font-size: 17px; font-weight: 570; letter-spacing: -.027em; }
.profile-identity .profile-section-head { padding-bottom: 9px; }
.profile-facts { margin: 0; }
.profile-facts div { display: grid; grid-template-columns: minmax(86px,.53fr) minmax(0,1fr); gap: 4px 11px; padding: 9px 0 8px; border-top: 1px solid var(--ref-line); }
.profile-facts dt, .neural-profile-grid dt, .profile-activity dt { color: var(--ref-muted); font-size: 12px; }
.profile-facts dd, .neural-profile-grid dd { margin: 0; color: #e4e0ed; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.profile-facts dd.ref-mono { font-size: 11px; }
.profile-actions, .profile-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 13px; }
.profile-cta { padding-top: 11px; border-top: 1px solid var(--ref-line); }
.profile-cta > span, #mint-status { color: var(--ref-muted); font-size: 11.5px; }
.profile-panel { margin-top: 14px; padding: 14px 17px; border: 1px solid var(--ref-line); border-radius: 9px; background: var(--ref-panel); }
.profile-panel > .profile-section-head { margin-bottom: 10px; }
.neural-profile-grid, .profile-activity dl { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); margin: 0; border-top: 1px solid var(--ref-line); }
.neural-profile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 20px; }
.neural-profile-grid div, .profile-activity dl div { padding: 8px 0; min-width: 0; border-bottom: 1px solid var(--ref-line); }
.neural-profile-grid dd, .profile-activity dd { margin-top: 4px; }
.profile-activity dd { color: #ece9fa; font: 12px/1.45 var(--mono); overflow-wrap: anywhere; }
.profile-memory { list-style: none; }
.profile-memory li { border-top: 1px solid var(--ref-line); }
.profile-memory summary { cursor: pointer; padding: 9px 2px; color: var(--fg); font-size: 13px; }
.profile-memory summary .ref-mono { display: block; margin-top: 4px; }
.published-body { padding: 0 3px 12px; color: #dcd8e7; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.published-body p + p { margin-top: 10px; }
.profile-panel > button { margin-top: 7px; }

@media (max-width: 900px) {
  .registry-search { grid-template-columns: repeat(3,minmax(0,1fr)) auto; }
  .registry-query { grid-column: 1 / -1; }
  .registry-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .registry-file:nth-child(3n) { border-right: 1px solid var(--ref-line); }
  .registry-file:nth-child(2n) { border-right: 0; }
  .profile-activity dl { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .reference-shell { padding-top: 95px; }
  .reference-heading { margin-bottom: 18px; }
  .registry-metrics dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .registry-metrics dl div:nth-child(3) { padding-left: 0; border-left: 0; }
  .registry-metrics dl div:nth-child(n+3) { border-top: 1px solid var(--ref-line); }
  .registry-metrics dt { font-size: 11px; }
  .registry-metrics dd { font-size: 21px; }
  .registry-search { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 11px 12px; }
  .registry-search :is(input,select) { font-size: 16px; }
  .registry-search label { gap: 3px; }
  .directory > .reference-panel-head, .registry-owners > .reference-panel-head { padding-inline: 12px; }
  .directory-empty { grid-template-columns: minmax(0,1fr); }
  .directory-empty > div:first-child { padding: 19px 13px; }
  .directory-instrument { min-height: 184px; border-top: 1px solid var(--ref-line); border-left: 0; }
  .directory-instrument img { width: min(66%, 216px); }
  .directory-empty p { margin-block: 8px 13px; }
  .registry-cards, .profile-workspace, .neural-profile-grid { grid-template-columns: minmax(0,1fr); }
  .registry-file:nth-child(n) { border-right: 0; }
  .owner-row { padding-inline: 12px; }
  .owner-row .ref-button { min-height: 32px; padding-inline: 8px; }
  .profile-core { border-top: 1px solid var(--ref-line); border-left: 0; }
  .profile-core .lab-viewport { height: clamp(227px, 70vw, 360px); }
  .profile-panel { padding-inline: 12px; }
  .profile-activity dl { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 7px; }
}
.registry-guide { display: flex; flex-wrap: wrap; gap: 7px 17px; margin: 0 0 19px; padding-bottom: 13px; border-bottom: 1px solid var(--ref-line); }
.registry-guide p { flex-basis: 100%; max-width: 680px; color: var(--ref-muted); font-size: 14px; line-height: 1.55; }
.registry-guide a, .profile-docs-link { color: var(--ref-accent); text-decoration: underline; text-underline-offset: 4px; font-size: 12px; }
.registry-empty-mark { display: none; }
.directory-empty[data-kind='registry'] { border-color: #55436a; background-image: linear-gradient(#9c8cdd0b 1px,transparent 1px),linear-gradient(90deg,#9c8cdd0b 1px,transparent 1px); background-size: 23px 23px; }
.directory-empty[data-kind='registry'] .registry-empty-mark { display: block; margin: 0 0 11px; }
.profile-timeline { list-style: none; margin: 5px 0 3px 6px; border-left: 1px solid #765b99; }
.profile-timeline li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 16px; padding: 6px 8px 6px 15px; color: #c7bad8; font-size: 12px; }
.profile-timeline li::before { content: ''; width: 7px; height: 7px; position: absolute; left: -4px; top: 12px; border: 1px solid #c1a0f1; border-radius: 50%; background: #251b34; }
.profile-timeline strong { color: #e8dcf4; font-weight: 560; }
