:root {
  --bg: #070b10;
  --ink: #eef3f8;
  --muted: #a9b6c6;
  --soft: #8b9aab;
  --card: #101820;
  --card-strong: #16202c;
  --line: rgba(232, 241, 248, 0.12);
  --line-strong: rgba(232, 241, 248, 0.2);
  --accent: #2ec8d6;
  --accent-deep: #149aab;
  --amber: #e4b23a;
  --blue: #7aa2ff;
  --green: #3dd68c;
  --green-bg: rgba(61, 214, 140, 0.14);
  --warn: #e4b23a;
  --warn-bg: rgba(228, 178, 58, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --header-h: 68px;
  --display: "Space Grotesk", "IBM Plex Sans", "PingFang SC", sans-serif;
  --sans: "IBM Plex Sans", "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  /* Stop iOS from inflating the text in landscape and from widening the page
     when a single element is a pixel too wide. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  background-color: var(--bg);
  background-image:
    radial-gradient(820px 460px at 92% -8%, rgba(46, 200, 214, 0.16), transparent 58%),
    radial-gradient(640px 380px at -8% 0%, rgba(228, 178, 58, 0.1), transparent 52%);
  background-attachment: fixed;
}

body {
  margin: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

body::before {
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 241, 248, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 241, 248, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 78% 58% at 76% 10%, #000 0%, transparent 72%);
}

body::after {
  width: 460px;
  height: 460px;
  top: -140px;
  right: -80px;
  background: radial-gradient(circle, rgba(46, 200, 214, 0.22), transparent 68%);
  filter: blur(6px);
  animation: drift 22s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-32px, 26px, 0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

img { max-width: 100%; display: block; }

a { color: #8eefe6; text-underline-offset: 3px; }

a:hover { color: #d7fffb; }

::selection {
  background: rgba(46, 200, 214, 0.28);
  color: white;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-200%);
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 20;
}

.skip:focus { transform: translateY(0); }

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px) saturate(1.3);
  background: rgba(7, 11, 16, 0.72);
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  border-bottom-color: transparent;
  box-shadow: inset 0 -1px 0 transparent;
}

.site-header.is-stuck::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46, 200, 214, 0.55), rgba(228, 178, 58, 0.4), transparent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 18px rgba(46, 200, 214, 0.28);
}

.nav-links {
  display: flex;
  gap: 20px;
  margin-left: 8px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); }

.nav-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Small-screen menu button. Hidden until the inline links no longer fit. */
.nav-toggle {
  display: none;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, border-color 160ms ease;
}

.nav-toggle:hover { background: rgba(255, 255, 255, 0.07); }

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background 160ms ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Dropdown panel under the sticky header. */
.nav-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(7, 11, 16, 0.97);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.nav-menu.is-open { display: block; }

.nav-menu nav {
  display: flex;
  flex-direction: column;
  padding: 6px 0 12px;
}

.nav-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 2px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  border-bottom: 1px solid rgba(232, 241, 248, 0.06);
}

.nav-menu a:last-child { border-bottom: 0; }

.nav-menu a:hover,
.nav-menu a:focus-visible { color: var(--ink); }

.nav-menu a[aria-current="page"] { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.btn-primary {
  background: linear-gradient(180deg, #5ee7ef, var(--accent) 42%, var(--accent-deep));
  color: #041316;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 24px rgba(46, 200, 214, 0.22);
}

.btn-primary:hover {
  color: #041316;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 28px rgba(46, 200, 214, 0.38);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  border-color: rgba(46, 200, 214, 0.4);
}

.btn-small { min-height: 34px; padding: 0 12px; font-size: 13.5px; }

.hero {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 56px;
  align-items: center;
  padding: 72px 0 36px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 200, 214, 0.16);
  animation: pulse 2.6s ease-in-out infinite;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.04em;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 5vw, 68px);
  line-height: 0.98;
}

