/* Glyph docs hub — shared stylesheet.
   Extracted from landing/index.html and extended for long-form article pages.
   Self-contained: NO external network requests (no font CDN, no remote images).
   Fonts are named per the ClaudeOS brandbook (Archivo body/headings, IBM Plex
   Mono for code) with a graceful system fallback stack — the same
   no-@font-face strategy the landing uses, so nothing is fetched off-network. */

:root {
  /* Dark palette aligned to nanyte.com's dark-section tokens (tokens.css):
     nyt-black / graphite / steel surfaces, nyt-orange signal colour. */
  --bg: #0a0a0a; /* nyt-black */
  --panel: #1a1a1c; /* nyt-graphite (surface/card) */
  --panel-2: #2a2a2e; /* nyt-steel (raised surface) */
  --border: rgba(255, 255, 255, 0.1);
  --text: #f4f4f5;
  --muted: #d4d4d8;
  /* Tertiary/muted-most — verified ≥4.5:1 (≈7.5:1) on #0a0a0a. */
  --faint: #9aa0aa;
  /* Single brand accent — NANYTE orange (#FF7A00), per the ClaudeOS brandbook. */
  --accent: #ff7a00;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-border: color-mix(in srgb, var(--accent) 28%, transparent);
  --radius: 12px;
  --maxw: 820px;
  --font-body:
    Archivo, Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono:
    'IBM Plex Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono',
    monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-underline-offset: 2px;
}
a:hover {
  text-decoration: underline;
}

/* Skip link (a11y) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0a0a0a;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 10;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header / nav ---- */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  max-width: 1080px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}
.brand svg {
  height: 26px;
  width: auto;
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
}
.nav a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav a.btn.sm {
  color: #0a0a0a;
}
.nav a.btn.sm:hover {
  color: #0a0a0a;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0a0a0a;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 10px;
  transition:
    transform 0.08s ease,
    opacity 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  text-decoration: none;
}
.btn.sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* ---- Breadcrumbs ---- */
.breadcrumbs {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px 0;
  font-size: 13px;
  color: var(--faint);
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumbs li + li::before {
  content: '/';
  color: var(--border);
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--text);
}
.breadcrumbs [aria-current='page'] {
  color: var(--text);
}

/* ---- Article body ---- */
main {
  display: block;
}
.article {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 24px 8px;
}
.article h1 {
  font-size: clamp(28px, 4.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 8px 0 18px;
  font-weight: 800;
}
.article h2 {
  font-size: clamp(21px, 3vw, 27px);
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.article h3 {
  font-size: 18px;
  margin: 28px 0 10px;
}
.article h4 {
  font-size: 16px;
  margin: 22px 0 8px;
  color: var(--muted);
}
.article p,
.article li {
  color: var(--text);
  /* Long bare URLs / tokens wrap instead of pushing the page wide on mobile. */
  overflow-wrap: break-word;
}
.article p {
  margin: 0 0 16px;
}
.article ul,
.article ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.article li {
  margin: 6px 0;
}
.article a {
  color: var(--accent);
  /* A long link (bare URL) must break rather than overflow at 390px. */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.article strong {
  color: var(--text);
  font-weight: 600;
}
.article blockquote {
  margin: 18px 0;
  padding: 8px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--muted);
  border-radius: 0 8px 8px 0;
}
.article code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}
.article pre {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  max-width: 100%;
  margin: 0 0 18px;
}
.article pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.55;
}
.article img,
.article svg {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.article figure {
  margin: 18px 0;
}
.article figcaption {
  color: var(--faint);
  font-size: 13px;
  margin-top: 6px;
}
.article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}
/* Wide Markdown tables are wrapped in .table-wrap (see scripts/build-site.mjs)
   so they scroll horizontally on narrow viewports instead of pushing the page
   wide. The table itself stays a normal block-level table. */
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 0 0 20px;
  /* Subtle scroll affordance on the raised surface edge. */
  border-radius: 8px;
}
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 14.5px;
}
.article th,
.article td {
  border: 1px solid var(--border);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.article th {
  background: var(--panel-2);
  font-weight: 600;
}

/* ---- Updated line ---- */
.updated {
  max-width: var(--maxw);
  margin: 8px auto 0;
  padding: 0 24px;
  color: var(--faint);
  font-size: 13px;
}

/* ---- CTA band ---- */
.cta-band {
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 44px;
}
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 34px;
  padding-bottom: 34px;
}
.cta-band .cta-copy {
  font-size: 17px;
  font-weight: 600;
  max-width: 46ch;
}
.cta-band .cta-copy span {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
  margin-top: 4px;
}

/* ---- Footer ---- */
footer.site {
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 13.5px;
}
footer.site .wrap {
  max-width: 1080px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  padding-bottom: 20px;
}
footer.site a {
  color: var(--muted);
  text-decoration: none;
}
footer.site a:hover {
  color: var(--text);
}
footer .links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
footer .legal {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 34px;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.5;
}
footer .legal p {
  margin: 4px 0;
}
footer .legal a {
  text-decoration: underline;
}

.page-toc {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 20px 0;
}
.page-toc .page-toc-title {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.page-toc ul {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  font-size: 14px;
}

@media (max-width: 560px) {
  .nav a:not(.btn) {
    font-size: 13px;
    gap: 14px;
  }
  .cta-band .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}
