/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg: oklch(0.16 0.012 240);
  --bg-elev: oklch(0.19 0.013 240);
  --bg-line: oklch(0.24 0.014 240);
  --fg: oklch(0.96 0.005 80);
  --fg-dim: oklch(0.72 0.008 80);
  --fg-mute: oklch(0.52 0.010 80);
  --accent: #7dd3e4;
  --signal: oklch(0.80 0.18 145);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --pad-x: clamp(20px, 4vw, 56px);
}

[data-theme="light"] {
  --bg: oklch(0.97 0.005 80);
  --bg-elev: oklch(0.94 0.006 80);
  --bg-line: oklch(0.86 0.008 80);
  --fg: oklch(0.18 0.012 240);
  --fg-dim: oklch(0.38 0.010 240);
  --fg-mute: oklch(0.55 0.010 240);
}

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

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

/* ── Grain + grid backdrop ────────────────────────────────────────────── */
.network-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}
.backdrop {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--fg) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--fg) 6%, transparent) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
  opacity: .55;
}
.backdrop::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 20%, color-mix(in oklch, var(--accent) 14%, transparent), transparent 50%),
    radial-gradient(circle at 15% 75%, color-mix(in oklch, var(--accent) 8%, transparent), transparent 60%);
}

/* ── Top utility bar ──────────────────────────────────────────────────── */
.topbar {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 16px var(--pad-x);
  border-bottom: 1px solid var(--bg-line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.02em;
}
.topbar .lockup {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg);
}
.topbar .lockup .glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border: 1px solid var(--fg);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: -0.04em;
}
.topbar .meta { display: flex; gap: 28px; align-items: center; }
.topbar .meta > div { display: flex; gap: 8px; align-items: center; }
.topbar .meta .k { color: var(--fg-mute); }
.topbar .meta .v { color: var(--fg); }
.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--signal) 50%, transparent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   color-mix(in oklch, var(--signal) 60%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0   transparent; }
}

/* ── Card wrap ────────────────────────────────────────────────────────── */
.card-wrap {
  position: relative; z-index: 1;
  min-height: calc(100vh - 130px);
  display: grid;
  place-items: center;
  padding: 64px var(--pad-x) 96px;
}

