/* Cloudbit console shell (preview). Loaded after site.css (and design-builder.css).
   Re-themes site.css tokens to a light console canvas and adds the left rail,
   top bar, and card system. Layout idea borrowed from modern security consoles;
   no third-party assets. */

:root {
  --bg: #f4f5f7;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border: #e3e6eb;
  --border-strong: #c9d0da;
  --text: #1b2333;
  --text-muted: #5d6879;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --mint: #047857;
  --mint-soft: rgba(4, 120, 87, 0.08);
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  --max: 1180px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --rail-w: 212px;
  --rail-bg: #101624;
  --rail-text: #c5cede;
  --rail-muted: #7f8aa0;
  --rail-hover: #1b2335;
  --rail-active: #24304a;
  --topbar-h: 54px;
}

body.cb-console { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; }
body.cb-console .glow { display: none; }

/* —— App grid —— */
.cb-app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.cb-main { min-width: 0; display: flex; flex-direction: column; }
.cb-content { flex: 1; padding: 18px 22px 8px; min-width: 0; }

/* —— Left rail —— */
.cb-rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--rail-bg); color: var(--rail-text);
  display: flex; flex-direction: column; padding: 12px 10px 14px;
  scrollbar-width: thin; scrollbar-color: #2a344a transparent; z-index: 60;
}
.cb-brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 12px; color: #fff; font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.cb-brand:hover { text-decoration: none; }
.cb-brand .mark { width: 28px; height: 28px; border-radius: 8px; background: #0b1220; display: grid; place-items: center; border: 1px solid #2a3a58; }
.cb-rail-group { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--rail-muted); padding: 12px 10px 5px; }
.cb-rail nav a {
  display: flex; align-items: center; gap: 10px; padding: 5px 10px; margin: 1px 0;
  border-radius: 7px; color: var(--rail-text); font-size: 0.86rem; font-weight: 500; line-height: 1.3;
  position: relative;
}
.cb-rail nav a:hover { background: var(--rail-hover); color: #fff; text-decoration: none; }
.cb-rail nav a svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.cb-rail nav a .dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex: none; opacity: 0.9; }
.cb-rail nav a.active, .cb-rail nav a[aria-current="page"] { background: var(--rail-active); color: #fff; }
.cb-rail nav a.active::before, .cb-rail nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: #5ab7ff;
}
.cb-rail-foot { margin-top: auto; padding: 14px 10px 0; font-size: 0.74rem; color: var(--rail-muted); }
.cb-rail-foot a { color: var(--rail-text); }

