/* The IFC 1.3 datasheet (website/public/docs/fc13-datasheet.html): the board render with its connectors marked, the
   wiring diagram, pin tables. Swiss and plain: the site's tokens, IBM Plex, high contrast, motion only on screen and
   only for meaning (signal direction), none with reduced motion or in print. */
.ds { max-width: 1080px; margin: 0 auto; padding: 32px 0 96px; }
.ds h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; margin: 0; line-height: 1.1; }
.ds .ds-sub { color: var(--ink-3); margin: 8px 0 0; }
.ds h2 { font-size: 24px; margin: 56px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 12px); }
.ds h3 { font-size: 18px; margin: 26px 0 8px; scroll-margin-top: calc(var(--header-h) + 12px); }
.ds p, .ds li { line-height: 1.6; }
.ds .mono, .ds code { font-family: 'Plex Mono', monospace; font-size: .95em; }
.ds-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.ds .lead { font-size: 18px; color: var(--ink-2); max-width: 64ch; }

/* The board and its key figures */
.ds-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-top: 28px; }
@media (max-width: 860px) { .ds-hero { grid-template-columns: 1fr; } }
.board { position: relative; margin: 0; border-radius: var(--r-card); background: radial-gradient(120% 90% at 50% 40%, var(--surface) 0%, var(--surface-2) 100%); border: 1px solid var(--line); padding: 18px; box-shadow: var(--shadow-1); }
.board .art { position: relative; aspect-ratio: 1 / 1; }
.board img { width: 100%; height: 100%; display: block; border-radius: var(--r-btn); }
.board figcaption { color: var(--ink-3); font-size: 13px; margin-top: 10px; }
.pin-mark { position: absolute; transform: translate(-50%, -50%); min-width: 34px; height: 26px; padding: 0 7px; border-radius: var(--r-pill); display: grid; place-items: center;
  background: var(--navy); color: #fff; font: 650 12px/1 'Plex Sans', system-ui, sans-serif; text-decoration: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), var(--shadow-1);
  transition: transform .2s var(--ease), background-color .2s; }
.pin-mark.alt { background: var(--ink-2); }
.pin-mark:hover, .pin-mark:focus-visible { transform: translate(-50%, -50%) scale(1.12); background: var(--navy-600); outline: none; box-shadow: 0 0 0 3px var(--focus); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
/* A document can afford whitespace: the value and its label, no tile around them (S166 taste 12). */
.fact { padding: 0; }
.fact b { display: block; font-size: 22px; letter-spacing: -.01em; }
.fact span { color: var(--ink-3); font-size: 14px; }

/* Lists of what comes and what to add */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 32px; }
.cols .box { background: none; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; padding: 14px 0 0; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; }
.box h3 { margin: 0 0 6px; font-size: 16px; }
.box ul { margin: 0; padding-left: 18px; }
.tag { display: inline-block; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: var(--r-pill); background: var(--warn-bg); color: var(--warn); margin-left: 6px; vertical-align: 1px; }
.tbc { color: var(--warn); font-weight: 600; }

/* The wiring diagram */
.wiring { margin: 18px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; overflow-x: auto; }
.wiring svg { display: block; width: 100%; min-width: 760px; height: auto; font-family: 'Plex Sans', system-ui, sans-serif; }
.wiring .dev rect { fill: var(--surface-2); stroke: var(--line-2); }
.wiring .dev .t { font-weight: 650; font-size: 15px; fill: var(--ink); }
.wiring .dev .s { font-size: 12px; fill: var(--ink-3); }
.wiring .pcb { fill: #0f1115; stroke: #2a2f38; }
.wiring .pad { fill: #d9a43b; }
.wiring .plabel { font: 650 12px 'Plex Mono', monospace; fill: #f1e3c4; }
.wiring .wl { font: 600 11px 'Plex Mono', monospace; fill: var(--ink-2); }
.wiring .w { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wiring .w.pwr { stroke: #dc2626; stroke-width: 3.4; }
.wiring .w.gnd { stroke: #475569; stroke-width: 3; }
.wiring .w.sig { stroke: #d97706; }
.wiring .w.sig2 { stroke: #2563eb; }
.wiring .w.i2c { stroke: #16a34a; }
.wiring .w.rf { stroke: #7c3aed; stroke-dasharray: 2 5; }
.wiring .w.opt { stroke-dasharray: 7 6; }
/* Signals move the way they travel; power and ground stay still. */
@media screen and (prefers-reduced-motion: no-preference) {
  .wiring .w.sig.flow, .wiring .w.sig2.flow, .wiring .w.i2c.flow { stroke-dasharray: 5 7; animation: ds-flow 1.6s linear infinite; }
  .wiring .w.flow.back { animation-direction: reverse; }
  .ds-reveal { animation: ds-rise .5s var(--ease) both; }
  .ds-reveal.d2 { animation-delay: .08s; } .ds-reveal.d3 { animation-delay: .16s; }
}
@keyframes ds-flow { to { stroke-dashoffset: -24; } }
@keyframes ds-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 4px 0; color: var(--ink-3); font-size: 13px; }
.legend i { display: inline-block; width: 22px; height: 0; border-top: 3px solid; vertical-align: middle; margin-right: 6px; }

/* Pin tables */
.conn { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.conn .box { padding: 14px 16px 10px; }
.conn h3 { display: flex; align-items: baseline; gap: 8px; }
.conn h3 .ref { font: 700 14px 'Plex Mono', monospace; color: #fff; background: var(--navy); border-radius: 6px; padding: 2px 7px; }
.ds table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14.5px; }
.ds th, .ds td { text-align: left; vertical-align: top; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); }
.ds th { font-weight: 650; color: var(--ink-2); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.dot.pwr { background: #dc2626; } .dot.gnd { background: #475569; } .dot.sig { background: #d97706; } .dot.sig2 { background: #2563eb; } .dot.i2c { background: #16a34a; } .dot.ana { background: #7c3aed; } .dot.off { background: var(--line-2); }
.note { background: var(--navy-50); padding: 12px 16px; border-radius: var(--r-card); margin: 14px 0; }
.warnbox { background: var(--warn-bg); padding: 12px 16px; border-radius: var(--r-card); margin: 14px 0; }
.ds .scroll { overflow-x: auto; }
.ds .motto { color: var(--ink-3); margin-top: 56px; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr 1fr; } .fact b { font-size: 19px; } }

@media print {
  @page { size: A4; margin: 14mm; }
  #site-header, #site-footer, .ds-actions, .skip, .notice { display: none !important; }
  body { background: #fff; color: #000; }
  .ds { padding: 0; max-width: none; font-size: 10.5pt; }
  .ds h2 { break-after: avoid; margin-top: 22px; }
  .box, .ds table, .note, .warnbox, .wiring, .board, .fact { break-inside: avoid; box-shadow: none; }
  .wiring svg { min-width: 0; }
  .pin-mark { box-shadow: 0 0 0 2px #fff; }
  a { color: inherit; text-decoration: none; }
}
.ds .facts { background: none; border: 0; }
