/* GridShepard — quiet editorial. One file, system fonts only. */
:root {
  --paper: #f4f2ec;
  --paper-2: #ebe8df;
  --screen: #fbfaf6;
  --ink: #1b1d1c;
  --ink-2: #444946;
  --ink-3: #5f635d;
  --rule: #cfcabd;
  --rule-2: #e0dcd1;
  --accent: #9a3b1f;
  --ok: #2f5d3a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;
  --page: 1240px;
  --gut: 32px;
  --pad: clamp(20px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }
strong { font-weight: 600; }
.nw { white-space: nowrap; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 8px 14px;
  font: 600 14px/1.2 var(--sans); text-decoration: none;
}
.skip:focus { top: 12px; color: var(--paper); }

.page { width: 100%; max-width: calc(var(--page) + 2 * var(--pad)); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

.label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.4;
}

/* Masthead */
.masthead { border-bottom: 1px solid var(--ink); }
.masthead-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 18px/1 var(--sans); letter-spacing: -0.01em; }
.brand img { width: 22px; height: auto; }
.masthead-desc { font: italic 16px/1.3 var(--serif); color: var(--ink-3); padding-left: 24px; border-left: 1px solid var(--rule); }
.toc-nav ol { display: flex; gap: 28px; }
.toc-nav a { font: 500 15px/1 var(--sans); text-decoration: none; color: var(--ink-2); display: inline-flex; gap: 7px; padding: 10px 0; border-bottom: 1px solid transparent; }
.toc-nav a .n { font-family: var(--mono); font-size: 12px; color: var(--ink-3); position: relative; top: 1px; }
.toc-nav a:hover, .toc-nav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.toc-nav a[aria-current="true"] .n { color: var(--accent); }

/* Opening */
.opening {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gut);
  padding-top: clamp(36px, 4.5vw, 64px);
  padding-bottom: clamp(48px, 5vw, 72px);
  align-items: start;
}
.opening-text { grid-column: 1 / span 7; }
.opening .label { margin-bottom: 22px; }
h1 {
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  max-width: 15.5em;
  font-variant-numeric: lining-nums;
}
.lede { margin-top: 26px; font-size: 20px; line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.lede strong { color: var(--ink); }

.contents { margin-top: 40px; max-width: 40em; }
.contents .label { margin-bottom: 8px; }
.contents ol { border-top: 1px solid var(--ink); }
.contents a {
  display: grid; grid-template-columns: 2.2em 13em 1fr; gap: 8px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--rule); text-decoration: none;
}
.c-n { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.c-t { font-size: 18px; }
.c-d { font: 15px/1.4 var(--sans); color: var(--ink-3); }
.contents a:hover .c-t { text-decoration: underline; }

.fig-oneline { grid-column: 8 / span 5; padding-left: 16px; }
.fig-oneline .art { max-width: 440px; margin: 0 auto; }

/* Figures */
.fig { min-width: 0; }
.art { width: 100%; height: auto; overflow: visible; }
.fig figcaption {
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule);
  font: 15px/1.5 var(--sans); color: var(--ink-2); max-width: 44em;
}
.fig-n { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--ink); margin-right: 8px; }

