/* ==========================================================================
   cassette - terminal styles
   One palette, three themes. Everything is driven by custom properties.
   ========================================================================== */

:root {
  color-scheme: dark;
  --mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #060b09;
  --panel: #07100d;
  --panel-2: #0a1511;
  --chrome: #08120e;
  --ink: #c8f7d8;
  --ink-strong: #effff5;
  --muted: #82ab93;
  --faint: #4d7560;
  --accent: #5af78e;
  --accent-2: #9aedc0;
  --accent-dim: #2c8b55;
  --blue: #7dcfff;
  --amber: #ffd479;
  --red: #ff7a90;
  --line: #16352a;
  --line-soft: #0e231b;
  --code-bg: #0e1f18;
  --selection: #1f5c3d;
  --grid: rgba(90, 247, 142, 0.035);
  --scan: rgba(255, 255, 255, 0.012);
  --glow: rgba(90, 247, 142, 0.075);
  --shell-glow: rgba(90, 247, 142, 0.06);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

[data-theme="amber"] {
  color-scheme: dark;
  --bg: #0c0904;
  --panel: #100c06;
  --panel-2: #161007;
  --chrome: #120d06;
  --ink: #ffe7bd;
  --ink-strong: #fff6e6;
  --muted: #b39a72;
  --faint: #7a6647;
  --accent: #ffb347;
  --accent-2: #ffd08a;
  --accent-dim: #a86a1f;
  --blue: #8ad7ff;
  --amber: #ffd479;
  --red: #ff8674;
  --line: #3a2a14;
  --line-soft: #241a0c;
  --code-bg: #1d150a;
  --selection: #5a3c16;
  --grid: rgba(255, 179, 71, 0.035);
  --scan: rgba(255, 255, 255, 0.013);
  --glow: rgba(255, 179, 71, 0.07);
  --shell-glow: rgba(255, 179, 71, 0.055);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

[data-theme="lazulum"] {
  color-scheme: dark;
  --bg: #06121a;
  --panel: #071a24;
  --panel-2: #09222d;
  --chrome: #081822;
  --ink: #d7f3ff;
  --ink-strong: #f0fbff;
  --muted: #7fb7cc;
  --faint: #4f7f93;
  --accent: #59ccea;
  --accent-2: #8ee0ff;
  --accent-dim: #2f7fa0;
  --blue: #7dcfff;
  --amber: #ffd479;
  --red: #ff7a90;
  --line: #153a4a;
  --line-soft: #0f2b36;
  --code-bg: #0e2230;
  --selection: #1f5a72;
  --grid: rgba(89, 204, 234, 0.035);
  --scan: rgba(255, 255, 255, 0.012);
  --glow: rgba(89, 204, 234, 0.09);
  --shell-glow: rgba(89, 204, 234, 0.065);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

[data-theme="lux"] {
  color-scheme: light;
  --bg: #e8e4d6;
  --panel: #fbf8ef;
  --panel-2: #f3efe2;
  --chrome: #efebdd;
  --ink: #203329;
  --ink-strong: #0e2118;
  --muted: #5b7064;
  --faint: #8b9a90;
  --accent: #0a7a4d;
  --accent-2: #086b43;
  --accent-dim: #459a71;
  --blue: #0b5f8a;
  --amber: #8a5a00;
  --red: #a52135;
  --line: #cbd4ca;
  --line-soft: #e0e5dc;
  --code-bg: #ecefe6;
  --selection: #b9e3cc;
  --grid: rgba(10, 122, 77, 0.045);
  --scan: rgba(20, 40, 30, 0.012);
  --glow: rgba(10, 122, 77, 0.055);
  --shell-glow: rgba(10, 122, 77, 0.04);
  --shadow: 0 26px 70px rgba(30, 45, 35, 0.18);
}

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

[hidden] {
  display: none !important;
}

html {
  scrollbar-color: var(--line) transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(1100px 680px at 50% -20%, var(--glow), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 82%);
  opacity: 0.9;
}

::selection {
  background: var(--selection);
  color: var(--ink-strong);
}

a {
  color: var(--accent-2);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
  text-decoration-style: solid;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--panel);
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
  transform: translateY(-180%);
}

.skip:focus {
  transform: none;
}

.noscript {
  position: relative;
  z-index: 10;
  margin: 0;
  padding: 10px 18px;
  background: var(--amber);
  color: #171108;
  font-size: 13px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.shell {
  --pad-x: clamp(18px, 3vw, 34px);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 32px));
  height: min(900px, calc(100dvh - 32px));
  min-height: 520px;
  margin: 16px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow), 0 0 70px var(--shell-glow);
  transition: border-color 220ms ease;
}

