/* ============================================================
   disktree-tui — project site
   ============================================================ */

:root {
  --bg: #060b0c;
  --bg-soft: #081112;
  --surface: #0b1516;
  --surface-2: #0e1c1d;
  --surface-3: #112224;
  --line: rgba(133, 187, 177, 0.14);
  --line-strong: rgba(133, 187, 177, 0.26);
  --text: #e9f5f1;
  --text-soft: #c4d8d3;
  --muted: #8ba39e;
  --muted-dim: #78908b;
  --green: #2ee6a6;
  --green-bright: #6ef0c0;
  --amber: #f5b84a;
  --coral: #f2545b;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --shell: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(46, 230, 166, 0.26);
  color: #fff;
}

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

img {
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
}

code,
kbd,
pre {
  font-family: var(--mono);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.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-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--green);
  color: #04100c;
  font-weight: 600;
  border-radius: 8px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Backdrop ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(22, 62, 56, 0.45), transparent 65%),
    var(--bg);
}

.backdrop-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 180, 168, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 168, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
}

.backdrop-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.backdrop-glow-a {
  width: 620px;
  height: 620px;
  top: -320px;
  left: 8%;
  background: rgba(46, 230, 166, 0.16);
}

.backdrop-glow-b {
  width: 520px;
  height: 520px;
  top: -260px;
  right: 4%;
  background: rgba(242, 84, 91, 0.1);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 11, 12, 0.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.25s, background 0.25s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(6, 11, 12, 0.88);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
}

.brand-name {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted-dim);
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(133, 187, 177, 0.07);
}

.site-nav a.is-active {
  color: var(--green);
}

.site-nav .nav-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 10px;
  padding: 7px 14px;
  color: var(--text-soft);
  border: 1px solid var(--line-strong);
  background: rgba(133, 187, 177, 0.04);
}

.site-nav .nav-github svg {
  width: 16px;
  height: 16px;
}

.site-nav .nav-github:hover {
  color: var(--text);
  border-color: rgba(46, 230, 166, 0.4);
  background: rgba(46, 230, 166, 0.08);
}

.nav-toggle {
  position: relative;
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}

.nav-toggle span:not(.sr-only) {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 1.5px;
  margin: -0.75px 0 0 -8.5px;
  background: var(--text-soft);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle span:nth-child(2) {
  transform: translateY(-4px);
}

.nav-toggle span:nth-child(3) {
  transform: translateY(4px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 84px;
  text-align: center;
}

.hero-copy {
  max-width: 900px;
  margin-inline: auto;
  animation: rise 0.7s var(--ease) both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 24px;
  padding: 6px 13px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid rgba(46, 230, 166, 0.25);
  border-radius: 100px;
  background: rgba(46, 230, 166, 0.055);
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(46, 230, 166, 0.6);
  animation: pulse 2.4s infinite;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.9rem, 7.2vw, 5.6rem);
  line-height: 0.99;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.grad {
  background: linear-gradient(100deg, #8af4cd 0%, #2ee6a6 45%, #f5b84a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 660px;
  margin: 26px auto 0;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.65;
  color: var(--text-soft);
}

.lede strong {
  color: var(--text);
  font-weight: 600;
}

.lede code {
  font-size: 0.9em;
  color: var(--green-bright);
  background: rgba(46, 230, 166, 0.09);
  padding: 1px 6px;
  border-radius: 5px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.96rem;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: #04130e;
  box-shadow: 0 8px 30px rgba(46, 230, 166, 0.18);
}

.btn-primary:hover {
  background: var(--green-bright);
  box-shadow: 0 10px 36px rgba(46, 230, 166, 0.26);
}

.btn-ghost {
  background: rgba(133, 187, 177, 0.045);
  border-color: var(--line-strong);
  color: var(--text-soft);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(46, 230, 166, 0.36);
  background: rgba(46, 230, 166, 0.07);
}

.btn-wide {
  width: 100%;
}

.hero-note {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted-dim);
}

.hero-note .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-dim);
}

.hero-visual {
  position: relative;
  max-width: 1080px;
  margin: 58px auto 0;
  animation: rise 0.9s 0.12s var(--ease) both;
}

