/* ============================================================
   NHP-2027 datasheet. Loaded after style.css.
   ============================================================ */
.sheet main { width: min(920px, 100% - 32px); padding-top: 96px; }
.sheet main a:not(.say-hello), .sheet footer a { color: var(--current); text-decoration: none; }
.sheet main a:not(.say-hello):hover, .sheet footer a:hover { text-decoration: underline; }
.sheet .links a { color: var(--muted); }

/* ---------- title block ---------- */
.ds-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: end;
  padding: 28px 0 22px; border-bottom: 2px solid var(--current);
}
.ds-kicker { margin: 0 0 4px; color: var(--current); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.ds-head h1 { margin: 0 0 10px; font-family: var(--mono); font-weight: 600; letter-spacing: -.03em; font-size: clamp(2.6rem, 9vw, 4.4rem); }
.ds-sub { margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.4; }
.ds-meta { margin: 0; display: grid; grid-template-columns: auto auto; gap: 4px 18px; font-size: .78rem; }
.ds-meta div { display: contents; }
.ds-meta dt { color: var(--muted); }
.ds-meta dd { margin: 0; text-align: right; }
.ds-meta .live { color: var(--current); }
.ds-meta .live::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px;
  background: var(--current); box-shadow: 0 0 8px var(--current); animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .35; } }

/* ---------- sections ---------- */
.ds-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; }
.ds-sec { padding: 34px 0 6px; }
.ds-sec h2 {
  font-size: 1.25rem; letter-spacing: -.02em; margin: 0 0 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--dim); display: flex; gap: 12px; align-items: baseline;
}
.ds-sec h2 .mono { color: var(--current); font-size: .9rem; font-weight: 600; }
.ds-sec > p, .ds-sec p { color: #c5c4c0; margin: 0 0 12px; max-width: 62ch; }
.ds-list { margin: 0; padding: 0; list-style: none; color: #c5c4c0; font-size: .97rem; }
.ds-list li { position: relative; padding-left: 20px; margin-bottom: 7px; line-height: 1.5; }
.ds-list li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 7px; height: 7px; border: 1.5px solid var(--current); border-radius: 50%; }
.ds-list b { color: var(--text); font-weight: 500; }
sup { font-family: var(--mono); font-size: .65em; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 18px; }
.ds-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ds-table caption { caption-side: top; text-align: left; color: var(--muted); font-size: .72rem; padding-bottom: 8px; }
.ds-table th {
  text-align: left; font-family: var(--mono); font-weight: 600; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--muted); border-bottom: 1px solid var(--muted); white-space: nowrap;
}
.ds-table td { padding: 9px 12px; border-bottom: 1px solid var(--dim); color: #c5c4c0; vertical-align: top; line-height: 1.45; }
.ds-table tbody tr { transition: background .2s ease; }
.ds-table tbody tr:hover, .ds-table tr.hl { background: rgba(245,181,69,.07); }
.ds-table .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.ds-table .hi { color: var(--current-hot); }
.ds-table tr.pending td { color: var(--muted); font-style: italic; }
.ds-note { color: var(--muted); font-size: .72rem; margin-top: -8px; }

/* ---------- pinout ---------- */
.pinout { margin: 4px auto 22px; max-width: 560px; }
.pinout svg, .timing svg { display: block; width: 100%; height: auto; font-family: var(--mono); }
.pinout .body { fill: var(--bg-2); stroke: var(--muted); stroke-width: 1.5; }
.pinout .notch { fill: var(--bg); stroke: var(--muted); stroke-width: 1.5; }
.pinout .dot { fill: var(--current); }
.pinout .part { fill: var(--text); font-size: 22px; font-weight: 600; }
.pinout .pkg { fill: var(--muted); font-size: 11px; }
.pin { cursor: pointer; }
.pin line { stroke: var(--muted); stroke-width: 6; transition: stroke .2s ease, filter .2s ease; }
.pin .num { fill: var(--muted); font-size: 11px; }
.pin .name { fill: var(--text); font-size: 13px; font-weight: 600; transition: fill .2s ease; }
.pin:hover line, .pin.hl line { stroke: var(--current); filter: drop-shadow(0 0 5px var(--current)); }
.pin:hover .name, .pin.hl .name { fill: var(--current-hot); }
.pinout figcaption, .timing figcaption { text-align: center; color: var(--muted); font-size: .74rem; margin-top: 10px; }

/* ---------- timing diagram ---------- */
.timing { margin: 0 0 10px; }
.timing .grid line { stroke: var(--dim); stroke-dasharray: 2 4; }
.timing .axis text { fill: var(--muted); font-size: 11px; }
.timing .labels text { fill: var(--text); font-size: 11.5px; font-weight: 600; }
.timing .sig { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; }
.timing .sig.hot { stroke: var(--current); filter: drop-shadow(0 0 4px var(--current)); }
.timing .now { stroke: var(--current-hot); stroke-width: 1; stroke-dasharray: 4 3; }
.timing .now-label { fill: var(--current-hot); font-size: 10px; font-weight: 600; }
.timing .edge { fill: var(--current); font-size: 10.5px; }

/* ---------- ordering + notes ---------- */
.ds-order { margin-bottom: 0 !important; }
.ds-notes { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--dim); }
.ds-notes p { font-size: .8rem; color: var(--muted); margin: 0 0 6px; max-width: none; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .ds-head { grid-template-columns: 1fr; }
  .ds-meta dd { text-align: left; }
  .ds-meta { justify-content: start; }
  .ds-cols { grid-template-columns: 1fr; }
  .print-link { display: none; }
}

/* ---------- print: a real paper datasheet ---------- */
@media print {
  :root { --bg: #fff; --bg-2: #f6f6f6; --text: #111; --muted: #555; --dim: #ccc; --current: #b06d00; --current-hot: #8a5500; }
  body { background: #fff; color: #111; font-size: 10pt; }
  .topbar, .say-hello + .links, footer a { display: none; }
  .sheet main { padding-top: 0; width: 100%; }
  .ds-sec p, .ds-list, .ds-table td { color: #222; }
  .ds-sec { break-inside: avoid; }
  .pin line, .timing .sig.hot, .ds-meta .live::before { filter: none; box-shadow: none; animation: none; }
}
