:root {
      --paper: #ffffff;
      --paper-dark: #ffffff;
      --ink: #1f1f1b;
      --muted: #5f5f5f;
      --line: #d6d6d6;
      --accent: #787777;
      --sidebar: #ffffff;
      --code: #ffffff;
    }

    * {
      box-sizing: border-box;
    }

    html, body {
      margin: 0;
      min-height: 100%;
      background: var(--paper);
      color: var(--ink);
      font-family: "Times New Roman", Times, serif;
    }

    .layout {
      display: grid;
      grid-template-columns: 290px 1fr;
      min-height: 100vh;
    }

    aside {
      position: fixed;
      inset: 0 auto 0 0;
      width: 230px;
      overflow-y: auto;
      padding: 28px 16px 40px;
      background: var(--sidebar);
      border-right: 1px solid var(--line);
      backdrop-filter: blur(4px);
    }

    .brand {
      margin-bottom: 30px;
      padding-bottom: 18px;
      border-bottom: 1px dashed var(--line);
    }

    .brand h1 {
      margin: 0 0 7px;
      font-size: 21px;
      line-height: 1.3;
      font-weight: 700;
    }

    .brand p {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
    }

    nav h3 {
      margin: 24px 0 8px;
      color: var(--muted);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    nav a {
      display: block;
      padding: 7px 10px;
      margin: 2px 0;
      color: var(--ink);
      text-decoration: none;
      border-left: 2px solid transparent;
      font-size: 14px;
      line-height: 1.35;
      cursor: pointer;
    }

    nav a:hover {
      background: rgba(0, 0, 0, 0.05);
      border-left-color: var(--accent);
    }

    nav a.active {
      background: rgba(0, 0, 0, 0.08);
      border-left-color: var(--accent);
      font-weight: 700;
    }

    main {
      grid-column: 2;
      width: 100%;
      max-width: 980px;
      padding: 58px 24px 100px;
    }

    .download-button {
      float: right;
      padding: 7px 10px;
      border: 1px solid var(--line);
      color: var(--ink);
      font-size: 13px;
      text-decoration: none;
    }

    .download-buttons {
      display: flex;
      float: right;
      gap: 8px;
    }

    .download-buttons .download-button {
      float: none;
    }

    .download-button:hover {
      background: #f5f5f5;
    }

    .page {
      display: none;
      animation: appear 0.15s ease-out;
    }

    .page.active {
      display: block;
    }

    @keyframes appear {
      from { opacity: 0; transform: translateY(3px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .eyebrow {
      margin-bottom: 14px;
      color: var(--muted);
      font-size: 12px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    h2 {
      margin: 0 0 14px;
      font-size: 28px;
      line-height: 1.1;
      letter-spacing: -0.035em;
    }

    main h2 {
      margin-top: 52px;
    }

    h3 {
      margin: 34px 0 10px;
      font-size: 20px;
    }

    p, li {
      font-size: 16px;
      line-height: 1.8;
    }

    p {
      max-width: 780px;
    }

    .lead {
      color: #303030;
      font-size: 16px;
      max-width: 800px;
    }

    .rule {
      margin: 28px 0;
      border: 0;
      border-top: 1px dashed var(--line);
    }

    .note {
      margin: 2px 0;
      padding: 10px 18px;
      background: rgba(255,255,255,0.24);
      border: 1px solid var(--line);
      border-left: 4px solid var(--accent);
      color: #777777;
      font-size: 14px;
      line-height: 1.5;
    }

    .note p,
    .note li {
      color: inherit;
      font-size: inherit;
      line-height: inherit;
    }

    main blockquote {
      margin: 18px 0;
      padding: 5px 10px;
      border: 0;
      border-left: 2px solid #b5b5b5;
      color: #555555;
      font-size: 13px;
      line-height: 1.5;
    }

    main blockquote p {
      margin: 0;
      font-size: inherit;
      line-height: inherit;
    }

    .diagram {
      margin: 26px 0;
      padding: 26px;
      background: var(--paper-dark);
      border: 1px solid var(--line);
      white-space: pre-wrap;
      font-size: 16px;
      line-height: 1.7;
      overflow-x: auto;
    }

    .placeholder-image {
      display: block;
      width: min(328px, 100%);
      height: auto;
      margin: 26px 0;
      border: 1px solid var(--line);
    }

    .overview-board-frame {
      display: grid;
      place-items: center;
      width: min(400px, 100%);
      aspect-ratio: 4 / 3;
      margin: 0;
      overflow: hidden;
    }

    .overview-board-image {
      display: block;
      width: min(400px, 70vw);
      height: auto;
    }

    .overview-intro {
      margin-bottom: 2px;
    }

    .overview-after-image {
      margin-top: 2px;
    }

    article img[src$="-placeholder.svg"] {
      display: block;
      width: min(760px, 100%);
      height: auto;
      margin: 24px 0;
    }

    .pinout-image {
      display: block;
      width: min(500px, 100%);
      height: auto;
      margin: 10px 0;
    }

    pre {
      padding: 18px;
      overflow-x: auto;
      background: var(--code);
      border: 1px solid var(--line);
      font-size: 16px;
      line-height: 1.55;
    }

    pre[class~="language-python"] {
      background: #1e1e1e;
      border-color: #1e1e1e;
      color: #d4d4d4;
      font-size: 12px;
    }

    pre[class~="language-text"],
    pre[class~="language-bash"] {
      background: #ffffff;
      border-color: var(--line);
      color: var(--ink);
      font-size: 12px;
    }

    pre code,
    code[class*="language-"] {
      font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    }

    p code,
    li code,
    td code,
    th code,
    blockquote code,
    .note code {
      font-size: 0.9em;
    }

    .token.comment,
    .token.prolog,
    .token.doctype,
    .token.cdata {
      color: #6a9955;
    }

    .token.keyword,
    .token.function {
      color: #569cd6;
    }

    .token.string,
    .token.char,
    .token.attr-value {
      color: #ce9178;
    }

    .token.number,
    .token.boolean {
      color: #b5cea8;
    }

    .token.operator,
    .token.punctuation {
      color: #d4d4d4;
    }

    .specs {
      width: 100%;
      border-collapse: collapse;
      margin: 20px 0 28px;
    }

    .specs th,
    .specs td {
      padding: 12px 10px;
      text-align: left;
      vertical-align: top;
      border-bottom: 1px solid var(--line);
      font-size: 16px;
    }

    .specs th {
      width: 230px;
      color: var(--muted);
      font-weight: normal;
    }

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

    .checklist li::before {
      content: "✓ ";
      font-weight: bold;
    }

    .demo-box {
      margin: 22px 0;
      aspect-ratio: 16 / 9;
      display: grid;
      place-items: center;
      background: #22211e;
      color: #eee8d1;
      border: 1px solid var(--line);
      text-align: center;
      padding: 20px;
    }

    .demo-video {
      display: block;
      width: min(720px, 100%);
      height: auto;
      margin: 22px 0;
      background: #000000;
      border: 1px solid var(--line);
    }

    .next {
      margin-top: 48px;
      padding-top: 20px;
      border-top: 1px dashed var(--line);
      color: var(--muted);
      font-size: 13px;
    }

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

    @media (max-width: 780px) {
      .layout {
        grid-template-columns: 220px minmax(0, 1fr);
      }

      aside {
        position: fixed;
        width: 200px;
        padding: 22px 16px 32px;
        transform: none;
      }

      main {
        grid-column: 2;
        padding: 38px 24px 70px;
        max-width: none;
      }
    }
  </style>