/* —— Top bar —— */
.cb-topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  display: flex; align-items: center; gap: 10px; padding: 0 22px;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.cb-menu-btn { display: none; border: 1px solid var(--border); background: #fff; border-radius: 7px; padding: 5px 8px; cursor: pointer; }
.cb-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 7px; background: #fff;
  font-size: 0.82rem; font-weight: 600; color: var(--text); white-space: nowrap;
}
a.cb-chip:hover { border-color: var(--border-strong); text-decoration: none; background: #f8fafc; }
.cb-chip svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.cb-chip.accent { color: var(--accent); background: var(--accent-soft); border-color: rgba(37,99,235,0.18); }
.cb-chip.preview { color: #b45309; background: #fff7ed; border-color: #fed7aa; }
.cb-crumb { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-spacer { flex: 1; }
.cb-search {
  display: flex; align-items: center; gap: 8px; width: 260px; height: 32px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-muted);
  font: inherit; font-size: 0.86rem; cursor: pointer; text-align: left;
}
.cb-search:hover { border-color: var(--border-strong); }
.cb-search svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.cb-search kbd { margin-left: auto; font: 600 0.68rem var(--font); letter-spacing: 0.04em; color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; background: #f8fafc; }
.cb-icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--text-muted); border: 1px solid transparent; }
.cb-icon-btn:hover { background: #f1f3f6; color: var(--text); text-decoration: none; }
.cb-icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; }

/* —— Command palette —— */
.cb-palette-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.35); z-index: 200; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.cb-palette-backdrop.open { display: flex; }
.cb-palette { width: min(620px, 92vw); background: #fff; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(15,23,42,0.25); overflow: hidden; }
.cb-palette input { width: 100%; border: 0; border-bottom: 1px solid var(--border); padding: 14px 16px; font: inherit; font-size: 1rem; outline: none; }
.cb-palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.cb-palette li a { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 7px; color: var(--text); font-size: 0.9rem; }
.cb-palette li a small { color: var(--text-muted); font-size: 0.76rem; margin-left: auto; white-space: nowrap; }
.cb-palette li a.sel, .cb-palette li a:hover { background: var(--accent-soft); text-decoration: none; }
.cb-palette .empty { padding: 14px; color: var(--text-muted); font-size: 0.9rem; }

/* —— Page head (console pages) —— */
.cb-pagehead { display: flex; align-items: flex-end; gap: 16px; margin: 2px 0 14px; flex-wrap: wrap; }
.cb-pagehead h1 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.2; }
.cb-pagehead h1 span { color: var(--accent); }
.cb-pagehead p { margin: 3px 0 0; color: var(--text-muted); font-size: 0.86rem; max-width: 62rem; }
.cb-pagehead .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* —— Cards —— */
.cb-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.cb-card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.cb-card-head h2, .cb-card-head h3 { margin: 0; font-size: 0.98rem; font-weight: 700; letter-spacing: -0.005em; line-height: 1.3; }
.cb-card-head .sub { font-size: 0.76rem; color: var(--text-muted); margin-top: 1px; }
.cb-card-head .tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.cb-card-head a.more { font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.cb-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.cb-grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cb-grid.map { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.cb-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cb-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cb-stat { display: flex; align-items: baseline; gap: 8px; }
.cb-stat strong { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.cb-stat span { font-size: 0.8rem; color: var(--text-muted); }
.cb-stat-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 0.82rem; }
.cb-stat-list li { display: flex; align-items: center; gap: 8px; }
.cb-stat-list a { color: var(--text); }
.cb-stat-list .n { margin-left: auto; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Pills (severity-style) */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; line-height: 1.6; white-space: nowrap; border: 1px solid transparent; }
.pill.physical { background: #fff4e5; color: #b45309; border-color: #fde3bf; }
.pill.data { background: #eaf1ff; color: #1d4ed8; border-color: #cfdcfb; }
.pill.protect { background: #fdecec; color: #b42318; border-color: #f9d0cc; }
.pill.control { background: #e8f7f0; color: #047857; border-color: #c6ebda; }
.pill.policy { background: #f2effd; color: #6d28d9; border-color: #ded5fa; }
.pill.ai { background: #e9f9fb; color: #0e7490; border-color: #c4ecf2; }
.pill.neutral { background: #f1f3f6; color: #475467; border-color: #e3e6eb; }
.swatch { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }

/* Compact tables */
.cb-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.cb-table th { text-align: left; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cb-table td { padding: 7px 8px; border-bottom: 1px solid #eef0f3; vertical-align: top; }
.cb-table tr:last-child td { border-bottom: 0; }
.cb-table tr:hover td { background: #fafbfc; }
.cb-table a { color: var(--text); font-weight: 500; }
.cb-table a:hover { color: var(--accent); }

/* —— Domain map —— */
.cb-map-card { padding: 12px 14px 10px; display: flex; flex-direction: column; }
.cb-map-wrap { position: relative; width: 100%; aspect-ratio: 1000 / 580; margin-top: 6px; }
.cb-map-wrap svg { width: 100%; height: 100%; display: block; }
.cb-legend { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cb-map .edge { stroke-width: 2; fill: none; opacity: 0.55; transition: opacity .15s, stroke-width .15s; }
.cb-map .edge-hit { stroke: transparent; stroke-width: 14; fill: none; cursor: pointer; }
.cb-map .edge.hot { opacity: 1; stroke-width: 3; }
.cb-map.focused .edge { opacity: 0.08; }
.cb-map.focused .edge.on { opacity: 0.95; stroke-width: 2.6; }
.cb-map.focused .edge.on.hot { stroke-width: 3.6; }
.cb-map .node { cursor: pointer; }
.cb-map .node rect { fill: #fff; stroke: #cfd5de; stroke-width: 1.2; transition: stroke .15s, fill .15s; }
.cb-map .node .ico { stroke: #475467; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cb-map .node text { font: 650 17px var(--font); fill: #1b2333; }
.cb-map .node text.cnt { font: 500 13px var(--font); fill: #7a8596; }
.cb-map .node:hover rect, .cb-map .node:focus rect { stroke: var(--accent); }
.cb-map .node:focus { outline: none; }
.cb-map.focused .node { opacity: 0.35; }
.cb-map.focused .node.near { opacity: 1; }
.cb-map.focused .node.sel { opacity: 1; }
.cb-map .node.sel rect { fill: #eef4ff; stroke: var(--accent); stroke-width: 2; }
.cb-map .node.sel .ico { stroke: var(--accent); }
.cb-map .edge-label { font: 600 15px var(--font); fill: #1b2333; pointer-events: none; }
.cb-map .edge-label-bg { fill: #fff; stroke: #d6dbe3; pointer-events: none; }
.cb-tip {
  position: absolute; pointer-events: none; z-index: 5; max-width: 300px;
  background: #101624; color: #e8eef8; border-radius: 8px; padding: 8px 10px;
  font-size: 0.78rem; line-height: 1.4; box-shadow: 0 8px 24px rgba(15,23,42,0.25); display: none;
}
.cb-tip b { display: block; color: #fff; font-size: 0.8rem; margin-bottom: 2px; }
.cb-map-hint { font-size: 0.74rem; color: var(--text-muted); margin-top: 6px; }

.cb-detail { display: flex; flex-direction: column; max-height: 640px; }
.cb-content .cb-detail { padding-bottom: 6px; }
.cb-detail-body { overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px; }
.cb-detail .blurb { font-size: 0.84rem; color: var(--text-muted); margin: 0 0 10px; }
.cb-conn { list-style: none; margin: 0; padding: 0; }
.cb-conn li { border-top: 1px solid #eef0f3; padding: 8px 0; font-size: 0.82rem; }
.cb-conn li:first-child { border-top: 0; }
.cb-conn li .top { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.cb-conn li .top button { all: unset; cursor: pointer; font-weight: 700; color: var(--text); font-size: 0.86rem; }
.cb-conn li .top button:hover { color: var(--accent); }
.cb-conn li .top .pill { margin-left: auto; }
.cb-conn li .flow { color: var(--text-muted); }
.cb-conn li .src { margin-top: 4px; font-size: 0.76rem; display: flex; flex-direction: column; gap: 2px; }
.cb-conn li.hot { background: #f6f9ff; margin: 0 -8px; padding: 8px; border-radius: 6px; }
.cb-open { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 7px; background: var(--accent); color: #fff !important; font-weight: 600; font-size: 0.82rem; }
.cb-open:hover { background: #1d4ed8; text-decoration: none; }
.cb-empty-list { font-size: 0.82rem; color: var(--text-muted); padding-left: 1rem; margin: 6px 0; }
.cb-mobile-conn { display: none; }

/* —— Restyle existing site.css components inside the console —— */
.cb-content .wrap { width: 100%; max-width: var(--max); margin-inline: 0; }
.cb-content section { padding: 0 0 16px; }
.cb-content main > section:first-child { padding-top: 0; }
.cb-content h1, .cb-content h2, .cb-content h3 { color: var(--text); }
.cb-content .page-hero { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; }
.cb-content .page-hero h1 { font-size: 1.55rem; margin: 2px 0 4px; }
.cb-content .page-hero .lead { font-size: 0.95rem; color: var(--text-muted); margin: 0; }
.cb-content .eyebrow { color: var(--accent); background: var(--accent-soft); border-color: rgba(37,99,235,0.18); }
.cb-content .panel, .cb-content .taxonomy-block, .cb-content .layer-card, .cb-content .feature,
.cb-content .cta-band, .cb-content .shortlist-item, .cb-content .offer-card {
  background: #fff; border: 1px solid var(--border); box-shadow: none; border-radius: var(--radius);
}
.cb-content .cta-band { background: #fff; padding: 18px 20px; }
.cb-content .cta-band h2 { font-size: 1.1rem; }
.cb-content .cta-band p { font-size: 0.9rem; }
.cb-content .layer-card.highlight { border-color: rgba(37,99,235,0.55); background: linear-gradient(180deg, #f3f7ff, #fff 55%); box-shadow: 0 0 0 1px rgba(37,99,235,0.15); }
.cb-content .btn-primary { background: var(--accent); color: #fff; box-shadow: none; }
.cb-content .btn-primary:hover { background: #1d4ed8; color: #fff; box-shadow: none; }
.cb-content .btn-ghost { background: #fff; border-color: var(--border); color: var(--text); }
.cb-content table { background: #fff; }
.cb-content th { background: #f8fafc; color: var(--text-muted); }
.cb-content code { background: #f1f3f6; color: #334155; }
.cb-content .hero { padding: 0 0 16px; }
.cb-content .hero-art { box-shadow: none; border: 1px solid var(--border); }
.cb-content .hero-art-caption { background: rgba(255,255,255,0.9); color: var(--text); border-color: var(--border); }
.cb-content .badge-mq, .cb-content .badge-cited { filter: saturate(1.1); }

body.cb-console > .cb-app footer, .cb-main > footer {
  margin: 8px 22px 18px; padding: 12px 0 0; background: transparent; border-top: 1px solid var(--border); font-size: 0.8rem;
}
.cb-main > footer .wrap { width: 100%; max-width: none; }

/* —— Responsive —— */
@media (max-width: 1240px) {
  .cb-grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cb-grid.map { grid-template-columns: minmax(0, 1fr) 300px; }
  .cb-search { width: 200px; }
}
@media (max-width: 980px) {
  .cb-app { grid-template-columns: minmax(0, 1fr); }
  .cb-rail { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; transform: translateX(-100%); transition: transform .2s; box-shadow: 8px 0 30px rgba(0,0,0,0.3); }
  body.rail-open .cb-rail { transform: none; }
  body.rail-open::after { content: ""; position: fixed; inset: 0; background: rgba(15,23,42,0.35); z-index: 55; }
  .cb-menu-btn { display: inline-flex; }
  .cb-grid.map, .cb-grid.two, .cb-grid.three { grid-template-columns: minmax(0, 1fr); }
  .cb-detail { max-height: none; }
  .cb-hide-md { display: none !important; }
}
@media (max-width: 640px) {
  .cb-content { padding: 12px 12px 6px; }
  .cb-topbar { padding: 0 12px; gap: 6px; }
  .cb-search { width: 34px; padding: 0 9px; }
  .cb-search span, .cb-search kbd { display: none; }
  .cb-grid.stats { grid-template-columns: minmax(0, 1fr); }
  .cb-mobile-conn { display: block; }
  .cb-hide-sm { display: none !important; }
}

/* specificity: cards are often <section>, which site/console section rules pad */
.cb-content .cb-card { padding: 12px 14px; }
.cb-content .cb-map-card { padding: 12px 14px 10px; }
.cb-pagehead .cb-chip { height: 30px; }
.cb-home .cb-content > main > section > .wrap > .section-head, .cb-content .section-head { text-align: left; margin-bottom: 12px; }
.cb-content .section-head h2 { font-size: 1.15rem; }
.cb-content .section-head p { margin-left: 0; font-size: 0.88rem; }
.cb-home .stack-strip { justify-content: flex-start; }
.cb-pagehead > div:first-child { flex: 1 1 520px; }
.cb-pagehead p { max-width: 52rem; }
.cb-eyebrow { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 9px; vertical-align: middle; margin-left: 6px; white-space: nowrap; }
.cb-pagehead .actions { align-self: center; }
.cb-menu-btn { align-items: center; justify-content: center; width: 34px; height: 32px; color: var(--text); }
.cb-menu-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; }
@media (max-width: 640px) { .cb-pagehead .actions { margin-left: 0; } }

/* ===== Product drill-down ===== */
.cb-products-section { scroll-margin-top: 70px; }
.cb-products-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.cb-pd-cards { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cb-pd-card { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; font-size: 0.8rem; color: var(--text-muted); min-width: 120px; }
.cb-pd-card:hover, .cb-pd-card:focus-visible { border-color: var(--accent); }
.cb-pd-card strong { font-size: 1.15rem; color: var(--text); font-weight: 700; }
.cb-pd-card svg { width: 16px; height: 16px; stroke: #475467; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cb-pd-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.cb-pd-search { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; min-width: 260px; }
.cb-pd-search svg { width: 15px; height: 15px; stroke: var(--text-muted); fill: none; stroke-width: 1.8; }
.cb-pd-search input { border: 0; outline: 0; font: inherit; font-size: 0.86rem; flex: 1; background: transparent; }
.cb-pd-note { font-size: 0.74rem; color: var(--text-muted); flex: 1 1 260px; }
.cb-pd-tree { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.cb-pd-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px calc(12px + var(--d, 0) * 22px); border-top: 1px solid #eef0f3; font-size: 0.86rem; cursor: pointer; background: #fff; }
.cb-pd-row:first-child { border-top: 0; }
.cb-pd-row:hover { background: #f8fafc; }
.cb-pd-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cb-pd-row.grp { font-weight: 600; background: #fbfcfd; }
.cb-pd-row.grp[style*="--d:0"] { background: #f5f7fa; }
.cb-pd-row.sel { background: #eef4ff; box-shadow: inset 3px 0 0 var(--accent); }
.cb-pd-chev { width: 12px; color: var(--text-muted); font-size: 0.8rem; flex: none; }
.cb-pd-ico svg { width: 16px; height: 16px; stroke: #475467; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }
.cb-pd-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-pd-count { font-size: 0.74rem; font-weight: 600; color: var(--text-muted); background: #f1f3f6; border-radius: 999px; padding: 0 8px; }
.cb-pd-meta { display: flex; gap: 4px; flex: none; }
.cb-pd-go { color: var(--text-muted); font-size: 1.1rem; line-height: 1; }
.cb-muted { color: var(--text-muted); font-weight: 400; }

/* drawer */
.cb-drawer-back { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.32); z-index: 150; opacity: 0; pointer-events: none; transition: opacity .18s; }
.cb-drawer-back.open { opacity: 1; pointer-events: auto; }
.cb-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(820px, 100vw - 60px); z-index: 160; display: flex; transform: translateX(105%); transition: transform .22s ease; }
.cb-drawer.open { transform: none; }
.cb-drawer-rail { width: 48px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 12px; }
.cb-drawer-rail button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.92); color: #1b2333; cursor: pointer; font-size: 0.9rem; box-shadow: 0 2px 8px rgba(15,23,42,0.2); }
.cb-drawer-rail button:hover { background: #fff; }
.cb-drawer-rail button:disabled { opacity: 0.4; cursor: default; }
.cb-drawer-body { flex: 1; background: #fff; border-left: 1px solid var(--border); overflow-y: auto; padding: 16px 20px 40px; box-shadow: -12px 0 40px rgba(15,23,42,0.18); font-size: 0.88rem; }
.cb-dhead { display: flex; gap: 12px; align-items: center; }
.cb-dhead h2 { margin: 0; font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.01em; }
.cb-dicon { width: 38px; height: 38px; border-radius: 9px; background: #eef4ff; display: grid; place-items: center; flex: none; }
.cb-dicon svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cb-dactions { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.cb-dactions button.cb-chip { cursor: pointer; font: inherit; font-size: 0.82rem; font-weight: 600; }
.cb-dchips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.cb-dbanner { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; border-radius: 8px; padding: 7px 10px; font-size: 0.8rem; margin-bottom: 12px; }
.cb-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 6px 0 14px; }
.cb-tabs button { all: unset; cursor: pointer; padding: 8px 12px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cb-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.cb-dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; margin-bottom: 12px; }
.cb-dsum { margin: 0 0 10px; line-height: 1.55; }
.cb-dtags { display: flex; flex-wrap: wrap; gap: 4px; }
.cb-dmeta { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; margin: 0; font-size: 0.8rem; border-left: 1px solid var(--border); padding-left: 14px; align-content: start; }
.cb-dmeta dt { color: var(--text-muted); }
.cb-dmeta dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.cb-reco { display: flex; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 4px 0 12px; background: #fcfdff; }
.cb-reco-ico svg { width: 26px; height: 26px; stroke: #059669; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cb-reco-title { font-weight: 700; margin-bottom: 6px; }
.cb-reco-grid { display: grid; grid-template-columns: 90px 1fr; gap: 4px 10px; margin: 0; font-size: 0.82rem; }
.cb-reco-grid dt { color: var(--text-muted); }
.cb-reco-grid dd { margin: 0; }
.cb-dgraph-card { padding: 10px 12px; }
.cb-dgraph { width: 100%; height: auto; display: block; }
.cb-dgraph .gn rect { fill: #fff; stroke: #cfd5de; }
.cb-dgraph .gn text { font: 600 12px var(--font); fill: #1b2333; }
.cb-dgraph .gn text.s { font-weight: 400; font-size: 10.5px; fill: #7a8596; }
.cb-dgraph .gn.prod rect { fill: #eef4ff; stroke: var(--accent); stroke-width: 1.6; }
.cb-dgraph .gn.dom rect { fill: #101624; stroke: #101624; }
.cb-dgraph .gn.dom text { fill: #fff; }
.cb-dgraph a:hover .gn.sat rect { stroke: var(--accent); }
.cb-dh { font-size: 0.9rem; margin: 14px 0 6px; }
.cb-dh:first-child { margin-top: 0; }
.cb-table-scroll { overflow-x: auto; }
.cb-ladder { font-size: 0.8rem; margin-bottom: 10px; }
.cb-ladder td { min-width: 90px; }
.cb-ladder tr.hl td { background: #fff8e6; }
.cb-srcs { padding-left: 1.1rem; margin: 6px 0; }
.cb-srcs li { margin: 4px 0; overflow-wrap: anywhere; }
.cb-cmpbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 140; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: min(900px, 94vw); background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; box-shadow: 0 10px 30px rgba(15,23,42,0.18); font-size: 0.82rem; }
.cb-cmpbar[hidden] { display: none; }
.cb-cmpbar .pill button { all: unset; cursor: pointer; margin-left: 4px; }
.cb-cmpbar button.cb-open { border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.82rem; }
.cb-cmpbar button.cb-open:disabled { opacity: .5; cursor: default; }
.cb-cmpbar button.cb-chip { cursor: pointer; font: inherit; font-size: 0.8rem; }
.cb-toast { position: fixed; right: 18px; bottom: 18px; z-index: 300; background: #101624; color: #fff; padding: 10px 14px; border-radius: 9px; font-size: 0.86rem; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
body.cb-drawer-open { overflow: hidden; }
@media (max-width: 760px) {
  .cb-drawer { width: 100vw; }
  .cb-drawer-rail { position: absolute; left: auto; right: 8px; top: 6px; flex-direction: row; width: auto; z-index: 2; padding-top: 4px; }
  .cb-dhead { padding-right: 120px; }
  .cb-dgrid { grid-template-columns: 1fr; }
  .cb-dmeta { border-left: 0; padding-left: 0; }
  .cb-pd-meta { display: none; }
  .cb-pd-search { min-width: 0; flex: 1; }
}

.cb-drawer section { padding: 0; margin: 0; border: 0; background: none; }
.cb-products-section { padding-top: 8px; padding-bottom: 8px; }

.cb-quote-note { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px dashed var(--border); border-radius: 8px; color: var(--text-muted); font-size: 0.84rem; font-weight: 600; }
