/* Experiment: printed engineering manual. Same color tokens as the live site. */
:root {
  --navy: #10192b; --paper: #faf9f6; --ink: #1c2126; --muted: #5b6472; --line: #e4e0d8;
  --accent: #c1793f; --accent-dark: #9a5a28; --sand: #f3efe6; --on-navy: #d9dee8; --on-navy-dim: #aab3c2; --amber-lt: #e7b98a;
  --serif: "Source Serif 4", Georgia, serif;
  --label: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --plate: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --margin: 12.5rem; --wrap: 76rem; --pad: clamp(1rem, 3.5vw, 2.75rem);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.6 var(--serif); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
p { margin: 0 0 1rem; max-width: 40em; }
strong { font-weight: 600; }

/* masthead and binder tabs */
.mast { background: var(--navy); color: var(--on-navy); }
.mast-in { max-width: var(--wrap); margin: 0 auto; padding: 1.1rem var(--pad) 0; }
.who { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem 1rem; margin: 0 0 1.4rem; max-width: none; }
.who a { font: 600 1.7rem/1.1 var(--plate); color: #fff; text-decoration: none; letter-spacing: .01em; }
.who span { font: 500 1rem/1.2 var(--plate); color: var(--amber-lt); letter-spacing: .02em; }
.tabs { list-style: none; display: flex; gap: 3px; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: flex; align-items: baseline; gap: .5rem; white-space: nowrap; padding: .5rem 1.05rem .45rem .7rem; text-decoration: none;
  font: 500 1rem/1.3 var(--label); color: var(--on-navy); background: #1c2840; }
.tabs a:hover { background: #26344f; color: #fff; }
.tabs a[aria-current] { background: var(--paper); color: var(--navy); font-weight: 600; }
.tab-no { font: 600 .95rem var(--plate); color: var(--amber-lt); }
.tabs a[aria-current] .tab-no { color: var(--accent-dark); }

/* page head: the sheet number hangs in the margin */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad) 3rem; counter-reset: sec; }
.head { display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); padding: 3rem 0 2.6rem; }
.head.has-portrait { grid-template-columns: var(--margin) minmax(0, 1fr) 15.5rem; column-gap: 0; }
.sheet-no { font: 500 clamp(5rem, 9vw, 8.5rem)/.8 var(--plate); color: var(--accent); margin: 0; }
h1, h2, h3 { font-family: var(--plate); color: var(--navy); font-weight: 600; }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: .98; letter-spacing: -.005em; margin: 0 0 1.2rem; max-width: 13.5em; }
.lede { font-size: 1.32rem; line-height: 1.45; max-width: 31em; margin: 0; }
.head.has-portrait .headshot { grid-column: 3; grid-row: 1; }
.head.has-portrait .sheet-no { grid-column: 1; grid-row: 1; }
.head.has-portrait .head-text { grid-column: 2; grid-row: 1; }
.headshot { width: 100%; max-width: 14rem; justify-self: end; align-self: start; aspect-ratio: 3 / 4; object-fit: cover; margin-top: -4.6rem; border: 5px solid var(--paper); outline: 1px solid var(--navy); outline-offset: -5px; position: relative; }

/* sections: heading and number sit in the left margin, like a manual */
section { display: grid; grid-template-columns: var(--margin) minmax(0, 46rem); border-top: 2px solid var(--navy); padding: 1.1rem 0 2.4rem; counter-increment: sec; }
section > * { grid-column: 2; }
section > h2 { grid-column: 1; grid-row: 1 / span 40; align-self: start; position: sticky; top: 1rem; font-size: 1.45rem; line-height: 1.08; margin: 0; padding-right: 1.6rem; }
section > h2::before { content: var(--sheet) "." counter(sec); display: block; font: 500 1rem/1.5 var(--label); color: var(--accent-dark); font-variant-numeric: tabular-nums; }
h3 { font-size: 1.28rem; line-height: 1.15; margin: 1.7rem 0 .5rem; }
section > h3:first-of-type { margin-top: 0; }
ul.plain { margin: 0 0 1rem; padding: 0; list-style: none; }
ul.plain li { padding: .55rem 0; border-top: 1px solid var(--line); }
.list-tight li { padding: .25rem 0; }
section > h2 + ul.plain li:first-child { border-top: 0; padding-top: 0; }

