/* BlackStar Devs — site stylesheet
   Version 1.1.0 (2026-11-02) — adds Services page styles
   Dark "control panel" theme. Fonts are self-hosted (no Google requests). */

/* ---------- Fonts (SIL Open Font License, see assets/fonts) ---------- */
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
@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: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-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 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: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* ---------- Design tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0E1116;
  --bg-deep: #0B0E12;
  --bg-band: #12161C;
  --panel: #161B22;
  --raised: #1F2630;
  --line: #2A313C;
  --line-strong: #3A4452;
  --text: #E6EAF0;
  --text-2: #C9D1D9;
  --muted: #9AA4B2;
  --label: #8B95A3;
  --accent: #F2A93B;     /* BlackStar amber */
  --on-accent: #0E1116;
  --link: #5AB0FF;
  --link-hover: #8CC8FF;
  --teal: #4DB6AC;       /* VIRA teal, lightened for dark backgrounds */
  --ok: #56D364; --ok-bg: #12261A; --ok-line: #2E5E3A;
  --warn: #F2C66B; --warn-bg: #261E0E; --warn-line: #5C4A1E;
  --info: #79B8FF; --info-bg: #0E1D2B; --info-line: #1E3F5C;

  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --radius: 10px;
  --wrap: 1280px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--f-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { background: var(--bg-deep); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand svg { width: 28px; height: 28px; }
.brand-name { font: 700 20px/1 var(--f-display); letter-spacing: .04em; }
.brand-name span { color: var(--accent); }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 6px; border: 1px solid transparent; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.main-nav a:hover { color: var(--text); background: #1A2029; }
.main-nav a[aria-current] { color: var(--text); background: var(--raised); border-color: var(--line); }
.status-chip { display: flex; align-items: center; gap: 8px; font: 13px var(--f-mono); color: var(--muted); }
.status-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #3FB950; }

/* ---------- Layout ---------- */
main.wrap { padding-block: 32px 48px; display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 24px; }
.row > .grow { flex: 999 1 560px; min-width: 0; }
.row > .side { flex: 1 1 320px; min-width: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid.narrow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ---------- Panels and type ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.panel.lg { padding: 32px; gap: 18px; }
.panel.dashed { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.eyebrow { font: 500 12px/1.4 var(--f-mono); letter-spacing: .08em; color: var(--label); text-transform: uppercase; }
.eyebrow.accent { color: var(--accent); }
.eyebrow.teal { color: var(--teal); }
.h1 { font: 700 clamp(32px, 5vw, 48px)/1.1 var(--f-display); }
.h1-page { font: 700 clamp(28px, 4vw, 40px)/1.15 var(--f-display); }
.h2 { font: 700 24px/1.25 var(--f-display); }
.h3 { font: 600 17px/1.35 var(--f-body); }
.lead { font: 500 clamp(19px, 2.2vw, 24px)/1.3 var(--f-display); }
.muted { color: var(--muted); }
.small { font-size: 14px; color: var(--label); }
.mono { font-family: var(--f-mono); }
.prose { max-width: 62ch; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.more-link { font: 14px var(--f-mono); text-decoration: none; padding-block: 12px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 600 16px var(--f-body); text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--text); border-color: #4A5566; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); color: var(--on-accent); }
.btn.quiet { background: var(--raised); border-color: var(--line); font-weight: 500; font-size: 15px; }
.btn.lg { min-height: 50px; padding: 0 24px; font-size: 17px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.action-link { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.action-link:hover { color: var(--text); border-color: var(--line-strong); }
.action-link svg { width: 18px; height: 18px; }

/* ---------- Chips ---------- */
.chip { display: inline-block; font: 500 12px/1.4 var(--f-mono); padding: 3px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.chip.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.chip.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.chip.info { color: var(--info); background: var(--info-bg); border-color: var(--info-line); }
.chip.plain { color: var(--muted); background: #1A2029; border-color: var(--line-strong); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 12px var(--f-mono); padding: 4px 10px; border-radius: 999px; border: 1px solid #1F4F4A; background: #0F2624; color: #80CBC4; }

/* ---------- Home: hero + readout ---------- */
.hero .h1 { max-width: 18ch; }
.hero p.muted { font-size: 18px; max-width: 56ch; }
.readout { font: 14px var(--f-mono); gap: 0; }
.readout-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.readout-head .live { color: #3FB950; font-size: 12px; }
.readout dl { margin: 0; }
.readout .r { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.readout .r:last-child { border-bottom: 0; }
.readout dt { color: var(--label); }
.readout dd { margin: 0; text-align: right; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.log li:last-child { border-bottom: 0; }
.log time { font: 13px var(--f-mono); color: var(--label); white-space: nowrap; padding-top: 2px; }
.log li:first-child time { color: var(--accent); }

/* ---------- Product card ---------- */
.product-card { padding: 0; overflow: hidden; gap: 0; }
.product-card .body { padding: 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.product-card .banner { border-bottom: 1px solid var(--line); aspect-ratio: 1024 / 500; width: 100%; object-fit: cover; }
.product-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.product-id { display: flex; align-items: center; gap: 12px; }
.product-id img { width: 44px; height: 44px; border-radius: 10px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font: 13px var(--f-mono); }
.facts div { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
.facts span { display: block; color: var(--label); font-size: 11px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- Page heading ---------- */
.crumbs { font: 13px var(--f-mono); color: var(--label); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.page-head { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Product band (VIRA pages) ---------- */
.product-band { background: var(--bg-band); border-bottom: 1px solid var(--line); }
.product-band .wrap { padding-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.product-band .top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.product-band .ident { display: flex; align-items: center; gap: 14px; }
.product-band .ident img { width: 56px; height: 56px; border-radius: 12px; }
.product-band h1 { font: 700 32px/1.15 var(--f-display); display: inline; margin-right: 10px; }
.product-band .meta { font: 13px var(--f-mono); color: var(--label); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Features ---------- */
.feature { padding: 22px; gap: 8px; }
.feature svg { width: 26px; height: 26px; stroke: var(--accent); }
.feature p { color: var(--muted); font-size: 15px; }
.point { display: flex; gap: 12px; align-items: flex-start; }
.point svg { width: 22px; height: 22px; stroke: var(--teal); flex: none; margin-top: 2px; }
.point strong { display: block; }
.point span { color: var(--muted); font-size: 15px; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table { min-width: 0; }
th, td { text-align: left; vertical-align: top; padding: 12px; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
thead th { font: 500 12px var(--f-mono); color: var(--label); border-bottom: 1px solid var(--line-strong); padding-block: 10px; }
tbody tr { border-bottom: 1px solid var(--line); }
tbody tr:last-child { border-bottom: 0; }
.kv th { color: var(--muted); font-weight: 500; width: 30%; }
td.num, th.num { text-align: right; }

/* ---------- FAQ (native details/summary, no JavaScript needed) ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 20px var(--f-mono); color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); max-width: 75ch; padding-bottom: 16px; }

/* ---------- Downloads ---------- */
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; align-self: flex-start; }
.seg button { min-height: 44px; padding: 0 18px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); font: 14px var(--f-mono); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.seg[hidden] { display: none; }
.code { background: var(--bg-deep); border: 1px solid var(--line); border-radius: 6px; padding: 14px; font: 13px var(--f-mono); color: var(--text-2); overflow-x: auto; white-space: pre; }
.fileinfo { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; font: 14px var(--f-mono); }
.fileinfo div { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 12px; overflow-wrap: anywhere; }
.fileinfo span { display: block; color: var(--label); font-size: 11px; }
.platform + .platform { margin-top: 0; }
.js .platform[data-hidden="true"] { display: none; }

/* ---------- Services ---------- */
.steps { list-style: none; margin: 0; padding: 0; }
.steps .panel { gap: 8px; }
.step-num { font: 500 13px var(--f-mono); color: var(--accent); letter-spacing: .08em; }

/* ---------- Contact ---------- */
.contact-line { display: flex; gap: 12px; align-items: center; }
.contact-line svg { width: 20px; height: 20px; stroke: var(--muted); flex: none; }
.contact-line span { display: block; font-size: 13px; color: var(--label); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 20px; font: 13px var(--f-mono); color: var(--label); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer a { color: var(--muted); text-decoration: none; padding-block: 6px; }
.site-footer a:hover { color: var(--text); }
.disclaimer { font-size: 14px; color: var(--label); }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .panel.lg { padding: 22px; }
  .status-chip { display: none; }
  .main-nav { gap: 2px; }
  .main-nav a { padding: 0 11px; }
  .facts { grid-template-columns: 1fr; }
  .kv th { width: 40%; }
  .seg button { padding: 0 12px; font-size: 13px; }
  .data-table th, .data-table td { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
