/* Shipright — public feed.
   Identity: "Instrument" (docs/brand/brand-kit.md). Chalk and graphite, an
   engineering-drawing grid, orange industrial arms, lime only as a fill.
   An advanced-mainframe console: lamps, monospace readouts, job records.

   Fonts are IBM Plex (SIL Open Font License), served from this site's own
   fonts/ folder. Nothing is fetched from a font service. Each brand face has
   a size-matched stand-in built from a common system font, so text does not
   jump when the real font arrives. */

/* ---------- Fonts ---------- */

@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans Condensed';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-condensed-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2');
}

/* Stand-ins: system fonts stretched to the brand fonts' widths and heights.
   size-adjust measured with website-release's font-ratio.mjs on this page's
   own text at its real sizes (sans 17px, condensed 92px, mono 12px), 31 Oct 2026.
   ascent and descent overrides = Plex's own 1025 / 275 per 1000 ÷ size-adjust. */
@font-face {
  font-family: 'Plex Sans Fallback';
  font-weight: 400;
  src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');
  size-adjust: 99.10%;
  ascent-override: 103.40%;
  descent-override: 27.70%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Sans Fallback';
  font-weight: 600;
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold');
  size-adjust: 96.18%;
  ascent-override: 106.60%;
  descent-override: 28.60%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Condensed Fallback';
  font-weight: 700;
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold');
  size-adjust: 88.98%;
  ascent-override: 115.20%;
  descent-override: 30.90%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Mono Fallback';
  src: local('Courier New'), local('CourierNewPSMT'), local('Liberation Mono'), local('LiberationMono');
  size-adjust: 97.62%;
  ascent-override: 105.00%;
  descent-override: 28.20%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root {
  /* Surfaces */
  --chalk: #ece7dd;          /* page */
  --chalk-deep: #e4ded2;     /* panels, notices */
  --graphite: #1f1f1f;       /* ink, rules, wordmark */
  --graphite-soft: #4a4741;  /* secondary text: 7.5:1 on chalk, 6.9:1 on chalk-deep */
  --rule: rgba(31, 31, 31, .32);
  --rule-soft: rgba(31, 31, 31, .12);
  --grid: rgba(31, 31, 31, .055);

  /* Signals */
  --signal: #b51c15;         /* the wordmark slash, link underlines, errors: 5.4:1 on chalk, 5.0:1 on chalk-deep */
  --lime: #d7ff00;           /* fills only: tags, the full stop. Never text on chalk */
  --lamp: #9bc400;           /* lit lamps */
  --lime-ink: #3f5300;       /* green text, such as "running": 7.0:1 on chalk */

  /* The line's industrial arms */
  --arm-edge: #1f1f1f;
  --arm-light: #ffb27a;
  --arm-mid: #f07a2a;
  --arm-dark: #b9531a;
  --arm-side: #8e3e12;
  --beam: #ffb070;
  --spark: #ff5a00;

  /* Type */
  --sans: 'IBM Plex Sans', 'Plex Sans Fallback', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --condensed: 'IBM Plex Sans Condensed', 'Plex Condensed Fallback', 'Arial Narrow', Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'Plex Mono Fallback', ui-monospace, Consolas, monospace;

  /* Spacing: a 4px base, mostly in steps of 8 */
  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 32px;
  --s6: 48px;
  --s7: 64px;
  --page: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--chalk);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--graphite);
  outline-offset: 3px;
}

