/*
 * pypi-tea styles, on the sbomify design tokens (Brand Guidelines v2.0) shared
 * with sbomify.com: navy type on white, mist for the rare panel, Figtree, and
 * Signal Orange spent on one moment per page (the call to action). Status uses
 * the semantic palette, never orange.
 *
 * Hand-written, no build step. The token block mirrors sbomify.com's
 * _assets/css/tokens.css; keep the two in step.
 */

/* Figtree (SIL Open Font License 1.1): one variable file, latin subset. */
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ===================== tokens ===================== */

:root {
  /* Primitives: primary palette (space-separated RGB channels) */
  --color-navy-100: 37 41 63; /* #25293F */
  --color-navy-80: 81 84 107; /* #51546B */
  --color-navy-60: 124 127 140; /* #7C7F8C */
  --color-navy-55: 110 113 128; /* #6E7180  lightest navy at 4.5:1 on white */
  --color-navy-40: 168 169 178; /* #A8A9B2 */
  --color-navy-20: 211 212 217; /* #D3D4D9 */
  --color-navy-10: 233 234 236; /* #E9EAEC */
  --color-navy-5: 244 244 245; /* #F4F4F5 */
  --color-white: 255 255 255;
  --color-mist: 225 227 234; /* #E1E3EA */
  --color-mist-soft: 238 240 244; /* #EEF0F4 */

  /* Signal Orange: emphasis only, one moment per layout */
  --color-orange-800: 170 61 20; /* #AA3D14  hover/pressed */
  --color-orange-700: 194 65 12; /* #C2410C  buttons, small orange text */
  --color-orange-500: 255 106 19; /* #FF6A13  large shapes */
  --color-orange-300: 255 166 113; /* #FFA671  strings in code */
  --color-orange-50: 255 243 236; /* #FFF3EC */

  /* Semantic palette: status only, never decoration */
  --color-success-full: 31 169 113; /* #1FA971 */
  --color-success-ink: 19 122 81; /* #137A51  success text on white/tint */
  --color-success-tint: 231 246 239; /* #E7F6EF */
  --color-danger-full: 229 72 77; /* #E5484D */
  --color-danger-ink: 176 38 44; /* #B0262C */
  --color-danger-tint: 252 234 235; /* #FCEAEB */
  --color-warning-full: 244 164 37; /* #F4A425 */
  --color-warning-ink: 138 83 0; /* #8A5300 */
  --color-warning-tint: 253 243 225; /* #FDF3E1 */
  --color-info-full: 66 99 235; /* #4263EB */
  --color-info-ink: 47 73 184; /* #2F49B8 */
  --color-info-tint: 234 238 253; /* #EAEEFD */

  /* Roles */
  --canvas: rgb(var(--color-white));
  --surface: rgb(var(--color-mist-soft));
  --surface-strong: rgb(var(--color-mist));
  --line: rgb(var(--color-navy-10));
  --line-strong: rgb(var(--color-navy-20));
  --ink: rgb(var(--color-navy-100));
  --ink-muted: rgb(var(--color-navy-80));
  --ink-subtle: rgb(var(--color-navy-55));
  --accent: rgb(var(--color-orange-500));
  --accent-strong: rgb(var(--color-orange-700));
  --accent-hover: rgb(var(--color-orange-800));
  --focus: rgb(var(--color-orange-700));

  --code-bg: rgb(var(--color-navy-100));
  --code-text: rgb(var(--color-navy-10));
  --code-muted: rgb(var(--color-navy-40));
  --code-string: rgb(var(--color-orange-300));
  --code-inline-bg: rgb(var(--color-navy-5));

  --font-sans: "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --tracking-display: -0.03em;
  --tracking-heading: -0.015em;
  --tracking-eyebrow: 0.12em;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-pill: 9999px;

  --shadow-card: 0 1px 2px 0 rgb(var(--color-navy-100) / 0.04), 0 1px 3px 0 rgb(var(--color-navy-100) / 0.06);
  --shadow-raised: 0 10px 30px -12px rgb(var(--color-navy-100) / 0.18);

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
}

