/* =========================================== */
/* DOCS ENGINE CSS                             */
/* Source file. Copied to docs/assets/css/    */
/* on build. Edit here; do NOT edit docs/.    */
/* =========================================== */

/* INTERNAL DOCS ENGINE CSS */
:root {
  --docs-sidebar-width: 280px;
  --docs-bg-sidebar: #eef1f5;                                /* slightly cooler than #f8f9fa */
  --docs-bg-main: var(--gn-color-fill-default, #ffffff);
  --docs-border: var(--gn-color-border-neutral-light, #e2e8f0);
  --docs-text: var(--gn-color-text-default, #334155);
  --docs-link: var(--gn-color-primary, #D82B0F);
  --docs-link-hover: var(--gn-color-primary-hover, #A3200B);
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--docs-text);
  background: var(--docs-bg-main);
  line-height: 1.7;                                          /* more comfortable than 1.6 */
}

/* ── Sidebar ─────────────────────────────────── */

.docs-sidebar {
  width: var(--docs-sidebar-width);
  background: var(--docs-bg-sidebar);
  border-right: 1px solid var(--docs-border);
  padding: 2rem 1rem;
  box-sizing: border-box;
  flex-shrink: 0;
}

.sidebar-header {
  margin-bottom: 2rem;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  margin-bottom: 0.25rem;                                    /* tighter than 0.5rem */
}

.sidebar-menu .menu-title {
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 1.75rem 0 0.625rem 0;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sidebar-menu a {
  text-decoration: none;
  color: var(--docs-text);
  display: block;
  padding: 0.4rem 0.625rem;
  border-radius: 4px;
  border-left: 3px solid transparent;                        /* placeholder for active indicator */
  transition: background 0.15s, border-color 0.15s;
  font-size: 0.9375rem;
}

.sidebar-menu a:hover {
  background: #dde3ea;
  border-left-color: transparent;
}

.sidebar-menu a.active {
  background: #dde3ea;
  border-left-color: var(--docs-link);                       /* accent bar instead of full fill */
  color: var(--docs-text);
  font-weight: 600;
}

/* ── Main Content ────────────────────────────── */

.docs-main {
  flex: 1;
  padding: 3rem;
  max-width: 860px;                                          /* 1000px → 860px, better line length */
  box-sizing: border-box;
}

.docs-main h1 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 2rem;                                           /* 2.5rem → 2rem, less imposing */
  font-weight: 700;
  line-height: 1.25;
}

.docs-main h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  padding-left: 0.75rem;
  border-bottom: 1px solid var(--docs-border);
  border-left: 3px solid var(--docs-link);                   /* accent bar for hierarchy */
  font-weight: 600;
  font-size: 1.375rem;
}

.docs-main h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: #475569;                                            /* slightly muted vs h1/h2 */
}

.docs-main p {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.docs-main ul {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.docs-main li {
  margin-bottom: 0.5rem;
}

.docs-main code {
  font-family: Consolas, Monaco, "Courier New", monospace;
  background-color: var(--gn-color-blue-50, #EAF4F8);       /* system palette — blue-50 */
  color: var(--gn-color-blue-700, #1F5A78);                  /* system palette — blue-700 */
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.875em;
}

/* ── Meta Blocks ─────────────────────────────── */

.docs-description {
  font-size: 1.0625rem;
  color: #475569;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.docs-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--docs-border);
}

.docs-meta-item {
  font-size: 0.8125rem;
  background: var(--gn-color-blue-50, #EAF4F8);
  color: var(--gn-color-blue-900, #16465D);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 500;
}

/* ── Preview block ───────────────────────────── */

.docs-preview {
  padding: 2rem;
  border: 1px solid var(--docs-border);
  border-radius: 6px;
  background-color: #fafcfe;                                 /* very subtle warm-cool tint */
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.06);             /* lift from page */
}

.docs-preview .example-group {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.docs-preview .example-container {
  border: 1px dashed #cbd5e1;
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 20px;
}

/* ── Code block ──────────────────────────────── */

.docs-code-container {
  margin-top: 2rem;
}

/* Style the "HTML" <h2> as a label badge, not a section header */
.docs-code-container h2 {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 0.625rem 0;
  padding: 0;
  border: none;
  border-left: none;
  background: none;
}

.docs-code {
  margin: 0;
  padding: 1.5rem;
  background-color: #1e293b;
  color: #e2e8f0;                                            /* slightly softer than #f8fafc */
  border-radius: 6px;
  overflow-x: auto;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

.docs-code code {
  background: transparent;
  padding: 0;
  color: inherit;
  border-radius: 0;
}

/* ── Comparatives & Layout ───────────────────── */

.docs-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.docs-compare-grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
.docs-compare-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.docs-compare-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 800px) {
  .docs-compare-grid[data-cols] { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

.docs-compare-card {
  background: var(--gn-color-fill-default, #ffffff);
  border: 1px solid var(--docs-border);
  border-radius: 6px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.docs-compare-title {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 1.5rem;
  width: 100%;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.5rem;
  text-align: center;
}

.docs-compare-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  width: 100%;
}

.docs-compare-content--row {
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
}

.docs-note {
  font-size: 0.875rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid var(--docs-border);
  border-left: 3px solid #94a3b8;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  border-radius: 0 4px 4px 0;
}

.docs-note code {
  background: #e2e8f0;
  color: #334155;
}