/* career */
.job { padding: 0 0 1.5rem; }
.job + .job { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.job h3 { margin: 0; }
.job-org { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; max-width: none; font: 500 .98rem/1.4 var(--label); color: var(--muted); margin: .15rem 0 .6rem; }
.yrs { color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.job ul { margin: 0; padding: 0 0 0 1.05rem; list-style: square; }
.job li { margin-bottom: .25rem; }
.job li::marker { color: var(--accent); }

/* skills: parts lists */
.chips { list-style: none; padding: 0; margin: 0 0 .4rem; columns: 2; column-gap: 2rem; border-top: 1px solid var(--navy); }
.chips li { break-inside: avoid; font: 400 1rem/1.3 var(--label); padding: .34rem 0; border-bottom: 1px solid var(--line); }

/* contents list instead of cards */
.cards { counter-reset: sh 1; border-top: 1px solid var(--navy); }
.card { counter-increment: sh; display: grid; grid-template-columns: 2.2rem 13rem minmax(0, 1fr); align-items: baseline; padding: .75rem 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.card::before { content: counter(sh); font: 600 1.25rem var(--plate); color: var(--accent-dark); }
.card h3 { margin: 0; font-size: 1.28rem; }
.card p { margin: 0; font-size: 1rem; line-height: 1.4; }
.card:hover { background: var(--sand); color: var(--ink); }

/* lab */
.note { border: 1px solid var(--navy); padding: .85rem 1.05rem; margin: 0 0 2.4rem var(--margin); max-width: 46rem; font-size: 1.03rem; background: var(--paper); }
.note strong { font-family: var(--label); }
.blueprint { background-color: var(--navy); background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 28px 28px; margin: 0 calc(50% - 50vw) 3rem; color: var(--on-navy); }
.blueprint-in { max-width: var(--wrap); margin: 0 auto; padding: 1.2rem var(--pad) 1.3rem; }
.diagram-scroll { overflow-x: auto; }
.diagram-scroll svg { display: block; width: 100%; min-width: 760px; height: auto; }
.blueprint figcaption { font: 400 .95rem/1.45 var(--label); color: var(--on-navy-dim); margin-top: .6rem; max-width: 46rem; }
figcaption { font: 400 .92rem/1.4 var(--label); color: var(--muted); margin-top: .4rem; }
.specs { margin: 0; border-top: 1px solid var(--navy); }
.specs div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .8rem; padding: .42rem 0; border-bottom: 1px solid var(--line); }
.specs dt { font: 600 1rem/1.35 var(--label); color: var(--navy); }
.specs dd { margin: 0; font: 400 1rem/1.35 var(--label); }
.photo { margin: 0 0 1.4rem; }
.photo.narrow img { max-width: 15rem; }
.hw { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.hw .photo { margin: 0; }
.hw .photo.narrow img { width: 100%; max-width: 100%; }
.hw figcaption { margin-top: .5rem; }
.photo.portrait { max-width: 18rem; }
section .photo.narrow:has(picture) img { max-width: 28rem; }

/* education */
.certs { border-top: 1px solid var(--navy); margin-bottom: 1.4rem; }
.cert { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.1rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.cert img { width: 100%; border: 1px solid var(--line); }
.cert-name { font: 600 1.14rem/1.2 var(--plate); color: var(--navy); margin: 0; }
.cert-org { font: 400 .95rem/1.3 var(--label); color: var(--muted); margin: .1rem 0 0; }
.vendors { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.vendors li { display: flex; align-items: center; justify-content: center; height: 4.6rem; padding: .6rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vendors img { max-height: 1.7rem; width: auto; max-width: 100%; }
.vendors .word { font: 600 1.25rem var(--plate); color: var(--navy); }
table.awards { border-collapse: collapse; width: 100%; margin-bottom: 1rem; font-family: var(--label); }
table.awards th, table.awards td { text-align: left; padding: .45rem .8rem .45rem 0; border-bottom: 1px solid var(--line); }
table.awards thead th { font-size: .92rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--navy); }
table.awards td:last-child { font-variant-numeric: tabular-nums; color: var(--accent-dark); font-weight: 500; }

/* off the clock: station log */
.award-grid { border-top: 1px solid var(--navy); }
.award { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) minmax(0, 15rem); column-gap: 1rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.award img { grid-row: 1 / span 2; height: 2.6rem; width: auto; margin: auto; }
.award p { margin: 0; }
.award-name { font: 600 1.12rem/1.15 var(--plate); color: var(--navy); }
.award-stat { font: 500 .95rem/1.3 var(--label); color: var(--accent-dark); grid-column: 2; }
.award-meta { font: 400 .92rem/1.3 var(--label); color: var(--muted); grid-column: 3; grid-row: 1 / span 2; }
.source { font: 400 .9rem var(--label); color: var(--muted); margin-top: .6rem; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem .7rem; }
.photo-grid figure { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.photo-grid figure > a { display: block; flex: 1; min-height: 0; }
.photo-grid img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.photo-grid:not(.even):not(.pair) figure:first-child { grid-column: span 2; grid-row: span 2; }
.photo-grid.even { grid-template-columns: repeat(3, 1fr); }
.photo-grid.pair { grid-template-columns: repeat(2, 1fr); margin-bottom: 1rem; max-width: 30rem; }

/* title block */
.block { background: var(--navy); color: var(--on-navy); }
.block-in { max-width: var(--wrap); margin: 0 auto; padding: 1.4rem var(--pad); display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.6fr .7fr; }
.cell { border: 1px solid #3a4763; margin: 0 -1px -1px 0; padding: .4rem .7rem .5rem; display: flex; flex-direction: column; }
.k { font: 400 .8rem/1.3 var(--label); color: var(--on-navy-dim); }
.v { font: 600 1.18rem/1.25 var(--plate); color: #fff; overflow-wrap: anywhere; }
.v a { color: var(--amber-lt); }
.v a:hover { color: #fff; }

/* live EdgeRouter 12 panel: instrument strip */
.live { margin: .4rem 0 0; }
.live-status { font: 500 .95rem var(--label); color: var(--muted); margin: 0 0 .6rem; max-width: none; }
.live-status .live-pulse { color: #2e7d4f; }
.live-status.is-stale, .live-status.is-stale .live-pulse { color: var(--accent-dark); }
.live-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); border-top: 1px solid var(--navy); border-left: 1px solid var(--line); margin: 0 0 1.4rem; }
.live-tile { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .45rem .7rem; }
.live-label { display: block; font: 400 .88rem/1.25 var(--label); color: var(--muted); }
.live-value { display: block; font: 600 1.6rem/1.15 var(--plate); color: var(--navy); font-variant-numeric: tabular-nums; }
.live-tile .live-dot { font-size: .7em; margin-right: .3rem; vertical-align: .1em; }
.live-tile.is-good .live-dot { color: #2e7d4f; }
.live-tile.is-bad .live-dot { color: #b3261e; }
.live-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.3rem 1.6rem; margin: 0 0 1.4rem; }
.live-chart { margin: 0; }
.live-chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; margin: 0 0 .3rem; }
.live-chart-title { font: 600 1.18rem var(--plate); color: var(--navy); }
.live-legend { display: flex; gap: .8rem; font: 400 .88rem var(--label); color: var(--muted); }
.live-key { display: inline-flex; align-items: center; gap: .35rem; }
.live-swatch { display: inline-block; width: 12px; height: 3px; }
.live-plot { position: relative; }
.live-plot svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.live-grid { stroke: var(--line); stroke-width: 1; }
.live-axis { font: 400 11px var(--label); fill: var(--muted); }
.live-direct { font: 500 11px var(--label); fill: var(--muted); }
.live-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.live-tip { position: absolute; top: 4px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .35rem .55rem; font: 400 .82rem/1.45 var(--label); pointer-events: none; white-space: nowrap; }
.live-tip strong { display: block; font-weight: 600; }
.live-tip-row { display: flex; align-items: center; gap: .35rem; }
.live-chart-note { font: 400 .86rem var(--label); color: var(--muted); margin: .3rem 0 0; }
.live-empty { color: var(--muted); font: 400 .95rem var(--label); }
.live-table-wrap { overflow-x: auto; }
.live-table { width: 100%; border-collapse: collapse; font: 400 .95rem var(--label); }
.live-table caption { text-align: left; font: 600 1.18rem var(--plate); color: var(--navy); padding: 0 0 .3rem; }
.live-table th { text-align: left; font-size: .88rem; font-weight: 600; color: var(--muted); padding: .3rem .8rem .3rem 0; border-top: 1px solid var(--navy); border-bottom: 1px solid var(--navy); }
.live-table td { padding: .3rem .8rem .3rem 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.live-table td.num { font-variant-numeric: tabular-nums; }
.live-table td.mono { font-variant-numeric: tabular-nums; font-weight: 500; }
.live-table td.link-up .live-dot { color: #2e7d4f; }
.live-table td.link-down { color: var(--muted); }

/* cluster totals on the live dashboard */
section .live-head { font-size: 1.28rem; margin: 1.6rem 0 .5rem; }
.live-cluster .live-head { margin-top: .4rem; }
.live-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); border-top: 1px solid var(--navy); border-left: 1px solid var(--line); }
.live-meter { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .45rem .7rem .55rem; }
.live-bar { height: 6px; background: var(--line); margin: .3rem 0 .35rem; }
.live-bar i { display: block; height: 100%; background: var(--navy); }
.live-detail { display: block; font: 400 .9rem/1.3 var(--label); color: var(--muted); }

/* narrow phones: the four tabs sit in two rows so none is hidden */
@media (max-width: 560px) {
  .tabs { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .tabs a { padding: .45rem .6rem; font-size: .95rem; }
}
/* tablets and phones */
@media (max-width: 860px) {
  :root { --margin: 0rem; }
  .head, .head.has-portrait { display: block; padding: 1.6rem 0 1.8rem; }
  .sheet-no { display: none; }
  .hw { grid-template-columns: minmax(0, 1fr); }
  .hw .photo.narrow img { max-width: 12rem; }
  .headshot { float: right; width: 6.4rem; margin: .1rem 0 .5rem 1rem; }
  .lede { font-size: 1.18rem; }
  section { display: block; padding-bottom: 1.8rem; }
  section > h2 { position: static; padding: 0 0 .8rem; font-size: 1.7rem; }
  .note { margin-left: 0; }
  .chips { columns: 1; }
  .card { grid-template-columns: 1.8rem minmax(0, 1fr); }
  .card p { grid-column: 2; margin-top: .1rem; }
  .specs div { grid-template-columns: 7.5rem minmax(0, 1fr); }
  .award { grid-template-columns: 3rem minmax(0, 1fr); }
  .award-meta { grid-column: 2; grid-row: auto; }
  .vendors { grid-template-columns: repeat(3, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid.even { grid-template-columns: repeat(2, 1fr); }
  .block-in { grid-template-columns: 1fr 1fr; }
  .cell.wide { grid-column: span 2; }
}
