/* ring-mods — a wearable instrument bench: graphite, titanium and signal green.
   Structure and diagram roles come from the sibling sites' unchanged base.css. */
:root {
  --page-bg: #10191c; --page-text: #dce7e6; --page-muted: #a4b8b7; --page-line: #34474a;
  --page-accent: #bbefbd; --strong: #f3f8f6; --surface: #18272b; --raise: #22363a;
  --code-bg: #0c1316; --code-text: #dce7e6;
  --page-ui: "IBM Plex Sans", system-ui, sans-serif; --display: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --k-ink: #dce7e6; --k-accent: #bbefbd; --k-a: #edb487; --k-b: #8ed3de; --k-c: #c7b9ef;
  --k-d: #e9b4c5; --k-ok: #bbefbd; --k-warn: #edc58b; --k-err: #f1a199;
  --k-muted: #a4b8b7; --k-file: #a4b8b7; --wide: 1160px;
  color-scheme: dark;
}
body { background-image: radial-gradient(ellipse at 82% 0, #243e3c66, transparent 38rem); }
.wrap { width: min(var(--wide), 100% - 64px); }
.topbar { align-items: center; padding: 26px 0; gap: 20px; border-bottom: 1px solid var(--page-line); }
.brand { display: inline-flex; gap: 10px; align-items: center; font: 600 19px/1 var(--display); color: var(--strong) !important; }
.brand svg { width: 30px; height: 30px; color: var(--page-accent); }
.topbar .navlinks { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-left: auto; }
.topbar a[aria-current] { color: var(--page-accent); text-decoration: underline; text-underline-offset: 7px; }
.eyebrow, .label, .section-no { font: 500 11px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--page-muted); }
.eyebrow { margin-bottom: 20px; }
.eyebrow::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: var(--page-accent); }
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: center; padding: 64px 0 38px; }
.hero h1 { font-size: clamp(46px, 6vw, 80px); line-height: 1.03; font-weight: 600; letter-spacing: -.055em; }
.hero h1 span { color: var(--page-accent); }
.hero .lede { margin: 24px 0; max-width: 39ch; font-size: 20px; color: var(--page-muted); }
.hero figure { margin: 0; min-width: 0; }
.hero .dg { display: block; width: 100%; }
.hero .ring-cutout { fill: var(--page-bg); }
.hero figcaption { font: 11px/1.7 var(--mono); text-align: center; margin: 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 46px; padding: 10px 19px; border: 1px solid var(--page-line); border-radius: 5px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--strong); }
.button.primary { background: var(--page-accent); color: #14251b; border-color: var(--page-accent); }
.button:hover { border-color: var(--page-accent); text-decoration: none; }
.button .arrow { font-size: 20px; line-height: 1; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--page-line); border-bottom: 1px solid var(--page-line); margin: 20px 0 52px; }
.facts > div { padding: 22px 24px; border-right: 1px solid var(--page-line); }
.facts > div:first-child { padding-left: 0; }
.facts > div:last-child { border-right: 0; }
.facts strong { display: block; font: 500 19px/1.4 var(--display); color: var(--strong); }
.facts p { color: var(--page-muted); font-size: 14px; margin: 5px 0 0; }
section.part { margin-top: 46px; padding-top: 36px; }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
h2 { font-weight: 500; letter-spacing: -.035em; }
h3 { font-weight: 500; }
.intro { max-width: 860px; }
header.intro { padding: 54px 0 24px; }
header.intro h1 { font-size: clamp(40px, 5.5vw, 66px); font-weight: 500; letter-spacing: -.045em; }
header.intro .lede { color: var(--page-muted); margin-top: 18px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; font: 12px/1.7 var(--mono); color: var(--page-muted); margin-bottom: 25px; }
.breadcrumbs a { color: inherit; }
.fig { padding: 16px; border: 1px solid var(--page-line); background: var(--surface); border-radius: 6px; }
.fig .dg .lab-bg { fill: var(--surface); }
.fig .dg .halo { stroke: var(--surface); }
.fig figcaption { max-width: none; }
.figure-note { margin-top: 10px; font-size: 13px; color: var(--page-muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { display: flex; flex-direction: column; min-width: 0; padding: 26px; border: 1px solid var(--page-line); background: var(--surface); border-radius: 6px; }
.card h3 { margin: 18px 0 10px; font-size: 23px; letter-spacing: -.025em; }
.card p { font-size: 15px; color: var(--page-muted); }
.card .card-link { margin-top: auto; padding-top: 18px; font-size: 14px; text-decoration: none; }
.card .card-link:hover { text-decoration: underline; }
.card-number { font: 500 11px/1 var(--mono); color: var(--page-muted); }
.callout { padding: 24px 28px; border: 1px solid var(--page-line); border-left: 3px solid var(--page-accent); background: var(--surface); border-radius: 3px; margin: 26px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout.warning { border-left-color: var(--k-warn); }
.callout h2, .callout h3 { margin-top: 0; }
.status { display: inline-block; font: 500 10px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px; border: 1px solid var(--page-line); border-radius: 3px; color: var(--page-muted); width: fit-content; }
.status.hardware { color: var(--k-ok); border-color: #527956; }
.status.offline { color: var(--k-warn); border-color: #776046; }
.status.open { color: var(--k-b); border-color: #436a72; }
.status.archived { color: var(--page-muted); }
.reading-layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 54px; margin-top: 12px; }
.toc { position: sticky; top: 24px; align-self: start; font: 12px/1.6 var(--mono); border-top: 1px solid var(--page-line); padding-top: 18px; }
.toc strong { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; color: var(--page-muted); }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 12px; }
.toc a { text-decoration: none; color: var(--page-muted); display: block; }
.toc a:hover { color: var(--page-accent); }
.article { min-width: 0; }
.article section { margin: 0 0 42px; }
.article section + section { padding-top: 30px; border-top: 1px solid var(--page-line); }
.article h2 { font-size: 30px; }
.article h3 { margin-top: 24px; }
.article p, .article li { max-width: 70ch; }
.article ul { padding-left: 23px; }
.article li { margin-bottom: 7px; }
pre { border: 1px solid var(--page-line); font-size: 12.5px; padding: 18px; }
.code-label { font: 11px/1.5 var(--mono); color: var(--page-muted); margin: 18px 0 8px; }
:not(pre) > code { overflow-wrap: anywhere; }
.table-wrap { border-top: 1px solid var(--page-line); padding-top: 4px; }
td, th { padding: 13px 15px 13px 0; }
td code { white-space: normal; overflow-wrap: anywhere; }
.families-table { min-width: 700px; }
.families-table td:nth-child(2) { min-width: 175px; }
.families-table td:first-child { font-weight: 500; color: var(--strong); }
.detail-table { min-width: 580px; }
.detail-table td:first-child { font-family: var(--mono); font-size: 12px; }
.proof-table { min-width: 540px; }
.proof-table th:first-child { width: 38%; }
.link-list { list-style: none; padding: 0; margin: 16px 0; }
.link-list li { padding: 13px 0; margin: 0; border-bottom: 1px solid var(--page-line); max-width: none; }
.link-list a { text-decoration: none; }
.link-list a:hover { text-decoration: underline; }
.link-list small { display: block; font-size: 13px; color: var(--page-muted); margin-top: 4px; }
.archive-note { margin-top: 28px; color: var(--page-muted); font-size: 14px; }
.bytes { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; font: 13px/1.5 var(--mono); }
.bytes span { padding: 6px 9px; background: var(--raise); border: 1px solid var(--page-line); border-radius: 3px; }
.bytes .opcode { color: var(--page-accent); border-color: #527956; }
.bytes .sample { color: var(--k-b); }
.bytes .check { color: var(--k-a); }
footer.foot { align-items: center; }
footer.foot { gap: 12px 28px; }
footer .footer-note { margin-left: auto; font-size: 12px; }
@media (max-width: 900px) {
  .hero { gap: 20px; }
  .hero h1 { font-size: 58px; }
  .card-grid { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .reading-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 26px; }
  .facts strong { font-size: 16px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 36px); }
  .topbar { gap: 18px; padding: 20px 0; }
  .topbar .navlinks { width: 100%; margin-left: 0; gap: 24px; font-size: 12px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 38px 0 20px; }
  .hero h1 { font-size: clamp(44px, 12vw, 62px); }
  .hero .lede { font-size: 18px; }
  .hero figure { max-width: 380px; width: 100%; margin: 0 auto; }
  .facts { grid-template-columns: 1fr; margin-top: 26px; }
  .facts > div, .facts > div:first-child { border-right: 0; border-bottom: 1px solid var(--page-line); padding: 15px 0; }
  .facts > div:last-child { border-bottom: 0; }
  .reading-layout { grid-template-columns: 1fr; gap: 26px; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 8px 18px; }
  .toc li { margin-bottom: 2px; }
  .fig { padding: 10px; }
  .callout { padding: 20px; }
  header.intro { padding-top: 34px; }
  .section-head { gap: 12px; }
  footer .footer-note { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  :root { --page-bg: white; --surface: white; --page-text: #111; --strong: #111; --page-muted: #444; --page-line: #aaa; --page-accent: #17542e; --code-bg: #eee; --code-text: #111; }
  body { background: white; }
  .reading-layout { display: block; }
  .toc, .actions, .skh-made-wrap { display: none; }
  .card-grid { display: block; }
  .table-wrap, .fig { overflow: visible; }
  [data-more] { mask-image: none; }
}
