/* AI-Specs website - styles layered on the SC mini skin + sc-extension-theme.
   Colors come from the SC theme CSS variables so dark/light mode works
   automatically (driven by <html data-theme="...">). asp- prefixes only. */

html, body { height: 100%; margin: 0; padding: 0; }

/* ---- Header / brand ---------------------------------------------------- */
.asp-brand { display: flex; align-items: center; height: 60px; padding-left: 16px; gap: 12px; }
.asp-brand-logo { height: 34px; width: 34px; flex: 0 0 34px; }
.asp-brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.asp-brand-product { font-size: 19px; font-weight: 700; color: var(--accent-success); letter-spacing: .2px; }
.asp-brand-owner { font-size: 11px; color: var(--text-muted); margin-top: 2px; letter-spacing: .3px; }

.asp-tagline { display: flex; align-items: center; height: 60px; }
.asp-tag-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-tertiary); color: var(--text-secondary);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 500;
}
.asp-tag-pill .sci { color: var(--sc-primary); font-size: 15px; }

/* ---- Sidebar (sclist with custom template) ----------------------------- */
.asp-sidebar-list .webix_list_item { position: relative; }
.asp-sidebar-list .webix_list_item::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: transparent; transition: background .15s ease;
}
.asp-sidebar-list .webix_list_item:hover::before,
.asp-sidebar-list .webix_list_item.webix_selected::before { background: var(--sc-primary); }

.asp-menu-icon {
  display: inline-block; width: 22px; text-align: center; margin-right: 12px;
  color: var(--text-muted); font-size: 18px; vertical-align: middle; transition: color .15s ease;
}
.asp-menu-label { vertical-align: middle; font-size: 14px; color: var(--text-primary); transition: color .15s ease; }
.asp-menu-item.asp-sub .asp-menu-icon { margin-left: 18px; font-size: 15px; }
.asp-menu-item.asp-sub .asp-menu-label { font-size: 13px; color: var(--text-secondary); }

.asp-sidebar-list .webix_list_item:hover .asp-menu-icon,
.asp-sidebar-list .webix_list_item.webix_selected .asp-menu-icon { color: var(--sc-primary) !important; }
.asp-sidebar-list .webix_list_item.webix_selected .asp-menu-label { color: var(--accent-success) !important; font-weight: 600; }

/* ---- Content surface --------------------------------------------------- */
.asp-page-scroll .webix_scroll_cont { padding: 0; }
.asp-section {
  padding: 30px 40px 60px 40px; color: var(--text-primary);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.55;
}
.asp-section h1 { font-size: 27px; margin: 0 0 6px 0; font-weight: 700; }
.asp-section h2 { font-size: 19px; margin: 30px 0 12px 0; font-weight: 700; }
.asp-kicker {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--accent-success); margin-bottom: 10px;
}
.asp-lead { font-size: 16px; color: var(--text-secondary); max-width: 760px; }
.asp-section p { max-width: 760px; color: var(--text-primary); }
.asp-section code {
  background: var(--bg-tertiary); border-radius: 4px; padding: 1px 6px;
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; color: var(--accent-success);
}

/* ---- Diagram ----------------------------------------------------------- */
.asp-diagram { width: 100%; max-width: 1000px; margin: 8px 0 0 0; }
.asp-diagram svg { width: 100%; height: auto; display: block; }
.asp-legend { display: flex; flex-wrap: wrap; gap: 16px 22px; margin: 18px 0 0 0; padding: 0; list-style: none; }
.asp-legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.asp-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---- Cards ------------------------------------------------------------- */
.asp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 8px; max-width: 900px; }
.asp-card {
  background: var(--bg-input); border: 1px solid var(--bg-tertiary); border-radius: 12px;
  padding: 20px; box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
.asp-card .sci { font-size: 26px; color: var(--sc-primary); }
.asp-card h3 { margin: 10px 0 6px 0; font-size: 16px; color: var(--text-primary); }
.asp-card p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.asp-pillar { border-left: 4px solid var(--sc-primary); }
.asp-pill-num {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--sc-primary); color: #16320a; font-weight: 700; font-size: 14px;
}

/* ---- Chips ------------------------------------------------------------- */
.asp-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; max-width: 820px; }
.asp-chip {
  background: var(--bg-tertiary); color: var(--accent-success); border: 1px solid var(--sc-primary);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500;
}

/* ---- Mermaid diagrams -------------------------------------------------- */
/* White card behind every diagram so the SC mermaid palette (fixed hexes)
   stays legible in both light and dark theme. */
.asp-mermaid {
  background: #ffffff; border: 1px solid var(--bg-tertiary); border-radius: 12px;
  padding: 18px; margin: 10px 0 4px 0; max-width: 1000px; overflow-x: auto; text-align: center;
}
.asp-mermaid svg { max-width: 100%; height: auto; }

/* Console (product) mount: hosts the data-driven page-config layout in-shell */
.asp-console-mount {
  min-height: 240px; margin-top: 12px; padding: 18px;
  border: 1px dashed var(--bg-tertiary); border-radius: 12px;
  color: var(--text-secondary); font-size: 14px; background: var(--bg-input);
}

/* status badges (live / in progress / planned) */
.asp-st {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; border-radius: 999px; padding: 2px 9px; margin-left: 8px; vertical-align: middle;
}
.asp-st-live { background: #e8ffe0; color: #2f7d12; border: 1px solid #4a9f1c; }
.asp-st-wip { background: #fff7e6; color: #b76e00; border: 1px solid #f59e0b; }
.asp-st-planned { background: #eef2ff; color: #4f46e5; border: 1px solid #6366f1; }
.asp-note { font-size: 13px; color: var(--text-muted); margin-top: 18px; max-width: 900px; }

/* ---- Etalon: requirement-level cards + category table ------------------ */
.asp-level { border-left: 4px solid var(--bg-tertiary); }
.asp-level-r  { border-left-color: #d92d20; }
.asp-level-cr { border-left-color: #f59e0b; }
.asp-level-o  { border-left-color: #6366f1; }
.asp-level .sci.asp-lv-r  { color: #d92d20; }
.asp-level .sci.asp-lv-cr { color: #f59e0b; }
.asp-level .sci.asp-lv-o  { color: #6366f1; }
.asp-level h3 .asp-lv-tag { font-weight: 800; letter-spacing: .5px; }

.asp-etable { width: 100%; max-width: 760px; border-collapse: collapse; margin: 8px 0 4px 0; font-size: 13.5px; }
.asp-etable caption { caption-side: top; text-align: left; color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
.asp-etable th, .asp-etable td { padding: 7px 12px; border-bottom: 1px solid var(--bg-tertiary); }
.asp-etable thead th { text-align: left; color: var(--text-muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.asp-etable td.asp-num, .asp-etable th.asp-num { text-align: right; font-variant-numeric: tabular-nums; }
.asp-etable tbody tr:hover { background: var(--bg-tertiary); }
.asp-etable tfoot td { font-weight: 700; color: var(--text-primary); border-top: 2px solid var(--sc-primary); border-bottom: none; }
.asp-etable .asp-cat { color: var(--text-primary); font-weight: 600; }

/* ---- Article ----------------------------------------------------------- */
.asp-article { max-width: 800px; }
.asp-article h2 { color: var(--accent-success); }
.asp-article ul { padding-left: 20px; }
.asp-article li { margin: 6px 0; max-width: 760px; color: var(--text-primary); }
.asp-proposed { color: var(--sc-primary); font-weight: 600; }