.visual-glow {
  position: absolute;
  inset: 8% 6% -6%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(46, 230, 166, 0.22), transparent 68%);
  filter: blur(60px);
  opacity: 0.75;
}

.terminal {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  background: #050a0b;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 40px 90px -30px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(0, 0, 0, 0.3);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 14px;
  background: linear-gradient(#0e1a1b, #0a1314);
  border-bottom: 1px solid var(--line);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #23322f;
}

.terminal-dots i:nth-child(1) {
  background: #f2545b;
  opacity: 0.75;
}

.terminal-dots i:nth-child(2) {
  background: #f5b84a;
  opacity: 0.75;
}

.terminal-dots i:nth-child(3) {
  background: #2ee6a6;
  opacity: 0.75;
}

.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted-dim);
  letter-spacing: 0.03em;
}

.terminal-tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--green);
  background: rgba(46, 230, 166, 0.08);
  border: 1px solid rgba(46, 230, 166, 0.18);
  padding: 1px 7px;
  border-radius: 100px;
}

.terminal-screen {
  position: relative;
  background: #071010;
  border-bottom: 1px solid var(--line);
}

.terminal-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.terminal-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.16));
}

.terminal-bar-bottom {
  height: 36px;
  background: #081112;
  border-bottom: 0;
  font-family: var(--mono);
  font-size: 0.69rem;
  color: var(--muted-dim);
  gap: 9px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(46, 230, 166, 0.8);
  flex: none;
}

.terminal-hint {
  margin-left: auto;
  color: var(--muted-dim);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1080px;
  margin: 46px auto 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 24px 20px;
  text-align: left;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
}

.stat dt {
  font-family: var(--mono);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 600;
  color: var(--green);
  letter-spacing: -0.03em;
}

.stat dd {
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- Sections ---------- */

.section {
  padding-top: 120px;
}

.section-head {
  max-width: 740px;
  margin-bottom: 46px;
}

.kicker {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.section-head h2,
.keys-intro h2,
.safety-copy h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.section-lede {
  margin: 18px 0 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--green);
  border-bottom: 1px solid rgba(46, 230, 166, 0.25);
  padding-bottom: 2px;
  transition: gap 0.2s, border-color 0.2s;
}

.text-link:hover {
  gap: 10px;
  border-color: var(--green);
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(133, 187, 177, 0.045), transparent 55%),
    var(--surface);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease), background 0.3s;
}

.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px 160px at 20% 0%, rgba(46, 230, 166, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 230, 166, 0.28);
}

.feature:hover::after {
  opacity: 1;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tone-green {
  color: var(--green);
  background: rgba(46, 230, 166, 0.07);
  border-color: rgba(46, 230, 166, 0.22);
}

.tone-amber {
  color: var(--amber);
  background: rgba(245, 184, 74, 0.07);
  border-color: rgba(245, 184, 74, 0.22);
}

.tone-coral {
  color: #ff7b81;
  background: rgba(242, 84, 91, 0.07);
  border-color: rgba(242, 84, 91, 0.24);
}

.feature h3 {
  margin: 0 0 9px;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.62;
  color: var(--muted);
}

.feature code,
.safety code,
.code-note code {
  font-size: 0.86em;
  color: var(--green-bright);
  background: rgba(46, 230, 166, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------- Workflow ---------- */

.workflow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.workflow::before {
  content: "";
  position: absolute;
  top: 27px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
}

.step {
  position: relative;
  padding: 0 16px;
}

.step-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--green);
  position: relative;
  z-index: 1;
}

.step-key {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted-dim);
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(133, 187, 177, 0.035);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 600;
}

.step p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Keys ---------- */

.keys-panel {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 48px;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(700px 300px at 0% 0%, rgba(46, 230, 166, 0.07), transparent 60%),
    linear-gradient(180deg, rgba(133, 187, 177, 0.03), transparent 40%),
    var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.keys-intro {
  align-self: center;
}

.keys-intro p:not(.kicker) {
  margin: 18px 0 0;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--muted);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.tab:hover {
  color: var(--text);
  background: rgba(133, 187, 177, 0.07);
}

.tab.is-active {
  color: #04130e;
  background: var(--green);
}

.tab-panel {
  padding-top: 6px;
}

.keylist {
  margin: 0;
}

.keylist > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 2px;
  border-bottom: 1px dashed rgba(133, 187, 177, 0.1);
}