/* SVG drawing styles */
.art .ln path, .art .ln rect, .art .ln circle { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: square; }
.art .ln rect { fill: var(--paper); }
.art .ln .bus { stroke-width: 4; }
.art .ln .ct { stroke-width: 1.3; }
.art .ln .thin { stroke-width: 1.1; }
.art .ln .dash, .art .dash { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.art .ln.hi path, .art .ln.hi rect, .art .ln.hi circle { stroke: var(--accent); stroke-width: 1.8; }
.art .ln.hi .dash { stroke: var(--accent); stroke-width: 1; }
.art .lg-rule { stroke: var(--rule); stroke-width: 1; }
.art .tx { font-family: var(--mono); font-size: 12.5px; fill: var(--ink); }
.art .tx .sm, .art .tx.sm, .art text.sm { font-size: 12px; fill: var(--ink-3); }
.art .tx.hi, .art .tx .hi, .art text.hi { fill: var(--accent); }
.art .tx.note { font-family: var(--serif); font-style: italic; font-size: 14px; }

.fig-oneline .art .tx { font-size: 14px; }
.fig-oneline .art .tx .sm, .fig-oneline .art .tx.sm { font-size: 13px; }
.fig-oneline .art .tx.note { font-size: 15px; }

.art .grid-min { fill: none; stroke: var(--rule-2); stroke-width: 0.8; }
.art .grid-maj { fill: none; stroke: var(--rule); stroke-width: 1; }
.art .frame { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.art .crv { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.art .crv.hi { stroke: var(--accent); stroke-width: 2.2; }
.art .dim { fill: none; stroke: var(--ink); stroke-width: 1; }
.art .axis { fill: none; stroke: var(--rule); stroke-width: 1; }
.art .wv { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.art .wv.hi { stroke: var(--accent); stroke-width: 1.5; }
.art .dig { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.art .dig.hi { stroke: var(--accent); }
.fig-pair .art .tx, .fig-pair .art .tx .sm, .fig-pair .art .tx.sm { font-size: 13px; }

/* Fig. 4: rugged tablet and keypad */
.art .dev { fill: #dcd8cc; stroke: var(--ink); stroke-width: 1.6; }
.art .bump { fill: none; stroke: var(--ink); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.art .side { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.art .cam { fill: var(--ink); }
.art .scr { fill: var(--screen); stroke: var(--ink); stroke-width: 1.4; }
.art .banner { fill: var(--ink); }
.art .dot-off { fill: #e8a27f; }
.art .rule { stroke: var(--rule); stroke-width: 4; }
.art .prog { stroke: var(--ink); stroke-width: 4; }
.art .field { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.art .ok { fill: #e6eee4; stroke: var(--ok); stroke-width: 1.4; }
.art .tick { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art .tx.ui-sm, .art .tx .ui-sm { font-family: var(--sans); font-size: 15px; }
.art .tx.mute { fill: var(--ink-3); }
.art .tx.prev { fill: #8a8d86; }
.art .tx.lab { font-family: var(--sans); font-size: 25px; font-weight: 600; }
.art .tx.big { font-family: var(--sans); font-size: 84px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; }
.art .tx.unit { font-family: var(--sans); font-size: 32px; fill: var(--ink-2); }
.art .btn { fill: var(--screen); stroke: var(--ink); stroke-width: 1.6; }
.art .btn.pri { fill: var(--ink); }
.art .tx.btn-t { font-family: var(--sans); font-size: 20px; font-weight: 600; }
.art .tx.inv, .art .tx .inv, .art text.inv { fill: var(--screen); }
.art .bt { fill: none; stroke: #1f4f8a; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.art .led { fill: #1f4f8a; }
.art .keys rect { fill: var(--screen); stroke: var(--ink); stroke-width: 1.4; }
.art .keys rect.ent { fill: var(--ink); }
.art .tx.key-t { font-family: var(--sans); font-size: 26px; font-weight: 600; }
.art .tx.key-t .key-s { font-size: 16px; letter-spacing: 0.06em; }

/* Fig. 5 */
.art .zone { fill: var(--paper-2); stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 5 4; }
.art .box { fill: var(--screen); stroke: var(--ink); stroke-width: 1.3; }
.art .hi-box { stroke: var(--accent); stroke-width: 1.8; }
.art .arw { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.art .arw.dashed { stroke-dasharray: 4 3; }
.art .ah { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.art .tx.lab-sm { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--ink-3); }
.fig-arch .art .tx { font-size: 14px; }
.fig-arch .art .tx .sm, .fig-arch .art .tx.sm { font-size: 12px; }

/* Sections */
.sec { padding-bottom: clamp(40px, 4.5vw, 64px); }
.sec-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gut);
  align-items: end;
  border-top: 1px solid var(--ink);
  padding-top: 22px;
  margin-bottom: clamp(28px, 3vw, 40px);
}
.sec-title { grid-column: 1 / span 5; }
.sec-head .label { margin-bottom: 8px; display: flex; align-items: baseline; gap: 12px; }
.sec-n { font: 400 26px/1 var(--serif); color: var(--accent); letter-spacing: 0; font-variant-numeric: lining-nums; }
h2 { font-weight: 400; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -0.015em; }
.standfirst { grid-column: 6 / -1; font-size: 21px; line-height: 1.45; font-style: italic; color: var(--ink-2); max-width: 34em; }

.prose p { max-width: 36em; }
.prose p + p { margin-top: 0.9em; }
.prose.cols { columns: 2; column-gap: calc(var(--gut) * 1.5); }
.prose.cols p { break-inside: avoid-column; max-width: none; }

.fig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 40px calc(var(--gut) * 1.5); margin: clamp(28px, 3vw, 40px) 0; align-items: start; }

.list-title { font: 600 13px/1.4 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }

/* Schedule of product areas */
.schedule { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); font: 16px/1.5 var(--sans); }
.schedule thead th {
  text-align: left; font: 600 12.5px/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); padding: 10px 16px 10px 0; border-bottom: 1px solid var(--ink);
}
.schedule thead th:nth-child(4) { color: var(--accent); }
.schedule td, .schedule tbody th { vertical-align: baseline; padding: 14px 20px 14px 0; border-bottom: 1px solid var(--rule); text-align: left; }
.schedule .s-n { font: 13px/1.5 var(--mono); color: var(--accent); width: 4.5em; }
.schedule tbody th { font: 400 19px/1.35 var(--serif); width: 13em; }
.schedule td { color: var(--ink-2); }
.schedule .s-lim { width: 32%; font: italic 16px/1.5 var(--serif); color: var(--ink); border-left: 1px solid var(--rule); padding-left: 20px; padding-right: 0; }

/* Section 2 */
.field-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); align-items: start; }
.fig-device { grid-column: 1 / span 7; }
.field-text { grid-column: 8 / -1; padding-top: 8px; }
.fig4-row { display: grid; grid-template-columns: 380fr 220fr; gap: 6%; align-items: end; max-width: 640px; }
.aside-link { margin-top: 22px; font-size: 19px; }
.aside-link a { text-decoration-color: var(--accent); }
.sec-note { margin-top: 26px; padding-top: 10px; border-top: 1px solid var(--rule); font: italic 16px/1.5 var(--serif); color: var(--ink-3); max-width: 24em; }

.points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gut); margin-top: 32px; border-top: 1px solid var(--ink); }
.points li { padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.p-n, .a-n { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.points h3, .layers h3 { font-weight: 400; font-size: 20px; line-height: 1.25; margin-top: 4px; }
.points p, .layers p { margin-top: 4px; font: 16px/1.55 var(--sans); color: var(--ink-2); }

/* Section 3 */
.arch-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); align-items: center; }
.fig-arch { grid-column: 1 / span 8; }
.layers { grid-column: 9 / -1; border-top: 1px solid var(--ink); }
.layers li { padding: 12px 0 14px; border-bottom: 1px solid var(--rule); }
.arch-v { display: none; }

/* Section 4 */
.claims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gut); border-top: 1px solid var(--ink); }
.claims div { padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.claims dt { font-style: italic; font-size: 19px; }
.claims dd { margin-top: 6px; font: 16px/1.55 var(--sans); color: var(--ink-2); }

/* Colophon */
.colophon { border-top: 1px solid var(--ink); background: var(--paper-2); }
.colophon-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); padding-top: 36px; padding-bottom: 32px; }
.colophon-brand { grid-column: 1 / span 3; }
.colophon-brand p { margin-top: 10px; font-style: italic; color: var(--ink-2); font-size: 16px; }
.colophon nav { grid-column: 4 / span 5; }
.colophon nav ul { columns: 2; column-gap: var(--gut); }
.colophon nav li { padding: 3px 0; }
.colophon nav a { font: 16px/1.5 var(--sans); color: var(--ink-2); }
.colophon-note { grid-column: 9 / span 4; font: 15px/1.6 var(--sans); color: var(--ink-3); }
.colophon-base { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 22px; border-top: 1px solid var(--rule); font: 14px/1.4 var(--sans); color: var(--ink-3); }
.colophon-base a { color: var(--ink-3); }

/* Medium */
@media (max-width: 1100px) {
  .masthead-desc { display: none; }
  .masthead-row { grid-template-columns: auto 1fr; }
  .toc-nav { justify-self: end; }
  .opening-text { grid-column: 1 / span 7; }
  .fig-oneline { grid-column: 8 / -1; padding-left: 0; }
  .contents a { grid-template-columns: 2em 1fr; }
  .c-d { grid-column: 2; }
  .sec-title { grid-column: 1 / span 6; }
  .standfirst { grid-column: 7 / -1; font-size: 19px; }
  .fig-device { grid-column: 1 / span 7; }
  .field-text { grid-column: 8 / -1; }
  .points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fig-arch, .layers { grid-column: 1 / -1; }
  .layers { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gut); }
  .claims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule tbody th { width: 10em; }
}

/* Narrow */
@media (max-width: 760px) {
  body { font-size: 16px; line-height: 1.55; }
  .masthead-row { grid-template-columns: 1fr; gap: 0; min-height: 0; padding-top: 14px; }
  .toc-nav { justify-self: stretch; }
  .toc-nav ol { gap: 0 18px; flex-wrap: wrap; padding: 2px 0; }
  .toc-nav a { font-size: 16px; padding: 12px 0; }
  .toc-nav a .n { display: none; }
  .opening, .sec-head, .field-grid, .arch-grid, .colophon-row { display: block; }
  .opening { padding-top: 28px; padding-bottom: 40px; }
  h1 { font-size: 32px; line-height: 1.12; }
  .lede { font-size: 17px; margin-top: 16px; }
  .contents { display: none; }
  .fig-oneline { margin-top: 32px; }
  .fig-oneline .art { max-width: 400px; }
  .fig-oneline .art .tx { font-size: 16px; }
  .fig-oneline .art .tx .sm, .fig-oneline .art .tx.sm { font-size: 14px; }
  .fig-oneline .art .tx.note { font-size: 16px; }
  .fig figcaption { font-size: 16px; }
  .sec { padding-bottom: 44px; }
  .sec-head { padding-top: 18px; margin-bottom: 22px; }
  .standfirst { margin-top: 8px; font-size: 17px; }
  .prose.cols { columns: 1; }
  .fig-pair { grid-template-columns: 1fr; gap: 36px; margin: 28px 0 36px; }
  .fig-pair .art .tx, .fig-pair .art .tx .sm, .fig-pair .art .tx.sm { font-size: 21px; }
  .fig-pair .art .grid-min { display: none; }

  .schedule, .schedule tbody, .schedule tr, .schedule td, .schedule tbody th { display: block; width: auto; }
  .schedule thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .schedule tr { display: grid; grid-template-columns: 2.6em 1fr; padding: 12px 0 14px; border-bottom: 1px solid var(--rule); }
  .schedule td, .schedule tbody th { border: 0; padding: 0; }
  .schedule .s-n { grid-row: 1; padding-top: 3px; }
  .schedule tbody th { grid-column: 2; }
  .schedule td:not(.s-n) { grid-column: 2; margin-top: 4px; }
  .schedule .s-lim { width: auto; border: 0; padding: 0; margin-top: 4px; }
  .schedule .s-lim::before { content: "Limits: "; font: 600 12.5px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; font-style: normal; color: var(--accent); }

  .fig4-row { grid-template-columns: 1fr; gap: 16px; max-width: 340px; margin: 0 auto; }
  .fig4-row .keypad { width: 46%; margin: 0 auto; }
  .field-text { margin-top: 28px; }
  .points { grid-template-columns: 1fr; margin-top: 28px; }
  .points li { padding: 12px 0 14px; }
  .points .p-n { display: inline-block; width: 2.8em; }
  .points h3 { display: inline; font-size: 19px; }
  .points p { display: inline; margin-left: 4px; }
  .arch-h { display: none; }
  .arch-v { display: block; max-width: 360px; margin: 0 auto; }
  .fig-arch .art .tx { font-size: 16px; }
  .fig-arch .art .tx .sm, .fig-arch .art .tx.sm { font-size: 14.5px; }
  .layers { display: block; margin-top: 28px; }
  .claims { grid-template-columns: 1fr; }
  .colophon-row > * + * { margin-top: 20px; }
  .colophon nav { display: none; }
  .colophon-row { padding-top: 28px; padding-bottom: 24px; }
  .field-text .sec-note { display: none; }
  .arch-v { max-width: 320px; }
  .opening .label { display: none; }
  .layers li { padding: 12px 0 14px; }
  .layers .a-n { display: inline-block; width: 2.8em; }
  .layers h3 { display: inline; font-size: 19px; }
  .layers p { display: inline; margin-left: 4px; }
  .claims div { padding: 12px 0 14px; }
  .claims dt { display: inline; font-size: 18px; }
  .claims dt::after { content: "."; }
  .points h3::after, .layers h3::after { content: "."; }
  .claims dd { display: inline; margin: 0 0 0 4px; }
}
