/* Engineering specification page: a formal, printable document that reuses the figure styles from styles.css */
body.doc { background: #E9E8E3; color: #1B1B1A; font-family: Inter, -apple-system, system-ui, sans-serif; }
.tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; align-items: center; padding: 10px 16px; background: rgba(241,241,238,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #DDDCD6; }
.tabs a, .tabs button { font: 600 13px/1 Inter, sans-serif; color: #555; text-decoration: none; padding: 8px 12px; border-radius: 99px; border: 0; background: none; cursor: pointer; }
.tabs a[aria-current] { background: #1B1B1A; color: #fff; }
.tabs a:hover:not([aria-current]), .tabs button:hover { background: #E2E1DC; }
.tabs button { margin-left: auto; }

.paper { max-width: 900px; margin: 28px auto 60px; background: #fff; padding: 56px 64px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.08); font-size: 13.5px; line-height: 1.55; }
.paper a { color: #1F5BB8; }
.paper code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; background: #F4F3EF; padding: 1px 4px; border-radius: 4px; }

.cover { border-bottom: 2px solid #1B1B1A; padding-bottom: 24px; margin-bottom: 24px; }
.kicker { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7A7A76; }
.cover h1 { margin: 6px 0 10px; font-size: 32px; letter-spacing: -.02em; }
.lede { margin: 0 0 18px; font-size: 15px; color: #444; max-width: 680px; }
.ctrl { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 16px; }
.ctrl th, .ctrl td { border: 1px solid #DDDCD6; padding: 6px 10px; text-align: left; }
.ctrl th { background: #F4F3EF; font-weight: 600; width: 14%; white-space: nowrap; }
.note { background: #F4F3EF; border-left: 3px solid #1B1B1A; padding: 10px 14px; font-size: 12.5px; }
.tbd { display: inline-block; font: 700 10.5px/1.4 "JetBrains Mono", monospace; background: #FFF1D6; color: #A86A00; padding: 0 5px; border-radius: 4px; }

.toc { border-bottom: 1px solid #DDDCD6; padding-bottom: 20px; margin-bottom: 8px; }
.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #7A7A76; margin: 0 0 8px; }
.toc ol { columns: 2; margin: 0; padding-left: 22px; }
.toc li { margin: 2px 0; }
.toc a { text-decoration: none; color: #1B1B1A; }
.toc a:hover { text-decoration: underline; }

.paper section { padding-top: 28px; }
.paper section > h2 { display: flex; gap: 12px; align-items: baseline; margin: 0 0 12px; font-size: 21px; letter-spacing: -.01em; border-bottom: 1px solid #DDDCD6; padding-bottom: 8px; }
.paper section > h2 span { font-size: 14px; color: #fff; background: #1B1B1A; border-radius: 6px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.paper h3 { font-size: 15px; margin: 22px 0 8px; }
.paper h4 { font-size: 13.5px; margin: 0 0 6px; }
.paper p { margin: 0 0 10px; }
.paper ul { margin: 0 0 10px; padding-left: 20px; }
.small { font-size: 12px; color: #666; }

.t { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 6px 0 14px; }
.t th, .t td { border-bottom: 1px solid #E6E5E0; padding: 7px 8px; text-align: left; vertical-align: top; }
.t thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #7A7A76; border-bottom: 1.5px solid #1B1B1A; }
.t tbody th { width: 18%; font-weight: 600; background: #FAFAF8; }
.t td:first-child { font-variant-numeric: tabular-nums; }
.req td:first-child, .pins td:first-child, .steps-t td:first-child { font-family: "JetBrains Mono", monospace; font-size: 11.5px; white-space: nowrap; font-weight: 600; }
.t .grp td { background: #F4F3EF; font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.t.num td:nth-child(n+3) { font-family: "JetBrains Mono", monospace; font-size: 11.5px; white-space: nowrap; }

.blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.blocks > div { border: 1px solid #E6E5E0; border-radius: 8px; padding: 12px 14px; }
.blocks ul { font-size: 12.5px; margin: 0; }

.fig { margin: 14px 0 18px; }
.fig figcaption { font-size: 12px; color: #666; margin-top: 6px; }
.blk { width: 100%; height: auto; font-family: Inter, sans-serif; }
.blk .b rect { stroke-width: 1.2; }
.blk .pw rect { fill: #FFF3E8; stroke: #F2994A; }
.blk .mcu rect { fill: #F1ECFF; stroke: #8A6FE8; }
.blk .io rect { fill: #EAF3FF; stroke: #4C78E8; }
.blk text { font-size: 13px; font-weight: 700; text-anchor: middle; fill: #1B1B1A; }
.blk text.s { font-size: 10.5px; font-weight: 500; fill: #555; }
.blk text.cap { font-size: 11px; font-weight: 500; fill: #888; text-anchor: start; }
.blk .ln path { fill: none; stroke: #555; stroke-width: 1.2; marker-end: url(#ar); }

.phases, .steps { padding-left: 22px; }
.phases li, .steps li { margin-bottom: 8px; }

.paper .lab-sum, .paper .tests li, .paper .rev li { box-shadow: none; border: 1px solid #E6E5E0; }
.paper .chk { margin-top: 0; }
.paper .exploded { box-shadow: none; border: 1px solid #E6E5E0; }
.docfoot { margin-top: 40px; padding-top: 12px; border-top: 1px solid #DDDCD6; font-size: 11px; color: #999; }

@media (max-width: 760px) {
  .paper { padding: 28px 18px; margin: 0; border-radius: 0; }
  .blocks { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .t { display: block; overflow-x: auto; }
}

@media print {
  @page { size: A4; margin: 16mm 14mm; }
  body.doc { background: #fff; }
  .tabs { display: none; }
  .paper { box-shadow: none; margin: 0; padding: 0; max-width: none; font-size: 11px; }
  .paper section { break-inside: auto; }
  .paper section > h2 { break-after: avoid; }
  #s1, #s3, #s4, #s6, #s7, #s9, #s11, #s12 { break-before: page; }
  .t tr, .blocks > div, .fig, .tests li { break-inside: avoid; }
  .cover { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* figure 5: front face grid */
.face { width: 100%; height: auto; font-family: Inter, sans-serif; }
.face .f-body { fill: #A9D3BF; stroke: #2b2b2b; stroke-width: .3; }
.face .f-plate { fill: #93C2AA; stroke: #6E9C86; stroke-width: .25; }
.face .f-win { fill: #151515; }
.face .f-act { fill: none; stroke: #6FD3FF; stroke-width: .2; stroke-dasharray: .8 .6; }
.face .f-tray { fill: #7FA893; }
.face .f-key { fill: #B5D9C6; }
.face .f-play { fill: #F07A3C; }
.face .f-top { fill: #B5D9C6; stroke: #6E9C86; stroke-width: .2; }
.face .dim path { stroke: #555; stroke-width: .15; fill: none; }
.face .dim text { font-size: 1.7px; font-weight: 600; fill: #333; text-anchor: middle; }
.face .dim.m path, .face .lg .m { stroke: #D9480F; fill: #D9480F; }
.face .dim.m text { fill: #D9480F; }
.face .dim.p path, .face .lg .p { stroke: #1F5BB8; fill: #1F5BB8; }
.face .dim.p text { fill: #1F5BB8; }
.face .lg { font-size: 2px; font-weight: 600; fill: #555; }
