/* Mechayard shared styles: yard look (dark grid, hazard tape, bay cards), build data plate, chapter rail. */
:root {
  color-scheme: dark;
  --bg: #0f1113; --panel: #171a1d; --panel2: #1d2125; --line: #2a2f34;
  --text: #e8e6e1; --muted: #9aa0a6; --yellow: #F5B700; --orange: #FF5A1F; --ink: #111;
  --display: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
[hidden] { display: none !important; }
body {
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
  color: var(--text); font-family: var(--display); font-size: 16px; line-height: 1.55;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--mono); }
.hazard { height: 10px; background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--ink) 14px 28px); }


/* header */
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 42px; height: 42px; flex: none; }
.wordmark { font-weight: 700; font-size: 1.35rem; letter-spacing: .06em; }
.wordmark span { color: var(--yellow); }
nav.main { display: flex; gap: 4px 6px; flex-wrap: wrap; font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; }
nav.main a { text-decoration: none; color: var(--muted); padding: 6px 10px; border: 1px solid transparent; border-radius: 4px; }
nav.main a:hover { color: var(--text); border-color: var(--line); }
nav.main a.on { color: var(--ink); background: var(--yellow); }

/* shared */
.kicker { color: var(--yellow); font-family: var(--mono); font-size: .78rem; letter-spacing: .18em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.8rem); line-height: 1.05; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h1 em { font-style: normal; color: var(--yellow); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.15; text-wrap: balance; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.section-label { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: .76rem; letter-spacing: .18em; color: var(--muted); margin: 52px 0 18px; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tag { display: inline-block; font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; padding: 3px 8px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); white-space: nowrap; }
.tag.y { border-color: var(--yellow); color: var(--yellow); }
.tag.o { border-color: var(--orange); color: var(--orange); }
.btn { display: inline-block; text-decoration: none; background: var(--yellow); color: var(--ink); font-weight: 700; padding: 11px 18px; border-radius: 4px; }
.btn:hover { background: #ffc928; }
.btn.ghost { background: none; color: var(--text); border: 1px solid var(--line); font-weight: 600; }
.btn.ghost:hover { border-color: var(--yellow); background: none; }

/* home */
.hero { padding: 56px 0 8px; display: grid; gap: 18px; }
.bays { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.bay { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px 18px 16px 20px; position: relative; text-decoration: none; display: grid; gap: 6px; align-content: start; }
.bay::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--yellow); border-radius: 6px 0 0 6px; }
.bay:hover { border-color: var(--yellow); }
.bay-no { font-family: var(--mono); font-size: .7rem; color: var(--yellow); letter-spacing: .14em; }
.bay h3 { font-size: 1.12rem; }
.bay p { color: var(--muted); font-size: .9rem; }
.bay .count { font-family: var(--mono); font-size: .68rem; color: var(--muted); letter-spacing: .08em; margin-top: 6px; }
.feature { display: grid; grid-template-columns: 1.25fr 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.feature img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; display: block; }
.feature .body { padding: 26px; display: grid; gap: 14px; align-content: center; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* builds index */
.pagehead { padding: 44px 0 6px; display: grid; gap: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; text-decoration: none; display: grid; grid-template-rows: auto 1fr; }
a.card:hover { border-color: var(--yellow); }
.card .pic { aspect-ratio: 16 / 10; max-width: 100%; position: relative; background: var(--panel2); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .pic.empty { background: repeating-linear-gradient(-45deg, var(--panel2) 0 16px, var(--panel) 16px 32px); display: grid; place-items: center; }
.card .pic.empty span { font-family: var(--mono); font-size: 2.4rem; font-weight: 600; color: var(--line); letter-spacing: .06em; }
.card .pic .st { position: absolute; left: 10px; top: 10px; background: var(--bg); }
.card .body { padding: 16px 18px 18px; display: grid; gap: 8px; align-content: start; }
.card h3 { font-size: 1.15rem; line-height: 1.2; }
.card p { color: var(--muted); font-size: .92rem; }
.card .meta { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; color: var(--yellow); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card .specs { font-family: var(--mono); font-size: .72rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }

/* build page */
.crumb { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: var(--muted); padding: 18px 0 14px; }
.crumb a { text-decoration: none; } .crumb a:hover { color: var(--yellow); }
.bhero { position: relative; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); }
.bhero img { width: 100%; aspect-ratio: 16 / 8; max-width: 100%; object-fit: cover; display: block; }
.bhero .over { position: absolute; inset: auto 0 0 0; padding: 60px 26px 22px; background: linear-gradient(transparent, rgba(8,9,10,.92) 62%); display: grid; gap: 8px; }
.plate { margin-top: 16px; border: 1px solid var(--yellow); border-radius: 6px; background: var(--panel); display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); position: relative; }
.plate::before, .plate::after { content: ""; position: absolute; top: 8px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--yellow); }
.plate::before { left: 8px; } .plate::after { right: 8px; }
.plate div { padding: 18px 18px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; min-width: 0; }
.plate dt { font-family: var(--mono); font-size: .64rem; letter-spacing: .16em; color: var(--yellow); }
.plate dd { font-weight: 600; font-size: 1.02rem; line-height: 1.25; margin-top: 4px; font-variant-numeric: tabular-nums; }
.plate dd small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.why { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px 40px; margin-top: 44px; align-items: start; }
.why p + p { margin-top: 12px; }
.prose { max-width: 66ch; }
.prose p { color: #cfcdc8; }
.prose p + p { margin-top: 12px; }
blockquote.pull { border-left: 3px solid var(--yellow); padding: 4px 0 4px 18px; font-size: 1.3rem; line-height: 1.3; font-weight: 600; text-wrap: balance; }
blockquote.pull cite { display: block; font-family: var(--mono); font-style: normal; font-weight: 400; font-size: .7rem; letter-spacing: .1em; color: var(--muted); margin-top: 10px; }
.watch { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.story { display: grid; grid-template-columns: 210px 1fr; gap: 40px; margin-top: 12px; align-items: start; }
.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 14px); display: grid; gap: 2px; font-size: .9rem; }
.rail a { text-decoration: none; color: var(--muted); display: grid; grid-template-columns: 26px 1fr; padding: 6px 8px; border-left: 2px solid var(--line); }
.rail a:hover { color: var(--text); border-left-color: var(--yellow); }
.rail a b { font-family: var(--mono); font-weight: 400; font-size: .72rem; color: var(--yellow); padding-top: 2px; }
.chapters { display: grid; gap: 64px; min-width: 0; }
.ch { display: grid; gap: 18px; min-width: 0; scroll-margin-top: 20px; }
.ch-head { display: grid; gap: 6px; }
.ch-no { font-family: var(--mono); font-size: .74rem; letter-spacing: .16em; color: var(--yellow); }
.snag { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); }
.snag > div { padding: 16px 18px; min-width: 0; }
.snag > div + div { border-left: 1px solid var(--line); }
.snag h4 { font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; font-weight: 600; margin-bottom: 6px; }
.snag .s h4 { color: var(--orange); } .snag .f h4 { color: var(--yellow); }
.snag p { font-size: .94rem; color: #cfcdc8; }
.shots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.shots figure { grid-column: span 2; display: grid; grid-template-rows: 1fr auto; min-height: 0; }
.shots figure.w { grid-column: span 4; grid-row: span 2; }
.shots figure.w img { aspect-ratio: auto; }
.shots button { all: unset; cursor: zoom-in; display: block; width: 100%; height: 100%; min-height: 0; }
.shots img { width: 100%; height: 100%; aspect-ratio: 4 / 3; max-width: 100%; object-fit: cover; display: block; border-radius: 4px; border: 1px solid var(--line); }
.shots button:hover img, .shots button:focus-visible img { border-color: var(--yellow); }
.shots.one figure.w { grid-column: span 6; grid-row: auto; }
.shots.one figure.w img { aspect-ratio: 16 / 10; }
.shots.two figure, .shots.two figure.w { grid-column: span 3; grid-row: auto; }
.shots.two figure.w img { aspect-ratio: 4 / 3; }
.shots figcaption { font-size: .8rem; color: var(--muted); padding: 6px 2px 2px; line-height: 1.35; }
.qa { border: 1px dashed var(--line); border-radius: 6px; padding: 16px 18px; display: grid; gap: 8px; }
.qa h4 { font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; color: var(--muted); font-weight: 600; }
.qa p { font-size: .94rem; } .qa p b { color: var(--yellow); font-weight: 600; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 20px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.box h3 { font-size: 1.05rem; }
table.ledger { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .84rem; font-variant-numeric: tabular-nums; }
table.ledger td { padding: 7px 0; border-bottom: 1px solid var(--line); }
table.ledger td:last-child { text-align: right; white-space: nowrap; }
table.ledger tr.sum td { border-bottom: 0; color: var(--yellow); font-weight: 600; }
.bar { height: 10px; background: var(--panel2); border-radius: 2px; position: relative; margin: 4px 0 2px; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--yellow); border-radius: 2px; }
.bar.t i { background: var(--muted); }
.barrow { display: grid; grid-template-columns: 1fr auto; font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.barrow b { color: var(--text); font-weight: 600; }
ol.lessons { list-style: none; display: grid; gap: 12px; counter-reset: l; }
ol.lessons li { counter-increment: l; display: grid; grid-template-columns: 34px 1fr; }
ol.lessons li::before { content: counter(l, decimal-leading-zero); font-family: var(--mono); font-size: .74rem; color: var(--yellow); padding-top: 3px; }
ol.lessons b { display: block; }
ol.lessons span { color: var(--muted); font-size: .94rem; }
ul.spin { list-style: none; display: grid; gap: 0; }
ul.spin li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .94rem; align-items: baseline; }
ul.spin li:last-child { border-bottom: 0; }
ul.spin .k { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; color: var(--orange); }
ul.spin .k.note { color: var(--text); }
.log { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.log div { display: grid; grid-template-columns: 108px 1fr; gap: 14px; padding: 9px 0 9px 18px; position: relative; font-size: .95rem; }
.log div::before { content: ""; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--yellow); }
.log div.bad::before { border-color: var(--orange); background: var(--orange); }
.log time { font-family: var(--mono); font-size: .74rem; color: var(--muted); padding-top: 3px; }
.src { margin: 44px 0 0; color: var(--muted); font-size: .9rem; }
footer.site .wrap { padding-block: 40px 34px; color: var(--muted); font-family: var(--mono); font-size: .72rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; letter-spacing: .08em; margin-top: 56px; border-top: 1px solid var(--line); }

/* lightbox */
.lb { position: fixed; inset: 0; background: rgba(6,7,8,.94); z-index: 50; display: grid; grid-template-rows: 1fr auto; place-items: center; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 16px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 16px) max(16px, env(safe-area-inset-left, 0px)); cursor: zoom-out; }
.lb img { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; border-radius: 4px; }
.lb p { color: var(--text); font-size: .92rem; text-align: center; max-width: 70ch; }

