@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --phosphor: #00FF41;
  --phosphor-dim: #00aa2a;
  --phosphor-glow: rgba(0, 255, 65, 0.4);
  --warning: #ddff00;
  --scanline: rgba(0, 255, 65, 0.03);

  /* User-authored input shares the same cyan-blue across the whole app. */
  --user-input:      #00ddff;
  --user-input-dim:  #0088aa;
  --user-input-glow: rgba(0, 221, 255, 0.4);

  --font-mono: "JetBrains Mono", "Fira Code", "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--phosphor);
  font-family: var(--font-mono);
  font-size: 14px;
  text-shadow: 0 0 1px var(--phosphor-glow);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4vh 1.5rem;
  gap: 4vh;
}

/* Faint scanlines + vignette so the brand carries from the tool */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, transparent 0, transparent 2px,
    var(--scanline) 2px, var(--scanline) 3px
  );
  z-index: 100;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  border-radius: 2vmin;
  box-shadow: inset 0 0 12vmin rgba(0,0,0,0.65);
  z-index: 101;
}

/* Login card */
.card {
  position: relative;
  width: min(100%, 420px);
  border: 1px solid var(--phosphor);
  background: var(--bg);
  padding: 2.5rem 2rem 2rem;
}

.brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.brand-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--phosphor);
  text-shadow: 0 0 2px var(--phosphor-glow);
}
.brand-tag {
  margin-top: 0.25rem;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--phosphor-dim);
}

.lede {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--phosphor-dim);
  margin-bottom: 2rem;
}

/* Form */
.login { display: flex; flex-direction: column; gap: 1.2rem; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--phosphor-dim);
}
.field input {
  background: var(--bg);
  border: none;
  border-bottom: 1px solid var(--phosphor-dim);
  color: var(--user-input);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 6px 2px;
  outline: none;
  caret-color: var(--user-input);
  text-shadow: 0 0 1px var(--user-input-glow);
}
.field input:focus { border-bottom-color: var(--user-input); }

.enter {
  margin-top: 0.5rem;
  background: none;
  border: none;
  color: var(--phosphor);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.25em;
  cursor: pointer;
  padding: 8px 12px;
  text-shadow: 0 0 1px var(--phosphor-glow);
  transition: text-shadow 100ms;
}
.enter::before { content: '[ '; color: var(--phosphor-dim); }
.enter::after  { content: ' ]'; color: var(--phosphor-dim); }
.enter:hover { text-shadow: 0 0 6px var(--phosphor); }
.enter:hover::before, .enter:hover::after { color: var(--phosphor); }
.enter:active {
  background: var(--phosphor);
  color: var(--bg);
  text-shadow: none;
}
.enter:active::before, .enter:active::after { color: var(--bg); }
.enter:disabled { color: var(--phosphor-dim); cursor: progress; }

.login-message {
  min-height: 1.2em;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-align: center;
  color: var(--warning);
}
.login-message.is-ok { color: var(--phosphor); }

/* "What this is, in a nutshell..." accordion - single-item version of
   the /about/ FAQ pattern. Closed by default; clicking the question
   opens the answer panel with typewriter reveal. Square panel borders
   matching the build_tool's viewers; cyan = the question (user-side),
   phosphor green = the (teacher-authored) answer. */
.nutshell {
  width: min(100%, 640px);
  display: flex;
  flex-direction: column;
}

.nutshell-question {
  width: 100%;
  text-align: left;
  background: var(--bg);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: baseline;
  transition: border-color 180ms, color 180ms;
}

.nutshell-prompt {
  color: var(--user-input-dim);
  font-weight: 700;
  flex-shrink: 0;
  transition: color 180ms;
}

.nutshell-q-text {
  color: var(--user-input-dim);
  transition: color 180ms, text-shadow 180ms;
}

.nutshell-question:hover .nutshell-q-text,
.nutshell.open .nutshell-q-text {
  color: var(--user-input);
  text-shadow: 0 0 4px var(--user-input-glow);
}
.nutshell.open .nutshell-question {
  border-color: var(--user-input-dim);
  margin-right: clamp(0px, 8vw, 80px);
}
.nutshell.open .nutshell-prompt {
  color: var(--user-input);
}

.nutshell-answer {
  display: none;
  margin: 8px 0 0 clamp(20px, 6vw, 56px);
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--phosphor-dim);
}
.nutshell-answer.open { display: block; }

.nutshell-a-content {
  color: var(--phosphor);
  text-shadow: 0 0 1px var(--phosphor-glow);
  font-size: 12px;
  line-height: 1.6;
}
.nutshell-a-content p { margin-bottom: 10px; }
.nutshell-a-content p:last-child { margin-bottom: 0; }

/* Authorial signature line at the bottom of the nutshell - the
   teacher's voice rather than the system's, so it wears the cyan
   "user/teacher-authored" color of the course-wide convention.
   Dashed top divider separates it from the descriptive body. */
.nutshell-slogan {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--phosphor-dim);
  color: var(--user-input);
  text-shadow: 0 0 1px var(--user-input-glow);
  font-style: italic;
  letter-spacing: 0.04em;
}

.nutshell-demo-link {
  margin-top: 14px;
  font-size: 13px;
}
.nutshell-demo-link a {
  color: var(--phosphor);
  text-decoration: none;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--phosphor-dim);
  padding-bottom: 1px;
}
.nutshell-demo-link a:hover {
  color: var(--phosphor);
  text-shadow: 0 0 6px var(--phosphor);
  border-bottom-color: var(--phosphor);
}

.nutshell-steps {
  list-style: none;
  padding-left: 0;
  margin: 0 0 10px 0;
  counter-reset: nutshell-step;
}
.nutshell-steps li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 8px;
  counter-increment: nutshell-step;
}
.nutshell-steps li:last-child { margin-bottom: 0; }
.nutshell-steps li::before {
  content: counter(nutshell-step, decimal-leading-zero) '.';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--phosphor-dim);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.nutshell-a-content::after {
  content: '\2588';
  display: inline-block;
  color: var(--phosphor);
  margin-left: 2px;
  animation: nutshell-cursor-blink 700ms steps(2) infinite;
}
.nutshell-a-content.done::after { display: none; }
@keyframes nutshell-cursor-blink { 50% { opacity: 0; } }

/* Contact footer below the card */
.contact {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--phosphor-dim);
  line-height: 1.7;
}
.contact a { color: var(--phosphor); text-decoration: none; }
.contact a:hover { text-shadow: 0 0 4px var(--phosphor); text-decoration: underline; }

.contact-tip {
  margin-top: 1.2rem;
  font-size: 10px;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--phosphor-dim);
  opacity: 0.7;
}