.keylist > div:last-child {
  border-bottom: 0;
}

.keylist dt {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-soft);
  flex: none;
}

.keylist dd {
  margin: 0;
  text-align: right;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.45;
}

kbd {
  display: inline-block;
  min-width: 22px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  color: var(--text-soft);
  background: linear-gradient(#152527, #101d1e);
  border: 1px solid rgba(133, 187, 177, 0.22);
  border-bottom-color: rgba(133, 187, 177, 0.3);
  border-radius: 5px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 1px 1px rgba(0, 0, 0, 0.35);
}

.or {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Safety ---------- */

.safety {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
  padding-top: 24px;
}

.safety-copy .section-lede {
  max-width: 440px;
}

.safety-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.safety-list li {
  display: flex;
  gap: 14px;
  padding: 17px 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  transition: background 0.2s, border-color 0.2s;
}

.safety-list li:hover {
  background: rgba(133, 187, 177, 0.035);
  border-color: var(--line);
}

.safety-list strong {
  color: var(--text-soft);
  font-weight: 600;
}

.check {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(46, 230, 166, 0.1);
  border: 1px solid rgba(46, 230, 166, 0.3);
  color: var(--green);
  font-size: 0.68rem;
}

/* ---------- Install ---------- */

.install-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 20px;
  align-items: start;
}

.install-main {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
}

.code-tabs {
  display: flex;
  gap: 2px;
  padding: 10px 10px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(133, 187, 177, 0.02);
}

.code-tab {
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.code-tab:hover {
  color: var(--text);
}

.code-tab.is-active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.code-panel {
  padding: 22px;
}

.code-block,
.run-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #050a0b;
  overflow: hidden;
}

.run-card {
  margin-top: 18px;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
  background: rgba(133, 187, 177, 0.03);
}

.copy {
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.copy:hover {
  color: var(--green);
  border-color: rgba(46, 230, 166, 0.4);
  background: rgba(46, 230, 166, 0.06);
}

.copy.is-copied {
  color: #04130e;
  background: var(--green);
  border-color: var(--green);
}

.code-block pre,
.run-card pre {
  margin: 0;
  padding: 17px 16px;
  overflow-x: auto;
  font-size: 0.79rem;
  line-height: 1.75;
  color: #cfe6df;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
}

.c-prompt {
  color: var(--green);
  user-select: none;
}

.code-note {
  margin: 16px 2px 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.run-card .code-note {
  margin: 0;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.install-side {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(133, 187, 177, 0.04), transparent 50%),
    var(--surface);
}

.install-side h3 {
  margin: 0 0 16px;
  font-size: 0.95rem;
  font-weight: 600;
}

.plain-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.plain-list li {
  display: flex;
  gap: 10px;
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--muted);
}

.plain-list li span {
  color: var(--green);
  font-size: 0.7rem;
  line-height: 1.7;
}

.plain-list code {
  font-size: 0.85em;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

/* ---------- Docs ---------- */

.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.doc-card {
  position: relative;
  padding: 26px 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}

.doc-card:hover {
  border-color: rgba(46, 230, 166, 0.3);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.doc-tag {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.doc-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 600;
}

.doc-card p {
  margin: 0;
  max-width: 92%;
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--muted);
}

.doc-arrow {
  position: absolute;
  top: 25px;
  right: 26px;
  font-size: 1.05rem;
  color: var(--muted-dim);
  transition: color 0.2s, transform 0.25s var(--ease);
}

.doc-card:hover .doc-arrow {
  color: var(--green);
  transform: translate(3px, -3px);
}

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

.notfound {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  max-width: 720px;
  padding-top: 60px;
  padding-bottom: 60px;
}

.notfound .kicker {
  margin-top: 64px;
}

.notfound h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.notfound .lede {
  margin-left: 0;
  margin-right: 0;
  max-width: 480px;
}

.notfound-code {
  margin: 26px 0 30px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #050a0b;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.notfound .btn {
  align-self: flex-start;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 130px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(46, 230, 166, 0.025));
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding-top: 44px;
  padding-bottom: 36px;
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-brand .brand-mark {
  flex: none;
}

.footer-name {
  margin: 2px 0 4px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-note {
  margin: 0;
  max-width: 430px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.footer-note a {
  color: var(--text-soft);
  border-bottom: 1px solid var(--line-strong);
}

.footer-note a:hover {
  color: var(--green);
  border-color: var(--green);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 5px;
}

.footer-links a {
  font-size: 0.83rem;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--green);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 28px;
  border-top: 1px solid rgba(133, 187, 177, 0.07);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted-dim);
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0.08em;
}

.footer-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(46, 230, 166, 0.8);
}

/* ---------- Motion ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 230, 166, 0.5);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(46, 230, 166, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 230, 166, 0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.feature.reveal:nth-child(2),
.doc-card.reveal:nth-child(2) {
  transition-delay: 0.06s;
}

.feature.reveal:nth-child(3),
.doc-card.reveal:nth-child(3) {
  transition-delay: 0.12s;
}

.feature.reveal:nth-child(4),
.doc-card.reveal:nth-child(4) {
  transition-delay: 0.18s;
}

.feature.reveal:nth-child(5) {
  transition-delay: 0.24s;
}

.feature.reveal:nth-child(6) {
  transition-delay: 0.3s;
}

.step.reveal:nth-child(2) {
  transition-delay: 0.05s;
}
.step.reveal:nth-child(3) {
  transition-delay: 0.1s;
}
.step.reveal:nth-child(4) {
  transition-delay: 0.15s;
}
.step.reveal:nth-child(5) {
  transition-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

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

@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .workflow {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 38px;
  }

  .workflow::before {
    display: none;
  }

  .keys-panel {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .safety {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .install-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .brand-sub {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 18px;
    background: #070d0e;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s, transform 0.22s var(--ease), visibility 0.22s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav a {
    padding: 11px 12px;
    font-size: 0.95rem;
  }

  .site-nav .nav-github {
    margin: 6px 0 0;
    justify-content: center;
  }

  .hero {
    padding-top: 62px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(3) {
    border-left: 0;
  }

  .stat:nth-child(1),
  .stat:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .section {
    padding-top: 92px;
  }
}

@media (max-width: 720px) {
  .shell {
    padding-inline: 18px;
  }

  .hero h1 {
    letter-spacing: -0.035em;
  }

  .lede {
    font-size: 1rem;
  }

  .hero-visual {
    margin-top: 42px;
  }

  .terminal-title,
  .terminal-hint {
    display: none;
  }

  .terminal-bar-bottom {
    justify-content: center;
  }

  .stats {
    margin-top: 34px;
  }

  .stat {
    padding: 18px 16px;
  }

  .feature-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .workflow {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .step {
    display: grid;
    grid-template-columns: 58px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 14px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
  }

  .step:last-child {
    border-bottom: 1px solid var(--line);
  }

  .step-top {
    display: contents;
    margin: 0;
  }

  .step-no {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: start;
    width: 42px;
    height: 42px;
  }

  .step-key {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    font-size: 0.62rem;
    white-space: normal;
    line-height: 1.5;
  }

  .step h3 {
    grid-column: 2;
    grid-row: 2;
    margin: 8px 0 6px;
  }

  .step p {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
  }

  .keys-panel {
    padding: 26px 20px;
    border-radius: 18px;
  }

  .keylist > div {
    flex-direction: column;
    gap: 7px;
  }

  .keylist dd {
    text-align: left;
  }

  .install-side {
    padding: 22px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 26px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .eyebrow {
    font-size: 0.63rem;
    letter-spacing: 0.1em;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-note {
    gap: 7px;
    font-size: 0.66rem;
  }

  .terminal-dots {
    display: none;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stat {
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .tabs {
    gap: 2px;
  }

  .tab {
    padding: 7px 9px;
    font-size: 0.76rem;
  }

  .code-panel {
    padding: 16px;
  }

  .code-block pre,
  .run-card pre {
    font-size: 0.71rem;
  }
}