@media (max-width: 860px) {
  .feature, .why, .snag { grid-template-columns: 1fr; }
  .snag > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .story { grid-template-columns: 1fr; gap: 20px; }
  .rail { position: static; grid-template-columns: 1fr 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .shots figure, .shots figure.w { grid-column: span 1; grid-row: auto; }
  .shots figure.w { grid-column: span 2; }
  .shots.two figure, .shots.two figure.w { grid-column: span 1; }
  .shots.one figure.w { grid-column: span 2; }
  .bhero img { aspect-ratio: 4 / 3; }
  .bhero .over { position: static; padding: 18px; background: none; }
  .log div, ul.spin li { grid-template-columns: 1fr; gap: 2px; }
}

/* header status light, bay tags, contact (home) */
.status { font-family: var(--mono); font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: 8px; letter-spacing: .08em; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); animation: blink 2.4s infinite; }
@keyframes blink { 0%, 60%, 100% { opacity: 1; } 70%, 90% { opacity: .25; } }
.headright { display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; }
.bay .tag { justify-self: start; margin-top: 8px; }
.contact { margin: 64px 0 0; padding: 28px; border: 1px dashed var(--line); border-radius: 6px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: rgba(23,26,29,.7); }
.contact h2 { font-size: 1.3rem; }
.contact p { color: var(--muted); }
.more { color: var(--muted); margin-top: 22px; }
@media (prefers-reduced-motion: reduce) { .status i { animation: none; } }

