/* orcalinux(1) — the site is a manual page */
:root {
  --bg: #050b12;
  --bg-2: #08131d;
  --bg-3: #0c1c29;
  --fg: #d6eef5;
  --fg-hi: #ffffff;
  --muted: #86a3ae;
  --cyan: #00e5ff;
  --cyan-dim: rgba(0, 229, 255, 0.16);
  --cyan-line: rgba(0, 229, 255, 0.28);
  --green: #3ddc5a;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-ui: cubic-bezier(0.2, 0, 0, 1);
  --head-h: 2.75rem;
  --less-h: 2.75rem;
  --indent: 7ch;
  --gut: clamp(1rem, 3vw, 2.5rem);
  --gut-l: max(var(--gut), env(safe-area-inset-left, 0px));
  --gut-r: max(var(--gut), env(safe-area-inset-right, 0px));
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--cyan-line) var(--bg);
  scroll-padding-top: calc(var(--head-h) + 1rem);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 15.5px/1.7 var(--mono);
  -webkit-font-smoothing: antialiased;
  font-variant-ligatures: none;
  padding-bottom: calc(var(--less-h) + var(--safe-b));
  overflow-wrap: break-word;
  caret-color: var(--cyan);
}
::selection { background: var(--cyan); color: #001018; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--cyan-line); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

a { color: var(--cyan); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: var(--cyan-line); transition: text-decoration-color 150ms var(--ease-ui), color 150ms var(--ease-ui); }
a:hover { text-decoration-color: var(--cyan); color: var(--fg-hi); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
b { color: var(--fg-hi); font-weight: 800; }
u { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
kbd { font: inherit; font-size: 0.85em; padding: 0.05em 0.45em; border-radius: 5px; background: var(--bg-3); color: var(--fg-hi); box-shadow: inset 0 -1px 0 rgba(0, 229, 255, 0.25); }
button { font: inherit; color: inherit; }

.skip { position: fixed; left: 1rem; top: -4rem; z-index: 50; background: var(--cyan); color: #001018; padding: 0.5rem 0.9rem; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 0.5rem; }
.skip:hover { color: #001018; }

/* ── man header / footer lines ── */
.manhead,
.manfoot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: var(--fg-hi);
}
.manhead {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--head-h);
  align-items: center;
  padding: 0 var(--gut-r) 0 var(--gut-l);
  white-space: nowrap;
  background: rgba(5, 11, 18, 0.82);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 1px 0 var(--cyan-line);
}
.manhead .mid,
.manfoot .mid { color: var(--muted); font-weight: 400; }
.manfoot { margin: 4rem 0 2rem; padding-top: 1rem; box-shadow: 0 -1px 0 var(--cyan-line); }

/* ── layout ── */
.shell {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 var(--gut-r) 0 var(--gut-l);
}
.page { min-width: 0; max-width: 62rem; }

/* ── section index ── */
.index {
  position: sticky;
  top: calc(var(--head-h) + 2rem);
  align-self: start;
  margin-top: 2.5rem;
}
.index ul { list-style: none; margin: 0; padding: 0; position: relative; }
.index li a {
  display: block;
  padding: 0.3rem 0 0.3rem 1.1rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 200ms var(--ease-ui), transform 250ms var(--ease-out);
}
.index li a:hover { color: var(--fg-hi); transform: translateX(3px); }
.index li a.active { color: var(--cyan); }
.index-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 1.9rem;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  will-change: transform;
}
.index-keys { margin-top: 1.5rem; color: var(--muted); font-size: 0.8rem; line-height: 2; }

/* ── man body grammar ── */
.prompt { margin: 2.5rem 0 1.5rem; color: var(--fg-hi); }
.ps1 { color: var(--green); font-weight: 600; }
.ps2 { color: var(--muted); }
.caret {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  margin-left: 0.15em;
  vertical-align: -0.2em;
  background: var(--cyan);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.sec { margin: 0 0 3.25rem; scroll-margin-top: calc(var(--head-h) + 1rem); }
.sec h2 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--fg-hi);
}
.sec .body { margin: 0; padding-left: var(--indent); }
.sec .body > p { margin: 0 0 0.9rem; max-width: 70ch; text-wrap: pretty; }

/* NAME + wordmark + avatar */
.sec-name {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(13rem, 26vw, 19rem);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.wordmark { margin-bottom: 2rem; }
.ascii {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(11px, 2.35vw, 26px);
  line-height: 1.02;
  color: var(--fg-hi);
  text-shadow: 0 0 18px rgba(0, 229, 255, 0.35);
  white-space: pre;
}
.ascii span { display: inline-block; }
.linux {
  margin: 0.35rem 0 0;
  color: var(--cyan);
  font-weight: 800;
  font-size: clamp(14px, 2.1vw, 24px);
  letter-spacing: 0.55em;
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.55);
}
.src { color: var(--muted); }
.avatar { margin: 0; position: relative; }
.avatar img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0, 229, 255, 0.22));
  will-change: transform;
}

