/* DominScript help — shared stylesheet. Matches the landing's palette/typography. */
:root {
  --bg: #0a0814;
  --bg-soft: #110e1f;
  --bg-card: #161226;
  --line: #2a2444;
  --line-soft: #1c1830;
  --text: #faf9ff;
  --text-dim: #c4bfdb;
  --text-faint: #837ea8;
  --accent: #8b85d6;
  --accent-deep: #5a52a8;
  --accent-soft: rgba(139, 133, 214, 0.14);
  --accent-glow: rgba(139, 133, 214, 0.32);
  --serif: "Fraunces", "Georgia", serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-weight: 400; font-size: 17px;
  line-height: 1.7; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(26, 79, 187, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(74, 158, 255, 0.08) 0%, transparent 50%);
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }

/* "Under development" banner */
.dev-banner {
  position: relative; z-index: 10;
  background: rgba(139, 133, 214, 0.10);
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--mono); font-size: 13px;
  padding: 9px 32px; text-align: center;
}
.dev-banner b { color: var(--accent); font-weight: 500; }

/* NAV */
nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(6, 10, 20, 0.78);
  border-bottom: 1px solid var(--line);
}
nav .container { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.logo-img { height: 38px; width: auto; display: block; }
.nav-links { display: flex; gap: 36px; list-style: none; font-family: var(--mono); font-size: 13.5px; }
.nav-links a { color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.current { color: var(--accent); }
.nav-cta {
  font-family: var(--mono); font-size: 13.5px; padding: 10px 18px;
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; text-decoration: none; font-weight: 500; transition: all 0.2s;
}
.nav-cta:hover { background: var(--accent); color: var(--bg); }

/* DOC HERO */
.doc-hero { padding: 60px 0 32px; }
.crumb { font-family: var(--mono); font-size: 12.5px; color: var(--text-faint); margin-bottom: 14px; }
.crumb a { color: var(--text-dim); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb .sep { margin: 0 8px; opacity: 0.6; }
.doc-kicker {
  font-family: var(--mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--accent); margin-bottom: 18px;
}
.doc-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(40px, 5.5vw, 76px); line-height: 1.0;
  letter-spacing: -0.03em; margin-bottom: 22px;
}
.doc-title em { font-style: italic; color: var(--accent); }
.doc-title .ns-title {
  font-family: var(--mono); font-size: 0.62em; color: var(--accent);
}
.doc-lead { font-size: 19px; color: var(--text-dim); max-width: 64ch; line-height: 1.65; }
.doc-lead code { font-family: var(--mono); font-size: 14px; color: var(--accent); }

/* LAYOUT */
.doc-layout {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 56px;
  padding: 24px 0 100px;
  align-items: start;
}

/* SIDEBAR */
.doc-sidebar { position: sticky; top: 88px; align-self: start; }
.search-wrap { position: relative; margin-bottom: 22px; }
.search-box {
  width: 100%;
  font-family: var(--mono); font-size: 13.5px;
  padding: 11px 14px 11px 34px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box::placeholder { color: var(--text-faint); }
.search-box:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-wrap::before {
  content: "⌕"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); font-size: 15px; pointer-events: none;
}
.toc-group-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-faint); margin: 6px 0 10px 4px;
}
.toc { list-style: none; }
.toc li { margin: 1px 0; }
.toc a {
  display: block; text-decoration: none;
  font-family: var(--mono); font-size: 13.5px;
  color: var(--text-dim);
  padding: 6px 12px; border-radius: 7px;
  border-left: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.toc a:hover { color: var(--text); background: var(--accent-soft); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
.toc li.hidden { display: none; }
.toc-empty { font-family: var(--mono); font-size: 12.5px; color: var(--text-faint); padding: 8px 12px; display: none; }

/* CONTENT */
.doc-content { min-width: 0; }
.doc-section { padding: 22px 0 40px; border-top: 1px solid var(--line-soft); scroll-margin-top: 84px; }
.doc-section:first-child { border-top: none; padding-top: 4px; }
.doc-section.filtered-out { display: none; }
.sec-num {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  letter-spacing: 0.1em; display: block; margin-bottom: 8px;
}
.doc-section h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 3vw, 36px); line-height: 1.1;
  letter-spacing: -0.02em; margin-bottom: 18px;
}
.doc-section h3 {
  font-family: var(--sans); font-weight: 500; font-size: 18px;
  color: var(--text); margin: 30px 0 12px;
}
.doc-section p, .doc-content p { color: var(--text-dim); max-width: 70ch; margin: 0 0 14px; }
.doc-section ul, .doc-content ul { color: var(--text-dim); max-width: 72ch; margin: 0 0 14px; padding-left: 22px; }
.doc-section li, .doc-content li { margin: 5px 0; }
.doc-section li p, .doc-content li p { margin: 0 0 4px; }
.doc-section strong, .doc-content strong { color: var(--text); font-weight: 500; }
.doc-section em, .doc-content em { color: var(--accent); font-style: italic; }
.doc-section a.xref, .doc-content a.xref { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent-deep); }

code {
  font-family: var(--mono); font-size: 13.5px; color: var(--accent);
  background: var(--accent-soft); padding: 1px 6px; border-radius: 4px;
}

/* CALLOUT */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px; margin: 18px 0; max-width: 72ch;
}
.callout p { margin: 0 0 6px; color: var(--text-dim); }
.callout p:last-child { margin: 0; }
.callout .tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 4px; }

