* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg-base);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -30%;
  z-index: -1;
  background:
    radial-gradient(48% 42% at 18% 8%, var(--bg-wash-a), transparent 65%),
    radial-gradient(42% 46% at 88% 92%, var(--bg-wash-b), transparent 62%),
    linear-gradient(160deg, var(--bg-base), var(--bg-deep));
}

.wrap { width: min(1060px, 92vw); margin: 0 auto; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--stroke-strong);
  border-radius: var(--pill);
  border: 2px solid transparent;
  background-clip: content-box;
}

header { padding: 88px 0 8px; text-align: center; }

.mark {
  width: 88px;
  height: 88px;
  border-radius: var(--r-xl);
  box-shadow: 0 18px 48px rgba(124, 92, 255, 0.42);
}

h1 {
  font-size: clamp(40px, 7vw, 62px);
  margin: 20px 0 8px;
  letter-spacing: -1.4px;
  font-weight: 700;
}

.tagline {
  font-size: clamp(15px, 2.3vw, 19px);
  color: var(--ink-mute);
  margin: 0 auto 28px;
  max-width: 48ch;
}

.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 550;
  transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast), filter var(--fast);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  color: #fff;
  background: linear-gradient(140deg, var(--accent), #5b6cff);
  box-shadow: 0 8px 26px rgba(124, 92, 255, 0.38);
}
.btn--primary:hover { filter: brightness(1.09); }

.btn--ghost { background: var(--glass-strong); border-color: var(--stroke-soft); color: var(--ink-mute); }
.btn--ghost:hover { background: var(--glass-hover); color: var(--ink); }

.meta { font-size: 12.5px; color: var(--ink-faint); margin-top: 14px; min-height: 20px; }

.shot {
  display: block;
  width: 100%;
  margin: 48px auto 0;
  border-radius: var(--r-lg);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-lg);
}

section { padding: 76px 0; }
h2 { font-size: clamp(25px, 4vw, 33px); margin: 0 0 8px; letter-spacing: -0.6px; }
.lede { color: var(--ink-mute); margin: 0 0 34px; max-width: 66ch; }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }

.card {
  padding: 21px 23px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(22px) saturate(150%);
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}
.card:hover { background: var(--glass-strong); border-color: var(--stroke-strong); transform: translateY(-2px); }
.card h3 { margin: 0 0 7px; font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card p { margin: 0; font-size: 13.5px; color: var(--ink-mute); }

.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--pill);
  background: var(--dot, var(--accent));
  box-shadow: 0 0 10px color-mix(in srgb, var(--dot, var(--accent)) 70%, transparent);
  flex: none;
}
.dot--c { --dot: var(--cyan); }
.dot--g { --dot: var(--green); }
.dot--a { --dot: var(--amber); }

code { font-family: var(--font-mono); font-size: 0.92em; color: var(--ink); }

pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--stroke-soft);
  border-radius: var(--r-md);
  padding: 17px 19px;
  overflow-x: auto;
  font-size: 13px;
  font-family: var(--font-mono);
  color: #c8cde0;
}

.fonts {
  display: grid;
  gap: 2px;
  max-height: 470px;
  overflow-y: auto;
  padding: 7px;
  border-radius: var(--r-lg);
  border: 1px solid var(--stroke-soft);
  background: rgba(0, 0, 0, 0.24);
}

.frow {
  display: grid;
  grid-template-columns: 210px 1fr 116px 92px;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: none;
  color: inherit;
  text-align: left;
  transition: background var(--fast), border-color var(--fast);
}
button.frow { cursor: pointer; font: inherit; }
.frow:hover { background: var(--glass-strong); }
button.frow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.frow.installed { border-color: var(--stroke-soft); }
.frow.web, .frow.base { border-color: transparent; }
.frow.none { opacity: 0.3; }

.frow.is-using {
  background: var(--glass-strong);
  border-color: var(--accent);
}
.frow.is-using .ftag::after { content: ' • live'; }

.fname { font-weight: 550; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsample { font-size: 13.5px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; }
.fgroup {
  font-family: var(--font-ui);
  font-size: 10.5px;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ftag {
  font-family: var(--font-ui);
  font-size: 10px;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  color: var(--green);
}
.frow.web .ftag { color: var(--accent); }
.frow.base .ftag { color: var(--ink-mute); }
.frow.none .ftag { color: var(--ink-faint); }
.fcount { color: var(--accent); font-weight: 650; }

table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--stroke-soft); }
th {
  color: var(--ink-faint);
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}
tr:last-child td { border-bottom: 0; }

