/* outsource-coder — public page. One typeface, one phosphor, no third parties. */

:root {
  --black: #000000;
  --phosphor: #2bff7e;   /* prompts, accents, focus */
  --text: #9fe9b9;       /* body copy */
  --dim: #1f9d55;        /* secondary lines */
  --deep: #0c3b20;       /* rules and borders */
  --bone: #ece8dc;       /* the few statements that matter */
  --amber: #ffb000;      /* denials and errors */
  --mono: "Cascadia Mono", "JetBrains Mono", "IBM Plex Mono", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
  --measure: 76ch;
  --bar: 2.75rem;
}

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

html {
  background: var(--black);
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(14px, 0.55vw + 11.5px, 17px);
  line-height: 1.6;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + 1.5rem);
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; min-height: 100vh; overflow-x: hidden; }

/* CRT scanlines over everything; purely cosmetic */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0.22) 3px);
}

::selection { background: var(--phosphor); color: var(--black); }

a { color: var(--phosphor); text-underline-offset: 0.25em; }
a:hover { background: var(--phosphor); color: var(--black); text-decoration: none; }

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

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

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }

.skip { position: absolute; left: -999rem; top: 0; z-index: 100; padding: 0.5rem 1rem; background: var(--phosphor); color: var(--black); }
.skip:focus { left: 0; }

.prompt { color: var(--dim); white-space: nowrap; user-select: none; }

/* ---------- status bar ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--bar);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.25rem;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid var(--deep);
  font-size: 0.875rem;
}
.bar a { text-decoration: none; padding: 0.15rem 0.35rem; }
.bar__id { color: var(--bone); font-weight: 700; }
.bar__path { color: var(--dim); font-weight: 400; }
.bar__nav { display: flex; gap: 0.75rem; margin-left: auto; }
.bar__nav a { color: var(--text); }
.bar__nav a:hover { color: var(--black); }
.bar__nav .bar__cta { color: var(--black); background: var(--phosphor); font-weight: 700; }
.bar__nav .bar__cta:hover { background: var(--bone); }
.bar__clock { color: var(--dim); min-width: 12ch; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--bar) + 3rem) 0 4rem;
  border-bottom: 1px solid var(--deep);
}
.hero__rain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.2; }
.hero__body { position: relative; }

.boot { color: var(--dim); font-size: 0.875rem; margin-bottom: 2.5rem; }
.boot__ok { color: var(--phosphor); white-space: pre; }
.boot__no { color: var(--amber); white-space: pre; }
html:not(.no-js) .boot li { visibility: hidden; }
html:not(.no-js) .boot li.is-on { visibility: visible; }

.hero__title {
  color: var(--bone);
  font-size: clamp(2rem, 5.6vw, 4.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 17ch;
  text-shadow: 0 0 28px rgba(236, 232, 220, 0.18);
}
.hero__lede { margin-top: 1.75rem; max-width: 62ch; font-size: 1.125rem; color: var(--text); }

.term { margin-top: 3rem; max-width: var(--measure); }
.no-js .term { display: none; }
.term__out { white-space: pre-wrap; overflow-wrap: anywhere; }
.term__out .t-cmd { color: var(--bone); }
.term__out .t-warn { color: var(--amber); }
.term__line { display: flex; align-items: baseline; gap: 1ch; }
.term__in {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--bone);
  caret-color: var(--phosphor);
  caret-shape: block;
}
.term__in:focus { outline: none; }
.term__line:focus-within .prompt { color: var(--phosphor); }
.term__hint { margin-top: 0.5rem; font-size: 0.875rem; color: var(--dim); }
kbd { font: inherit; color: var(--phosphor); border: 1px solid var(--deep); padding: 0 0.4em; }

/* ---------- sections ---------- */

.block { padding: clamp(4rem, 10vw, 7.5rem) 0; border-bottom: 1px solid var(--deep); }

.cmd { font-size: 1rem; color: var(--bone); margin-bottom: 2.5rem; overflow-wrap: anywhere; }

