/* ============================================================
   CEREBRO SYSTEMS — one white phosphor
   spec: CLAUDE.md v1.4 — retint = swap this token block only
   ============================================================ */

:root {
  --bg-0: #0A0A0A;
  --bg-1: #101010;
  --bg-2: #161616;
  --border: #2E2E2E;
  --dim: #7E7E7E;
  --text: #C9C9C9;
  --bright: #ECECEC;
  --phosphor: #FFFFFF;

  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --glow: 0 0 14px rgba(255, 255, 255, .18);
}

/* ---------- reset / base ---------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0; /* squares only — titlebar dots excepted */
}

html {
  background: var(--bg-0);
  scroll-behavior: smooth;
}

body {
  font-family: var(--mono);
  font-variant-ligatures: none;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
}

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

/* scanlines — static, ≤12% black, 3px period */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, .10) 0px,
    rgba(0, 0, 0, .10) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* vignette — the tube's curvature, implied */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, .32) 100%);
}

/* ---------- layout ---------- */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  border-top: 1px dashed var(--border);
  padding: 88px 0;
  scroll-margin-top: 72px;
}

.hero {
  border-top: none;
  padding-top: 56px;
}

p {
  max-width: 68ch;
}

/* ---------- type ---------- */

h1 {
  font-size: clamp(21px, 3.2vw, 31px);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--bright);
  text-shadow: var(--glow);
  line-height: 1.2;
  letter-spacing: .02em;
}

h2 {
  font-size: clamp(19px, 3vw, 25px);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--bright);
  line-height: 1.3;
  margin-bottom: 24px;
}

a {
  color: var(--phosphor);
  text-decoration: none;
}

p a:hover,
.readout a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 1px solid var(--phosphor);
  outline-offset: 2px;
}

.fine {
  font-size: 13px;
  color: var(--dim);
  text-transform: lowercase;
}

/* section command lines — replace decorative labels */
.cmd {
  font-size: 14px;
  color: var(--dim);
  margin-bottom: 32px;
}

.cmd .ps1 {
  color: var(--phosphor);
}

/* reverse video — top of the emphasis ladder */
.rv {
  background: var(--phosphor);
  color: var(--bg-0);
  padding: 0 .35em;
}

.ok {
  color: var(--phosphor);
}

/* ---------- titlebar ---------- */

.titlebar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, .93);
  border-bottom: 1px solid var(--border);
}

.titlebar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 48px;
}

.dots {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%; /* the one place circles exist */
}

.dots span:nth-child(1) { background: #4A4A4A; }
.dots span:nth-child(2) { background: #5E5E5E; }
.dots span:nth-child(3) { background: #727272; }

.session-title {
  font-size: 13px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.titlebar nav {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.titlebar nav a {
  color: var(--text);
  font-size: 13px;
  transition: none;
}

.titlebar nav a:hover {
  background: var(--phosphor);
  color: var(--bg-0);
}

@media (max-width: 700px) {
  .session-title { display: none; }
}

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

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 48px;
}

.preheader {
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 20px;
}

.hero .subhead {
  margin-bottom: 32px;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  filter: grayscale(1);
}

@media (max-width: 799px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-photo {
    max-width: 320px;
  }
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

/* ---------- readouts — anything the machine prints ---------- */

.readout {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 20px 24px;
  font-size: 14px;
  line-height: 1.9;
  overflow-x: auto;
}

.readout .line {
  white-space: pre-wrap;
}

.readout .prompt {
  color: var(--phosphor);
}

.readout .comment {
  color: var(--dim);
}

/* ---------- buttons — bracketed commands ---------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 18px;
  background: transparent;
  cursor: pointer;
  transition: background 80ms, color 80ms, border-color 80ms;
  white-space: nowrap;
}

.btn-primary {
  border: 1px solid var(--phosphor);
  color: var(--phosphor);
}

.btn-primary:hover {
  background: var(--phosphor);
  color: var(--bg-0);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--phosphor);
  color: var(--phosphor);
}

/* ---------- panels ---------- */

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

@media (max-width: 799px) {
  .panel-grid { grid-template-columns: 1fr; }
}

.panel {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-1);
  padding: 28px 20px 20px;
}

.panel .chip {
  position: absolute;
  top: -0.75em;
  left: 12px;
  background: var(--bg-0);
  padding: 0 8px;
  font-size: 13px;
  color: var(--dim);
  text-transform: lowercase;
}

.panel h3 {
  font-size: 15.5px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--bright);
  margin-bottom: 12px;
}

.panel p {
  font-size: 14px;
  line-height: 1.7;
}

/* ---------- dot-leader rows ---------- */

.leader-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 0;
  font-size: 15px;
}

.leader-row .fill {
  flex: 1;
  min-width: 24px;
  border-bottom: 1px dotted var(--dim);
  margin-bottom: .38em;
}

.leader-row .l {
  color: var(--bright);
}

.leader-row .r {
  color: var(--text);
  text-align: right;
}

.leader-row .arrow {
  color: var(--phosphor);
}

/* ghost row — the invitation */
.leader-row.ghost .l,
.leader-row.ghost .r,
.leader-row.ghost .arrow,
.leader-row.ghost .val {
  color: var(--dim);
}

/* rules + stats variants */
.leader-row .key {
  color: var(--bright);
  text-transform: uppercase;
  font-weight: 700;
}

.leader-row .val {
  color: var(--text);
  text-align: right;
}

.leader-row .val.placeholder {
  color: var(--dim);
}

.leader-row .val.hot {
  color: var(--phosphor);
}

@media (max-width: 560px) {
  .leader-row {
    flex-wrap: wrap;
  }
  .leader-row .r,
  .leader-row .val {
    text-align: left;
  }
}

/* ---------- man page / FAQ ---------- */

details {
  border-top: 1px solid var(--border);
}

details:last-of-type {
  border-bottom: 1px solid var(--border);
}

summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  gap: 12px;
  padding: 16px 0;
  color: var(--bright);
  font-weight: 700;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "+";
  color: var(--phosphor);
  flex-shrink: 0;
}

summary .qnum {
  color: var(--dim);
  font-weight: 400;
  flex-shrink: 0;
}

details[open] summary::before {
  content: "−";
}

details .answer {
  padding: 0 0 20px 25px;
  max-width: 68ch;
}

details .answer p {
  margin-bottom: 12px;
}

details .answer p:last-child {
  margin-bottom: 0;
}

/* ---------- footer / status line ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 13px;
  color: var(--dim);
}

/* ---------- cursor — exactly one per page ---------- */

.cursor {
  display: inline-block;
  width: .6em;
  height: 1.05em;
  background: var(--phosphor);
  vertical-align: text-bottom;
  margin-left: .18em;
  animation: blink 1.1s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 60vh;
}

.btn-lower {
  text-transform: lowercase;
}

.notfound .ctas {
  margin-top: 40px;
}

/* ---------- mobile ---------- */

@media (max-width: 700px) {
  section {
    padding: 56px 0;
  }
}

/* ---------- reduced motion ---------- */

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