/* Docs chrome */
:root {
  --bg: #f5f5f3;
  --text: #1c1917;
  --muted: #57534e;
  --faint: #a8a29e;
  --border: #e7e5e4;
  --hover: #f5f5f4;
  --active: #f5f5f4;
  --header-h: 3.75rem;
  --chrome-top: calc(var(--header-h) + 2.5rem);
  --font: "Host Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
::selection { background: #fde047; color: #000; }

a { color: #292524; text-underline-offset: 2px; }
a:hover { color: #0c0a09; }

.docs-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(8px);
}
.docs-header-inner {
  max-width: 80rem;
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.brand img { height: 22px; width: auto; display: block; }
.brand-gap { margin-left: 0.25ch; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.header-link:hover { color: var(--text); }
.header-cta {
  display: inline-flex;
  align-items: center;
  height: 2.25rem;
  padding: 0 0.875rem;
  border-radius: 0.5rem;
  background: #1c1917;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.header-cta:hover { background: #292524; }

.docs-frame {
  max-width: 80rem;
  margin: 0 auto;
  padding: var(--chrome-top) 1.5rem 6rem;
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 1024px) {
  .docs-frame { grid-template-columns: 11.5rem minmax(0, 1fr); }
}
@media (min-width: 1280px) {
  .docs-frame { grid-template-columns: 11.5rem minmax(0, 48rem); }
}

.docs-sidebar {
  display: none;
  position: sticky;
  top: var(--chrome-top);
  align-self: start;
  max-height: calc(100vh - var(--chrome-top) - 2rem);
  overflow-y: auto;
  padding-bottom: 2rem;
  padding-right: 1rem;
  border-right: 1px solid var(--border);
}
@media (min-width: 1024px) { .docs-sidebar { display: block; } }

.nav-link {
  display: block;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
}
.nav-link:hover { background: color-mix(in srgb, var(--hover) 80%, transparent); color: var(--text); }
.nav-link.active { background: var(--active); color: var(--text); font-weight: 500; }
.nav-link.nested { padding-left: 1.25rem; }
.nav-section {
  margin: 1.5rem 0 0.375rem;
  padding: 0 0.75rem;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.nav-section.active { color: #78716c; }

.docs-main { min-width: 0; }

h1 {
  margin: 0 0 0.75rem;
  font-size: 1.875rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
h1.hero {
  font-size: clamp(2.25rem, 5vw, 3rem);
  margin-bottom: 1rem;
}
h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h3.tool-cmd {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}

.lead {
  margin: 0 0 1rem;
  max-width: 42rem;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.lead-list, .next-list {
  margin: 0 0 1rem;
  max-width: 42rem;
  padding-left: 1.25rem;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.next-list { list-style: none; padding-left: 0; }
.next-list li { margin-bottom: 0.5rem; }
.next-list a { font-weight: 500; color: var(--text); }
.dot { color: var(--faint); }

.chip {
  font-family: var(--mono);
  font-size: 13px;
  background: color-mix(in srgb, #e7e5e4 60%, transparent);
  padding: 0.05rem 0.25rem;
  border-radius: 0.25rem;
}

.prereq {
  max-width: 42rem;
  margin: 0 0 2rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 13px;
  color: #78716c;
}
.prereq-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.tool {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 7rem;
}
.tool:last-of-type { border-bottom: 0; }
.tool-desc {
  margin: 0 0 1rem;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}
.agent-tool {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}
.agent-tool span { color: #78716c; }
.notes {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 13px;
  line-height: 1.55;
  color: #78716c;
}

.table-wrap { overflow-x: auto; }
.table-wrap.mb { margin-bottom: 1rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
table.plain { font-size: 14px; }
thead tr { border-bottom: 1px solid #d6d3d1; }
tbody tr { border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent); }
th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  color: #292524;
}
td { padding: 0.625rem 0.75rem; vertical-align: top; color: var(--muted); line-height: 1.5; }
td.flag, td.mono, .mono {
  font-family: var(--mono);
  font-size: 11px;
  color: #292524;
  white-space: nowrap;
}
table.plain td.mono { font-size: 13px; }
.req { color: #ef4444; margin-left: 0.25rem; }
.table-wrap:not(:has(.plain)) {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.codeblock {
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-family: var(--mono);
  font-size: 12px;
  color: #44403c;
  background: transparent;
}
.codeblock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.copy-btn {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--faint);
  cursor: pointer;
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
}
.copy-btn:hover { color: #44403c; }
.codeblock pre {
  margin: 0;
  padding: 0.75rem;
  overflow-x: auto;
  line-height: 1.7;
}
.codeblock code { display: block; white-space: pre; }
.codeblock .line { display: flex; gap: 0.5rem; }
.codeblock .prompt {
  width: 0.75rem;
  flex-shrink: 0;
  user-select: none;
  color: var(--faint);
}
.codeblock .comment { color: var(--faint); }

/* Changelog standalone (aquin.app-style, no docs sidebar) */
body.cl-page {
  padding-top: var(--header-h);
}
.cl-standalone {
  min-height: calc(100vh - var(--header-h));
  padding-bottom: 7rem;
}
.cl-hero-wrap {
  position: relative;
  overflow: hidden;
  padding: 3.25rem 1.5rem 3.75rem;
}
@media (min-width: 640px) {
  .cl-hero-wrap { padding: 5rem 1.5rem 5.5rem; }
}
.cl-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.cl-hero {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}
.cl-hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #000;
  text-wrap: balance;
}
.cl-hero p {
  margin: 1rem auto 0;
  max-width: 28rem;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.cl-content {
  max-width: 52rem;
  margin: -0.5rem auto 0;
  padding: 0 1.5rem 2rem;
}
.cl-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}
@media (min-width: 640px) {
  .cl-timeline { gap: 5rem; }
}
.cl-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
  scroll-margin-top: 6rem;
}
@media (min-width: 640px) {
  .cl-entry {
    grid-template-columns: 7.25rem minmax(0, 1fr);
    column-gap: 3.5rem;
  }
}
.cl-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding-top: 0.2rem;
}
@media (min-width: 640px) {
  .cl-meta { position: sticky; top: 6.5rem; }
}
.cl-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #ca8a04 40%, transparent);
  background: #facc15;
  padding: 0.25rem 0.625rem;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: #1c1917;
  line-height: 1;
}
.cl-meta time {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  padding-left: 0.125rem;
  line-height: 1;
}
.cl-body { min-width: 0; max-width: 36rem; }
.cl-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
.cl-title a { color: inherit; text-decoration: none; }
.cl-title a:hover { opacity: 0.7; }
.cl-section,
.cl-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-weight: 600;
}
.cl-section {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 15px;
  color: #292524;
}
.cl-group {
  margin-top: 1.35rem;
  margin-bottom: 0.55rem;
  font-size: 14px;
  color: #44403c;
}
.cl-section .cl-ico,
.cl-group .cl-ico {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  color: #57534e;
}
.cl-group .cl-ico { color: #78716c; width: 0.95em; height: 0.95em; }
.cl-prose,
.cl-outro {
  margin: 0.75rem 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.cl-outro { margin-top: 2.25rem; line-height: 1.7; }
.cl-cmd {
  margin: 0 0 1rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: color-mix(in srgb, #e7e5e4 45%, transparent);
  padding: 0.75rem 0.875rem;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: #44403c;
  white-space: pre-wrap;
}
.cl-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.cl-list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.cl-list li > span { min-width: 0; }
.cl-caret {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  margin-top: 0.35em;
  color: #a8a29e;
}
.cl-ico-inline {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.18em;
  margin: 0 0.12em;
  color: #78716c;
}

@media (max-width: 1023px) {
  .docs-sidebar { display: none; }
}