.manifesto { max-width: 34ch; font-size: clamp(1.25rem, 2.4vw, 2rem); line-height: 1.3; letter-spacing: -0.02em; color: var(--bone); }
.manifesto p + p { margin-top: 1.4em; }
.manifesto p:last-child { color: var(--phosphor); }

.ls li {
  display: grid;
  grid-template-columns: 11ch 18ch 1fr;
  gap: 0 2ch;
  padding: 0.85rem 0;
  border-top: 1px solid var(--deep);
}
.ls li:last-child { border-bottom: 1px solid var(--deep); }
.ls__perm { color: var(--dim); }
.ls__name { color: var(--phosphor); font-weight: 700; }
.ls__desc { color: var(--text); max-width: 60ch; }
.ls__total { margin-top: 1rem; color: var(--dim); font-size: 0.875rem; }

.steps { counter-reset: step; max-width: 84ch; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 4ch 10ch 1fr;
  gap: 0 2ch;
  padding: 0.85rem 0;
}
.steps li::before { content: "0" counter(step); color: var(--dim); }
.steps__name { color: var(--bone); font-weight: 700; }
.steps__text { max-width: 60ch; }

/* ---------- request form ---------- */

.request__intro { max-width: 60ch; margin-bottom: 2.5rem; }

.form { max-width: 46rem; }
.hp { position: absolute; left: -999rem; width: 1px; height: 1px; overflow: hidden; }

.field { margin-bottom: 1.75rem; }
.field--pair { display: grid; grid-template-columns: 14ch 1fr; gap: 0 2ch; }
.field label { display: block; margin-bottom: 0.4rem; color: var(--dim); font-size: 0.875rem; }
.field label::before { content: "> "; color: var(--phosphor); }

.field input, .field select, .field textarea {
  display: block;
  width: 100%;
  background: rgba(43, 255, 126, 0.04);
  border: 1px solid var(--deep);
  border-radius: 0;
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--bone);
  caret-color: var(--phosphor);
}
.field textarea { resize: vertical; min-height: 9rem; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--phosphor) 50%), linear-gradient(135deg, var(--phosphor) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 55%, calc(100% - 0.75rem) 55%; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; padding-right: 2.2rem; }
.field select option { background: var(--black); color: var(--bone); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--phosphor); box-shadow: 0 0 0 1px var(--phosphor), 0 0 24px rgba(43, 255, 126, 0.15); }
.field .is-bad { border-color: var(--amber); }

.form__status { min-height: 1.6em; margin-bottom: 1rem; color: var(--amber); }
.form__status:empty { min-height: 0; margin: 0; }

.btn {
  font: inherit;
  font-weight: 700;
  color: var(--black);
  background: var(--phosphor);
  border: 1px solid var(--phosphor);
  border-radius: 0;
  padding: 0.85rem 1.75rem;
  cursor: pointer;
}
.btn:hover { background: var(--bone); border-color: var(--bone); }
.btn[disabled] { background: none; color: var(--dim); border-color: var(--deep); cursor: progress; }

.receipt { max-width: 60ch; border: 1px solid var(--phosphor); padding: 1.5rem; }
.receipt:focus { outline: none; }
.receipt__ref { margin: 1rem 0; font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 700; color: var(--bone); letter-spacing: 0.04em; }
.receipt__note { color: var(--text); }

/* ---------- footer and fallback page ---------- */

.foot { padding: 2.5rem 0 3.5rem; color: var(--dim); font-size: 0.875rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.foot__eof { color: var(--text); }

.plain { padding: 5rem 0; }
.plain p { margin-bottom: 1.25rem; max-width: 60ch; }
.plain .ok { color: var(--phosphor); }
.plain .err { color: var(--amber); }

/* ---------- small screens ---------- */

@media (max-width: 46rem) {
  .bar { gap: 0.75rem; padding: 0 0.75rem; }
  .bar__clock, .bar__nav a:not(.bar__cta) { display: none; }
  .ls li { grid-template-columns: 1fr; }
  .ls__perm { display: none; }
  .steps li { grid-template-columns: 4ch 1fr; }
  .steps__text { grid-column: 2; }
  .field--pair { grid-template-columns: 1fr; gap: 1.75rem 0; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