/* SYNOPSIS flags */
.synopsis { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.55rem; }
.flag {
  position: relative;
  padding: 0.1rem 0.35rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background-color 180ms var(--ease-ui), color 180ms var(--ease-ui), box-shadow 180ms var(--ease-ui), scale 120ms var(--ease-ui);
}
.flag::after { content: ""; position: absolute; inset: -6px -2px; }
.flag b { color: inherit; font-weight: 800; text-decoration: underline; text-decoration-color: var(--cyan-line); text-underline-offset: 0.25em; transition: text-decoration-color 180ms var(--ease-ui); }
.flag:hover { background: var(--cyan-dim); color: var(--fg-hi); }
.flag:hover b { text-decoration-color: var(--cyan); }
.flag:active { scale: 0.96; }
.flag[aria-pressed="true"] { background: var(--cyan); color: #001018; box-shadow: 0 0 22px rgba(0, 229, 255, 0.45); }
.flag[aria-pressed="true"] b { color: #001018; text-decoration-color: transparent; }
.hint { color: var(--muted); }

/* OPTIONS / FILES definition lists */
.options,
.files { display: grid; grid-template-columns: minmax(0, 1fr); }
.options dt,
.files dt { margin-top: 0.9rem; }
.options dt:first-child,
.files dt:first-child { margin-top: 0; }
.options dd,
.files dd { margin: 0.15rem 0 0 var(--indent); max-width: 66ch; color: var(--fg); text-wrap: pretty; }
.options .flag { margin-left: -0.35rem; }
.stars { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 0.4rem; white-space: nowrap; }

/* ── EXAMPLES ── */
.filterline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.7rem; margin-bottom: 1.4rem !important; }
#filter-cmd { color: var(--fg-hi); font-weight: 600; }
.cmt { color: var(--muted); font-variant-numeric: tabular-nums; }
.clear {
  border: 0;
  background: var(--bg-3);
  color: var(--cyan);
  border-radius: 6px;
  padding: 0.05rem 0.6rem;
  cursor: pointer;
  transition: background-color 150ms var(--ease-ui), scale 120ms var(--ease-ui);
}
.clear:hover { background: var(--cyan-dim); }
.clear:active { scale: 0.96; }

.examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ex {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.1rem 1.2rem 1rem;
  border-radius: 14px;
  background: var(--bg-2);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.12), 0 10px 30px -18px rgba(0, 0, 0, 0.9);
  isolation: isolate;
  overflow: hidden;
  transition: box-shadow 300ms var(--ease-out), translate 400ms var(--ease-out), opacity 300ms var(--ease-ui), filter 300ms var(--ease-ui);
}
/* cursor spotlight */
.ex::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(0, 229, 255, 0.13), transparent 60%);
  opacity: 0;
  transition: opacity 300ms var(--ease-ui);
}
/* light running along the border */
.ex::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx) var(--my), var(--cyan), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 300ms var(--ease-ui);
  pointer-events: none;
}
.ex:hover,
.ex:focus-within { translate: 0 -4px; box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.22), 0 22px 44px -22px rgba(0, 229, 255, 0.35); }
.ex:hover::before,
.ex:hover::after,
.ex:focus-within::before,
.ex:focus-within::after { opacity: 1; }
.ex.dim { opacity: 0.28; filter: grayscale(1); }
.ex.dim:hover { opacity: 0.6; }

.cmd {
  display: flex;
  align-items: center;
  gap: 0.6ch;
  margin: 0 -0.4rem 0.9rem;
  padding: 0.35rem 0.4rem 0.35rem 0.7rem;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 0;
}
.cmd code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: inherit; }
.copy {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 150ms var(--ease-ui), color 150ms var(--ease-ui), scale 120ms var(--ease-ui);
}
.copy::after { content: ""; position: absolute; inset: -4px; }
.copy:hover { background: var(--cyan-dim); color: var(--fg-hi); }
.copy:active { scale: 0.96; }
.copy svg {
  grid-area: 1 / 1;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 250ms var(--ease-ui), scale 250ms var(--ease-ui), filter 250ms var(--ease-ui);
}
.copy .i-check { opacity: 0; scale: 0.25; filter: blur(4px); color: var(--green); stroke-width: 2; }
.copy.copied .i-copy { opacity: 0; scale: 0.25; filter: blur(4px); }
.copy.copied .i-check { opacity: 1; scale: 1; filter: blur(0); }

