@font-face {
  font-family: "Inter Tight";
  src: url("fonts/of-inter-tight-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/of-inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --field: #151513;
  --lime: #faff69;
  --grey: #414141;
  --panel: #1c1c19;
  --panel-hi: #242420;
  --ink: #f4f4ef;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--field);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

.shell {
  height: 100vh;
  height: 100dvh;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(18px, 3.2vw, 42px) clamp(18px, 4.5vw, 68px) 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- banner ---- */

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--panel-hi);
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 800;
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.mark { color: var(--lime); }

.claim {
  color: var(--ink);
  opacity: 0.4;
  font-weight: 400;
  letter-spacing: 0.14em;
}

/* ---- terminal ---- */

.term {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: clamp(20px, 4.5vh, 46px);
  cursor: text;
}

.out {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 10px;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.72;
  scrollbar-width: thin;
  scrollbar-color: var(--grey) transparent;
  overscroll-behavior: contain;
}

.out::-webkit-scrollbar { width: 8px; }
.out::-webkit-scrollbar-thumb { background: #2c2c28; border-radius: 4px; }
.out::-webkit-scrollbar-track { background: transparent; }

.cmd {
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 20px;
}
.cmd:first-child { margin-top: 0; }

.cmd::before {
  content: "\276F";
  color: var(--lime);
  opacity: 0.85;
  margin-right: 0.85ch;
}

.block {
  margin: 9px 0 2px;
  max-width: 78ch;
}

.block + .block { margin-top: 18px; }

.line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dim { opacity: 0.46; }
.soft { color: var(--ink); opacity: 0.78; }
.lime { color: var(--lime); }

.answer { padding: 0.35em 0 0.15em; }
.version { color: var(--lime); }
.note {
  color: var(--ink);
  opacity: 0.5;
  margin-left: 1.6ch;
}

.motd {
  margin-top: 14px;
  color: var(--ink);
  opacity: 0.34;
}

.rule {
  height: 1px;
  margin: 16px 0 14px;
  background: var(--panel-hi);
}

/* key / value rows */

.kv {
  display: grid;
  grid-template-columns: 10ch minmax(0, 1fr);
  gap: 3px 18px;
  margin-top: 10px;
}
.kv .k { color: var(--ink); opacity: 0.42; }
.kv .v { color: var(--ink); overflow-wrap: anywhere; }
.kv .v.lime { color: var(--lime); }

/* model wall */

.wall { margin-top: 12px; max-width: 68ch; }

.mrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 20px;
  padding: 9px 0 10px;
  border-top: 1px solid var(--panel);
}
.mrow:last-of-type { border-bottom: 1px solid var(--panel); }

.mname {
  color: var(--ink);
  font-size: 1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mrate {
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mrate.quoted {
  color: var(--ink);
  opacity: 0.4;
}
.mfit {
  grid-column: 1 / -1;
  color: var(--ink);
  opacity: 0.44;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

/* tunnel */

.tunnel {
  margin: 12px 0 4px;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.62;
}
.tunnel .node { color: var(--lime); }
.tunnel .link { color: var(--ink); opacity: 0.45; }

pre.sh {
  margin: 6px 0 0;
  padding: 12px 14px;
  background: var(--panel);
  border-left: 2px solid var(--panel-hi);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.9em;
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
pre.sh .cap { color: var(--lime); opacity: 0.9; }

/* ---- prompt ---- */

.prompt {
  position: relative;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.7ch;
  max-width: 78ch;
  margin-top: 12px;
  padding: 16px 0 17px;
  border-top: 1px solid var(--panel-hi);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

.ps1 {
  color: var(--lime);
  opacity: 0.9;
  flex: none;
}

.typed {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}

.cursor {
  display: inline-block;
  width: 0.62em;
  height: 1.12em;
  background: var(--lime);
  transform: translateY(0.19em);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.term:not(:focus-within) .cursor {
  opacity: 0.75;
}

.entry {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 16px 0 17px;
  border: 0;
  outline: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  opacity: 0;
}

/* ---- footer ---- */

.foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0 18px;
  border-top: 1px solid var(--panel-hi);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  line-height: 1.4;
}

.hint {
  color: var(--ink);
  opacity: 0.32;
  letter-spacing: 0.04em;
}

.site {
  color: var(--ink);
  opacity: 0.58;
  text-decoration: none;
  border-bottom: 1px solid var(--grey);
  padding-bottom: 1px;
  transition: opacity 120ms linear, border-color 120ms linear;
}
.site:hover,
.site:focus-visible {
  opacity: 1;
  border-bottom-color: var(--lime);
  outline: none;
}

/* ---- phone ---- */

@media (max-width: 620px) {
  .shell { padding: 15px 17px 0; }

  .banner {
    font-size: 9.5px;
    letter-spacing: 0.14em;
    gap: 4px 12px;
    padding-bottom: 12px;
  }
  .claim { letter-spacing: 0.1em; }

  .term { padding-top: 20px; }

  .out { font-size: 13px; line-height: 1.7; }

  .cmd { margin-top: 16px; }

  .kv {
    grid-template-columns: 8.5ch minmax(0, 1fr);
    gap: 2px 12px;
  }

  .mrow { padding: 8px 0 9px; gap: 1px 12px; }
  .mname { white-space: normal; }
  .mfit { font-size: 0.9em; }

  pre.sh { padding: 10px 11px; font-size: 0.86em; }

  .prompt { font-size: 14px; padding: 13px 0 14px; }
  .entry { padding: 13px 0 14px; }

  .foot { padding: 12px 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  .site { transition: none; }
}