/* TABLE */
.doc-table-wrap { overflow-x: auto; margin: 16px 0 22px; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
thead th {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  text-align: left; color: var(--text-dim); background: var(--bg-card);
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
tbody td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); color: var(--text-dim); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody td:first-child { font-family: var(--mono); color: var(--accent); white-space: nowrap; }
tbody td code { background: none; padding: 0; }
/* tables inside content area (from DOCX) */
.doc-content table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 14px 0 18px; }
.doc-content table th { background: var(--bg-card); }

/* CODE CARD */
.code-card {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--bg-soft); box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
  margin: 14px 0 22px;
}
.code-header {
  padding: 12px 18px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.05em;
  color: var(--text-dim); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; background: var(--bg-card);
}
.code-header .filename::before { content: "▸ "; color: var(--accent); }
.code-header .lang {
  font-size: 10.5px; padding: 3px 8px; background: var(--accent-soft); color: var(--accent);
  border-radius: 4px; letter-spacing: 0.05em;
}
.code-block {
  font-family: var(--mono); font-size: 14px; line-height: 1.85;
  padding: 22px 26px; overflow-x: auto; white-space: pre-wrap; color: var(--text); margin: 0;
}
.code-block .kw { color: var(--accent); font-weight: 500; }
.code-block .type { color: #b8b2eb; }
.code-block .str { color: #ffd28a; }
.code-block .com { color: var(--text-faint); font-style: italic; }
.code-block .fn { color: #c4bff0; }
.code-block .num { color: #c4a7e7; }
.code-block .var { color: #ffae8a; }
.code-block .out { color: var(--text-faint); }

/* Output block (kimenet) — like code but a touch dimmer */
.output-card {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: rgba(139, 133, 214, 0.05); margin: 4px 0 22px;
}
.output-card .code-header { background: rgba(139, 133, 214, 0.04); }
.output-card .code-block { color: var(--text-dim); }

/* function-entry block */
.fn-entry {
  padding: 26px 0 32px;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 84px;
}
.fn-entry:first-of-type { border-top: none; }
.fn-entry.filtered-out { display: none; }
.fn-entry > h3.verb {
  font-family: var(--mono); font-weight: 600; font-size: 22px;
  color: var(--accent); margin: 6px 0 10px; word-break: break-word;
}

/* Section labels within a verb entry (Parameters / Return value / Example / When to use) */
.block-label {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin: 22px 0 8px;
}
.block-label.subtle { color: var(--text-faint); }

/* Verb category headers within a namespace */
.fn-category {
  font-family: var(--serif); font-weight: 400; font-size: 22px;
  color: var(--text); margin: 36px 0 4px; letter-spacing: -0.01em;
}
.fn-category-sub { color: var(--text-faint); font-style: italic; margin-bottom: 10px; }

/* namespace meta + load line */
.ns-meta {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  font-family: var(--mono); font-size: 13px; color: var(--text-faint);
  margin: 4px 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.ns-meta b { color: var(--text-dim); font-weight: 500; }
.ns-meta .pill {
  font-size: 11.5px; padding: 3px 9px; background: var(--accent-soft); color: var(--accent);
  border-radius: 999px;
}

/* Plugin intro section */
.plugin-intro { padding: 8px 0 18px; }
.plugin-intro h3 {
  font-family: var(--sans); font-weight: 500; font-size: 17px;
  color: var(--text); margin: 22px 0 10px;
}
.plugin-intro blockquote {
  font-style: normal; border: none; margin: 0; padding: 0;
}

/* reference hub — grouped namespace cards */
.ns-group { margin: 40px 0 8px; }
.ns-group-title {
  font-family: var(--serif); font-weight: 400; font-size: 22px;
  letter-spacing: -0.01em; margin-bottom: 4px;
}
.ns-group-sub { font-size: 14.5px; color: var(--text-faint); margin-bottom: 20px; }
.ns-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px; margin-bottom: 8px;
}
.ns-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-soft); padding: 16px 18px;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}
.ns-card:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--bg-card); }
.ns-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.ns-card-name { font-family: var(--mono); font-size: 15.5px; color: var(--accent); font-weight: 500; }
.ns-card-count { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }
.ns-card-desc { font-size: 14.5px; color: var(--text-dim); line-height: 1.55; }

/* Architecture diagram (inline SVG) */
.diagram-wrap {
  margin: 22px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  overflow-x: auto;
}
.arch-diagram { display: block; width: 100%; height: auto; max-width: 940px; margin: 0 auto; }

.diagram-legend {
  margin: 8px 0 22px 22px;
  max-width: 78ch;
  color: var(--text-dim);
  font-size: 14.5px;
}
.diagram-legend li { margin: 6px 0; }
.diagram-legend strong { color: var(--text); font-weight: 500; }
.diagram-legend code { font-family: var(--mono); font-size: 12.5px; }

.section-lead {
  font-size: 17px; color: var(--text-dim); max-width: 72ch; line-height: 1.65;
  margin-bottom: 18px;
}

/* FOOTER */
footer { border-top: 1px solid var(--line); padding: 48px 0; }
footer .container { display: flex; align-items: center; justify-content: space-between; }
footer .logo-img { height: 28px; opacity: 0.75; }

@media (max-width: 880px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .doc-sidebar {
    position: static; margin-bottom: 8px;
    border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg-soft);
  }
  .nav-links { display: none; }
}