h1 em {
  font-style: normal;
  color: #7eefe8;
  background: linear-gradient(105deg, #d8fffb 0%, #2ec8d6 48%, #e4b23a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  margin: 18px 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 17.5px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.trust li {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12.5px;
}

.stage {
  position: relative;
  padding: 18px 16px 14px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(165deg, rgba(22, 30, 40, 0.95), rgba(8, 12, 16, 0.95));
  box-shadow:
    0 0 0 1px rgba(46, 200, 214, 0.06),
    0 30px 70px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(46, 200, 214, 0.06);
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(8px);
}

.stage::before {
  width: 200px;
  height: 200px;
  right: 0;
  top: -50px;
  background: radial-gradient(circle, rgba(228, 178, 58, 0.38), transparent 68%);
}

.stage::after {
  width: 220px;
  height: 220px;
  left: 0;
  bottom: 8px;
  background: radial-gradient(circle, rgba(46, 200, 214, 0.32), transparent 68%);
}

.app {
  --ink: #142033;
  --muted: #4d5e74;
  --soft: #6d7e94;
  --line: rgba(20, 32, 51, 0.1);
  --blue: #2563eb;
  --green: #15803d;
  --green-bg: rgba(22, 163, 74, 0.12);
  --warn: #c2410c;
  --warn-bg: #fff6eb;
  position: relative;
  z-index: 1;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f6f9fc);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  padding: 16px 16px 18px;
}

.app-bar, .app-status, .workspace-line, .score-row, .attention-head, .download-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.app-brand img { width: 22px; height: 22px; border-radius: 6px; }

.pill {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.app .pill { background: #f3f6fb; border-color: transparent; }

.pill-blue {
  background: var(--blue);
  color: white;
  border-color: transparent;
}

.app-status {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-bg);
  display: inline-block;
  margin-right: 6px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  background: #f3f6fb;
  border-radius: 12px;
  font-size: 13px;
  color: var(--soft);
  text-align: center;
}

.tabs span { padding: 7px 4px; border-radius: 9px; }

.tabs .on {
  background: white;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(20, 32, 51, 0.06);
}

.workspace-line {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef5ff;
  color: #2451b8;
  font-size: 12px;
}

.app-body {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 12px;
  margin-top: 12px;
}

.score-row { align-items: flex-start; justify-content: flex-start; }

.ring {
  width: 78px;
  height: 78px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(#16a34a 0 331deg, #e6edf5 331deg 360deg);
  display: grid;
  place-items: center;
  margin-right: 12px;
}

.ring span {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  color: #142033;
}

.score-copy h3, .attention-head h3 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 15px;
}

.score-copy p, .note p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.checks span {
  font-size: 11px;
  color: var(--green);
  background: var(--green-bg);
  border-radius: 999px;
  padding: 3px 7px;
}

.agent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.agent-grid li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  min-height: 58px;
}

.agent-grid strong { display: block; font-size: 13px; }

.agent-grid span { color: var(--soft); font-size: 12px; }

.attention {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(#fff, #fbfcfe);
}

.count {
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}

.note {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  background: var(--warn-bg);
}

.note strong { display: block; font-size: 13px; }

.note p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.caption {
  position: relative;
  z-index: 1;
  margin: 12px 6px 2px;
  color: rgba(232, 240, 248, 0.62);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.band {
  margin-top: 36px;
  background: #0b1219;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section { padding: 88px 0; }

h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.05;
}

.section-lead {
  max-width: 40rem;
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 17px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 36px;
  padding: 0;
  list-style: none;
}

.steps li,
.panel,
.runtime-row li,
.skill-card,
.skill-tease a,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: none;
}

.steps li {
  position: relative;
  border-radius: 16px;
  padding: 22px 20px 24px;
  min-height: 210px;
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.steps li:hover,
.panel:hover,
.runtime-row li:hover,
.skill-card:hover,
.skill-tease a:hover {
  border-color: rgba(46, 200, 214, 0.4);
  background: var(--card-strong);
}

.steps li::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46, 200, 214, 0.8), transparent);
}

.steps li:nth-child(3)::before {
  background: linear-gradient(90deg, transparent, rgba(228, 178, 58, 0.85), transparent);
}

.step-no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.steps li:nth-child(3) .step-no { color: var(--amber); }

.steps h3 {
  margin: 12px 0 0;
  font-size: 26px;
}

.steps p { margin: 8px 0 0; color: var(--muted); }

.runtime-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 32px;
  padding: 0;
  list-style: none;
}

.runtime-row li {
  border-radius: 16px;
  padding: 18px 14px 16px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.runtime-row li:hover { transform: translateY(-3px); }

.mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #f4f7fb;
  color: #142033;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.mark img { width: 22px; height: 22px; }

.runtime-row strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.runtime-row span {
  display: block;
  margin-top: 4px;
  color: var(--soft);
  font-size: 13px;
}

.split {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 40px;
  align-items: start;
}

.safety-board {
  margin: 8px 0 12px;
  padding: 36px 32px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(46, 200, 214, 0.12), transparent 60%),
    radial-gradient(320px 160px at 100% 100%, rgba(228, 178, 58, 0.08), transparent 55%),
    #0c141c;
}

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

