/*
  OutOS public download page - engineered monochrome.
  OutOS monochrome tokens. No warm accents, no gradient decor,
  no network fonts. The download console is the page; copy stays literal.
*/
:root {
  --out-bg: #202020;
  --out-bg-deep: #101010;
  --out-panel: #262626;
  --out-panel-2: #303030;
  --out-line: rgba(245,245,240,0.16);
  --out-line-strong: rgba(245,245,240,0.34);
  --out-text: #F4F4F0;
  --out-muted: #B8B8B0;
  --out-dim: #7C7C76;
  --out-invert: #080808;
  --out-t: 0.2s ease;
  --out-radius-sm: 2px;
  --out-radius-md: 6px;
  --out-radius-lg: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: clamp(13px, 12.25px + 0.098vw, 16px); }
body {
  min-height: 100vh;
  color: var(--out-text);
  background: var(--out-bg);
  font-family: "Montserrat", "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Functional backdrop: fine dot registration grid + slow scan. */
.grid-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    repeating-radial-gradient(circle at 0 0, rgba(245,245,240,0.14) 0 1px, transparent 1px 18px),
    var(--out-bg);
  opacity: 0.25;
}
.grid-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(245,245,240,0.07), transparent);
  transform: translateY(-100%);
  animation: scanline 12s linear infinite;
}

.mono { font-family: "Cascadia Mono", "Roboto Mono", ui-monospace, monospace; }
.micro {
  color: var(--out-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 800;
}
i { font-style: normal; color: var(--out-dim); }

/* ---------- header ---------- */
.top-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--out-line);
  background: rgba(16,16,16,0.88);
}
.wordmark { display: block; line-height: 0; }
.wordmark img { height: 28px; width: auto; display: block; }
.build-chip {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 1px;
  border: 1px solid var(--out-line-strong);
  border-radius: var(--out-radius-md);
  padding: 8px 12px;
  background: var(--out-bg-deep);
}
.build-chip span {
  color: var(--out-dim);
  font-size: 0.68rem;
  text-transform: uppercase;
}
.build-chip strong {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.main {
  width: min(1280px, calc(100vw - 32px));
  max-width: 100%;
  margin: 0 auto;
  padding: 26px 0 36px;
  flex: 1;
}

/* ---------- download console ---------- */
.dl-console {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  max-width: 100%;
  overflow: hidden;
  gap: 26px;
  padding: 28px 26px;
  border: 1px solid var(--out-line);
  border-radius: var(--out-radius-lg);
  background: var(--out-bg-deep);
}
.dl-console::before,
.dl-console::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  opacity: 0.55;
}
.dl-console::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--out-text);
  border-left: 2px solid var(--out-text);
}
.dl-console::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--out-text);
  border-right: 2px solid var(--out-text);
}
.dl-copy h1 {
  margin: 6px 0 10px;
  font-size: clamp(2.1rem, 1.2rem + 3vw, 4.2rem);
  line-height: 0.98;
  font-weight: 900;
}
.dl-sub {
  max-width: 62ch;
  color: var(--out-muted);
  overflow-wrap: anywhere;
}
.run-steps {
  list-style: none;
  margin-top: 18px;
  display: grid;
}
.run-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid var(--out-line);
}
.run-steps li > div { min-width: 0; }
.run-steps .idx {
  flex: 0 0 auto;
  color: var(--out-dim);
  font-size: 0.8rem;
  padding-top: 2px;
}
.run-steps strong {
  display: block;
  font-size: 0.95rem;
}
.run-steps em {
  display: block;
  font-style: normal;
  color: var(--out-muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.dl-copy,
.dl-action {
  min-width: 0;
}

.dl-action {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
  border-left: 1px solid var(--out-line);
  padding-left: 26px;
}
.download {
  display: grid;
  min-width: 0;
  gap: 3px;
  min-height: 64px;
  align-content: center;
  border: 1px solid var(--out-line-strong);
  border-radius: var(--out-radius-md);
  background: var(--out-text);
  color: var(--out-invert);
  padding: 12px 16px;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.05rem;
  transition: transform var(--out-t), background var(--out-t), opacity var(--out-t);
}
.download:hover { transform: translateY(-1px); background: #fff; }
.download span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: "Cascadia Mono", ui-monospace, monospace;
}
.download.unavailable {
  background: var(--out-panel);
  color: var(--out-dim);
  border-color: var(--out-line);
  cursor: not-allowed;
  pointer-events: auto;
}
.download.unavailable:hover { transform: none; }
.fallback-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  color: var(--out-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--out-line-strong);
}
.fallback-link:hover { color: var(--out-text); border-bottom-color: var(--out-text); }
.dl-status {
  color: var(--out-muted);
  font-size: 0.78rem;
  min-height: 1.2em;
  overflow-wrap: anywhere;
}
.fact-table { display: grid; }
.frow {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  min-height: 36px;
  border-top: 1px solid var(--out-line);
  padding: 7px 0;
  font-size: 0.85rem;
}
.frow span { color: var(--out-dim); text-transform: uppercase; font-size: 0.7rem; font-weight: 800; }
.frow strong { font-weight: 600; overflow-wrap: anywhere; }
.frow .wrap { font-size: 0.72rem; line-height: 1.5; }

/* ---------- truth strip ---------- */
.truth-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.truth {
  display: grid;
  gap: 2px;
  border: 1px solid var(--out-line);
  border-radius: var(--out-radius-md);
  background: var(--out-panel);
  padding: 10px 14px;
}
.truth strong { font-size: 0.95rem; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- hard limits ---------- */
.bounds {
  margin-top: 22px;
  border: 1px solid var(--out-line);
  border-radius: var(--out-radius-lg);
  background: rgba(38,38,38,0.96);
  padding: 22px;
}
.bounds-head h2 {
  margin-top: 4px;
  font-size: clamp(1.3rem, 1rem + 1.2vw, 2rem);
  line-height: 1.05;
  font-weight: 800;
  max-width: 30ch;
}
.bounds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.bound {
  display: grid;
  align-content: start;
  gap: 6px;
  border: 1px solid var(--out-line);
  border-left: 4px solid var(--out-text);
  border-radius: var(--out-radius-md);
  background: var(--out-bg-deep);
  padding: 12px 14px;
}
.bound strong { font-size: 0.85rem; }
.bound p {
  color: var(--out-muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--out-line);
  background: var(--out-bg-deep);
  padding: 18px 24px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.foot-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--out-muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.foot-brand img { height: 16px; width: auto; opacity: 0.9; }
.foot-truth {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  color: var(--out-dim);
  font-size: 0.74rem;
}
.foot-note {
  color: var(--out-dim);
  font-size: 0.78rem;
  max-width: 96ch;
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 920px) {
  .foot { flex-direction: column; align-items: stretch; }
  .build-chip { width: 100%; }
  .main {
    width: calc(100vw - 24px);
    max-width: 760px;
  }
  .dl-console {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 16px;
  }
  .dl-action {
    border-left: 0;
    border-top: 1px solid var(--out-line);
    padding-left: 0;
    padding-top: 18px;
  }
  .truth-strip,
  .bounds-grid {
    grid-template-columns: 1fr;
  }
  .frow { grid-template-columns: 1fr; gap: 2px; }
}