.ex-link { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; text-decoration: none; color: var(--fg-hi); }
.ex-link::before { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.ex h3 { margin: 0 0 0.45rem; font-size: 1.02rem; font-weight: 800; overflow-wrap: anywhere; }
.arrow { display: inline-block; color: var(--cyan); transition: translate 300ms var(--ease-out); }
.ex:hover .arrow,
.ex-link:focus-visible .arrow { translate: 5px 0; }
.ex p { margin: 0 0 0.9rem; color: var(--muted); font-size: 0.88rem; text-wrap: pretty; }
.ex .meta { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.78rem; color: var(--fg); }
.lang::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-right: 0.45rem; background: var(--c); }
.topics { color: #19b8d6; }
.ex .stars { margin: 0; }
.ex .cmd,
.ex .copy { position: relative; z-index: 1; }

/* SEE ALSO */
.seealso { line-height: 2.1; }
.seealso a { font-weight: 600; }

/* AUTHOR close */
.banner-link { display: block; margin: 1.5rem 0 1.25rem; border-radius: 14px; overflow: hidden; }
.banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  outline: 1px solid oklch(1 0 0 / 0.1);
  outline-offset: -1px;
  transition: filter 400ms var(--ease-ui), scale 600ms var(--ease-out);
}
.banner-link:hover .banner { filter: drop-shadow(0 0 24px rgba(0, 229, 255, 0.35)) brightness(1.08); scale: 1.01; }
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7ch;
  min-height: 2.9rem;
  padding: 0 1.2rem;
  border-radius: 10px;
  background: var(--cyan);
  color: #001018;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 30px -12px rgba(0, 229, 255, 0.7);
  transition: box-shadow 250ms var(--ease-out), scale 120ms var(--ease-ui), background-color 200ms var(--ease-ui);
}
.cta .ps1 { color: #00521a; }
.cta .arrow { color: inherit; }
.cta:hover { color: #001018; background: #5ff0ff; box-shadow: 0 16px 40px -12px rgba(0, 229, 255, 0.9); }
.cta:hover .arrow { translate: 5px 0; }
.cta:active { scale: 0.96; }

/* ── less status line ── */
.less {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: calc(var(--less-h) + var(--safe-b));
  padding: 0 var(--gut-r) var(--safe-b) var(--gut-l);
  background: rgba(5, 11, 18, 0.9);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 -1px 0 var(--cyan-line);
  font-size: 0.85rem;
}
.less p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.less-status { flex: 1; min-width: 0; color: var(--muted); }
.less-status .hl { background: var(--fg); color: var(--bg); padding: 0 0.3ch; }
.num { font-variant-numeric: tabular-nums; color: var(--fg); }
.less-msg { color: var(--cyan); }
.less-msg:empty { display: none; }
.less-search { display: flex; align-items: center; gap: 0.4ch; flex: 1; }
.less-search[hidden] { display: none; }
.less-search label { color: var(--cyan); font-weight: 800; }
.less-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg-hi); font: inherit; outline: none; }
.less-search input::-webkit-search-cancel-button { display: none; }
.less-btns { display: flex; gap: 0.35rem; }
.less-btns button {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--fg-hi);
  font-weight: 800;
  cursor: pointer;
  transition: background-color 150ms var(--ease-ui), scale 120ms var(--ease-ui);
}
.less-btns button:hover { background: var(--cyan-dim); }
.less-btns button:active { scale: 0.96; }