/* one build in volumes: the volume strip and the series page */
.vols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); margin-bottom: 16px; }
.vols a { display: grid; gap: 2px; padding: 14px 16px; text-decoration: none; border-right: 1px solid var(--line); position: relative; min-width: 0; }
.vols a:last-child { border-right: 0; }
.vols a:hover { background: var(--panel2); }
.vols b { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; color: var(--yellow); }
.vols span { font-weight: 600; line-height: 1.2; }
.vols small { font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.vols a.on { background: var(--yellow); }
.vols a.on b, .vols a.on span, .vols a.on small { color: var(--ink); }
.vols a:not(:last-child)::after { content: "→"; position: absolute; right: 10px; top: 12px; color: var(--line); font-family: var(--mono); }
.vols a.on::after { color: var(--ink); }
.log .v { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; color: var(--yellow); margin-right: 8px; }
.card .pic .vn { position: absolute; right: 12px; bottom: 6px; font-family: var(--mono); font-weight: 600; font-size: 3rem; line-height: 1; color: var(--yellow); text-shadow: 0 2px 12px rgba(0,0,0,.7); }
@media (max-width: 860px) {
  .vols { grid-template-columns: 1fr 1fr; }
  .vols a:nth-child(2) { border-right: 0; }
  .vols a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .vols a::after { display: none; }
}
.feature > a { display: block; min-width: 0; position: relative; min-height: 240px; }
.feature > a img { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; }
@media (max-width: 860px) { .feature > a { aspect-ratio: 16 / 10; min-height: 0; } }
.feature .vols { grid-template-columns: 1fr 1fr; }
.feature .vols a:nth-child(2) { border-right: 0; }
.feature .vols a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.feature .vols a::after { display: none; }
.cards.four { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
/* video clip inside a build chapter */
.clip { margin: 16px 0 0; }
.clip video { width: 100%; max-height: 70vh; display: block; background: #000; border-radius: 4px; }
.clip figcaption { color: var(--muted); font-size: .85rem; margin-top: 6px; }
