/* Variant — "Terminal".
   The form as a shell session. It deliberately inverts what a design job ad
   looks like: the applicants who find this comfortable are the ones this role
   is actually for. Answered steps stay in the scrollback, so the session reads
   as a transcript rather than a wizard.

   System monospace only — a terminal has no business loading a webfont. */

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

:root {
  --bg:      #0b0c0f;
  --panel:   #101217;
  --fg:      #d7dae2;
  --dim:     #7d8492;
  --faint:   #4d5361;
  --line:    #1e222b;
  --cyan:    #56d4c4;
  --amber:   #e8b45c;
  --violet:  #a99bf5;
  --red:     #f2766a;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  background: #06070a;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding: clamp(0px, 3vw, 34px);
  background-image: radial-gradient(120% 80% at 50% -10%, rgba(86, 212, 196, .07), transparent 62%);
}

::selection { background: rgba(86, 212, 196, .28); }
:focus-visible { outline: 1px solid var(--cyan); outline-offset: 2px; }

/* ================================================================= chrome */

.term {
  max-width: 900px; margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column;
  height: calc(100dvh - clamp(0px, 6vw, 68px));
}

.chrome {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #33383f; }
.lights i:nth-child(1) { background: #f2766a; }
.lights i:nth-child(2) { background: #e8b45c; }
.lights i:nth-child(3) { background: #56d4c4; }

.title { flex: 1; text-align: center; font-size: 12px; color: var(--dim); }
.badge { font-size: 11px; color: var(--faint); letter-spacing: .06em; }

/* ================================================================= screen */

.screen {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 18px clamp(14px, 3vw, 26px) 40px;
  scrollbar-gutter: stable;
}
.screen::-webkit-scrollbar { width: 9px; }
.screen::-webkit-scrollbar-thumb { background: #23272f; border-radius: 5px; }

.boot { color: var(--dim); font-size: 12.5px; margin-bottom: 18px; }
.boot .dim { color: var(--faint); }

/* =============================================================== scrollback */

.log { color: var(--dim); }
.log .entry { padding: 3px 0; }
.log .entry .p { color: var(--cyan); }
.log .entry .k { color: var(--violet); }
.log .entry .a { color: var(--fg); }
.log .entry.fresh { animation: line-in 220ms var(--ease) both; }

@keyframes line-in {
  from { opacity: 0; transform: translateX(-5px); }
  to   { opacity: 1; transform: none; }
}

/* ================================================================== block */

.block > * { animation: line-in 240ms var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

.cmd { margin: 20px 0 4px; color: var(--fg); }
.cmd .p { color: var(--cyan); }
/* Only the command line types out character by character; doing it to whole
   paragraphs is slower to read than it is charming. */
.cmd .txt {
  display: inline-block; overflow: hidden; white-space: nowrap;
  vertical-align: bottom;
  animation: type 380ms steps(26) both; animation-delay: calc(var(--i, 0) * 55ms + 60ms);
}
@keyframes type { from { width: 0; } to { width: 100%; } }

h1 {
  font-size: 15px; font-weight: 400; line-height: 1.6;
  color: var(--fg); margin: 10px 0 2px;
}
h1::before { content: '? '; color: var(--amber); }
.lede { color: var(--dim); font-size: 13px; max-width: 68ch; }
.hint { color: var(--faint); font-size: 12.5px; margin-top: 6px; }
.hint::before { content: '# '; }

/* ================================================================ choices */

.opts { margin: 12px 0 4px; display: grid; gap: 1px; }
.opt {
  display: flex; align-items: baseline; gap: 10px;
  width: 100%; max-width: 62ch;
  background: none; border: 0; border-left: 2px solid transparent;
  padding: 4px 10px;
  font: inherit; color: var(--fg); text-align: left; cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.opt .n { color: var(--violet); flex: none; }
.opt:hover { background: rgba(255, 255, 255, .04); border-left-color: var(--cyan); }
.opt.chosen { background: rgba(86, 212, 196, .12); border-left-color: var(--cyan); color: var(--cyan); }

/* Tools render as a checkbox list — [x] is the terminal-native multi-select. */
.tools { margin: 12px 0 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px 14px; }
.tool {
  display: flex; align-items: baseline; gap: 9px;
  background: none; border: 0; padding: 3px 6px;
  font: inherit; color: var(--dim); text-align: left; cursor: pointer;
  transition: color 120ms ease, background 120ms ease;
}
.tool .box { color: var(--faint); flex: none; }
.tool:hover { color: var(--fg); background: rgba(255, 255, 255, .03); }
.tool.on { color: var(--cyan); }
.tool.on .box { color: var(--cyan); }

/* ================================================================== input */

/* An inline prompt: the caret sits right after "› " with no visible field. */
.prompt { display: flex; align-items: baseline; gap: 9px; margin: 9px 0 2px; max-width: 74ch; }
.prompt .sig { color: var(--cyan); flex: none; }
.prompt-label { color: var(--dim); font-size: 12.5px; margin-top: 12px; }
.prompt-label .opt-tag { color: var(--amber); }

.prompt input, .prompt textarea {
  flex: 1; min-width: 0;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 2px 0 4px;
  font: inherit; color: var(--fg); caret-color: var(--cyan);
  outline: none; transition: border-color 160ms ease;
}
.prompt textarea { resize: vertical; min-height: 78px; line-height: 1.65; }
.prompt input::placeholder, .prompt textarea::placeholder { color: var(--faint); }
.prompt input:focus, .prompt textarea:focus { border-bottom-color: var(--cyan); }
.prompt input[aria-invalid="true"], .prompt textarea[aria-invalid="true"] { border-bottom-color: var(--red); }

.counter { color: var(--faint); font-size: 11.5px; text-align: right; max-width: 74ch; }
.err { color: var(--red); font-size: 12.5px; margin: 4px 0 0; max-width: 74ch; }
.err:empty { display: none; }
.err::before { content: 'error: '; color: var(--red); opacity: .7; }

/* ================================================================= upload */

.drop {
  display: block; margin: 12px 0 4px; max-width: 62ch;
  border: 1px dashed var(--line); border-radius: 4px;
  padding: 20px 16px; text-align: center; cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.drop:hover, .drop.over { border-color: var(--cyan); background: rgba(86, 212, 196, .05); }
.drop strong { display: block; font-weight: 400; color: var(--fg); font-size: 13px; }
.drop span { font-size: 12px; color: var(--faint); }
.drop input[type=file] { display: none; }

.file-card {
  margin: 12px 0 4px; max-width: 62ch;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-left: 2px solid var(--cyan);
  border-radius: 4px; padding: 12px 14px;
}
.file-card .doc { color: var(--cyan); font-size: 12px; flex: none; }
.file-card .name { color: var(--fg); font-size: 13px; word-break: break-all; }
.file-card .size { color: var(--faint); font-size: 11.5px; }

/* ================================================================== offer */

.offer {
  margin: 14px 0 6px; max-width: 62ch;
  border: 1px solid var(--line); border-radius: 6px;
  background: linear-gradient(180deg, rgba(232, 180, 92, .07), transparent 70%);
  padding: 18px 20px;
}
.offer .amount { font-size: clamp(24px, 5vw, 34px); color: var(--amber); line-height: 1.15; }
.offer .per { font-size: 13px; color: var(--dim); }
.offer ul { list-style: none; margin-top: 14px; display: grid; gap: 7px; }
.offer li { display: flex; gap: 10px; font-size: 12.5px; color: var(--dim); line-height: 1.6; }
.offer li::before { content: '+'; color: var(--amber); flex: none; }

/* ================================================================ actions */

.acts { margin: 16px 0 2px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.btn {
  background: var(--cyan); color: #04211d;
  border: 0; border-radius: 4px; padding: 8px 18px;
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: filter 140ms ease, transform 140ms var(--ease);
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.btn-plain {
  background: none; border: 0; padding: 4px 0;
  font: inherit; font-size: 12.5px; color: var(--faint); cursor: pointer;
}
.btn-plain:hover { color: var(--cyan); }

.turnstile-slot { margin: 14px 0 0; min-height: 66px; }
.legal { margin-top: 12px; font-size: 11.5px; color: var(--faint); line-height: 1.65; max-width: 68ch; }
.legal::before { content: '# '; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ================================================================ closing */

.ok { color: var(--cyan); font-size: 15px; margin: 14px 0 2px; }
.ok::before { content: '✓ '; }
.bad { color: var(--amber); font-size: 15px; margin: 14px 0 2px; }
.bad::before { content: '! '; }
.exit-code { color: var(--faint); font-size: 12.5px; margin-top: 14px; }

/* The resting cursor — the session is waiting for you, not finished. */
.caret { display: inline-block; width: 8px; height: 1.05em; background: var(--cyan);
  vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.noscript {
  max-width: 460px; margin: 60px auto; padding: 20px;
  border: 1px solid var(--line); border-radius: 8px; text-align: center; color: var(--dim);
}

@media (max-width: 640px) {
  body { padding: 0; }
  .term { height: 100dvh; border: 0; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .cmd .txt { width: auto; }
  .caret { opacity: 1; }
}
