/* Lohrberg Systems — single stylesheet. No external requests of any kind. */

:root {
  color-scheme: light dark;
  --paper: #F7F5F0;
  --ink: #1F1E1A;
  --muted: #6E6A5E;
  --hairline: #DDD9CC;
  --block: #EFECE3;
  --accent: #2E5A4B;
  --accent-hover: #23453A;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16150F;
    --ink: #EAE7DC;
    --muted: #9A9484;
    --hairline: #2C2A22;
    --block: #1D1C15;
    --accent: #7FB39C;
    --accent-hover: #9CC7B3;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 700px) {
  .wrap { padding: 0 40px; }
}

/* Links */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 120ms ease;
}
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Skip link */
.skip {
  position: absolute;
  left: 24px;
  top: 8px;
  padding: 8px 16px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  transform: translateY(-300%);
  z-index: 10;
}
.skip:focus { transform: none; }

/* Header */
.site-header .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 32px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand svg { display: block; flex: none; }
.brand rect, .brand line { fill: none; stroke: currentColor; stroke-width: 1; }
.brand circle { fill: var(--accent); }

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-left: auto;
  font-size: 0.9375rem;
}
.site-header nav a { color: inherit; text-decoration: none; }
.site-header nav a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.site-header nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
@media (max-width: 699px) {
  .site-header nav { margin-left: 0; flex-basis: 100%; }
}

/* Main column */
main { display: block; padding: 48px 0 72px; }
@media (min-width: 700px) { main { padding: 72px 0 104px; } }

.band + .band { margin-top: 48px; border-top: 1px solid var(--hairline); padding-top: 24px; }
@media (min-width: 700px) {
  .band + .band { margin-top: 104px; padding-top: 48px; }
}

/* Type */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 16px;
}
h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  max-width: 24ch;
}
h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 16px;
  max-width: 36rem;
}
h3 { font-size: 1.0625rem; font-weight: 600; margin: 0 0 8px; max-width: 36rem; }

p, ul, ol, dl { max-width: 36rem; margin: 0 0 16px; }
li { margin-bottom: 8px; }
.muted { font-size: 0.9375rem; color: var(--muted); }
.caption {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 8px;
  max-width: 36rem;
}

/* Service lines on the index */
.line + .line { margin-top: 24px; }
.line h2 { font-size: 1.1875rem; line-height: 1.3; margin: 0 0 8px; }

/* Labelled parts on the work page */
.parts dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 16px;
}
.parts dt:first-child { margin-top: 0; }
.parts dd { margin: 8px 0 0; }

/* Monospace texture blocks */
.texture {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  background: var(--block);
  border: 1px solid var(--hairline);
  padding: 16px 24px;
  overflow-x: auto;
  max-width: 36rem;
  margin: 24px 0 8px;
}

/* Tables */
.tablewrap { overflow-x: auto; max-width: 36rem; margin: 24px 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: left;
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid var(--hairline);
}
td {
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
td.fmt { font-family: var(--mono); font-size: 0.8125rem; }

/* Schematic */
.schematic { display: block; width: 100%; max-width: 36rem; height: auto; margin: 8px 0; }
.schematic text { font-family: var(--mono); font-size: 11px; fill: currentColor; }
.schematic .lbl { fill: var(--muted); }
.schematic rect, .schematic line, .schematic polyline { fill: none; stroke: currentColor; stroke-width: 1; }
@media (max-width: 480px) {
  .schematic text { font-size: 14px; }
}

/* Contact address */
.bigmail { margin: 24px 0 32px; }
.bigmail a {
  font-size: clamp(1.375rem, 3.5vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); }
.site-footer p {
  max-width: none;
  margin: 0;
  padding: 24px 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

@media print {
  .site-header nav, .skip { display: none; }
  body { background: #fff; color: #000; }
}