::highlight(hits) { background-color: rgba(0, 229, 255, 0.28); color: #fff; }
::highlight(hit-cur) { background-color: var(--cyan); color: #001018; }

/* help dialog */
.help {
  width: min(36rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem 1.6rem;
  border: 0;
  border-radius: 16px;
  background: var(--bg-2);
  color: var(--fg);
  box-shadow: 0 0 0 1px var(--cyan-line), 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 60px -20px rgba(0, 229, 255, 0.35);
}
.help::backdrop { background: rgba(2, 6, 10, 0.65); backdrop-filter: blur(4px); }
.help h2 { margin: 0 0 1rem; font-size: 0.95rem; color: var(--fg-hi); }
.help dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.4rem; margin: 0 0 1.25rem; }
.help dd { margin: 0; color: var(--muted); }
.help button { border: 0; border-radius: 8px; padding: 0.45rem 0.9rem; background: var(--bg-3); color: var(--fg-hi); cursor: pointer; transition: background-color 150ms var(--ease-ui), scale 120ms var(--ease-ui); }
.help button:hover { background: var(--cyan-dim); }
.help button:active { scale: 0.96; }
.help[open] { animation: help-in 260ms var(--ease-out); }
@keyframes help-in { from { opacity: 0; translate: 0 10px; scale: 0.98; } }

/* boot: hidden until printed (JS removes the class; CSS fallback timer in <head>) */
.booting [data-print] { opacity: 0; }

/* ── responsive ── */
@media (max-width: 960px) {
  .examples { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  :root { --indent: 2ch; }
  body { font-size: 14.5px; }
  .shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .index {
    position: sticky;
    top: var(--head-h);
    z-index: 15;
    margin: 0 calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut-l));
    padding: 0.4rem var(--gut-r) 0.4rem var(--gut-l);
    background: rgba(5, 11, 18, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 229, 255, 0.12);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .index::-webkit-scrollbar { display: none; }
  .index ul { display: flex; gap: 0.2rem; }
  .index li a { padding: 0.45rem 0.7rem; white-space: nowrap; font-size: 0.8rem; border-radius: 7px; }
  .index li a.active { background: var(--cyan-dim); }
  .index li a:hover { transform: none; }
  .index-marker,
  .index-keys { display: none; }
  .manhead .mid,
  .manfoot .mid { display: none; }
  .sec-name { grid-template-columns: minmax(0, 1fr); }
  .avatar { width: min(16rem, 70vw); margin: 0 auto; grid-row: 1; }
  .options dd,
  .files dd { margin-left: 2ch; }
  .less-tail { display: none; }
  .index { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent); }
  .index ul::after { content: ""; flex: none; width: 1.5rem; }
  .ascii { font-size: min(4.1vw, 26px); }
  .linux { font-size: clamp(13px, 3.6vw, 24px); }
  .cta { white-space: nowrap; font-size: clamp(0.68rem, 3.6vw, 1em); }
  .ex:hover { translate: none; }
}
@media (max-width: 560px) {
  .less { gap: 0.6rem; }
  .less-long { display: none; }
  .manfoot { margin-top: 3rem; }
  .sec { margin-bottom: 2.75rem; }
  .help { padding: 1.15rem 1.1rem; }
  .help dl { gap: 0.45rem 0.9rem; }
}
@media (max-width: 400px) {
  :root { --gut: 0.85rem; --indent: 1.25ch; }
  body { font-size: 14px; }
  .options dd,
  .files dd { margin-left: 1.25ch; }
  .ex { padding: 0.95rem 0.95rem 0.9rem; }
  .cmd { margin-inline: -0.25rem; }
  .cta { padding: 0 0.9rem; }
  .try-shell { padding: 0 0.85rem; }
  .help dl { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .help dd { margin: 0 0 0.6rem; }
}
@media (max-width: 330px) {
  :root { --gut: 0.7rem; --indent: 0.75ch; }
  body { font-size: 13.5px; }
  .options dd,
  .files dd { margin-left: 0.75ch; }
  .less { gap: 0.4rem; }
  .less-btns { gap: 0.25rem; }
  #less-pct { display: none; }
  .manhead { font-size: 0.92em; }
}
/* fingers need bigger targets than cursors */
@media (pointer: coarse) {
  :root { --less-h: 3.25rem; }
  .less-btns button { width: 2.75rem; height: 2.75rem; }
  .less-btns .less-term { width: auto; min-width: 2.75rem; }
  .synopsis { gap: 0.5rem 0.4rem; }
  .flag { padding: 0.4rem 0.5rem; }
  .flag::after { inset: -3px -1px; }
  .options .flag { margin-left: -0.5rem; }
  .options dt { margin-top: 0.6rem; }
  .copy { width: 2.5rem; height: 2.5rem; }
  .clear { padding: 0.45rem 0.9rem; }
  .index li a { padding: 0.7rem 0.8rem; }
  .index { padding-top: 0.2rem; padding-bottom: 0.2rem; }
  .crt-close { width: 2.5rem; height: 2.5rem; }
  .seealso { line-height: 2.5; }
  .help button { min-height: 2.75rem; padding: 0 1.1rem; }
  a, button { -webkit-tap-highlight-color: rgba(0, 229, 255, 0.18); }
}
@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  .ex, .arrow, .banner, .index li a { transition-property: opacity, box-shadow, background-color, color, filter; }
  .ex:hover, .ex:focus-within { translate: none; }
  .help[open] { animation: none; }
}

/* ───────── orcash: the CRT terminal ───────── */
.try-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.7ch;
  min-height: 2.6rem;
  margin-top: 0.4rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--bg-3);
  color: var(--fg-hi);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--cyan-line), 0 8px 24px -14px rgba(0, 229, 255, 0.6);
  transition: background-color 180ms var(--ease-ui), box-shadow 250ms var(--ease-out), scale 120ms var(--ease-ui);
}
.try-shell:hover { background: var(--cyan-dim); box-shadow: 0 0 0 1px var(--cyan), 0 12px 30px -12px rgba(0, 229, 255, 0.8); }
.try-shell:active { scale: 0.96; }
.less-btns .less-term { width: auto; padding: 0 0.7rem; color: var(--green); }

