:root {
  --bg: #0d1117;
  --bg-alt: #11161d;
  --surface: #161b22;
  --surface-2: #1c232c;
  --border: #2a323d;
  --text: #e6edf3;
  --text-muted: #9aa4b2;
  --green: #30a46c;
  --green-bright: #3fb950;
  --blue: #58a6ff;
  --yellow: #ffbd2e;
  --red: #f85149;
  --radius: 12px;
  --maxw: 1100px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
}

.brand:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--text-muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cta {
  padding: 7px 14px;
  border: 1px solid var(--green);
  border-radius: 8px;
  color: var(--green-bright) !important;
}

.nav-cta:hover {
  background: rgba(48, 164, 108, 0.12);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(800px 400px at 12% -10%, rgba(48, 164, 108, 0.16), transparent 60%),
    radial-gradient(700px 400px at 90% 0%, rgba(88, 166, 255, 0.14), transparent 55%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: stretch;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  color: var(--green-bright);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hero h1 {
  font-size: 52px;
  line-height: 1.12;
  margin: 0 0 26px;
  letter-spacing: -0.02em;
}

.accent {
  background: linear-gradient(90deg, var(--green-bright), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 560px;
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
}

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.hero-badges li {
  font-size: 13px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}

.hero-platforms {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.hero-platforms-title {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* Terminal */
.hero-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  margin-left: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.terminal-body {
  margin: 0;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.t-you { color: var(--blue); font-weight: 700; }
.t-ai { color: var(--green-bright); font-weight: 700; }
.t-cmd { color: var(--green); font-weight: 700; }
.t-mod { color: var(--yellow); font-weight: 700; }
.t-warn { color: var(--red); }

.term-cursor {
  color: var(--green-bright);
  animation: term-blink 1s steps(1) infinite;
}

.t-think {
  color: var(--text-muted);
}

.t-opt {
  color: var(--text);
}

@keyframes term-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 32px;
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: -0.01em;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 40px;
}

.subhead {
  font-size: 22px;
  text-align: center;
  margin: 56px 0 8px;
  letter-spacing: -0.01em;
}

.subhead-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.blacklist-example {
  margin-top: 24px;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
}

.card-highlight {
  grid-column: 1 / -1;
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(48, 164, 108, 0.12), transparent 70%),
    var(--surface);
}

.card-highlight h3 {
  color: var(--green-bright);
}

/* Weight comparison */
.weight-compare {
  margin-top: 22px;
}

.weight-row {
  display: grid;
  grid-template-columns: 120px 1fr 100px;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.weight-row:last-child {
  margin-bottom: 0;
}

.weight-name {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

.weight-bar {
  height: 12px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.weight-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.weight-fill-aist {
  width: 3%;
  min-width: 12px;
  background: linear-gradient(90deg, var(--green), var(--green-bright));
}

.weight-fill-claude {
  width: 100%;
  background: linear-gradient(90deg, var(--red), #ff9a92);
}

.weight-size {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

/* Code blocks */
.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 3px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  border-color: var(--green);
  color: var(--green-bright);
}

.copy-btn.copied {
  border-color: var(--green);
  color: var(--green-bright);
}

.code-block pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
}

.code-block code {
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

.mini-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 12px;
  overflow-x: auto;
}

.mini-code code {
  color: var(--green-bright);
  font-size: 13px;
}

/* Security table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 640px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

td code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.tag {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12.5px;
}

.tag-green {
  color: var(--green-bright);
  background: rgba(48, 164, 108, 0.15);
}

.tag-red {
  color: var(--red);
  background: rgba(248, 81, 73, 0.15);
}

/* Providers */
.providers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.providers li {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 40px 0 24px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand strong {
  font-size: 15px;
}

.footer-brand p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
}

.copyright {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.copyright p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
  text-align: center;
}

.site-version {
  font-family: var(--font-mono);
}

/* Responsive */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 38px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .weight-row {
    grid-template-columns: 90px 1fr 90px;
    gap: 10px;
  }

  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 8px 0;
    width: 100%;
  }

  .nav-cta {
    margin-top: 6px;
    text-align: center;
  }

  .nav-toggle {
    display: flex;
  }
}