/* ===================== base ===================== */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body > main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
p,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: var(--tracking-heading);
  font-weight: 700;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-color: rgb(var(--color-navy-40));
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

code,
kbd,
pre,
.mono {
  font-family: var(--font-mono);
}

code,
.mono {
  font-size: 0.9em;
}

[hidden],
.hidden {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted {
  color: var(--ink-muted);
}

.subtle {
  color: var(--ink-subtle);
}

.small {
  font-size: 0.875rem;
}

.mt-sm {
  margin-top: 12px;
}

.mt {
  margin-top: 20px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 30;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: rgb(var(--color-white));
}

.skip:focus {
  top: 12px;
}

/* Inline text link: navy type, orange underline, the accent stays small. */
.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 0.2s;
}

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

.break {
  overflow-wrap: anywhere;
}

/* ===================== header ===================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(255 255 255 / 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header > .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 22px;
}

.brand span {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink-muted);
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  position: relative;
  padding: 6px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

/* The current page: a short rounded bar, the emblem's shape. */
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

@media (max-width: 720px) {
  .site-header > .wrap {
    flex-wrap: wrap;
    gap: 0 16px;
    height: auto;
    padding-block: 12px;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 20px;
    padding-top: 8px;
    overflow-x: auto;
  }

  .brand span {
    display: none;
  }
}

/* ===================== buttons ===================== */

/* Orange is the one call to action; navy for section-level actions; the
   outline button for everything else. Type on orange is always white. */
.btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--canvas);
  color: var(--ink);
  font: 600 0.9rem/1.2 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent-strong);
  color: rgb(var(--color-white));
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-navy {
  background: var(--ink);
  color: rgb(var(--color-white));
}

.btn-navy:hover {
  background: var(--ink-muted);
}

.btn-secondary {
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--ink);
}

.btn-sm {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 0.8rem;
}

/* ===================== type helpers ===================== */

/* Eyebrow, caption and meta: 600, wide track, caps. */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink-subtle);
}

/* Eyebrow chip: the section label above a heading, with the orange dot. */
.eyebrow-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.eyebrow-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ===================== hero ===================== */

/* White canvas with the soft Signal Orange haze from the guide's cover. */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(40px, 7vw, 80px) clamp(28px, 4vw, 48px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(48rem 32rem at 100% 0%, rgb(var(--color-orange-500) / 0.16), rgb(var(--color-orange-500) / 0) 70%);
}

@media (max-width: 639px) {
  .hero::before {
    background: radial-gradient(24rem 18rem at 100% 0%, rgb(var(--color-orange-500) / 0.12), rgb(var(--color-orange-500) / 0) 70%);
  }
}

.hero > * {
  position: relative;
}

.hero h1 {
  max-width: 18ch;
  margin-top: 18px;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: var(--tracking-display);
}

.hero .lede {
  max-width: 60ch;
  margin-top: 16px;
  font-size: 1.15rem;
  color: var(--ink-muted);
}

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

/* ===================== page header (inner pages) ===================== */

.page-head {
  padding-block: 36px 28px;
}

.page-head .eyebrow-chip {
  margin-bottom: 16px;
}

.page-head h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.1;
}

.page-head h1 .version {
  font-weight: 500;
  color: var(--ink-subtle);
}

.page-head .lede {
  max-width: 70ch;
  margin-top: 10px;
  font-size: 1.1rem;
  color: var(--ink-muted);
}

.page-head .tags {
  margin-top: 16px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: var(--ink-subtle);
}