.term { position: fixed; top: var(--vvt, 0px); left: 0; width: 100%; height: var(--vvh, 100dvh); z-index: 60; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 1rem; }
.term[hidden] { display: none; }
.term-backdrop { position: fixed; inset: 0; background: rgba(2, 6, 10, 0.72); backdrop-filter: blur(5px); }
body.term-open { overflow: hidden; }

.crt {
  --ph: #9df6ff;
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(60rem, 100%);
  min-width: 0;
  height: min(40rem, 100%);
  padding: 0.9rem;
  border-radius: 26px;
  background: linear-gradient(160deg, #1b2a33, #0b141b 55%, #060c11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -2px 0 rgba(0, 0, 0, 0.6), 0 40px 90px -30px #000, 0 0 70px -25px rgba(0, 229, 255, 0.5);
}
.crt-top,
.crt-foot {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0 0.5rem;
  color: #6f8892;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.crt-top { height: 2rem; margin-bottom: 0.5rem; }
.crt-foot { height: 1.6rem; margin-top: 0.5rem; justify-content: flex-end; gap: 1.4rem; }
.crt-led { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: led 2.4s ease-in-out infinite; }
@keyframes led { 50% { opacity: 0.55; } }
.crt-title { flex: 1; min-width: 0; color: #a9c3cc; text-transform: none; letter-spacing: 0; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crt-model { white-space: nowrap; }
.crt-close {
  position: relative;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a9c3cc;
  cursor: pointer;
  transition: background-color 150ms var(--ease-ui), color 150ms var(--ease-ui), scale 120ms var(--ease-ui);
}
.crt-close::after { content: ""; position: absolute; inset: -6px; }
.crt-close:hover { background: rgba(255, 95, 87, 0.18); color: #ff8a84; }
.crt-close:active { scale: 0.96; }
.crt-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.crt-screen {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 16px;
  background: radial-gradient(120% 120% at 50% 40%, #06202a 0%, #020a0f 70%, #010507 100%);
  box-shadow: inset 0 0 0 2px #000, inset 0 0 60px rgba(0, 0, 0, 0.9), inset 0 0 24px rgba(0, 229, 255, 0.12);
  overflow: hidden;
}
.crt-inner {
  height: 100%;
  padding: 1rem 1.2rem 0.9rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.35) transparent;
  cursor: text;
  font-family: "VT323", var(--mono);
  font-size: 1.42rem;
  line-height: 1.18;
  color: var(--ph);
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.65), 0 0 18px rgba(0, 229, 255, 0.25);
  transform-origin: 50% 50%;
}
.crt-out:empty { display: none; }
.t-line { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.18em; }
.t-grid { display: flex; flex-wrap: wrap; gap: 0 2.5ch; }
.t-echo { margin-top: 0.25em; }
.t-cols > :first-child { display: inline-block; width: var(--w, 32ch); }
.t-fetch-info { min-width: 0; }
.crt-keys { display: none; }
.t-user, .t-ok { color: #6dff8c; text-shadow: 0 0 6px rgba(61, 220, 90, 0.7); }
.t-path, .t-dir { color: #fff; }
.t-dir { font-weight: 400; text-shadow: 0 0 8px rgba(255, 255, 255, 0.55); }
.t-dim { color: #5fb9c9; text-shadow: none; }
.t-cmd, .t-key { color: #ffd76a; text-shadow: 0 0 6px rgba(255, 200, 80, 0.55); }
.t-err { color: #ff8a84; text-shadow: 0 0 6px rgba(255, 95, 87, 0.6); }
.t-h { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }
.t-hit { background: var(--ph); color: #021016; text-shadow: none; }
.t-art { color: var(--cyan); }
.t-link { color: inherit; text-decoration-color: currentColor; }
.t-link:hover { color: #fff; }
.t-swatches { display: flex; gap: 0; margin-top: 0.4em; }
.t-fetch { display: flex; gap: 2.5ch; align-items: flex-start; margin: 0.2em 0; }
.t-fetch pre { margin: 0; font-family: var(--mono); font-size: 0.62em; line-height: 1.15; text-shadow: 0 0 8px rgba(0, 229, 255, 0.7); }
.t-sw { width: 1.6em; height: 0.9em; }
.crt-form { display: flex; align-items: baseline; gap: 0; margin-top: 0.25em; }
.crt-prompt { white-space: pre; flex: none; }
.crt-form input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
  text-shadow: inherit;
  caret-color: var(--ph);
  caret-shape: block;
}
/* glass: scanlines, vignette, slow refresh band, faint flicker */
.crt-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07), transparent 22%),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.28) 2px 3px),
    radial-gradient(120% 110% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
  animation: flicker 5s steps(1) infinite;
}
.crt-fx::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 22%;
  background: linear-gradient(transparent, rgba(0, 229, 255, 0.06), transparent);
  animation: refresh 7s linear infinite;
}
@keyframes refresh { from { translate: 0 -120%; } to { translate: 0 480%; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 47% { opacity: 0.94; } 48% { opacity: 1; } 81% { opacity: 0.96; } 82% { opacity: 1; } }

@media (max-width: 820px), (pointer: coarse) {
  .crt-foot { display: none; }
  .crt-keys {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 1.5rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 1.5rem), transparent);
  }
  .crt-keys::-webkit-scrollbar { display: none; }
  .crt-keys button {
    flex: none;
    min-width: 2.75rem;
    height: 2.5rem;
    padding: 0 0.8rem;
    border: 0;
    border-radius: 9px;
    background: #0d1c25;
    color: #a9c3cc;
    font-size: 0.82rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -2px 0 rgba(0, 0, 0, 0.5);
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color 150ms var(--ease-ui), color 150ms var(--ease-ui), scale 120ms var(--ease-ui);
  }
  .crt-keys button:last-child { margin-right: 1.25rem; }
  .crt-keys button:active { scale: 0.96; background: var(--cyan-dim); color: #fff; }
}
@media (max-width: 820px) {
  .term { padding: 0.5rem; align-items: start; }
  .crt { height: min(34rem, calc(var(--vvh, 100dvh) - 1rem)); padding: 0.6rem; border-radius: 20px; }
  .crt-screen { border-radius: 12px; }
  .crt-inner { font-size: 1.25rem; padding: 0.8rem 0.9rem; }
  .crt-model { display: none; }
  .crt-form input { font-size: max(1em, 16px); }
}
@media (max-width: 560px) {
  /* listings stack instead of wrapping mid-column */
  .t-wide { display: none; }
  .t-cols > :first-child { display: block; width: auto; }
  .t-cols > :first-child + * { margin-left: 2ch; }
  .t-grid { gap: 0 2ch; }
  .t-fetch { gap: 1.5ch; }
  .t-fetch pre { font-size: 0.5em; }
}
@media (max-width: 400px) {
  .term { padding: 0.35rem; }
  .crt { padding: 0.45rem; border-radius: 16px; }
  .crt-inner { font-size: 1.12rem; padding: 0.65rem 0.7rem; }
  .t-fetch pre { display: none; }
  .t-perm { display: none; }
}
/* short screens: phones held sideways, or with the keyboard up */
@media (max-height: 460px) {
  .term { padding: 0.35rem; }
  .crt { padding: 0.4rem 0.6rem; }
  .crt-top { height: 1.6rem; margin-bottom: 0.3rem; }
  .crt-foot { display: none; }
  .crt-keys { margin-top: 0.35rem; }
  .crt-keys button { height: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .crt-fx, .crt-fx::after, .crt-led { animation: none; }
}