.card {
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.card-tag {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 24px;
}
.card-tag .num { color: var(--accent); font-size: 14px; }

.card-name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(56px, 11vw, 144px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin: 0;
  text-transform: lowercase;
  min-height: 1.9em;
}
.card-name .italic {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.045em;
}

/* ── Terminal frame ───────────────────────────────────────────────────── */
.terminal {
  width: 100%;
  position: relative;
  background: oklch(0.13 0.012 240);
  border: 1px solid var(--bg-line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 1px 0 color-mix(in oklch, var(--fg) 6%, transparent) inset,
    0 30px 80px -30px rgba(0, 0, 0, 0.8),
    0 8px 24px -10px rgba(0, 0, 0, 0.4);
  font-family: var(--font-mono);
  transition: box-shadow .45s ease;
  z-index: 2;
}

/* Focused state when contact flow is active */
.terminal.is-active {
  box-shadow:
    0 1px 0 color-mix(in oklch, var(--fg) 6%, transparent) inset,
    0 0 0 1px color-mix(in oklch, var(--accent) 40%, transparent),
    0 30px 80px -30px rgba(0, 0, 0, 0.85),
    0 0 60px -10px color-mix(in oklch, var(--accent) 18%, transparent);
}
.t-body {
  --t-pad-y: 48px;
  /* Pre-allocate enough height for the full hero state (whoami / name /
     blank / motto cmd / motto / blank / idle prompt) including the
     taller t-name line. Prevents the box from growing as content types. */
  min-height: calc(7.6lh + var(--t-pad-y));
  max-height: clamp(280px, 60vh, 560px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklch, var(--fg) 20%, transparent) transparent;
  padding: 22px 26px 26px;
  font-size: clamp(13px, 1.2vw, 15.5px);
  line-height: 1.55;
  color: oklch(0.92 0.005 80);
}
.t-body::-webkit-scrollbar { width: 6px; }
.t-body::-webkit-scrollbar-thumb {
  background: color-mix(in oklch, var(--fg) 20%, transparent);
  border-radius: 3px;
}
[data-theme="light"] .terminal {
  background: oklch(0.18 0.012 240);
  color: oklch(0.96 0.005 80);
  border-color: oklch(0.30 0.014 240);
}
.t-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: oklch(0.17 0.012 240);
  border-bottom: 1px solid color-mix(in oklch, var(--fg) 8%, transparent);
}
[data-theme="light"] .t-head {
  background: oklch(0.23 0.012 240);
}
.t-dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.3) inset;
}
.t-red    { background: #ff5f57; }
.t-yellow { background: #febc2e; }
.t-green  { background: #28c840; }
.t-title {
  flex: 1;
  text-align: center;
  margin-right: 48px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: oklch(0.62 0.008 80);
}
.t-line {
  min-height: 1.55em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t-line.cm-line-active,
.t-line.cm-line-answered,
.t-line.cm-line-err,
.t-line.cm-line-ok,
.t-line.cm-line-system {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  white-space: normal;
  overflow: visible;
}
.t-line.cm-line-active .t-prompt,
.t-line.cm-line-answered .t-prompt,
.t-line.cm-line-err .t-prompt,
.t-line.cm-line-ok .t-prompt {
  display: inline-flex;
  flex-shrink: 0;
}
.t-blank { min-height: 1.55em; }
.t-prompt .user   { color: oklch(0.78 0.18 145); font-weight: 500; }
.t-prompt .path   { color: oklch(0.78 0.14 245); }
.t-prompt .dollar { color: oklch(0.62 0.008 80); }
.t-out { color: oklch(0.96 0.005 80); }
.t-name {
  color: var(--accent);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  letter-spacing: 0;
  font-weight: 500;
  text-transform: lowercase;
  min-height: 1.55em;
  margin: 0;
}
.t-name-ascii {
  white-space: pre;
  overflow-x: auto;
  margin: 6px 0 4px;
  padding-bottom: 4px;
}
.ascii-name {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: clamp(7px, 1.05vw, 11px);
  line-height: 1.1;
  margin: 0;
  white-space: pre;
  letter-spacing: 0;
}
.t-motto {
  font-size: clamp(13px, 1.2vw, 15.5px);
  line-height: 1.55;
  white-space: normal;
  color: oklch(0.94 0.005 80);
  min-height: 1.55em;
}
.t-motto .t-quote { color: var(--accent); opacity: .7; }
.t-motto .t-em    { color: var(--accent); font-weight: 600; }
.tt-mono { vertical-align: -0.15em; height: 1em; }

/* Terminal typewriter caret — hard binary blink */
.tt-caret {
  display: inline-block;
  width: 0.55ch;
  height: 1em;
  background: var(--accent);
  vertical-align: -0.15em;
  margin-left: 0.08em;
  animation: tt-blink 1.06s step-end infinite;
}
.tt-caret.tt-typing {
  animation: tt-blink 0.6s step-end infinite;
}
.tt-caret-name {
  height: 1em;
  vertical-align: -0.15em;
  margin-left: 0.08em;
}
@keyframes tt-blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.card-role {
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--bg-line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
}

.card-intro {
  margin-top: 28px;
  font-family: var(--font-sans);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--fg-dim);
  text-wrap: pretty;
  max-width: 56ch;
}

.card-motto {
  margin-top: 28px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.3;
  color: var(--fg);
  letter-spacing: -0.005em;
  position: relative;
  text-wrap: balance;
  max-width: 28ch;
  min-height: 1.3em;
}
.card-motto .em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.card-motto .quote-mark {
  color: var(--accent);
  opacity: .55;
  font-style: normal;
  margin: 0 2px;
  font-family: var(--font-mono);
  font-weight: 400;
}

.card-facts {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--bg-line);
}
.card-facts .fact {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--bg-line);
  font-family: var(--font-mono);
  font-size: 13px;
}
.card-facts .fact-k {
  color: var(--accent);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  min-width: 48px;
  flex-shrink: 0;
}
.card-facts .fact-v {
  color: var(--fg-dim);
}

/* Count-up number — settles to fact text color when complete */
.count-num {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--accent);
  transition: color .4s ease-out .15s;
}
.count-num.count-done {
  color: inherit;
}

.card-facts .fact.featured,
.card-facts .fact.highlight {
  grid-column: 1 / -1;
  align-items: center;
  padding: 16px 14px;
  position: relative;
  border-radius: 6px;
  border-bottom: 1px solid var(--bg-line);
  overflow: hidden;
  isolation: isolate;
}