.breadcrumbs a {
  color: var(--ink-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.breadcrumbs [aria-current] {
  color: var(--ink);
}

/* ===================== sections, cards, panels ===================== */

.section {
  margin-bottom: 40px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 1.35rem;
}

.section-head p {
  font-size: 0.925rem;
  color: var(--ink-muted);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--canvas);
  box-shadow: var(--shadow-card);
}

.card-body {
  padding: 24px;
}

.card h2,
.card h3 {
  font-size: 1rem;
  font-weight: 700;
}

.card .caption {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--ink-subtle);
}

.card-body > h2 + p,
.card-body > h2 + .caption {
  margin-top: 6px;
}

.card-head {
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.stack > * + * {
  margin-top: 20px;
}

/* ===================== stat tiles ===================== */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 16px;
}

.stat {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--canvas);
  box-shadow: var(--shadow-card);
}

.stat .value {
  margin-top: 6px;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: var(--tracking-display);
  font-variant-numeric: tabular-nums;
}

.stat .note {
  margin-top: 6px;
  font-size: 0.825rem;
  color: var(--ink-subtle);
}

.stat-inline {
  margin-top: 4px;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ===================== charts ===================== */

.chart {
  position: relative;
  height: 260px;
  margin-top: 16px;
}

.chart-wide {
  height: 240px;
}

.empty {
  display: grid;
  place-items: center;
  height: 260px;
  margin-top: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  font-size: 0.925rem;
  color: var(--ink-subtle);
}

.chart-note {
  margin-top: 12px;
  font-size: 0.875rem;
  text-align: center;
  color: var(--ink-muted);
}

/* Horizontal bar lists (top packages, endpoints, qualifiers). */
.bars {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.bars li {
  display: grid;
  grid-template-columns: minmax(0, 9rem) 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

.bars .label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-muted);
}

.bars .track,
.meter {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-strong);
  overflow: hidden;
}

.bars .fill,
.meter > span {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--ink);
}

.meter > span {
  background: rgb(var(--color-success-full));
  transition: width 0.5s ease;
}

.bars .count {
  min-width: 3rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-subtle);
}

/* ===================== tables ===================== */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}

th {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgb(var(--color-navy-5));
}

.card > .table-wrap:first-child table thead th:first-child {
  border-top-left-radius: var(--radius-xl);
}

.card > .table-wrap:first-child table thead th:last-child {
  border-top-right-radius: var(--radius-xl);
}

.table-compact th,
.table-compact td {
  padding: 8px 12px;
}

.vulns td {
  vertical-align: top;
}

.vuln-component {
  white-space: nowrap;
}

.vuln-summary {
  margin-top: 2px;
  font-size: 0.825rem;
  color: var(--ink-muted);
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pkg-link {
  font-weight: 600;
  text-decoration: none;
}

.pkg-link:hover {
  text-decoration: underline;
}

.row-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
}

.row-link:hover {
  color: var(--ink);
}

/* ===================== tags and status pills ===================== */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Neutral tag: SBOM formats and other facts. Orange is a brand accent, not a
   status, so it stays out of badges. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-strong);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
}

a.tag {
  text-decoration: none;
}

.tag svg {
  width: 14px;
  height: 14px;
}

.tag-success {
  background: rgb(var(--color-success-tint));
  color: rgb(var(--color-success-ink));
}

.tag-danger {
  background: rgb(var(--color-danger-tint));
  color: rgb(var(--color-danger-ink));
}

.tag-warning {
  background: rgb(var(--color-warning-tint));
  color: rgb(var(--color-warning-ink));
}

.tag-info {
  background: rgb(var(--color-info-tint));
  color: rgb(var(--color-info-ink));
}

.ok {
  color: rgb(var(--color-success-ink));
}

.bad {
  color: rgb(var(--color-danger-ink));
}

/* ===================== page tools ===================== */

/* Copy as Markdown and the More menu, under a page's heading. Outline buttons:
   these are utilities, not the page's call to action. */