.safety li {
  background: #101820;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 12px;
  padding: 14px 16px;
}

.safety strong { display: block; letter-spacing: -0.02em; }

.safety span { color: var(--muted); font-size: 15px; }

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.panel {
  border-radius: 16px;
  padding: 18px 18px 16px;
  transition: border-color 160ms ease, background 160ms ease;
}

.panel h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 17px;
}

.panel p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }

.download-panel {
  margin-top: 32px;
  background: #0c141c;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 8px 16px;
}

.download-top { padding: 16px 14px 4px; }

.download-top strong {
  font-family: var(--display);
  letter-spacing: -0.03em;
  font-size: 16px;
}

.release-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 0 8px;
}

.card {
  position: relative;
  border-radius: 16px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 240px;
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease;
}

.card:hover { border-color: var(--line-strong); }

.card h3::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 99px;
  background: var(--soft);
  box-shadow: 0 0 8px currentColor;
  vertical-align: 1px;
}

.card[data-slot="macos-arm64"] h3::before { background: var(--accent); color: var(--accent); }
.card[data-slot="windows-x64"] h3::before { background: var(--blue); color: var(--blue); }
.card[data-slot="linux-appimage"] h3::before { background: var(--amber); color: var(--amber); }

.yours {
  display: none;
  align-self: flex-start;
  color: #041316;
  background: var(--accent);
  border-radius: 999px;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.card.is-yours {
  border-color: rgba(46, 200, 214, 0.5);
  background: linear-gradient(180deg, rgba(46, 200, 214, 0.14), #101820 72%);
  box-shadow: inset 0 0 0 1px rgba(46, 200, 214, 0.12);
}

.card.is-yours .yours { display: inline-flex; }

.card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.card p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }

.card > a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 13px;
  font-weight: 600;
}

.file {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--soft);
  word-break: break-all;
}

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

.cli {
  margin: 14px 10px 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.cli summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 0;
}

.cli summary:hover { color: var(--ink); }

pre {
  margin: 12px 0 0;
  padding: 14px 16px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #05080c;
  color: #d5e4ef;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
}