/* ── Featured (Cleared) — security scanner ────────────────────────────
   Solid signal-green frame + a diagonal beam that sweeps across the row
   every few seconds, like a badge reader verifying credentials. Reads
   as "authorized / secure" rather than the generic chasing light. */
@property --scan-x {
  syntax: '<percentage>';
  initial-value: -20%;
  inherits: false;
}
.card-facts .fact.featured {
  background: linear-gradient(105deg,
    color-mix(in oklch, var(--signal) 22%, transparent),
    color-mix(in oklch, var(--signal) 10%, transparent) 70%,
    color-mix(in oklch, var(--signal) 4%, transparent));
}
.card-facts .fact.featured::before {
  /* static frame — no chase */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(
    color-mix(in oklch, var(--signal) 55%, transparent) 0 0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
.card-facts .fact.featured::after {
  /* diagonal scanner beam — dimmer + narrower */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent calc(var(--scan-x) - 5%),
    color-mix(in oklch, var(--signal) 14%, transparent) calc(var(--scan-x) - 1%),
    color-mix(in oklch, var(--signal) 40%, transparent) var(--scan-x),
    color-mix(in oklch, var(--signal) 14%, transparent) calc(var(--scan-x) + 1%),
    transparent calc(var(--scan-x) + 5%)
  );
  mix-blend-mode: screen;
  animation: scan-sweep 4.4s cubic-bezier(.5,.05,.5,.95) infinite;
  z-index: 1;
}
@keyframes scan-sweep {
  0%    { --scan-x: -10%; }
  55%   { --scan-x: 110%; }
  100%  { --scan-x: 110%; }
}

.card-facts .fact.featured .fact-k {
  color: var(--signal);
  font-weight: 600;
  position: relative;
  z-index: 2;
}
.card-facts .fact.featured .fact-v {
  color: var(--fg);
  position: relative;
  z-index: 2;
}
/* ── Highlight (Specialty) — public-safety cherry bar ─────────────────
   Red glow on the left, blue glow on the right, hard step-blinking out
   of phase. Evokes emergency lights without being seizure-inducing. */
.card-facts .fact.highlight {
  background: linear-gradient(to right,
    color-mix(in oklch, #ef4444 22%, transparent),
    color-mix(in oklch, #ef4444 8%, transparent) 35%,
    color-mix(in oklch, #3b82f6 8%, transparent) 65%,
    color-mix(in oklch, #3b82f6 22%, transparent));
}
.card-facts .fact.highlight::before {
  /* red side: edge accent + radial glow — double-strobes then rests */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(to right,
      #ef4444 0, #ef4444 2px, transparent 2px),
    radial-gradient(ellipse 55% 110% at 0% 50%,
      color-mix(in oklch, #ef4444 30%, transparent),
      transparent 70%);
  animation: ps-strobe-left 1.6s steps(1, end) infinite;
  z-index: 1;
}
.card-facts .fact.highlight::after {
  /* blue side: edge accent + radial glow — double-strobes, offset 50% */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(to left,
      #3b82f6 0, #3b82f6 2px, transparent 2px),
    radial-gradient(ellipse 55% 110% at 100% 50%,
      color-mix(in oklch, #3b82f6 30%, transparent),
      transparent 70%);
  animation: ps-strobe-right 1.6s steps(1, end) infinite;
  z-index: 1;
}
@keyframes ps-strobe-left {
  0%,    7%    { opacity: 1; }
  7.01%, 14%   { opacity: 0.18; }
  14.01%, 21%  { opacity: 1; }
  21.01%, 100% { opacity: 0.18; }
}
@keyframes ps-strobe-right {
  0%,    50%   { opacity: 0.18; }
  50.01%, 57%  { opacity: 1; }
  57.01%, 64%  { opacity: 0.18; }
  64.01%, 71%  { opacity: 1; }
  71.01%, 100% { opacity: 0.18; }
}
.card-facts .fact.highlight .fact-k {
  color: var(--accent);
  font-weight: 600;
  position: relative;
  z-index: 2;
}
.card-facts .fact.highlight .fact-v {
  color: var(--fg);
  position: relative;
  z-index: 2;
}
.card-facts .fact.wide { grid-column: 1 / -1; }
.card-facts .fact-pulse {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal);
  flex-shrink: 0;
  align-self: center;
  transform: translateY(0);
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--signal) 50%, transparent);
  animation: pulse 2.4s ease-out infinite;
}
.card-facts .fact-pulse.accent {
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 50%, transparent);
  animation: pulse-accent 2.4s ease-out infinite;
}
@keyframes pulse-accent {
  0%   { box-shadow: 0 0 0 0   color-mix(in oklch, var(--accent) 60%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0   transparent; }
}

.card-cta {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.card-foot {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  border: 1px solid var(--bg-line);
  background: var(--bg-elev);
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.04em;
  color: var(--fg);
  transition: border-color .15s, background .15s, transform .15s;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn.primary {
  background: var(--accent);
  color: oklch(0.18 0.012 240);
  border-color: var(--accent);
}
.btn.primary:hover { background: color-mix(in oklch, var(--accent) 85%, white); }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  position: relative; z-index: 1;
  padding: 24px var(--pad-x);
  border-top: 1px solid var(--bg-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.06em;
}
footer .stamp {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg);
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .topbar { padding: 14px var(--pad-x); }
  .card-wrap { padding: 36px var(--pad-x) 64px; min-height: calc(100vh - 110px); }
  .t-body {
    --t-pad-y: 38px;
    padding: 18px 18px 20px;
    font-size: 13px;
  }
  .t-head { padding: 9px 12px; }
  .t-title { font-size: 10.5px; margin-right: 36px; }
  .t-dot { width: 10px; height: 10px; }
  .cm-x { right: 8px; padding: 2px 6px; font-size: 10px; }
  .card-role { margin-top: 28px; font-size: 11px; }
  .card-intro { margin-top: 22px; font-size: 16px; }
  .card-facts { margin-top: 28px; }
  .card-facts .fact { font-size: 12px; padding: 12px 4px; gap: 12px; }
  .card-facts .fact.featured,
  .card-facts .fact.highlight { padding: 14px 10px; }
  .card-cta { margin-top: 32px; gap: 12px; }
  .btn { padding: 12px 18px; font-size: 12px; }
}
@media (max-width: 600px) {
  .topbar .meta { display: none; }
  .card-facts { grid-template-columns: 1fr; }
  .t-body { --t-pad-y: 34px; font-size: 12.5px; padding: 16px 14px 18px; }
  .t-name { font-size: 18px; }
  .ascii-name { font-size: 7px; }
  .t-motto { font-size: 12.5px; }
  /* Inputs inherit terminal typography — match the hero line */
  .cm-captcha-mount { transform: scale(0.92); transform-origin: left top; }
  footer { padding: 18px var(--pad-x); flex-wrap: wrap; gap: 6px; }
  footer .stamp { font-size: 12px; }
}
@media (max-width: 380px) {
  .topbar .lockup .glyph { display: none; }
  .t-title { display: none; }
}

/* ── Reveal ───────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: reveal .8s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes reveal {
  to { opacity: 1; transform: none; }
}
.r1 { animation-delay: .05s; }
.r2 { animation-delay: .15s; }
.r3 { animation-delay: .30s; }
.r4 { animation-delay: .45s; }
.r5 { animation-delay: .60s; }
.r6 { animation-delay: .75s; }

/* ── Inline contact flow (lives inside hero terminal) ─────────────── */
.cm-x {
  position: absolute;
  right: 12px; top: 50%; transform: translateY(-50%);
  background: transparent;
  border: 1px solid color-mix(in oklch, var(--fg) 14%, transparent);
  color: oklch(0.62 0.008 80);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
}
.cm-x:hover { color: var(--accent); border-color: var(--accent); }
.t-head { position: relative; }
.terminal.is-active .t-head .t-red { cursor: pointer; }

.cm-line-system {
  color: var(--fg-mute);
  font-size: 0.86em;
  letter-spacing: 0.04em;
  padding-left: 2px;
  margin: 6px 0 2px;
  display: flex;
  align-items: baseline;
  gap: 0;
  animation: cm-system-in .35s ease-out;
}
@keyframes cm-system-in {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: none; }
}
.cm-line-active { align-items: flex-start; }
.t-line.cm-line-answered {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  white-space: normal;
  overflow: visible;
}
.t-line.cm-line-answered .cm-answer {
  color: oklch(0.96 0.005 80);
  white-space: pre-wrap;
  word-break: break-word;
}
.cm-line-ok {
  color: var(--fg);
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  white-space: normal;
  overflow: visible;
  animation: cm-system-in .35s ease-out;
}
.cm-line-ok .cm-ok {
  color: var(--signal);
  font-weight: 700;
  margin-right: 4px;
}
.cm-line-err {
  color: #f87171;
  font-size: 0.86em;
  padding-left: 2px;
  margin-top: 2px;
  gap: 4px;
  display: flex;
  align-items: baseline;
  white-space: normal;
  overflow: visible;
}
.cm-line-err .cm-x-mark {
  color: #f87171;
  font-weight: 700;
}
.cm-line-cta {
  margin-top: 12px;
}

/* Inline input that lives on the same prompt line — inherits all
   typography AND color from the surrounding terminal body so the
   typed text matches the lines above. */
.cm-cli-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  font-style: normal;
  padding: 0;
  caret-color: var(--accent);
}
.cm-cli-input::placeholder {
  color: oklch(0.42 0.010 80);
  font-style: normal;
}
.cm-cli-textarea {
  resize: none;
  width: 100%;
  flex-basis: 100%;
  min-height: 3.3em;
  padding-top: 2px;
}

.cm-hint {
  font-size: 0.78em;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
  padding-left: 2px;
  margin-top: 6px;
}

/* Captcha mount */
.cm-captcha-mount {
  margin: 8px 0 4px 2px;
  min-height: 78px;
}

.cm-retry {
  margin-left: 8px;
  padding: 4px 10px;
  font-size: 11.5px;
}

/* Sending dots animation */
.cm-dots {
  display: inline-flex;
  margin-left: 2px;
}
.cm-dots span {
  animation: cm-dot 1.2s infinite;
}
.cm-dots span:nth-child(2) { animation-delay: .2s; }
.cm-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes cm-dot {
  0%, 60%, 100% { opacity: 0.2; }
  30% { opacity: 1; }
}
.cm-prompt {
  font-family: var(--font-mono);
  font-size: 12.5px;
  margin-bottom: 2px;
}
.cm-prompt .user   { color: oklch(0.78 0.18 145); font-weight: 500; }
.cm-prompt .path   { color: oklch(0.78 0.14 245); }
.cm-prompt .dollar { color: oklch(0.62 0.008 80); }

.cm-field {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in oklch, var(--fg) 8%, transparent);
}
.cm-field-block {
  grid-template-columns: 72px 1fr;
  align-items: flex-start;
  padding-top: 12px;
}
.cm-k {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.cm-input {
  background: transparent;
  border: none;
  outline: none;
  color: oklch(0.96 0.005 80);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 6px 0;
  width: 100%;
  caret-color: var(--accent);
}
.cm-input::placeholder { color: oklch(0.48 0.010 80); }
.cm-textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
  padding-top: 4px;
}

.cm-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.cm-ghost {
  background: transparent;
  color: var(--fg-dim);
}
.cm-ghost:hover { color: var(--fg); border-color: color-mix(in oklch, var(--fg) 20%, transparent); transform: none; }
.cm-foot {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
  margin-left: auto;
}

.cm-done { gap: 14px; }
.cm-out-ok {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: oklch(0.92 0.005 80);
}
.cm-ok {
  color: var(--signal);
  font-weight: 600;
  margin-right: 6px;
}

.cm-captcha {
  margin-top: -4px;
}
.cm-botcheck { display: none; }

.cm-error {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #ef4444;
  margin-top: -8px;
}

/* ── Dim + blur the page when contact flow is active ──────────────── */
body {
  transition: background-color .45s ease;
}
body.contact-active {
  background-color: oklch(0.06 0.010 240);
}
[data-theme="light"] body.contact-active,
html[data-theme="light"] body.contact-active {
  background-color: oklch(0.55 0.010 240);
}
body.contact-active .topbar,
body.contact-active .card-role,
body.contact-active .card-intro,
body.contact-active .card-facts,
body.contact-active .card-cta,
body.contact-active footer {
  opacity: 0.10;
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
  transition: opacity .45s ease, filter .45s ease;
}
body.contact-active .network-bg,
body.contact-active .backdrop {
  opacity: 0.18;
  transition: opacity .45s ease;
}
.topbar, .card-role, .card-intro, .card-facts, .card-cta, footer,
.network-bg, .backdrop {
  transition: opacity .45s ease, filter .45s ease;
}

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cm-line-system,
  .cm-line-ok {
    animation: none !important;
  }
  .terminal { transition: none; }
}

