:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --text: #1f2328;
  --text-muted: #656d76;
  --border: #d0d7de;
  --accent: #1a73e8;
  --accent-bg: #e8f0fe;
  --code-bg: #f0f2f5;
  --nav-width: 220px;
}


* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

/* Layout */
.page {
  display: flex;
  min-height: 100vh;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--border);
  background: var(--bg-alt);
  z-index: 10;
}

nav .logo {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav .logo img {
  width: 28px;
  height: 28px;
}

nav ul {
  list-style: none;
}

nav ul li {
  margin-bottom: 0.15rem;
}

nav ul li a {
  display: block;
  padding: 0.3rem 0.6rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

nav ul li a:hover {
  color: var(--text);
  background: var(--accent-bg);
}

nav .section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 1rem 0 0.4rem 0.6rem;
}

main {
  margin-left: var(--nav-width);
  flex: 1;
  max-width: 52rem;
  padding: 3rem 2.5rem 6rem;
}

/* Hero */
.hero {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.hero-title img {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
}

.hero-title h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-tagline {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 40rem;
  line-height: 1.7;
}


/* Sections */
section {
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

p {
  margin-bottom: 0.75rem;
}

ul, ol {
  margin: 0 0 0.75rem 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

/* Code */
code {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
}

th {
  background: var(--bg-alt);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

td code {
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Keyboard shortcuts table */
.kbd {
  display: inline-block;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.8rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  min-width: 1.5rem;
  text-align: center;
}

/* Tool card */
.tool-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--bg);
}

.tool-card summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-card summary code {
  font-weight: 700;
  font-size: 0.9rem;
}

.tool-card .desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

.tool-card .params {
  margin-top: 0.75rem;
}

/* Example gallery */
.example-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.example-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-alt);
}

.example-card img {
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--border);
}

.example-caption {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.example-caption strong {
  font-size: 0.95rem;
  white-space: nowrap;
}

.example-caption span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  nav {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  main {
    margin-left: 0;
    padding: 1.5rem 1rem 4rem;
  }

  .page {
    flex-direction: column;
  }

  .hero-title h1 {
    font-size: 1.75rem;
  }

  .hero-title img {
    width: 48px;
    height: 48px;
  }

  .example-caption {
    flex-direction: column;
    gap: 0.25rem;
  }
}
