:root {
  color-scheme: dark;
  --bg: #090a0d;
  --bg-elevated: #0d0f14;
  --surface: #11131a;
  --surface-strong: #171a22;
  --surface-hover: #1c202a;
  --border: #282c36;
  --border-strong: #383d49;
  --text: #f3f5f7;
  --text-soft: #c9cdd5;
  --muted: #a6abb5;
  --subtle: #7f8692;
  --accent: #8797ff;
  --accent-strong: #aeb8ff;
  --accent-wash: #1b2039;
  --green: #75d7ad;
  --amber: #e2b86b;
  --rose: #db8c9d;
  --sidebar-width: 264px;
  --header-height: 68px;
  --content-width: 1240px;
  --font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", monospace;
  --ease: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 28px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: #080910;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 9px 13px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  transition: transform var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #0b0c10;
}

.sidebar-header {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #5966bd;
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.brand-mark.small {
  width: 28px;
  height: 28px;
  font-size: 9px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 1.25;
}

.brand small {
  margin-top: 2px;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.sidebar-close,
.menu-button {
  display: none;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 18px 12px;
}

.nav-section + .nav-section {
  margin-top: 26px;
}

.nav-label,
.rail-label,
.section-kicker,
.eyebrow,
.note-index {
  margin: 0;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.nav-label {
  padding: 0 10px 8px;
}

.nav-link {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.nav-link:hover {
  background: var(--surface);
  color: var(--text);
}

.nav-link.is-active {
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 500;
}

.nav-link.is-active::before {
  position: absolute;
  left: 0;
  width: 2px;
  height: 20px;
  background: var(--accent);
  content: "";
}

.nav-link svg {
  width: 17px;
  height: 17px;
}

.nav-link kbd,
.nav-count {
  margin-left: auto;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 10px;
}

.nav-link kbd {
  min-width: 22px;
  padding: 1px 5px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  text-align: center;
}

.nav-dot {
  width: 7px;
  height: 7px;
  margin: 0 5px;
  border-radius: 50%;
  background: var(--subtle);
}

.dot-violet { background: var(--accent); }
.dot-blue { background: #65b4e8; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-rose { background: var(--rose); }

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgb(117 215 173 / 9%);
}

.sidebar-footer .version {
  margin-left: auto;
}

.nav-scrim {
  display: none;
}

.page-frame {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--border);
  background: rgb(9 10 13 / 94%);
  backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-actions,
.breadcrumbs,
.header-search {
  display: flex;
  align-items: center;
}

.breadcrumbs {
  gap: 8px;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 11px;
}

.breadcrumbs svg {
  width: 12px;
  height: 12px;
}

.breadcrumbs strong {
  color: var(--text-soft);
  font-weight: 500;
}

.topbar-actions {
  gap: 18px;
}

.header-search {
  width: clamp(220px, 25vw, 330px);
  height: 38px;
  gap: 9px;
  padding: 0 9px 0 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--subtle);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}

.header-search:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.header-search svg {
  width: 16px;
  height: 16px;
}

.header-search span {
  flex: 1;
  text-align: left;
}

kbd {
  font-family: var(--font-mono);
}

.header-search kbd {
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 9px;
}

.text-link,
.inline-action {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.text-link:hover,
.inline-action:hover {
  color: var(--accent-strong);
}

main {
  min-height: calc(100vh - var(--header-height));
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: clamp(50px, 7vw, 110px);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: clamp(70px, 8vw, 112px) 36px 74px;
  border-bottom: 1px solid var(--border);
}

.hero-copy {
  min-width: 0;
  max-width: 760px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent-strong);
}

.eyebrow span {
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  max-width: 720px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.hero-lede {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.65vw, 20px);
  line-height: 1.65;
}

.hero-search {
  display: flex;
  width: min(100%, 620px);
  min-height: 58px;
  align-items: center;
  gap: 12px;
  margin-top: 38px;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 45px rgb(0 0 0 / 18%);
  transition: border-color var(--ease), transform var(--ease), background var(--ease);
}

.hero-search > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-search:hover {
  transform: translateY(-1px);
  border-color: #6570b7;
  background: var(--surface-strong);
}

.search-icon-wrap {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #454d7d;
  border-radius: 6px;
  background: var(--accent-wash);
  color: var(--accent-strong);
}

.search-icon-wrap svg {
  width: 19px;
  height: 19px;
}

.search-shortcut {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.search-shortcut kbd {
  min-width: 25px;
  padding: 3px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--subtle);
  font-size: 9px;
  text-align: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 22px;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta strong {
  color: var(--text-soft);
  font-weight: 600;
}

.hero-note {
  min-width: 0;
  align-self: center;
  padding: 26px 0 4px 25px;
  border-left: 1px solid var(--border-strong);
}

.hero-note blockquote,
.hero-note > p:last-child {
  overflow-wrap: anywhere;
}

.hero-note blockquote {
  margin: 24px 0 16px;
  color: var(--text-soft);
  font-size: 19px;
  line-height: 1.55;
}

.publication-snapshot dl { margin: 18px 0 0; }
.publication-snapshot dl div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid var(--border); }
.publication-snapshot dt { color: var(--subtle); font-family: var(--font-mono); font-size: 9px; }
.publication-snapshot dd { margin: 0; color: var(--text-soft); font-family: var(--font-mono); font-size: 10px; text-align: right; }
.machine-card .secondary-button { margin-top: 16px; }

.hero-note > p:last-child {
  margin: 0;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.65;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: clamp(50px, 7vw, 110px);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 36px;
}

.content-primary {
  min-width: 0;
}

.section-block {
  padding: 74px 0;
  border-bottom: 1px solid var(--border);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading h2,
.rail-section h2,
.rail-section h3 {
  margin: 8px 0 0;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.section-heading h2 {
  font-size: 30px;
}

.inline-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 3px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.inline-action svg,
.primary-button svg {
  width: 17px;
  height: 17px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.topic-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 18px;
  min-height: 104px;
  align-items: center;
  gap: 14px;
  padding: 17px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background var(--ease);
}

.topic-row:hover {
  background: var(--surface);
}

.topic-row strong,
.topic-row small {
  display: block;
}

.topic-row strong {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
}

.topic-row small {
  margin-top: 4px;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.4;
}

.topic-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
}

.topic-icon svg {
  width: 20px;
  height: 20px;
}

.topic-violet { color: var(--accent-strong); background: #181c32; }
.topic-blue { color: #87caee; background: #13232e; }
.topic-green { color: #8ce3bd; background: #12271f; }
.topic-amber { color: #eac780; background: #2b2415; }
.topic-rose { color: #e6a3b2; background: #2c1920; }

.topic-count {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 10px;
}

.row-arrow {
  width: 17px;
  height: 17px;
  color: var(--subtle);
  transition: transform var(--ease), color var(--ease);
}

.topic-row:hover .row-arrow,
.document-row:hover .row-arrow {
  transform: translateX(2px);
  color: var(--accent-strong);
}

.feature-heading {
  align-items: center;
}

.segmented-control {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-elevated);
}

.segmented-control button {
  min-height: 30px;
  padding: 4px 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--subtle);
  font-size: 11px;
  cursor: pointer;
}

.segmented-control button:hover {
  color: var(--text-soft);
}

.segmented-control button.is-selected {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.document-list,
.updates-list {
  border-top: 1px solid var(--border);
}

.document-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 104px 18px;
  gap: 16px;
  align-items: center;
  min-height: 98px;
  padding: 18px 10px;
  border-bottom: 1px solid var(--border);
  transition: background var(--ease), padding var(--ease);
}

.document-row:hover {
  padding-right: 14px;
  padding-left: 14px;
  background: var(--surface);
}

.document-index {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 10px;
}

.document-main strong,
.document-main small {
  display: block;
}

.document-main strong {
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 500;
}

.document-main small {
  max-width: 570px;
  margin-top: 5px;
  color: var(--subtle);
  font-size: 13px;
}

.document-meta {
  text-align: right;
}

.document-meta span {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.document-meta small {
  display: block;
  margin-top: 5px;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 8px;
}

.empty-state {
  padding: 28px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  color: var(--text-soft);
  font-weight: 500;
}

.empty-state span {
  margin-top: 4px;
  color: var(--subtle);
  font-size: 13px;
}

.updates-block {
  border-bottom: 0;
}

.updated-stamp {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.update-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 72px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  transition: background var(--ease);
}

.update-row:hover {
  background: var(--surface);
}

.update-row time,
.update-row span {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.update-row strong {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}

.content-rail {
  min-width: 0;
  border-left: 1px solid var(--border);
}

.rail-section {
  padding: 74px 0 42px 30px;
  border-bottom: 1px solid var(--border);
}

.rail-section h2 {
  max-width: 260px;
  font-size: 25px;
  line-height: 1.25;
}

.rail-section h3 {
  font-size: 19px;
  line-height: 1.35;
}

.quick-start ol {
  padding: 0;
  margin: 30px 0;
  list-style: none;
}

.quick-start li,
.contribute-steps li {
  display: flex;
  gap: 14px;
}

.quick-start li + li {
  margin-top: 22px;
}

.quick-start li > span,
.contribute-steps li > span {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 9px;
}

.quick-start strong,
.quick-start p {
  display: block;
}

.quick-start strong {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.quick-start p,
.principle-note p,
.contribute-card > p {
  margin: 3px 0 0;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.55;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease), border-color var(--ease);
}

.primary-button {
  padding: 8px 14px;
  border: 1px solid #aeb8ff;
  background: var(--accent-strong);
  color: #101225;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  background: #c0c7ff;
}

.secondary-button {
  padding: 8px 13px;
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  color: var(--text-soft);
}

.secondary-button:hover {
  border-color: #555c6a;
  background: var(--surface-hover);
}

.principle-note {
  display: flex;
  gap: 14px;
  padding-top: 36px;
}

.principle-note > svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--green);
}

.contribute-card {
  padding-top: 38px;
}

.contribute-card .secondary-button {
  margin-top: 20px;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  min-height: 120px;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 30px 36px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 12px;
}

.site-footer > div,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer p {
  margin: 0;
  text-align: center;
}

.site-footer nav {
  justify-content: flex-end;
  gap: 18px;
}

.site-footer a:hover {
  color: var(--text-soft);
}

dialog {
  color: var(--text);
}

dialog::backdrop {
  background: rgb(2 3 5 / 76%);
  backdrop-filter: blur(5px);
}

.search-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 50px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-elevated);
  box-shadow: 0 30px 90px rgb(0 0 0 / 60%);
}

.dialog-shell {
  display: flex;
  max-height: min(680px, calc(100vh - 50px));
  flex-direction: column;
}

.dialog-search-row {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.dialog-search-row > svg {
  width: 20px;
  height: 20px;
  color: var(--accent-strong);
}

.dialog-search-row input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.dialog-search-row input::placeholder {
  color: var(--subtle);
}

.escape-button {
  padding: 4px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  cursor: pointer;
}

.search-context {
  display: flex;
  justify-content: space-between;
  padding: 13px 16px 8px;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-results {
  min-height: 200px;
  overflow-y: auto;
  padding: 4px 8px 12px;
}

.search-result {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.search-result:hover,
.search-result.is-active {
  border-color: var(--border);
  background: var(--surface-strong);
}

.result-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 9px;
}

.search-result strong,
.search-result small {
  display: block;
}

.search-result strong {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}

.search-result small {
  margin-top: 3px;
  color: var(--subtle);
  font-size: 11px;
}

.result-type {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
}

.search-empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.search-empty svg {
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  color: var(--subtle);
}

.search-empty strong,
.search-empty span {
  display: block;
}

.search-empty strong {
  color: var(--text-soft);
  font-weight: 500;
}

.search-empty span {
  max-width: 330px;
  margin-top: 5px;
  color: var(--subtle);
  font-size: 12px;
}

.dialog-footer {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 10px;
}

.dialog-footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dialog-footer kbd {
  min-width: 18px;
  padding: 1px 4px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.document-dialog,
.contribute-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-elevated);
  box-shadow: 0 30px 90px rgb(0 0 0 / 60%);
}

.document-dialog article,
.contribute-dialog article {
  padding: 28px 30px 24px;
}

.document-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.document-kind {
  padding: 4px 7px;
  border: 1px solid #515b9e;
  border-radius: 4px;
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.document-topic {
  margin: 34px 0 8px;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document-dialog h2,
.contribute-dialog h2 {
  max-width: 570px;
  margin: 0;
  font-size: clamp(27px, 5vw, 38px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.16;
}

.document-summary {
  max-width: 570px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.document-preview-body {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.document-trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0 0;
  border: 1px solid var(--border);
  background: var(--border);
}

.document-trust div {
  min-width: 0;
  padding: 12px;
  background: var(--surface);
}

.document-trust dt,
.document-trust dd {
  margin: 0;
}

.document-trust dt {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.document-trust dd {
  margin-top: 5px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-preview-body h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.document-preview-body > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.preview-callout {
  margin-top: 24px;
  padding: 16px 18px;
  border-left: 2px solid var(--green);
  background: var(--surface);
}

.preview-callout strong {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.preview-callout p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.document-dialog footer,
.contribute-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.contribute-steps {
  display: grid;
  gap: 18px;
  padding: 24px 0 0;
  margin: 28px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.contribute-steps strong,
.contribute-steps p {
  display: block;
}

.contribute-steps strong {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}

.contribute-steps p {
  margin: 3px 0 0;
  color: var(--subtle);
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  transform: translateY(18px);
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--text-soft);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease), transform var(--ease);
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1100px) {
  :root {
    --sidebar-width: 242px;
  }

  .hero,
  .content-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 48px;
  }

  .hero-note blockquote {
    font-size: 17px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: min(300px, calc(100vw - 46px));
    transform: translateX(-102%);
    box-shadow: 20px 0 70px rgb(0 0 0 / 40%);
    transition: transform 220ms ease;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .nav-scrim {
    position: fixed;
    z-index: 25;
    inset: 0;
    border: 0;
    background: rgb(2 3 5 / 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ease);
  }

  body.nav-open .nav-scrim {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-close,
  .menu-button {
    display: grid;
  }

  .page-frame {
    margin-left: 0;
  }

  .topbar {
    padding: 0 20px;
  }

  .topbar-left {
    gap: 12px;
  }

  .hero,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 50px;
  }

  .hero-note {
    max-width: 550px;
  }

  .content-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .rail-section {
    padding: 44px 28px;
    border-right: 1px solid var(--border);
  }

  .quick-start {
    grid-row: span 2;
  }
}

@media (max-width: 680px) {
  .header-search {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }

  .menu-button,
  .sidebar-close,
  .primary-button,
  .secondary-button,
  .segmented-control button {
    min-height: 44px;
  }

  .header-search span,
  .header-search kbd,
  .topbar .text-link {
    display: none;
  }

  .hero,
  .content-layout,
  .site-footer {
    padding-right: 20px;
    padding-left: 20px;
  }

  .hero {
    padding-top: 58px;
    padding-bottom: 56px;
  }

  .hero h1 {
    font-size: 41px;
  }

  .hero-lede {
    font-size: 17px;
  }

  .hero-search {
    min-height: 56px;
  }

  .search-shortcut {
    display: none;
  }

  .hero-meta {
    display: grid;
  }

  .hero-note {
    padding-top: 8px;
  }

  .section-block {
    padding: 56px 0;
  }

  .section-heading,
  .feature-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-heading {
    gap: 18px;
  }

  .section-heading h2 {
    font-size: 27px;
  }

  .segmented-control {
    max-width: 100%;
    overflow-x: auto;
  }

  .topic-row {
    grid-template-columns: 40px minmax(0, 1fr) 16px;
    min-height: 96px;
    padding: 14px;
  }

  .topic-count {
    display: none;
  }

  .document-row {
    grid-template-columns: 22px minmax(0, 1fr) 16px;
    gap: 10px;
    min-height: 92px;
    padding: 14px 5px;
  }

  .document-meta {
    display: none;
  }

  .document-main strong {
    font-size: 14px;
  }

  .document-main small {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .update-row {
    grid-template-columns: 1fr auto;
    gap: 5px 14px;
    padding: 14px 5px;
  }

  .update-row time {
    grid-column: 1 / -1;
  }

  .content-rail {
    display: block;
  }

  .rail-section {
    padding: 40px 0;
    border-right: 0;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 38px;
    padding-bottom: 38px;
  }

  .site-footer p {
    text-align: left;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .dialog-footer {
    gap: 10px;
  }

  .dialog-footer span:last-child {
    display: none;
  }

  .document-dialog article,
  .contribute-dialog article {
    padding: 22px 20px;
  }

  .document-dialog footer,
  .contribute-dialog footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (forced-colors: active) {
  :focus-visible {
    outline: 3px solid Highlight;
  }

  .status-dot,
  .nav-dot,
  .eyebrow span,
  .article-label::before {
    background: Highlight;
  }

  .brand-mark,
  .topic-icon,
  .search-icon-wrap,
  .primary-button,
  .document-kind {
    border: 1px solid ButtonText;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Article template */
.article-body {
  background: var(--bg);
}

.article-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgb(9 10 13 / 94%);
  backdrop-filter: blur(12px);
}

.article-topbar nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
}

.article-topbar nav a:hover {
  color: var(--text);
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px) 220px;
  gap: clamp(60px, 8vw, 120px);
  max-width: 1120px;
  margin: 0 auto;
  padding: 52px 28px 100px;
}

.article-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 40px;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-breadcrumbs a:hover {
  color: var(--accent-strong);
}

.article-breadcrumbs span[aria-hidden="true"] {
  color: var(--border-strong);
}

.article-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-label::before {
  width: 18px;
  height: 1px;
  background: var(--accent);
  content: "";
}

.article-header h1 {
  max-width: 700px;
  margin: 20px 0 18px;
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.article-deck {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.article-metadata {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 34px 0 0;
  border: 1px solid var(--border);
  background: var(--border);
}

.article-metadata div {
  padding: 13px;
  background: var(--surface);
}

.article-metadata dt,
.article-metadata dd {
  margin: 0;
}

.article-metadata dt {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.article-metadata dd {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 11px;
}

.article-content {
  max-width: 72ch;
  margin-top: 58px;
  color: #c6cad2;
  font-size: 16px;
  line-height: 1.78;
}

.article-content h2,
.article-content h3 {
  position: relative;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.025em;
  scroll-margin-top: 90px;
}

.article-content h2 {
  margin: 68px 0 16px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 28px;
}

.article-content h3 {
  margin: 34px 0 12px;
  font-size: 19px;
}

.article-content p,
.article-content ul,
.article-content ol {
  margin: 0 0 20px;
}

.article-content li + li {
  margin-top: 8px;
}

.article-content strong {
  color: var(--text-soft);
  font-weight: 600;
}

.article-content a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: #5966bd;
  text-underline-offset: 3px;
}

.article-content a:visited {
  color: #c0a7ea;
}

.article-content code {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: #b8c2ff;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.article-content pre {
  max-width: 100%;
  margin: 24px 0;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0b0d12;
}

.article-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: #cbd2ff;
  font-size: 13px;
  line-height: 1.75;
}

.article-callout {
  margin: 28px 0;
  padding: 18px 20px;
  border-left: 2px solid var(--amber);
  background: #211b10;
}

.article-callout strong {
  display: block;
  color: #f0cc88;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-callout p {
  margin: 7px 0 0;
  color: #d0c5af;
  font-size: 14px;
}

.article-checklist {
  padding: 0;
  list-style: none;
}

.article-checklist li {
  position: relative;
  padding-left: 30px;
}

.article-checklist li::before {
  position: absolute;
  top: 8px;
  left: 0;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #44765f;
  color: var(--green);
  font-size: 10px;
  line-height: 1;
  content: "✓";
}

.article-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 70px;
  border: 1px solid var(--border);
  background: var(--border);
}

.article-footer-nav a {
  display: block;
  padding: 20px;
  background: var(--surface);
  transition: background var(--ease);
}

.article-footer-nav a:hover {
  background: var(--surface-strong);
}

.article-footer-nav small,
.article-footer-nav strong {
  display: block;
}

.article-footer-nav small {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-footer-nav strong {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}

.article-toc {
  position: sticky;
  top: 98px;
  align-self: start;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.article-toc p {
  margin: 0 0 13px;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-toc a {
  display: block;
  padding: 6px 0;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.4;
}

.article-toc a:hover {
  color: var(--accent-strong);
}

.article-toc .toc-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--border);
}

.article-toc .edit-link {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .article-shell {
    grid-template-columns: 1fr;
  }

  .article-toc {
    position: static;
    grid-row: 1;
    padding: 15px 18px;
    border: 1px solid var(--border);
    background: var(--surface);
  }

  .article-toc a,
  .article-toc .toc-divider,
  .article-toc .edit-link {
    display: none;
  }

  .article-toc p {
    margin: 0;
  }
}

@media (max-width: 560px) {
  .article-topbar {
    padding: 0 18px;
  }

  .article-topbar nav a:first-child {
    display: none;
  }

  .article-shell {
    padding: 36px 20px 70px;
  }

  .article-header h1 {
    font-size: 39px;
  }

  .article-deck {
    font-size: 17px;
  }

  .article-metadata {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-content {
    font-size: 15px;
  }

  .article-footer-nav {
    grid-template-columns: 1fr;
  }
}

@media print {
  .article-topbar,
  .article-toc,
  .article-footer-nav {
    display: none;
  }

  .article-shell {
    display: block;
    max-width: none;
    padding: 0;
  }

  .article-body,
  .article-metadata div,
  .article-content pre,
  .article-callout {
    background: #fff;
    color: #111;
  }

  .article-header h1,
  .article-content h2,
  .article-content h3,
  .article-content strong,
  .article-metadata dd {
    color: #111;
  }
}

/* Published library launchpad --------------------------------------------- */

.library-launchpad {
  display: grid;
  width: min(var(--content-width), calc(100% - 96px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: -28px auto 72px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  overflow: hidden;
  background: var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.library-launchpad > a {
  display: grid;
  min-height: 150px;
  grid-template-columns: 40px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 17px;
  padding: 27px;
  background: linear-gradient(145deg, var(--surface), #10121a);
  transition: background var(--ease);
}

.library-launchpad > a:hover { background: var(--surface-strong); }
.library-launchpad > a > svg { width: 19px; color: var(--subtle); transition: transform var(--ease), color var(--ease); }
.library-launchpad > a:hover > svg { color: var(--accent-strong); transform: translateX(3px); }
.launchpad-index { color: var(--accent-strong); font-family: var(--font-mono); font-size: 9px; }
.library-launchpad p { margin: 0 0 7px; color: var(--subtle); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.library-launchpad h2 { margin: 0 0 8px; font-size: 18px; font-weight: 500; letter-spacing: -0.025em; }
.library-launchpad div > span { color: var(--subtle); font-size: 10px; }

@media (max-width: 940px) {
  .library-launchpad { width: min(100% - 48px, var(--content-width)); grid-template-columns: 1fr; margin-top: -10px; }
}

@media (max-width: 560px) {
  .library-launchpad { width: min(100% - 36px, var(--content-width)); }
  .library-launchpad > a { min-height: 130px; grid-template-columns: 28px minmax(0, 1fr) 20px; gap: 10px; padding: 20px; }
}

/* Public resource library ------------------------------------------------- */

.resource-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% -10%, rgba(91, 105, 214, 0.13), transparent 31rem),
    var(--bg);
}

.resource-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 4vw, 64px);
  border-bottom: 1px solid rgba(40, 44, 54, 0.86);
  background: rgba(9, 10, 13, 0.88);
  backdrop-filter: blur(16px);
}

.resource-header nav,
.resource-footer nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.resource-header nav a {
  padding: 8px 11px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.resource-header nav a:hover,
.resource-header nav a.is-current {
  background: var(--surface-strong);
  color: var(--text);
}

.resource-main {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.resource-hero {
  display: grid;
  min-height: 535px;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.78fr);
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
  padding: 92px 0 78px;
  border-bottom: 1px solid var(--border);
}

.resource-hero h1 {
  max-width: 820px;
  margin: 17px 0 22px;
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.resource-hero > div > p:not(.eyebrow) {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 31px;
}

.terminal-note {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #0b0d12;
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.32);
  transform: rotate(1deg);
}

.terminal-bar {
  display: flex;
  height: 39px;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.terminal-bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3e4450;
}

.terminal-bar span:first-child { background: var(--rose); }
.terminal-bar span:nth-child(2) { background: var(--amber); }
.terminal-bar span:nth-child(3) { background: var(--green); }

.terminal-bar small {
  margin-left: auto;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.terminal-note pre {
  margin: 0;
  padding: 31px 28px 34px;
  color: #bac3da;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
}

.trust-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}

.trust-band > div {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
}

.trust-band > div:last-child { border-right: 0; }

.trust-band strong,
.trust-band span {
  display: block;
}

.trust-band strong {
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 15px;
}

.trust-band span {
  margin-top: 3px;
  color: var(--subtle);
  font-size: 11px;
}

.resource-section {
  padding: 82px 0;
  border-bottom: 1px solid var(--border);
}

.resource-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.resource-section-heading h2,
.install-section h2,
.safety-section h2,
.guide-section h2 {
  margin: 6px 0 0;
  font-size: clamp(31px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.resource-section-heading > p {
  margin: 0;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 10px;
}

.skill-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.skill-card {
  position: relative;
  overflow: hidden;
  padding: 27px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(17, 19, 26, 0.78);
  transition: border-color var(--ease), transform var(--ease), background var(--ease);
}

.skill-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--accent);
  content: "";
}

.skill-card.accent-green::before { background: var(--green); }
.skill-card.accent-blue::before { background: #78a8ee; }
.skill-card.accent-amber::before { background: var(--amber); }
.skill-card.accent-rose::before { background: var(--rose); }

.skill-card:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  transform: translateY(-2px);
}

.skill-card-top,
.download-card-heading,
.skill-card-actions,
.checksum-line {
  display: flex;
  align-items: center;
}

.skill-card-top,
.download-card-heading {
  justify-content: space-between;
  gap: 14px;
}

.skill-category,
.choice-label,
.package-icon {
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.scan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 10px;
  white-space: nowrap;
}

.scan-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(117, 215, 173, 0.08);
}

.skill-card h3,
.download-card h3 {
  margin: 20px 0 9px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.skill-card h3 a:hover { color: var(--accent-strong); }

.skill-card > p:not(.checksum-line),
.download-card > p:not(.checksum-line) {
  min-height: 50px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.skill-card-facts,
.download-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 22px 0;
  padding: 15px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.skill-card-facts div,
.download-card dl div {
  min-width: 0;
  padding: 0 12px;
  border-right: 1px solid var(--border);
}

.skill-card-facts div:first-child,
.download-card dl div:first-child { padding-left: 0; }
.skill-card-facts div:last-child,
.download-card dl div:last-child { border-right: 0; }

.skill-card-facts dt,
.download-card dt {
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
}

.skill-card-facts dd,
.download-card dd {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-card-facts code,
.download-card code,
.guide-content code,
.source-link-grid code {
  color: #b5c1ff;
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.skill-card-actions {
  flex-wrap: wrap;
  gap: 13px;
}

.primary-button.compact { min-height: 36px; }

.text-button {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.text-button:hover { color: var(--accent-strong); }

.checksum-line {
  min-width: 0;
  gap: 9px;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.checksum-line span {
  flex: 0 0 auto;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 8px;
}

.checksum-line code {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #697185;
  font-family: var(--font-mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-loading,
.catalog-error {
  grid-column: 1 / -1;
  display: grid;
  min-height: 170px;
  place-content: center;
  gap: 5px;
  border: 1px dashed var(--border-strong);
  color: var(--subtle);
  text-align: center;
}

.catalog-error strong { color: var(--text-soft); }

.catalog-static-index {
  grid-column: 1 / -1;
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.catalog-static-index > p {
  margin: 0 0 14px;
  color: var(--subtle);
  font-size: 11px;
}

.catalog-static-index > p:last-child { margin: 16px 0 0; }
.catalog-static-index ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; }
.catalog-static-index li a { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.catalog-static-index li a:hover { border-color: var(--accent); }
.catalog-static-index li span { color: var(--subtle); font-family: var(--font-mono); font-size: 9px; white-space: nowrap; }

.install-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(470px, 1.2fr);
  gap: 90px;
}

.install-copy > p:last-child,
.safety-section > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.install-steps {
  border-top: 1px solid var(--border);
}

.install-steps > div {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 17px;
  padding: 19px 0;
  border-bottom: 1px solid var(--border);
}

.install-steps span {
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 9px;
}

.install-steps p { margin: 0; color: var(--muted); font-size: 13px; }
.install-steps strong { margin-right: 9px; color: var(--text); font-weight: 500; }

.safety-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 90px;
}

.safety-section > p { margin: 5px 0 0; }

.resource-footer {
  display: grid;
  width: min(1280px, calc(100% - 48px));
  min-height: 150px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  margin: 0 auto;
  color: var(--subtle);
  font-size: 11px;
}

.resource-footer p { margin: 0; text-align: center; }
.resource-footer nav { justify-content: end; }
.resource-footer nav a:hover { color: var(--text-soft); }

/* Skill source viewer ----------------------------------------------------- */

.viewer-main {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 90px;
}

.viewer-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 25px 0 0;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 10px;
}

.viewer-breadcrumb a:hover { color: var(--accent-strong); }
.viewer-breadcrumb strong { color: var(--muted); font-weight: 500; }

.viewer-intro {
  display: flex;
  min-height: 235px;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 38px 0 34px;
}

.viewer-intro h1 {
  margin: 11px 0 9px;
  font-size: clamp(39px, 5vw, 61px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}

.viewer-intro > div > p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.viewer-primary-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.viewer-trust {
  display: grid;
  grid-template-columns: auto minmax(130px, 0.7fr) 80px minmax(260px, 1.4fr);
  align-items: center;
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.viewer-trust > div {
  min-width: 0;
  padding: 16px 20px;
  border-right: 1px solid var(--border);
}

.viewer-trust > div:last-child { border-right: 0; }
.viewer-trust small { display: block; color: var(--subtle); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.viewer-trust code,
.viewer-trust strong { display: block; overflow: hidden; margin-top: 3px; color: var(--text-soft); font-family: var(--font-mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.source-workbench {
  display: grid;
  min-height: 690px;
  grid-template-columns: 285px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #0a0c10;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.file-sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #0d0f14;
}

.file-sidebar-heading,
.code-toolbar {
  min-height: 58px;
  border-bottom: 1px solid var(--border);
}

.file-sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
}

.file-sidebar-heading p { margin: 0; color: var(--text-soft); font-size: 12px; font-weight: 600; }
.file-sidebar-heading span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 4px; background: var(--surface-strong); color: var(--subtle); font-family: var(--font-mono); font-size: 9px; }

.file-tree {
  flex: 1;
  overflow: auto;
  padding: 9px;
}

.file-tree-item {
  display: grid;
  width: 100%;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin: 1px 0;
  padding: 9px 8px 9px calc(8px + var(--file-depth) * 11px);
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.file-tree-item:hover { background: var(--surface-strong); color: var(--text-soft); }
.file-tree-item.is-selected { background: var(--accent-wash); color: var(--accent-strong); }
.file-tree-item > span { color: var(--subtle); font-family: var(--font-mono); font-size: 9px; }
.file-tree-item strong { min-width: 0; overflow: hidden; font-family: var(--font-mono); font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.file-tree-item small { color: var(--subtle); font-family: var(--font-mono); font-size: 8px; }

.file-sidebar-note {
  margin: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
}

.file-sidebar-note strong { color: var(--green); font-size: 10px; }
.file-sidebar-note p { margin: 5px 0 0; color: var(--subtle); font-size: 9px; line-height: 1.55; }

.code-panel {
  display: grid;
  min-width: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 17px;
  background: var(--surface);
}

.code-toolbar > div:first-child { display: flex; min-width: 0; align-items: center; gap: 10px; }
.code-toolbar strong { overflow: hidden; color: var(--text-soft); font-family: var(--font-mono); font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.code-toolbar small { color: var(--subtle); font-family: var(--font-mono); font-size: 8px; }

.file-language {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 3px;
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 7px;
}

.code-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.code-actions button,
.code-actions a {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}
.code-actions button:hover,
.code-actions a:hover { border-color: var(--border-strong); color: var(--text); }
.code-actions button:disabled { cursor: not-allowed; opacity: 0.55; }

.code-status {
  padding: 18px;
  border-bottom: 1px solid var(--border);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 10px;
}

.source-code {
  min-height: 600px;
  max-height: 74vh;
  overflow: auto;
  margin: 0;
  padding: 25px 29px 44px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px) 0 0 / 38px 100%,
    #0a0c10;
  color: #c9ced9;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.75;
  tab-size: 4;
}

.source-code code { font: inherit; white-space: pre; }

.code-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 11px 17px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 8px;
}

.code-footer code { min-width: 0; overflow: hidden; color: #667084; text-overflow: ellipsis; white-space: nowrap; }

.viewer-help {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 65px;
  border: 1px solid var(--border);
  background: var(--border);
}

.viewer-help > div { padding: 26px; background: var(--bg); }
.viewer-help span { color: var(--accent-strong); font-family: var(--font-mono); font-size: 9px; }
.viewer-help h2 { margin: 12px 0 6px; font-size: 15px; font-weight: 500; }
.viewer-help p { margin: 0; color: var(--subtle); font-size: 11px; line-height: 1.6; }

/* XA DevHub guide --------------------------------------------------------- */

.devhub-page { overflow-x: clip; }

.devhub-hero { grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.65fr); }
.devhub-hero > * { min-width: 0; }
.devhub-hero h1 { overflow-wrap: anywhere; }

.devhub-map {
  width: 100%;
  min-width: 0;
  padding: 23px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(28, 32, 54, 0.8), rgba(13, 15, 20, 0.96));
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.3);
}

.map-node {
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  padding: 12px;
  border: 1px solid rgba(135, 151, 255, 0.17);
  border-radius: 6px;
  background: rgba(8, 10, 16, 0.5);
}

.map-node > span {
  display: grid;
  width: 34px;
  height: 34px;
  grid-row: 1 / 3;
  place-items: center;
  border: 1px solid #4c568c;
  border-radius: 50%;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 9px;
}

.map-node strong { font-size: 13px; font-weight: 500; }
.map-node small { color: var(--subtle); font-size: 10px; }
.map-line { width: 1px; height: 22px; margin-left: 29px; background: #4c568c; }

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.download-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.featured-download { background: linear-gradient(145deg, #15182a, var(--surface) 65%); }
.portable-release { grid-column: 1 / -1; }
.portable-release [hidden] { display: none; }
.portable-release-notes { white-space: pre-line; overflow-wrap: anywhere; color: var(--muted); line-height: 1.7; }
.portable-release h4 { margin: 24px 0 8px; }

.package-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #5663ae;
  border-radius: 5px;
  background: var(--accent-wash);
}

.download-card .primary-button,
.download-card .secondary-button { align-self: flex-start; }
.download-card > .text-button { margin-top: 14px; }

.compact-file-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
}

.compact-file-list li {
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.curation-note,
.guide-callout,
.guide-note {
  padding: 17px 19px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--green);
  background: rgba(17, 19, 26, 0.65);
}

.curation-note { margin-top: 14px; }
.curation-note strong,
.guide-callout strong,
.guide-note strong { color: var(--text-soft); font-size: 12px; font-weight: 500; }
.curation-note p,
.guide-callout p,
.guide-note p { margin: 5px 0 0; color: var(--subtle); font-size: 11px; line-height: 1.65; }

.guide-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(55px, 8vw, 115px);
  padding-bottom: 100px;
}

.guide-toc {
  position: sticky;
  top: 94px;
  align-self: start;
  margin-top: 82px;
  padding-left: 15px;
  border-left: 1px solid var(--border);
}

.guide-toc p {
  margin: 0 0 13px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.guide-toc a {
  display: block;
  padding: 6px 0;
  color: var(--subtle);
  font-size: 11px;
}

.guide-toc a:hover { color: var(--accent-strong); }

.guide-section {
  padding: 82px 0;
  border-bottom: 1px solid var(--border);
}

.guide-section > h2 { max-width: 780px; margin-bottom: 30px; }
.guide-section > p:not(.section-kicker):not(.section-lede) { color: var(--muted); }
.guide-section .section-lede { max-width: 760px; color: var(--muted); font-size: 14px; line-height: 1.7; }

.procedure-list {
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.procedure-list > li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 18px;
  padding: 23px 0;
  border-bottom: 1px solid var(--border);
}

.procedure-list > li > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid #4f588d;
  border-radius: 50%;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 8px;
}

.procedure-list h3 { margin: 2px 0 5px; font-size: 15px; font-weight: 500; }
.procedure-list p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.procedure-list pre {
  overflow: auto;
  margin: 13px 0;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #0a0c10;
  color: #bac3da;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.7;
}

.compact-procedure { margin-top: 25px; }

.workflow-cards,
.choice-grid,
.knowledge-grid {
  display: grid;
  gap: 12px;
}

.workflow-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.knowledge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.workflow-cards article,
.choice-grid article,
.knowledge-grid article {
  padding: 23px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.workflow-cards article > span {
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 9px;
}

.workflow-cards h3,
.choice-grid h3,
.knowledge-grid h3 {
  margin: 13px 0 9px;
  font-size: 16px;
  font-weight: 500;
}

.workflow-cards ol { margin: 0; padding-left: 17px; }
.workflow-cards li,
.choice-grid p:not(.choice-label),
.knowledge-grid p { color: var(--subtle); font-size: 11px; line-height: 1.65; }
.workflow-cards li + li { margin-top: 6px; }
.guide-note { margin-top: 12px; border-left-color: var(--amber); }

/* DevHub task instructions and native troubleshooting disclosures. */
.devhub-page .guide-content { min-width: 0; }
.devhub-page .guide-section p { line-height: 1.75; overflow-wrap: anywhere; }
.devhub-page .guide-section > p { font-size: 14px; }
.devhub-page .procedure-list p,
.devhub-page .guide-note p,
.devhub-page .workflow-cards li,
.devhub-page .choice-grid p:not(.choice-label),
.devhub-page .knowledge-grid p { font-size: 13px; }
.devhub-page .guide-section > h3 { margin: 30px 0 12px; }
.guide-command { min-width: 0; margin: 18px 0; }
.guide-command pre { overflow-x: auto; padding: 18px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 12px; line-height: 1.75; }
.guide-help { margin: 12px 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.guide-help summary { padding: 18px; color: var(--text-soft); font-size: 14px; cursor: pointer; }
.guide-help summary:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.guide-help p { margin: 0; padding: 0 18px 18px; color: var(--muted); font-size: 13px; }
.choice-grid .choice-label { margin: 0; }
.choice-grid h3 { margin-top: 8px; }

.skill-role-list,
.source-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.skill-role-list a,
.source-link-grid a {
  display: block;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.skill-role-list a:hover,
.source-link-grid a:hover { border-color: #4c5682; background: var(--surface-strong); }
.source-viewer-button { display: inline-flex; margin-top: 18px; }
.skill-role-list code,
.source-link-grid code { display: block; margin-bottom: 7px; }
.skill-role-list span,
.source-link-grid span { display: block; color: var(--subtle); font-size: 11px; line-height: 1.6; }

.boundary-table {
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}

.boundary-table > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-bottom: 1px solid var(--border);
}

.boundary-table > div:last-child { border-bottom: 0; }
.boundary-table strong,
.boundary-table span { padding: 15px 17px; }
.boundary-table strong { background: var(--surface); color: var(--accent-strong); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; }
.boundary-table span { color: var(--muted); font-size: 12px; }

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  transform: translateY(18px);
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease), transform var(--ease);
}

.toast.is-visible { transform: translateY(0); opacity: 1; }

@media (max-width: 1040px) {
  .resource-hero,
  .devhub-hero { grid-template-columns: 1fr; }
  .resource-hero { gap: 45px; padding-top: 70px; }
  .terminal-note,
  .devhub-map { max-width: 650px; transform: none; }
  .install-section,
  .safety-section { grid-template-columns: 1fr; gap: 35px; }
  .workflow-cards,
  .knowledge-grid { grid-template-columns: 1fr; }
  .viewer-trust { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .viewer-trust > div:first-child { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--border); }
  .guide-layout { grid-template-columns: 180px minmax(0, 1fr); gap: 45px; }
}

@media (max-width: 780px) {
  .resource-header { min-height: 62px; }
  .resource-header .brand small { display: none; }
  .resource-header nav a { padding: 7px; font-size: 10px; }
  .resource-main,
  .viewer-main,
  .resource-footer { width: min(100% - 32px, 1280px); }
  .resource-hero { min-height: auto; padding: 58px 0; }
  .resource-hero h1 { font-size: clamp(42px, 12vw, 62px); }
  .trust-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-band > div:nth-child(2) { border-right: 0; }
  .trust-band > div:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .skill-library-grid,
  .download-grid,
  .choice-grid,
  .skill-role-list,
  .source-link-grid { grid-template-columns: 1fr; }
  .catalog-static-index ul { grid-template-columns: 1fr; }
  .resource-section { padding: 60px 0; }
  .source-workbench { grid-template-columns: 1fr; }
  .file-sidebar { max-height: 270px; border-right: 0; border-bottom: 1px solid var(--border); }
  .file-sidebar-note { display: none; }
  .viewer-intro { display: block; padding-top: 36px; }
  .viewer-primary-actions { margin-top: 25px; }
  .viewer-trust { grid-template-columns: 1fr 1fr; }
  .viewer-trust > div:first-child { grid-column: 1 / -1; }
  .viewer-trust > div:nth-child(3) { border-right: 0; }
  .viewer-trust > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--border); }
  .viewer-help { grid-template-columns: 1fr; }
  .guide-layout { display: block; }
  .guide-toc { position: static; display: flex; overflow-x: auto; gap: 16px; margin-top: 50px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-left: 0; }
  .guide-toc p { display: none; }
  .guide-toc a { flex: 0 0 auto; }
  .resource-footer { grid-template-columns: 1fr auto; }
  .resource-footer p { display: none; }
}

@media (max-width: 520px) {
  .resource-header { padding: 0 16px; }
  .resource-header nav a:first-child { display: none; }
  .devhub-page .resource-header nav a:last-child { display: none; }
  .devhub-hero h1 { font-size: clamp(38px, 11vw, 48px); letter-spacing: -0.045em; }
  .devhub-map { padding: 16px; }
  .resource-hero > div > p:not(.eyebrow) { font-size: 15px; }
  .terminal-note pre { padding: 23px 19px; font-size: 10px; }
  .trust-band > div { padding: 20px 14px; }
  .resource-section-heading { display: block; }
  .resource-section-heading > p { margin-top: 10px; }
  .skill-card,
  .download-card { padding: 21px; }
  .skill-card-top { align-items: start; }
  .scan-badge { font-size: 8px; }
  .skill-card-facts,
  .download-card dl { grid-template-columns: 1fr; }
  .skill-card-facts div,
  .download-card dl div { padding: 8px 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .skill-card-facts div:last-child,
  .download-card dl div:last-child { border-bottom: 0; }
  .compact-file-list { grid-template-columns: 1fr; }
  .viewer-primary-actions { display: grid; }
  .viewer-trust { grid-template-columns: 1fr; }
  .viewer-trust > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .viewer-trust > div:first-child,
  .viewer-trust > div:last-child { grid-column: auto; border-top: 0; }
  .viewer-trust > div:last-child { border-bottom: 0; }
  .code-toolbar { display: block; height: auto; padding: 12px; }
  .code-actions { margin-top: 10px; }
  .source-code { padding: 20px 17px 35px; font-size: 10px; }
  .procedure-list > li { grid-template-columns: 31px minmax(0, 1fr); gap: 11px; }
  .boundary-table > div { grid-template-columns: 1fr; }
  .boundary-table strong { padding-bottom: 6px; }
  .boundary-table span { padding-top: 6px; }
}
