/* CodexLens theme tweaks */
:root {
  --cl-bg: #fffdf9;
  --cl-text: #2b2a27;
  --cl-muted: rgba(43, 42, 39, 0.68);
  --cl-border: rgba(43, 42, 39, 0.10);
  --cl-teal: #0fa08e;
  --cl-orange: #dd5e3f;
  --theme-color: var(--cl-teal);
}

/* Layout + subtle background */
body {
  background: radial-gradient(1200px 800px at 18% 12%, rgba(15, 160, 142, 0.10), transparent 55%),
    radial-gradient(900px 700px at 82% 88%, rgba(221, 94, 63, 0.10), transparent 50%),
    var(--cl-bg);
  color: var(--cl-text);
  font-family: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  padding-bottom: 56px;
}

/* Sidebar */
.sidebar {
  border-right: 1px solid var(--cl-border);
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: blur(10px) saturate(1.2);
}
.sidebar-toggle span {
  background-color: var(--cl-text);
}
.sidebar-nav > ul > li > a {
  font-weight: 600;
}
.sidebar-nav a:hover {
  color: var(--cl-teal);
}

/* Content typography */
.markdown-section {
  max-width: 980px;
}
.markdown-section h1,
.markdown-section h2,
.markdown-section h3 {
  letter-spacing: -0.01em;
}
.markdown-section h1 {
  margin-top: 0;
}

/* Code blocks */
.markdown-section pre {
  border-radius: 12px;
  border: 1px solid var(--cl-border);
}
.markdown-section code {
  border-radius: 6px;
}

/* Cover page */
section.cover {
  background: radial-gradient(1000px 700px at 20% 20%, rgba(15, 160, 142, 0.24), transparent 60%),
    radial-gradient(900px 600px at 78% 70%, rgba(221, 94, 63, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(255, 253, 249, 0.92), rgba(255, 253, 249, 0.72));
}
section.cover .cover-main > p {
  color: var(--cl-muted);
}
/* Keep the cover logo at a reasonable size (similar to the old fish logo). */
section.cover .cover-main > p img,
section.cover .cover-main > img {
  width: 160px !important;
  max-width: 160px !important;
  height: auto !important;
}
section.cover .cover-main > h1 {
  font-size: 56px;
}
section.cover .cover-main > p:last-of-type a {
  border-radius: 999px !important;
  border: 1px solid rgba(43, 42, 39, 0.14) !important;
  padding: 10px 18px !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
section.cover .cover-main > p:last-of-type a:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}
section.cover .cover-main > p:last-of-type a:first-child {
  background: rgba(15, 160, 142, 0.12) !important;
  border-color: rgba(15, 160, 142, 0.30) !important;
}

/* Search */
.search input {
  border-radius: 12px !important;
  border: 1px solid var(--cl-border) !important;
}


/* Release card */
.release-card {
  margin: 14px 0 18px;
  padding: 16px 16px 14px;
  border: 1px solid var(--cl-border);
  border-radius: 16px;
  background: radial-gradient(700px 240px at 18% 0%, rgba(15, 160, 142, 0.16), transparent 60%),
    radial-gradient(700px 240px at 82% 100%, rgba(221, 94, 63, 0.14), transparent 60%),
    rgba(255, 253, 249, 0.88);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}
.release-title {
  font-weight: 800;
  letter-spacing: -0.01em;
}
.release-meta {
  font-size: 12px;
  color: var(--cl-muted);
}

.release-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.release-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(43, 42, 39, 0.14);
  background: rgba(255, 253, 249, 0.74);
  color: var(--cl-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.release-btn.primary {
  background: rgba(15, 160, 142, 0.14);
  border-color: rgba(15, 160, 142, 0.35);
}
.release-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

.release-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--cl-muted);
}
.release-note a {
  color: inherit;
}

.release-loading {
  font-size: 13px;
  color: var(--cl-muted);
}
.release-error {
  font-size: 13px;
  color: rgba(221, 94, 63, 0.95);
}

/* ICP footer */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  padding: 10px 16px;
  text-align: center;
  font-size: 12px;
  color: rgba(43, 42, 39, 0.70);
  background: rgba(255, 253, 249, 0.82);
  backdrop-filter: blur(12px) saturate(1.2);
  border-top: 1px solid var(--cl-border);
}
.site-footer a {
  color: inherit;
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--cl-teal);
  text-decoration: underline;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  section.cover .cover-main > h1 {
    font-size: 44px;
  }
  .markdown-section {
    padding: 24px 20px;
  }
}