footer {
  padding: 46px 0 68px;
  border-top: 1px solid var(--stroke-soft);
  color: var(--ink-faint);
  font-size: 13px;
  text-align: center;
}
footer a { margin: 0 10px; }

@media (max-width: 640px) {
  header { padding-top: 56px; }
  .frow { grid-template-columns: 1fr; gap: 2px; }
  .ftag, .fgroup { text-align: left; }
}

.titlebar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--titlebar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--stroke-soft);
  background: rgba(10, 11, 18, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
}

.titlebar__brand { display: flex; align-items: center; gap: 9px; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), #4b7cff);
  box-shadow: 0 3px 12px rgba(124, 92, 255, 0.45);
}
.brand-mark svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-name { font-weight: 600; font-size: 14px; letter-spacing: 0.2px; }
.brand-version { color: var(--ink-faint); font-size: 11px; }

.titlebar__nav { margin-left: auto; display: flex; gap: 4px; }
.titlebar__nav a {
  padding: 6px 11px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-mute);
  transition: background var(--fast), color var(--fast);
}
.titlebar__nav a:hover { background: var(--glass-strong); color: var(--ink); text-decoration: none; }

header { padding-top: 64px; }

@media (max-width: 720px) {
  .titlebar__nav a:not(:last-child) { display: none; }
}

.demo {
  --demo-font: "Cascadia Code", "Consolas", monospace;
  --demo-size: 14px;
  --demo-term: rgba(6, 7, 12, 1);
  --demo-accent: var(--accent);
  display: grid;
  gap: 14px;
}

.demo__controls {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(22px) saturate(150%);
}

.ctl { display: grid; gap: 7px; }
.ctl__label { font-size: 11px; font-weight: 550; color: var(--ink-mute); }
.ctl__label b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }

.ctl__select {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.ctl__select:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.ctl__select option { background: #12141d; }

.ctl__range { width: 100%; accent-color: var(--demo-accent); background: transparent; }

.swatches { display: flex; gap: 7px; flex-wrap: wrap; }
.swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: var(--pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--fast), border-color var(--fast);
}
.swatch:hover { transform: scale(1.12); }
.swatch.is-on { border-color: var(--ink); }

.demo__app {
  border-radius: var(--r-lg);
  border: 1px solid var(--stroke);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, rgba(10, 11, 18, 0.86), rgba(6, 7, 12, 0.94));
}

.demo__titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 40px;
  border-bottom: 1px solid var(--stroke-soft);
  background: rgba(10, 11, 18, 0.55);
}
.brand-mark--sm { width: 21px; height: 21px; border-radius: 6px; }
.brand-mark--sm svg { width: 12px; height: 12px; }
.demo__name { font-size: 13px; font-weight: 600; }

.demo__tabs { display: flex; gap: 6px; margin-left: 10px; }
.demo__tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke-soft);
  font-size: 11.5px;
  color: var(--ink-mute);
}
.demo__tab.is-active {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--demo-accent) 55%, transparent);
  background: color-mix(in srgb, var(--demo-accent) 16%, transparent);
}

.demo__dot {
  width: 7px;
  height: 7px;
  border-radius: var(--pill);
  background: var(--demo-accent);
  flex: none;
}
.demo__dot--c { background: var(--cyan); }
.demo__dot--g { background: var(--green); }

.demo__body { display: grid; grid-template-columns: 212px 1fr; min-height: 340px; }

.demo__side {
  border-right: 1px solid var(--stroke-soft);
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.demo__search {
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke-soft);
  color: var(--ink-faint);
  font-size: 12px;
  margin-bottom: 10px;
}
.demo__group {
  padding: 10px 8px 4px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.demo__host {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: 12.5px;
}
.demo__host span { display: grid; line-height: 1.25; }
.demo__host small { font-size: 10.5px; color: var(--ink-faint); }
.demo__host.is-live {
  border-color: color-mix(in srgb, var(--demo-accent) 55%, transparent);
  background: color-mix(in srgb, var(--demo-accent) 16%, transparent);
}

.demo__term {
  margin: 10px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--demo-term);
  font-family: var(--demo-font);
  font-size: var(--demo-size);
  line-height: 1.5;
  color: #e9ecf8;
  overflow-x: auto;
  white-space: pre;
  min-height: 300px;
}

.t-prompt { color: var(--demo-accent); }
.t-path { color: var(--cyan); }
.t-ok { color: var(--green); }
.t-warn { color: var(--amber); }
.t-dim { color: var(--ink-faint); }
.t-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--demo-accent);
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 720px) {
  .demo__body { grid-template-columns: 1fr; }
  .demo__side { display: none; }
  .demo__tabs { display: none; }
}