.shell:focus-within {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 3px, var(--scan) 3px 4px);
}

.chrome {
  position: relative;
  z-index: 6;
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
  height: 46px;
  padding: 0 var(--pad-x);
  border-bottom: 1px solid var(--line);
  background: var(--chrome);
  font-size: 11.5px;
}

.chrome-controls {
  display: flex;
  flex: none;
  align-items: center;
  gap: 5px;
}

.chrome-control {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  opacity: 0.72;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.chrome-control svg {
  width: 8px;
  height: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell:focus-within .chrome-control {
  border-color: color-mix(in srgb, var(--muted) 65%, transparent);
  color: var(--ink);
  opacity: 1;
}

.shell .chrome-control:hover {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  opacity: 1;
}

.chrome-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.chrome-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
}

.chrome-btn {
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.chrome-btn:hover {
  border-color: var(--line);
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Screen
   -------------------------------------------------------------------------- */

.screen {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  padding: clamp(18px, 2.4vw, 30px) var(--pad-x) 26px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 14.5px;
  line-height: 1.62;
  scrollbar-color: var(--line) transparent;
  scrollbar-width: thin;
}

.screen:focus {
  outline: none;
}

.screen::-webkit-scrollbar {
  width: 11px;
}

.screen::-webkit-scrollbar-track {
  background: transparent;
}

.screen::-webkit-scrollbar-thumb {
  border: 3px solid var(--panel);
  border-radius: 8px;
  background: var(--line);
}

.screen::-webkit-scrollbar-thumb:hover {
  background: var(--faint);
}

.out {
  margin: 0 0 15px;
}

.out:last-child {
  margin-bottom: 0;
}

.out > :first-child {
  margin-top: 0;
}

.out > :last-child {
  margin-bottom: 0;
}

.cmd-line {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.cmd-line .cmd-text {
  color: var(--ink-strong);
}

.prompt-user,
.prompt-path,
.prompt-sigil {
  white-space: nowrap;
}

.prompt-user {
  color: var(--accent);
}

.prompt-path {
  color: var(--blue);
}

.prompt-sigil {
  margin: 0 9px 0 2px;
  color: var(--faint);
}

.line-dim,
.doc-meta,
.doc-sub {
  color: var(--muted);
}

.line-error {
  color: var(--red);
}

.line-ok {
  color: var(--accent);
}

.sep {
  color: var(--faint);
  padding: 0 0.25em;
}

.dot {
  color: var(--faint);
  padding: 0 0.2em;
}

/* --------------------------------------------------------------------------
   Boot + intro
   -------------------------------------------------------------------------- */

.boot {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.boot p {
  margin: 0;
  opacity: 0;
  animation: boot-in 380ms ease forwards;
}

.boot p:nth-child(1) {
  animation-delay: 40ms;
}

.boot p:nth-child(2) {
  animation-delay: 150ms;
}

.boot p:nth-child(3) {
  animation-delay: 260ms;
}

.boot p:nth-child(4) {
  animation-delay: 370ms;
}

.boot-ok {
  color: var(--accent);
}

@keyframes boot-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.intro {
  margin: 6px 0 4px;
}

.intro-eyebrow {
  margin: 0 0 14px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.intro-name {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(28px, 5.4vw, 52px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 0 32px color-mix(in srgb, var(--accent) 18%, transparent);
}

.intro-role {
  margin: 10px 0 0;
  color: var(--accent);
  font-size: clamp(14px, 1.8vw, 18px);
  letter-spacing: 0.01em;
}

.intro-summary {
  max-width: 68ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.intro-links {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.intro-links a {
  color: var(--accent-2);
}

.intro-hint {
  margin: 16px 0 0;
  font-size: 12.5px;
}

/* Toptal vetted badge: Option C's silhouette, driven by the active theme.
   Every dimension is a multiple of the original badge's pixel geometry, so
   changing --toptal-size scales the whole badge without distorting it. */
.toptal-slot {
  --toptal-size: clamp(84px, 10vw, 132px);
  position: absolute;
  top: calc(46px + 12px);
  right: var(--pad-x);
  z-index: 7;
  opacity: 0.92;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.toptal-slot:hover,
.toptal-slot:focus-within {
  opacity: 1;
}

.toptal-badge {
  --toptal-u: calc(var(--toptal-size, 132px) * 0.004716981132);
  --toptal-hex: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%);
  --toptal-line: color-mix(in srgb, var(--accent) 42%, var(--line));
  display: inline-block;
  width: calc(212 * var(--toptal-u));
  height: calc(212 * 1.15 * var(--toptal-u));
  padding: calc(6 * var(--toptal-u));
  clip-path: var(--toptal-hex);
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--accent) 60%, var(--line)),
    var(--line) 45%,
    color-mix(in srgb, var(--accent) 28%, var(--line))
  );
  color: var(--ink);
  font-size: calc(16 * var(--toptal-u));
  line-height: 1;
  text-decoration: none;
  pointer-events: auto;
  filter: drop-shadow(0 calc(28 * var(--toptal-u)) calc(50 * var(--toptal-u)) rgba(0, 0, 0, 0.35));
  transition:
    background 180ms ease,
    color 180ms ease,
    filter 180ms ease;
}

.toptal-badge:hover {
  color: var(--ink-strong);
  background: linear-gradient(
    155deg,
    var(--accent),
    color-mix(in srgb, var(--accent) 55%, var(--line)) 48%,
    var(--accent-dim)
  );
  filter:
    drop-shadow(0 calc(32 * var(--toptal-u)) calc(58 * var(--toptal-u)) color-mix(in srgb, var(--accent) 18%, transparent))
    drop-shadow(0 calc(12 * var(--toptal-u)) calc(26 * var(--toptal-u)) rgba(0, 0, 0, 0.22));
}

.toptal-badge:focus-visible {
  outline: none;
  filter:
    drop-shadow(0 0 2px var(--accent))
    drop-shadow(0 0 calc(12 * var(--toptal-u)) color-mix(in srgb, var(--accent) 55%, transparent));
}

.toptal-badge-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: calc(8 * var(--toptal-u));
  width: calc(200 * var(--toptal-u));
  height: 100%;
  padding: calc(24 * var(--toptal-u)) 0 calc(40 * var(--toptal-u));
  clip-path: var(--toptal-hex);
  background:
    radial-gradient(120% 90% at 18% -12%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    radial-gradient(120% 90% at 108% 112%, color-mix(in srgb, var(--blue) 9%, transparent), transparent 58%),
    color-mix(in srgb, var(--panel-2) 94%, transparent);
  text-align: center;
}

.toptal-stars {
  width: calc(64 * var(--toptal-u));
  height: auto;
  color: var(--accent);
  filter: drop-shadow(0 0 calc(12 * var(--toptal-u)) color-mix(in srgb, var(--accent) 45%, transparent));
}

.toptal-rank {
  color: var(--ink-strong);
  font-size: calc(19 * var(--toptal-u));
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1;
}

.toptal-rule {
  width: calc(120 * var(--toptal-u));
  height: max(1px, calc(1 * var(--toptal-u)));
  background: linear-gradient(90deg, transparent, var(--toptal-line), transparent);
}

.toptal-vetted {
  margin-bottom: calc(-6 * var(--toptal-u));
  color: var(--faint);
  font-size: calc(16 * var(--toptal-u));
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.toptal-wordmark {
  width: calc(100 * var(--toptal-u));
  height: auto;
  color: var(--accent-2);
  transition: color 180ms ease;
}

.toptal-badge:hover .toptal-wordmark {
  color: var(--ink-strong);
}

.toptal-cta {
  padding: calc(4 * var(--toptal-u)) calc(20 * var(--toptal-u));
  border-radius: calc(6 * var(--toptal-u));
  box-shadow: inset 0 0 0 max(1px, calc(1 * var(--toptal-u))) var(--toptal-line);
  color: var(--accent);
  font-size: calc(16 * var(--toptal-u));
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.15;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.toptal-badge:hover .toptal-cta {
  box-shadow: inset 0 0 0 max(1px, calc(1 * var(--toptal-u))) var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.chip {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--accent-2);
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    color 140ms ease,
    background 140ms ease;
}

.quick .chip::before {
  content: "$ ";
  color: var(--faint);
}

.chip:hover {
  border-color: var(--accent-dim);
  background: var(--code-bg);
  color: var(--accent);
}

.chip:active {
  transform: translateY(1px);
}

/* --------------------------------------------------------------------------
   Quick start
   -------------------------------------------------------------------------- */

.quickstart {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 32px);
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: blur(6px);
}

.quickstart[hidden] {
  display: none;
}

body.quickstart-open {
  overflow: hidden;
}

.quickstart-card {
  width: min(540px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  animation: quickstart-in 260ms ease both;
}

@keyframes quickstart-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.quickstart-eyebrow {
  margin: 0 0 10px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.quickstart-title {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.quickstart-lede {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.quickstart-section {
  margin-top: 22px;
}

.quickstart-section h3 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.quickstart-list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.quickstart-list > div {
  display: grid;
  grid-template-columns: minmax(112px, max-content) 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 5px 8px;
  border-radius: 4px;
}

.quickstart-list dt {
  margin: 0;
  color: var(--ink-strong);
  font-size: 12.5px;
  white-space: nowrap;
}

.quickstart-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.quickstart-list code {
  color: var(--amber);
}

.quickstart-shortcuts .is-key {
  background: var(--code-bg);
}

.quickstart-shortcuts .is-key dt {
  color: var(--accent);
}

.quickstart-shortcuts .is-key dd {
  color: var(--ink);
}

.quickstart-go {
  width: 100%;
  margin-top: 24px;
  padding: 11px 14px;
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.quickstart-go:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.quickstart-go:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Documents
   -------------------------------------------------------------------------- */

.doc {
  max-width: 82ch;
}

.doc h1 {
  margin: 0 0 6px;
  color: var(--ink-strong);
  font-size: clamp(20px, 3vw, 27px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.doc h2 {
  margin: 26px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.doc h2:first-child {
  margin-top: 0;
}

.doc-sub {
  margin: 0 0 12px;
  font-size: 12.5px;
}

.doc-lede {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
}

.doc-prose,
.doc-body {
  color: var(--ink);
}

.doc-prose p,
.doc-body p {
  margin: 0 0 11px;
}

.doc-meta {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

.doc code {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--code-bg);
  color: var(--amber);
  font-size: 0.92em;
}

.inline-action {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-2);
  font: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.inline-action:hover {
  color: var(--accent);
  text-decoration-style: solid;
}

.inline-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.doc ul,
.doc ol {
  margin: 10px 0;
  padding-left: 1.3em;
}

.doc li {
  margin: 4px 0;
}

.doc li::marker {
  color: var(--accent-dim);
}

.doc hr {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 20px 0;
}

.doc blockquote {
  margin: 12px 0;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--accent-dim);
  color: var(--muted);
}

.uptime-service {
  margin-top: 18px;
}

.uptime-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--line);
  border-radius: 4px;
  background: var(--code-bg);
}

.uptime-name {
  color: var(--ink-strong);
  font-weight: 700;
}

.uptime-type {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.uptime-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.uptime-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px color-mix(in srgb, currentColor 55%, transparent);
}

.uptime-state.is-health {
  color: var(--accent);
}

.uptime-state.is-warning {
  color: var(--amber);
}

.uptime-state.is-error {
  color: var(--red);
}

.uptime-state.is-none {
  color: var(--faint);
}

.uptime-pct {
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.uptime-beats {
  display: flex;
  gap: 3px;
  margin-top: 10px;
}

.uptime-beat {
  flex: 1 1 0;
  min-width: 2px;
  height: 20px;
  border-radius: 2px;
  background: var(--line);
  opacity: 0.55;
}

.uptime-beat.is-health {
  background: var(--accent);
  opacity: 0.9;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 30%, transparent);
}

.uptime-beat.is-warning {
  background: var(--amber);
  opacity: 0.9;
}

.uptime-beat.is-error {
  background: var(--red);
  opacity: 0.9;
}

.uptime-beat.is-none {
  background: var(--faint);
  opacity: 0.45;
}

.uptime-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.uptime-stats strong {
  color: var(--ink);
  font-weight: 600;
}

.uptime-trend {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
  overflow-x: auto;
  color: var(--muted);
  font-size: 12px;
}

.uptime-trend-label {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.uptime-spark {
  color: var(--accent-2);
  letter-spacing: 1px;
  white-space: nowrap;
}

.uptime-spark .is-error {
  color: var(--red);
}

.text {
  max-width: 100%;
  margin: 12px 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.terminal-snapshot {
  white-space: pre;
  font-size: 12px;
  line-height: 1.55;
}

.usage {
  margin: 12px 0 16px;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre;
}

.file-label {
  margin: 0 0 6px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */

.bar {
  display: inline-block;
  color: var(--accent);
  font-size: 0.95em;
  letter-spacing: -0.08em;
  white-space: nowrap;
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent);
}

.bar-empty {
  color: var(--faint);
  opacity: 0.55;
}

.bar-num {
  margin-left: 9px;
  color: var(--muted);
  font-size: 0.82em;
  letter-spacing: 0;
}

.skills-list {
  margin: 16px 0 4px;
}

.cat {
  padding: 10px 0 11px;
  border-bottom: 1px solid var(--line-soft);
}

.cat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.cat-name a {
  color: var(--ink-strong);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}

.cat-name a:hover {
  border-bottom-color: var(--accent-dim);
  color: var(--accent);
}

.cat-level {
  flex: none;
  white-space: nowrap;
}

.cat-level .bar {
  font-size: 0.85em;
  letter-spacing: -0.12em;
}

.cat-tools {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.cat-tools a {
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}

.cat-tools a:hover {
  border-bottom-color: var(--accent-dim);
}

.tool-list {
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.tool-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 7px 0;
  border-bottom: 1px dotted var(--line-soft);
}

.tool-list li:last-child {
  border-bottom: 0;
}

.tool-list a,
.tool-list button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-2);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.tool-list a:hover,
.tool-list button:hover {
  color: var(--accent);
  text-decoration: underline;
}

.tool-list button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tool-cat {
  color: var(--muted);
  font-size: 11.5px;
  text-align: right;
  overflow-wrap: anywhere;
}

.help-cats {
  margin: 8px 0 0;
}

.help-cat {
  display: grid;
  grid-template-columns: minmax(15ch, 22ch) 1fr;
  gap: 2px 16px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  line-height: 1.7;
}

.help-cat-name a {
  color: var(--ink-strong);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}

.help-cat-name a:hover {
  border-bottom-color: var(--accent-dim);
}

.help-cat-tools {
  color: var(--muted);
}

.help-cat-tools a {
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}

.help-cat-tools a:hover {
  border-bottom-color: var(--accent-dim);
}

.match-list {
  margin: 8px 0 0;
  line-height: 1.9;
}

.help-grid {
  display: grid;
  grid-template-columns: minmax(9ch, 15ch) 1fr;
  gap: 4px 20px;
  margin: 0 0 4px;
  font-size: 13px;
}

.help-row {
  display: contents;
}

.help-name a {
  color: var(--accent-2);
  font-weight: 600;
  text-decoration: none;
}

.help-name a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.help-desc {
  color: var(--muted);
}

.help-desc code {
  font-size: 0.9em;
}

/* --------------------------------------------------------------------------
   Listings
   -------------------------------------------------------------------------- */

.ls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1px 18px;
  margin: 2px 0 0;
}

.ls-item {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ls-item a,
.ls-name a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}

.ls-item a:hover,
.ls-name a:hover {
  border-bottom-color: currentColor;
}

.ls-item.dir,
.ls-name.dir {
  color: var(--blue);
  font-weight: 600;
}

.ls-item.doc,
.ls-name.doc {
  color: var(--ink);
}

.ls-item.file,
.ls-name.file {
  color: var(--amber);
}

.ls-long {
  margin-top: 2px;
  overflow-x: auto;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.7;
}

.ls-row {
  display: grid;
  grid-template-columns: 10ch 5ch 13ch minmax(190px, 1fr);
  gap: 0 14px;
  min-width: 520px;
}

.ls-perm {
  color: var(--faint);
}

.ls-size {
  color: var(--muted);
  text-align: right;
}

.ls-date {
  color: var(--muted);
}

.tree {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.9;
}

.tree a {
  text-decoration: none;
}

.tree a:hover {
  text-decoration: underline;
}

.branch {
  color: var(--faint);
  padding-right: 6px;
}

.completions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 8px 10px;
  border-left: 2px solid var(--line);
  color: var(--accent-2);
  font-size: 12.5px;
}

.history {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   neofetch + friends
   -------------------------------------------------------------------------- */

.fetch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 30px;
  align-items: start;
  max-width: 660px;
}

.ascii {
  margin: 0;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  line-height: 1.08;
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 30%, transparent);
}

.coffee {
  font-size: 13px;
  line-height: 1.15;
}

.fetch-info {
  font-size: 13px;
  line-height: 1.65;
}

.fetch-info p {
  margin: 0;
}

.fetch-user {
  color: var(--accent);
  font-weight: 700;
}

.fetch-host {
  color: var(--accent-2);
}

.fetch-key {
  display: inline-block;
  min-width: 10ch;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Prompt + status
   -------------------------------------------------------------------------- */

.prompt {
  position: relative;
  z-index: 6;
  display: flex;
  flex: none;
  align-items: center;
  padding: 11px var(--pad-x) calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, transparent, var(--panel-2) 55%);
  font-size: 14.5px;
  line-height: 1.5;
}

.prompt input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 2px 0 2px 9px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-strong);
  font: inherit;
  caret-color: var(--accent);
  -webkit-appearance: none;
  appearance: none;
}

.prompt input::placeholder {
  color: transparent;
}

.statusbar {
  position: relative;
  z-index: 6;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  padding: 0 var(--pad-x);
  border-top: 1px solid var(--line-soft);
  background: var(--chrome);
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.status-group {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.status-hints {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

kbd {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--code-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9em;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 1px 0 var(--line-soft);
}

/* --------------------------------------------------------------------------
   Plain view
   -------------------------------------------------------------------------- */

.plain {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px clamp(12px, 3vw, 28px) 72px;
}

.plain-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 2px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 12px;
}

.plain-back {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.plain-back:hover {
  text-decoration: underline;
}

.plain-label {
  color: var(--faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 10px;
}

.plain-actions {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.plain-actions a,
.plain-actions button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.plain-actions a:hover,
.plain-actions button:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Matrix overlay
   -------------------------------------------------------------------------- */

#fx {
  position: fixed;
  inset: 0;
  z-index: 120;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 420ms ease;
}

#fx.on {
  opacity: 0.62;
}

[data-theme="lux"] #fx.on {
  opacity: 0.3;
  mix-blend-mode: multiply;
}

/* --------------------------------------------------------------------------
   ￼404
   -------------------------------------------------------------------------- */

.not-found {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
}

.nf-box {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  font-size: 13px;
}

.nf-code {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: clamp(64px, 12vw, 118px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-shadow: 0 0 44px color-mix(in srgb, var(--accent) 25%, transparent);
}

.nf-box p {
  margin: 8px 0;
}

.nf-hint {
  color: var(--muted);
}

.nf-hint a {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .chrome {
    height: 44px;
    gap: 10px;
  }

  .chrome-title {
    font-size: 11px;
  }

  .chrome-actions {
    gap: 0;
  }

  .status-hints {
    display: none;
  }

  .screen {
    font-size: 13.5px;
  }

  .prompt {
    font-size: 16px;
  }

  .intro-name {
    font-size: clamp(27px, 9vw, 40px);
  }

  .intro-summary {
    font-size: 13.5px;
  }

  .fetch {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .fetch .ascii {
    font-size: 11px;
  }

  .help-cat {
    grid-template-columns: 1fr;
    gap: 1px;
    padding: 9px 0;
  }

  .help-grid {
    grid-template-columns: minmax(8ch, 12ch) 1fr;
    gap: 4px 14px;
    font-size: 12.5px;
  }

  .cat-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .ls-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 3px 14px;
  }

  .tool-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  .tool-cat {
    text-align: left;
  }

  .plain {
    padding: 0 0 48px;
  }

  .plain-bar {
    padding: 10px 14px;
    margin-bottom: 10px;
  }

  .plain-actions {
    font-size: 11px;
  }

  .nf-box {
    font-size: 12px;
  }
}

@media (max-width: 460px) {
  .chrome-controls {
    display: none;
  }

  .chrome-title {
    text-align: left;
  }

  .chrome-btn {
    padding: 4px;
  }

  .plain-label {
    display: none;
  }

  .quickstart-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .boot p {
    opacity: 1;
    transform: none;
  }
}

/* No-JavaScript fallback: show the plain CV that is already in the page. */
html:not(.js) #terminal,
html:not(.js) .skip,
html:not(.js) .noscript {
  display: none !important;
}

html:not(.js) #plain-view {
  display: block !important;
}

html:not(.js) .plain-bar {
  display: none;
}

html:not(.js) .plain {
  padding-top: 24px;
}
