/* AssetBridge — main stylesheet
   Light, minimal developer-tool theme. No external dependencies. */

:root {
  /* Palette */
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-sunken: #f1f3f7;
  --surface: #ffffff;
  --border: #e6e8ee;
  --border-strong: #d6dae3;

  --text: #1c2333;
  --text-soft: #4a5366;
  --text-muted: #6b7385;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;

  --ok: #15924f;
  --ok-soft: #e7f6ee;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* Shape & shadow */
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(20, 26, 46, 0.05);
  --shadow: 0 6px 20px rgba(20, 26, 46, 0.07);

  --maxw: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
}

p {
  margin: 0 0 1em;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.section {
  padding: 56px 0;
}
.section--tight {
  padding: 40px 0;
}

.muted {
  color: var(--text-muted);
}

.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;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  display: block;
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-links a[aria-current="page"] {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 36px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 64px;
  background:
    radial-gradient(900px 380px at 50% -10%, var(--accent-soft), transparent 70%),
    var(--bg);
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}
.hero .lead {
  font-size: 1.12rem;
  color: var(--text-soft);
  max-width: 56ch;
  margin: 0 auto 28px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.stat .num {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.stat .label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Feature grid ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card h3 {
  font-size: 1.05rem;
}
.card p {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin: 0;
}
.card .ico {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- Library list ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.search {
  position: relative;
  margin: 0 0 22px;
}
.search input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.result-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -10px 0 18px;
}

.lib-list {
  display: grid;
  gap: 12px;
}
.lib {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lib:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.lib-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  user-select: none;
}
.lib-name {
  font-weight: 600;
}
.lib-desc {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-top: 2px;
}
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.ver {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.chevron {
  color: var(--text-muted);
  transition: transform 0.18s ease;
  font-size: 0.8rem;
}
.lib.open .chevron {
  transform: rotate(90deg);
}
.lib-body {
  display: none;
  padding: 0 18px 18px;
  border-top: 1px solid var(--border);
}
.lib.open .lib-body {
  display: block;
}
.lib-body p {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin: 14px 0 10px;
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

/* ---------- Code blocks ---------- */
.code {
  background: #0f1320;
  color: #e6e8f0;
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0 0 16px;
}
.code .cm {
  color: #7f8aa8;
}
.code .mt {
  color: #8ad0a8;
}
.code .url {
  color: #9db4ff;
}
.inline-code {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.85em;
  color: var(--text);
}

.endpoint {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  background: var(--surface);
}
.endpoint h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.98rem;
}
.method {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ok);
  background: var(--ok-soft);
  border-radius: 5px;
  padding: 3px 8px;
}

/* ---------- Status ---------- */
.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ok-soft);
  border: 1px solid #cfeadd;
  color: #0f6e3c;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-weight: 600;
  margin-bottom: 24px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
  flex: none;
}
.status-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.status-row:last-child {
  border-bottom: none;
}
.status-row .state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ok);
  font-size: 0.9rem;
  font-weight: 600;
}
.status-row .state .dot {
  box-shadow: none;
}

.changelog {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.changelog li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}
.changelog li:last-child {
  border-bottom: none;
}
.changelog time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex: none;
}

/* ---------- Prose ---------- */
.prose {
  max-width: 70ch;
}
.prose h2 {
  font-size: 1.3rem;
  margin-top: 1.6em;
}
.prose ul {
  padding-left: 1.2em;
  color: var(--text-soft);
}
.prose li {
  margin-bottom: 6px;
}

/* ---------- 404 ---------- */
.center-screen {
  min-height: 64vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.center-screen .code-big {
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 28px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-inner .copy {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 22px 16px;
    z-index: 20;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: 10px 0;
    width: 100%;
  }
  .site-header {
    position: relative;
  }

  .stats,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .lib-head {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name chev"
      "meta meta";
  }
  .lib-name-wrap {
    grid-area: name;
  }
  .chevron {
    grid-area: chev;
  }
  .lib-meta {
    grid-area: meta;
    display: flex;
    gap: 10px;
    align-items: center;
  }
}

@media (min-width: 761px) {
  .lib-meta {
    display: contents;
  }
}
