@font-face {
  font-family: 'Fixedsys Excelsior';
  src: url('assets/fixedsys-excelsior-martyr.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --paper: #f4f1e8;
  --paper-2: #ebe6da;
  --ink: #161510;
  --muted: #514d43;
  --rule: #bbb3a3;
  --amber: #a95800;
  --terminal: #11110e;
  --panel-amber: #e0ad62;
}

html, body { background: var(--paper); color: var(--ink); }
body {
  font-family: 'Fixedsys Excelsior', 'Courier New', monospace;
  font-size: 19px;
  line-height: 1.46;
  margin: 0;
}
/* display elements keep Fixedsys even when mobile switches body text to sans */
h1, h2, .gcode, .wordmark, .mast, .scope strong, .founder strong,
.panel figcaption, .matrix th, .matrix td:first-child,
.sol-note, .contact p, .contact small, .colophon {
  font-family: 'Fixedsys Excelsior', 'Courier New', monospace;
}

.sheet { max-width: 1080px; margin: 0 auto; padding: 0 24px 96px; }

/* masthead */
.mast {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 16px;
  padding: 26px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.wordmark {
  font-family: 'Sixtyfour Convergence', 'Fixedsys Excelsior', monospace;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: .02em;
}
.mast a { color: var(--amber); text-decoration: none; border-bottom: 1px solid var(--rule); font-size: 16px; letter-spacing: .05em; }
.mast a:hover { border-bottom-color: var(--amber); }

/* landing (not a section) */
.landing { padding: 56px 0; border-bottom: 1px solid var(--rule); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: stretch;
}
.hero-grid .panel {
  margin-top: 7px; /* optical: drop panel top to the h1 cap line, not its line-box top */
}
.hero-grid .panel img {
  flex: 1;
  min-height: 0;
  object-fit: cover;
}
h1 {
  font-size: 44px;
  line-height: 1.14;
  font-weight: 400;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
  max-width: 21ch;
}
.lead {
  font-size: 20px;
  max-width: 58ch;
  margin: 0;
}

/* gutter rows */
.row {
  display: grid;
  grid-template-columns: 176px 1fr;
  gap: 0 40px;
  padding: 56px 0;
  border-bottom: 1px solid var(--rule);
}
.row:last-child { border-bottom: 0; }
.gutter {
  border-right: 1px solid var(--ink);
  padding-right: 20px;
  text-align: right;
}
.gcode { color: var(--amber); font-size: 16px; letter-spacing: .04em; white-space: nowrap; }
.content { min-width: 0; }

/* founder strip */
.founder {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: baseline;
  font-size: 17px;
  margin: 0;
}
.founder strong { font-weight: 400; }
.founder strong a { color: var(--amber); text-decoration: none; border-bottom: 1px solid var(--rule); }
.founder strong a:hover { border-bottom-color: var(--amber); }
.founder span { color: var(--muted); }

/* section heads */
h2 { font-size: 27px; font-weight: 400; margin: 0 0 22px; text-wrap: balance; }

/* scope callout */
.scope {
  border-left: 4px solid var(--amber);
  background: var(--paper-2);
  padding: 18px 22px;
  max-width: 62ch;
  margin: 0 0 20px;
}
.scope strong { font-weight: 400; color: var(--amber); letter-spacing: .04em; }
.thread { color: var(--muted); max-width: 62ch; margin: 0; }
.nobr { white-space: nowrap; }
.at { padding: 0 .13em; } /* air on either side of @ in rendered email addresses */

/* engagement table */
.tablewrap { overflow-x: auto; }
table.matrix {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-size: 16.5px;
}
.matrix th {
  text-align: left;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 13.5px;
  color: var(--muted);
  padding: 12px 18px 12px 0;
  border-bottom: 1px solid var(--ink);
}
.matrix td {
  vertical-align: top;
  padding: 16px 18px 16px 0;
  border-bottom: 1px solid var(--rule);
  line-height: 1.5;
}
.matrix tr:last-child td { border-bottom: 0; }
.matrix td:first-child { color: var(--amber); white-space: nowrap; padding-right: 26px; }
.matrix td:nth-child(2) { width: 52%; }

/* solutions */
.sol-note {
  font-size: 23px;
  line-height: 1.58;
  letter-spacing: .012em;
  max-width: 46ch;
  margin: 0 0 34px;
}
.sol-note a { color: var(--amber); text-decoration: none; border-bottom: 1px solid var(--rule); }
.sol-note a:hover { border-bottom-color: var(--amber); }
.sol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* terminal panels with real graphics */
.panel {
  background: var(--terminal);
  border: 1px solid var(--ink);
  color: var(--panel-amber);
  display: flex;
  flex-direction: column;
  margin: 0;
}
.panel img { width: 100%; height: auto; display: block; }
.panel figcaption {
  border-top: 1px solid #2a2820;
  padding: 10px 14px;
  font-size: 15px;
}
/* uniform tiles in the solutions grid: identical image area, identical caption block */
.sol-grid .panel img {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}
.sol-grid .panel figcaption {
  min-height: 2.92em;
}

/* contact */
.contact p { font-size: 22px; max-width: 34ch; margin: 0 0 14px; }
.contact a { color: var(--amber); text-decoration: none; border-bottom: 1px solid var(--rule); }
.contact a:hover { border-bottom-color: var(--amber); }
.contact small { color: var(--muted); font-size: 16px; letter-spacing: .05em; }

/* colophon */
.colophon {
  border-top: 1px solid var(--rule);
  padding: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .04em;
}

a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

@media (max-width: 900px) {
  body {
    /* running text switches to sans on mobile for readability (John's ruling: mobile only) */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
  }
  .lead { font-size: 17.5px; }
  table.matrix { font-size: 15px; }
  .landing { padding: 40px 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .panel img { flex: initial; min-height: auto; aspect-ratio: 4 / 3; }
  h1 { font-size: 32px; }
  .row { grid-template-columns: 1fr; gap: 18px 0; padding: 40px 0; }
  .gutter {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    padding: 0 0 10px;
    text-align: left;
  }
  .sol-grid { grid-template-columns: 1fr; }
  .sol-note { font-size: 20px; }
}

/* tablet band: two columns (after the 900 block so it wins the cascade there) */
@media (min-width: 561px) and (max-width: 900px) {
  .sol-grid { grid-template-columns: repeat(2, 1fr); }
}

/* engagement table stacks below 700px: no horizontal scrolling on phones (John's pick A) */
@media (max-width: 700px) {
  table.matrix, .matrix tbody, .matrix tr, .matrix td { display: block; }
  .matrix thead { display: none; }
  table.matrix { min-width: 0; }
  .matrix tr { border-bottom: 1px solid var(--rule); padding: 16px 0; }
  .matrix tr:last-child { border-bottom: 0; }
  .matrix td { border-bottom: 0; padding: 4px 0; width: auto; }
  .matrix td:first-child { white-space: normal; padding-right: 0; padding-bottom: 8px; font-size: 17.5px; }
  .matrix td:nth-child(2) { width: auto; }
  .matrix td[data-label]::before {
    content: attr(data-label);
    display: block;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 2px;
  }
}