.wrap {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Small capitals in monospace: the console voice used for every label. */
.readouts, .hero-head, .stations, .panel, .feed-meta, .post-head, .post-link,
.notice-label, .retry, .footer, .tag, .skip {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.skip {
  position: absolute;
  left: var(--s3);
  top: -60px;
  z-index: 2;
  padding: var(--s2) var(--s3);
  background: var(--graphite);
  color: var(--chalk);
  text-decoration: none;
}
.skip:focus { top: var(--s3); }

/* ---------- Console bar ---------- */

.bar { border-bottom: 1px solid var(--rule); }

.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 60px;
}

/* The wordmark: spaced capitals and a red slash, like a drawing reference. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .16em;
  text-decoration: none;
}
.wordmark .mark { width: 26px; height: 26px; flex: none; }
.wordmark .slash {
  margin-left: 2px;
  color: var(--signal);
  font-weight: 400;
}

.readouts {
  display: flex;
  gap: var(--s4);
  color: var(--graphite-soft);
}
.readouts a { text-decoration: none; }
.readouts a:hover { text-decoration: underline; }

.lamp {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: var(--s2);
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 8px var(--lamp);
  vertical-align: 1px;
}

/* ---------- The line ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero .wrap { padding-top: var(--s4); padding-bottom: var(--s3); }

.hero-head {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  color: var(--graphite-soft);
}
.hero-head .line-label { font: inherit; }
.line-status.is-running { color: var(--lime-ink); font-weight: 600; }

.line { position: relative; }

.stations li {
  position: absolute;
  bottom: 0;
  left: var(--at);
  line-height: 1.4;
  transform: translateX(-50%);
  color: var(--graphite-soft);
  white-space: nowrap;
}
.stations span { color: var(--graphite); font-weight: 600; }

/* The SVG drawing. Colours live here so the generator stays plain. */
.factory { display: block; width: 100%; height: auto; }
.factory .link { fill: url(#tube); stroke: var(--arm-edge); stroke-width: 1; }
.factory .side { flood-color: var(--arm-side); }
.factory .tube-light { stop-color: var(--arm-light); }
.factory .tube-mid { stop-color: var(--arm-mid); }
.factory .tube-dark { stop-color: var(--arm-dark); }
.factory .shine { stroke: var(--arm-light); stroke-width: 1.2; stroke-linecap: round; opacity: .9; }
.factory .hatch { stroke: var(--arm-edge); stroke-width: .7; stroke-dasharray: 3 4; opacity: .6; }
.factory .housing { fill: none; stroke: var(--arm-edge); stroke-width: .8; stroke-dasharray: 2 3; opacity: .7; }
.factory .joint { fill: url(#hub); stroke: var(--arm-edge); stroke-width: 1; }
.factory .joint-back { fill: var(--arm-side); }
.factory .pin { fill: var(--arm-dark); stroke: var(--arm-edge); stroke-width: .8; }
.factory .finger { fill: none; stroke: var(--arm-edge); stroke-width: 1.6; stroke-linecap: round; }
.factory .nozzle { fill: var(--graphite); stroke: var(--arm-edge); stroke-width: 1; }
.factory .shadow { fill: #000; opacity: .18; filter: blur(3px); }
.factory .truss { fill: none; stroke: var(--rule); stroke-width: 1; }
.factory .wall { stroke: var(--grid); stroke-width: 1; }
.factory .light { fill: var(--graphite-soft); }
.factory .beam { fill: url(#beam); }
.factory .beam-top { stop-color: var(--beam); stop-opacity: .26; }
.factory .beam-bottom { stop-color: var(--beam); stop-opacity: 0; }
.factory .belt-top { fill: #d9d2c4; }
.factory .belt-front { fill: #bdb5a6; }
.factory .belt-tick { stroke: var(--graphite); stroke-width: 1; opacity: .5; }
.factory .edge { stroke: var(--graphite); stroke-width: 1.2; }
.factory .leg { stroke: var(--rule); stroke-width: 1.2; }
.factory .bay { fill: none; stroke: var(--lamp); stroke-width: 1; stroke-dasharray: 4 3; }
.factory .lamp { fill: var(--lamp); }
.factory .spark line { stroke: var(--spark); stroke-width: 1.6; stroke-linecap: round; filter: drop-shadow(0 0 3px var(--spark)); }
.factory .spark-core { fill: #fff; filter: drop-shadow(0 0 10px var(--spark)) drop-shadow(0 0 4px #fff); }
.factory .eye { fill: var(--lime); }
.factory .eye-glow { fill: var(--lime); opacity: .45; filter: blur(4px); }
.factory .beacon { fill: #ff3b30; filter: blur(2.5px); }

/* ---------- Intro and status ---------- */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--s6);
  align-items: start;
  padding: var(--s6) 0 var(--s5);
  border-bottom: 1px solid var(--rule);
}

.tag {
  display: inline-block;
  margin-bottom: var(--s3);
  padding: 2px var(--s2);
  background: var(--lime);
  color: var(--graphite);
  font-weight: 600;
}

h1 {
  font-family: var(--condensed);
  font-size: clamp(56px, 9vw, 92px);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
h1 .dot { margin-left: 2px; padding: 0 4px; background: var(--lime); }

.lede {
  max-width: 34em;
  margin-top: var(--s4);
  color: var(--graphite-soft);
  font-size: 18px;
}

.panel { border: 1px solid var(--rule); background: var(--chalk-deep); }

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  padding: 10px var(--s3);
  border-bottom: 1px solid var(--rule);
  color: var(--graphite-soft);
}
.panel-head h2 { font: inherit; }

.panel-rows li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px var(--s3);
  border-bottom: 1px solid var(--rule-soft);
  text-transform: none;
  letter-spacing: .02em;
}
.panel-rows li:last-child { border-bottom: 0; }
.panel-rows .state {
  color: var(--graphite-soft);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: right;
}

.sq { width: 10px; height: 10px; border: 1px solid var(--graphite); }
.sq-live { border-color: var(--lamp); background: var(--lamp); box-shadow: 0 0 8px var(--lamp); }
.sq-proof { background: repeating-linear-gradient(45deg, var(--graphite) 0 2px, transparent 2px 4px); }

/* ---------- Notices ---------- */

.notice {
  margin-top: var(--s5);
  padding: 14px var(--s3);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--graphite);
  background: var(--chalk-deep);
  font-size: 15px;
}
.notice-label { display: block; margin-bottom: var(--s1); font-weight: 600; }
.notice-error { margin-top: 0; border-left-color: var(--signal); }
.notice-error .notice-label { color: var(--signal); }
.notice-detail { color: var(--graphite-soft); font-family: var(--mono); font-size: 13px; }

.retry {
  display: inline-block;
  margin-left: var(--s3);
  padding: 6px 14px;
  border: 1px solid var(--graphite);
  background: var(--chalk);
  color: var(--graphite);
  cursor: pointer;
}
.retry:hover { background: var(--graphite); color: var(--chalk); }

/* ---------- Feed: posts as job records ---------- */

.feed-section { padding-bottom: var(--s6); }

.feed-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s2) var(--s4);
  padding: var(--s6) 0 var(--s3);
}
.feed-head h2 {
  font-family: var(--condensed);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.feed-head h2:focus { outline: none; }
.feed-meta { color: var(--graphite-soft); }

.post {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: var(--s2) var(--s5);
  padding: var(--s4) 0;
  border-top: 1px solid var(--rule);
}
.post:last-child { border-bottom: 1px solid var(--rule); }

.post-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--graphite-soft);
  line-height: 1.6;
}
.post-no { color: var(--graphite); font-weight: 600; font-size: 13px; }
.zones {
  margin-top: var(--s2);
  padding-top: var(--s2);
  border-top: 1px solid var(--rule-soft);
  font-size: 11px;
  letter-spacing: .06em;
  line-height: 1.7;
}
.zone { white-space: nowrap; }
.zone-city { color: var(--graphite); }

.post-text {
  max-width: 40em;
  font-size: 18px;
  /* Post text arrives with its own line breaks. Keep them. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-link {
  align-self: start;
  justify-self: end;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--signal);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.post-link:hover { background: var(--lime); }

.empty {
  padding: var(--s5) var(--s4);
  border: 1px dashed var(--rule);
  background: var(--chalk-deep);
}
.empty h3 {
  font-family: var(--condensed);
  font-size: 26px;
  text-transform: uppercase;
}
.empty p { max-width: 36em; margin-top: var(--s2); color: var(--graphite-soft); }

.intro-single { grid-template-columns: 1fr; }
.lede a { color: var(--graphite); text-decoration-color: var(--signal); text-underline-offset: 3px; }

/* ---------- Questions ---------- */

.faq { padding-bottom: var(--s6); }
.faq h2 {
  padding: var(--s6) 0 var(--s3);
  border-bottom: 1px solid var(--rule);
  font-family: var(--condensed);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--s6);
}
.faq-item { padding: var(--s4) 0; border-bottom: 1px solid var(--rule-soft); }
.faq-item h3 { font-size: 18px; font-weight: 600; line-height: 1.35; }
.faq-item p { margin-top: var(--s2); color: var(--graphite-soft); max-width: 36em; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--rule); color: var(--graphite-soft); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s3);
  padding-top: var(--s5);
  padding-bottom: var(--s6);
}
.footer a { text-decoration-color: var(--signal); text-underline-offset: 3px; }

/* ---------- Smaller screens ---------- */

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: var(--s5); }
  .post { grid-template-columns: 1fr; }
  .faq-list { grid-template-columns: 1fr; }
  .post-head { flex-direction: row; flex-wrap: wrap; gap: var(--s3); }
  .zones { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 0 var(--s3); margin-top: 0; }
  .post-link { justify-self: start; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .readout-wide { display: none; }
  .readouts { gap: var(--s3); }
  .hero-head { flex-direction: column; gap: var(--s1); font-size: 11px; }
  .stations li { font-size: 9px; letter-spacing: .06em; }
  .stations span { display: none; }
  .lede, .post-text { font-size: 17px; }
  .panel-rows li { grid-template-columns: 12px minmax(0, 1fr); }
  .panel-rows .state { grid-column: 2; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .lamp { box-shadow: none; }
}