.page-tools {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.page-tools .btn.is-done {
  border-color: rgb(var(--color-success-full));
  color: rgb(var(--color-success-ink));
}

.page-tools .btn.is-failed {
  border-color: rgb(var(--color-danger-full));
  color: rgb(var(--color-danger-ink));
}

.more-menu {
  position: relative;
}

.more-menu summary {
  list-style: none;
}

.more-menu summary::-webkit-details-marker {
  display: none;
}

.more-menu[open] summary svg {
  transform: rotate(180deg);
}

.menu-pop {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 230px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--canvas);
  box-shadow: var(--shadow-raised);
}

.menu-pop a,
.menu-pop button {
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink);
  font: 500 0.875rem/1.3 var(--font-sans);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-pop a:hover,
.menu-pop button:hover,
.menu-pop a:focus-visible,
.menu-pop button:focus-visible {
  background: var(--surface);
}

/* ===================== filters and pagination ===================== */

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
}

.segmented a {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
}

.segmented a:hover {
  color: var(--ink);
}

.segmented a[aria-current="page"] {
  background: var(--ink);
  color: rgb(var(--color-white));
}

.toolbar {
  margin-bottom: 24px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--ink-subtle);
}

/* ===================== package page ===================== */

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px 32px;
}

.meta-grid dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.meta-grid dd {
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.wheel + .wheel {
  margin-top: 16px;
}

.wheel-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.wheel-title h3 {
  font: 600 0.9rem/1.4 var(--font-mono);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.wheel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--ink-subtle);
}

.wheel-meta b {
  font-weight: 500;
  color: var(--ink-muted);
}

.sbom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
}

.sbom-row + .sbom-row {
  border-top: 1px solid var(--line);
}

.sbom-file {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sbom-file .icon {
  flex: none;
  width: 22px;
  height: 22px;
}

.sbom-file .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 500 0.9rem/1.4 var(--font-mono);
}

.sbom-file .kind {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--ink-subtle);
}

@media (max-width: 560px) {
  .sbom-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===================== code ===================== */

.code {
  position: relative;
  margin-top: 16px;
}

.code pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 0.85rem;
  line-height: 1.7;
}

.code .c {
  color: var(--code-muted);
}

.code .s {
  color: var(--code-string);
}

.code .copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 0.06);
  color: var(--code-text);
  font: 500 0.75rem/1.4 var(--font-sans);
  cursor: pointer;
}

.code .copy:hover {
  background: rgb(255 255 255 / 0.12);
}

:not(pre) > code {
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--code-inline-bg);
  color: var(--ink);
}

.prose-sm {
  font-size: 0.925rem;
  color: var(--ink-muted);
}

.prose-sm p + p {
  margin-top: 10px;
}

/* ===================== CTA band ===================== */

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: rgb(var(--color-white));
}

.cta h2 {
  font-size: 1.35rem;
}

.cta p {
  margin-top: 4px;
  color: rgb(var(--color-navy-20));
}

/* ===================== empty / error states ===================== */

.notice {
  padding: 48px 24px;
  text-align: center;
}

.notice h1 {
  font-size: 1.75rem;
  letter-spacing: var(--tracking-display);
}

.notice p {
  margin-top: 10px;
  color: var(--ink-muted);
}

.notice-sm h2 {
  font-size: 1.25rem;
}

.notice .btn {
  margin-top: 24px;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: rgb(var(--color-danger-tint));
  color: rgb(var(--color-danger-ink));
}

/* ===================== footer ===================== */

.site-footer {
  flex: none;
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.9rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
  padding-block: 48px 32px;
}

.footer-brand img {
  width: auto;
  height: 22px;
}

.footer-brand p {
  max-width: 34ch;
  margin-top: 14px;
  color: var(--ink-muted);
}

.site-footer h2 {
  margin-bottom: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer ul a {
  color: var(--ink);
  text-decoration: none;
}

.site-footer ul a:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--line-strong);
  font-size: 0.825rem;
  color: var(--ink-muted);
}

@media (max-width: 800px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