.site-footer {
  padding: 8px 0 calc(48px + env(safe-area-inset-bottom));
  color: var(--soft);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.site-footer a { color: var(--muted); text-decoration: none; }

.site-footer a:hover { color: var(--ink); }

.skill-tease {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.skill-tease a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.skill-tease a:hover {
  color: var(--ink);
  transform: translateY(-2px);
}

.skill-tease span {
  color: var(--soft);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
}

.market-hero { padding: 64px 0 8px; }

.market-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.market { padding-bottom: 12px; }

/* Search + filters stick under the header so the list stays reachable while
   the reader scrolls through sixty cards. */
.market-tools {
  position: sticky;
  top: var(--header-h);
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 20px 0 14px;
  padding: 12px 0;
  background: rgba(7, 11, 16, 0.92);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.search {
  position: relative;
  flex: 1 1 220px;
  max-width: 300px;
}

.search input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  appearance: none;
}

.search input::placeholder { color: var(--soft); }

.search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.search-clear[hidden] { display: none; }

.search-clear:hover { color: var(--ink); background: rgba(255, 255, 255, 0.14); }

.market-count {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  font-family: var(--mono);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 16px;
}

.market-tools .filters { margin: 0; }

.filter {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.filter:hover { border-color: rgba(46, 200, 214, 0.45); color: var(--ink); }

.filter.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 12px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 230px;
  padding: 18px;
  border-radius: 16px;
  transition: border-color 160ms ease, background 160ms ease;
}

.skill-card[hidden] { display: none; }

.skill-top, .skill-card h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.skill-zh {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

.skill-card h2 {
  margin: 0;
  font-size: 22px;
  justify-content: flex-start;
  overflow-wrap: anywhere;
}

.skill-summary {
  margin: 0;
  color: var(--muted);
  flex: 1;
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.skill-fits, .skill-by {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
}

.skill-fits {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

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

.skill-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.skill-source {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
}

.skill-card .btn { align-self: flex-start; margin-top: 6px; }

.add-steps { margin-top: 8px; }

.market-next { margin: 22px 0 0; }

.market-next a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 600;
}

.market-status { color: var(--muted); }

.missing { color: var(--amber); }

@media (max-width: 980px) {
  .hero, .split, .steps, .cards, .app-body, .panels, .skill-tease {
    grid-template-columns: 1fr;
  }

  .runtime-row { grid-template-columns: 1fr 1fr; }

  .nav-links { display: none; }

  .nav-toggle { display: inline-flex; }

  .hero { padding-top: 36px; gap: 32px; }

  .safety-board { padding: 24px 18px; }

  .stage::before, .stage::after { display: none; }
}

@media (max-width: 640px) {
  .wrap { width: min(1120px, calc(100% - 28px)); }

  .nav { gap: 10px; min-height: 60px; }

  .brand {
    flex: none;
    white-space: nowrap;
    font-size: 15px;
    min-height: 40px;
  }

  .brand img { width: 28px; height: 28px; border-radius: 7px; }

  .nav-cta { gap: 8px; }

  .nav-cta .btn-ghost { display: none; }

  .nav-cta .btn-primary {
    white-space: nowrap;
    padding: 0 12px;
    font-size: 13.5px;
    min-height: 40px;
  }

  .nav-toggle { display: inline-flex; width: 40px; height: 40px; }

  /* Type scale — the desktop sizes push a phone into four-word lines. */
  h1 { font-size: clamp(30px, 8.4vw, 38px); line-height: 1.04; }
  h2 { font-size: clamp(26px, 7.4vw, 32px); }
  .lead { font-size: 16px; }
  .section-lead { font-size: 15.5px; }

  /* Spacing — a phone already scrolls a long way. */
  .hero { padding: 24px 0 28px; gap: 26px; }
  .section { padding: 46px 0; }
  .stage { padding: 12px 10px 10px; border-radius: 20px; }
  .caption { font-size: 10.5px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .trust { gap: 6px; margin-top: 18px; }
  .trust li { font-size: 12px; padding: 4px 9px; }
  .steps { gap: 10px; margin-top: 26px; }
  .steps li { min-height: 0; padding: 18px 16px 20px; }
  .steps h3 { font-size: 22px; }
  .panels { gap: 10px; margin-top: 22px; }
  .safety-board { padding: 20px 14px; }
  .safety { gap: 8px; }
  .safety li { padding: 12px 14px; }
  .safety span { font-size: 14px; }
  .runtime-row { gap: 10px; margin-top: 24px; }
  .runtime-row li { padding: 14px 12px; }
  .skill-tease { gap: 8px; margin-top: 20px; }
  .skill-tease a { min-height: 76px; padding: 14px; }
  .download-panel { padding: 6px 6px 12px; border-radius: 16px; }
  .download-top { flex-direction: column; align-items: flex-start; gap: 4px; }
  .cards { padding: 0 6px; gap: 10px; }
  .card { min-height: 0; padding: 16px 14px 14px; }
  .agent-grid, .runtime-row { grid-template-columns: 1fr 1fr; }
  .tabs { font-size: 11px; }

  /* Skills market: two columns, compact cards, one scrollable filter row. */
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .skill-card { padding: 12px; gap: 6px; min-height: 0; }
  .skill-card h2 { font-size: 15px; }
  .skill-zh { font-size: 11px; }
  .skill-top .pill { font-size: 11px; padding: 3px 7px; }
  .skill-summary { font-size: 12px; -webkit-line-clamp: 3; line-clamp: 3; }
  .skill-fits { display: none; }
  .skill-by {
    font-size: 11px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
  .skill-actions { flex-direction: column; align-items: stretch; gap: 2px; margin-top: 4px; }
  .skill-card .btn { width: 100%; padding: 0 8px; font-size: 12.5px; min-height: 38px; margin-top: 0; }
  .skill-source { justify-content: center; min-height: 38px; font-size: 12.5px; }

  .market-tools {
    margin: 14px -14px 12px;
    padding: 10px 14px;
    gap: 8px 10px;
  }
  .search { flex: 1 1 100%; max-width: none; }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding-bottom: 2px;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; min-height: 40px; }
  .market-count { flex: 1 1 100%; }
}

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

  body::after,
  .kicker::before { animation: none; }

  .btn-primary:hover,
  .runtime-row li:hover,
  .skill-tease a:hover { transform: none; }
}
