    :root {
      --bg0:        #060b18;
      --bg1:        #0c1226;
      --bg2:        #101a34;
      --bg3:        #182040;
      --bg4:        #1e2a50;
      --border:     #1e3060;
      --border-hi:  #2a4a90;

      --blue:       #1a7fff;
      --blue-dim:   #0f4fa0;
      --cyan:       #00d4ff;
      --cyan-dim:   #007a99;
      --green:      #00e87a;
      --green-dim:  #007a42;
      --orange:     #ff8c00;
      --orange-dim: #7a4400;
      --red:        #ff3355;
      --red-dim:    #7a1a2a;
      --purple:     #9955ff;
      --purple-dim: #4a2a88;
      --yellow:     #ffd000;

      --txt0:  #e8f0ff;
      --txt1:  #9aadd0;
      --txt2:  #5a6e99;
      --txt3:  #2e3d60;

      --radius:  8px;
      --radius2: 14px;
      --shadow:  0 4px 24px rgba(0,0,0,.5);
      --glow-b:  0 0 20px rgba(26,127,255,.25);
      --glow-c:  0 0 20px rgba(0,212,255,.25);
      --glow-g:  0 0 20px rgba(0,232,122,.25);
    }

    /* ─── Reset & Base ──────────────────────────────────────────────── */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { font-size: 15px; scroll-behavior: smooth; height: 100%; overflow-y: auto; }
    body {
      background: var(--bg0);
      color: var(--txt0);
      font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
      min-height: 100%;
      line-height: 1.55;
      overflow-y: auto;
    }
    input, select, textarea, button { font-family: inherit; }
    ::selection { background: var(--blue-dim); color: var(--txt0); }

    /* ─── Scrollbar ─────────────────────────────────────────────────── */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: var(--bg1); }
    ::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

    /* ─── Animations ─────────────────────────────────────────────────  */
    @keyframes fadeUp   { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }
    @keyframes pulse    { 0%,100% { opacity:1; } 50% { opacity:.4; } }
    @keyframes spin     { to { transform:rotate(360deg); } }
    @keyframes glow-pulse {
      0%,100% { box-shadow: 0 0 8px rgba(26,127,255,.3); }
      50%      { box-shadow: 0 0 22px rgba(26,127,255,.7); }
    }
    @keyframes dash     { to { stroke-dashoffset: 0; } }
    @keyframes flow {
      0%   { stroke-dashoffset: 40; }
      100% { stroke-dashoffset: 0; }
    }

    /* ─── Header ─────────────────────────────────────────────────────── */
    #header {
      position: sticky; top: 0; z-index: 100;
      background: rgba(6,11,24,.96);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border);
      padding: 0 1.5rem;
      display: flex; align-items: center; gap: 1rem;
      height: 52px;
      flex-shrink: 0;
    }
    /* Mobile hamburger (hidden on desktop) */
    #sb-hamburger {
      display: none;
      background: none; border: none;
      color: var(--txt1); font-size: 1.2rem;
      cursor: pointer; padding: .25rem .4rem;
      border-radius: 6px;
    }
    #sb-hamburger:hover { background: var(--bg3); }

    /* Breadcrumb: shows current step name */
    #header-breadcrumb {
      flex: 1;
      font-size: .78rem;
      color: var(--txt2);
      display: flex; align-items: center; gap: .4rem;
      overflow: hidden;
      white-space: nowrap;
    }
    #header-breadcrumb .bc-group {
      color: var(--txt3);
    }
    #header-breadcrumb .bc-sep {
      color: var(--txt3); font-size: .65rem;
    }
    #header-breadcrumb .bc-step {
      color: var(--txt0); font-weight: 600;
    }

    /* Logo only shown on mobile (in header); hidden on desktop since sidebar has it */
    #logo {
      display: none;
      align-items: center; gap: .6rem;
      font-size: 1rem; font-weight: 700; letter-spacing: -.02em;
      white-space: nowrap;
    }
    #logo .ico {
      width: 28px; height: 28px;
      background: linear-gradient(135deg, var(--blue), var(--cyan));
      border-radius: 7px;
      display: flex; align-items: center; justify-content: center;
      font-size: .85rem;
    }
    #logo span { color: var(--cyan); }

    /* Progress Steps */
    #progress-bar {
      flex: 1;
      display: flex; align-items: center; gap: 0;
      overflow-x: auto;
    }
    .step-item {
      display: flex; align-items: center; gap: 0;
      flex-shrink: 0;
    }
    .step-dot {
      display: flex; align-items: center; gap: .45rem;
      padding: .3rem .6rem;
      border-radius: 20px;
      font-size: .75rem; font-weight: 600;
      color: var(--txt2);
      cursor: pointer;
      transition: all .25s;
      white-space: nowrap;
    }
    .step-dot .num {
      width: 22px; height: 22px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: .7rem; font-weight: 700;
      background: var(--bg3); border: 1px solid var(--border);
      flex-shrink: 0; transition: all .25s;
    }
    .step-dot.active  { color: var(--txt0); }
    .step-dot.active .num  { background: var(--blue); border-color: var(--blue); box-shadow: var(--glow-b); }
    .step-dot.done    { color: var(--green); }
    .step-dot.done .num    { background: var(--green-dim); border-color: var(--green); color: var(--green); }
    .step-connector {
      width: 28px; height: 2px;
      background: var(--border);
      flex-shrink: 0;
      transition: background .4s;
    }
    .step-connector.done { background: var(--green-dim); }

    /* Badge */
    .badge {
      display: inline-flex; align-items: center;
      padding: .15rem .55rem;
      border-radius: 20px; font-size: .7rem; font-weight: 600;
      letter-spacing: .03em;
    }
    .badge-blue   { background: var(--blue-dim);   color: var(--cyan);  }
    .badge-green  { background: var(--green-dim);  color: var(--green); }
    .badge-orange { background: var(--orange-dim); color: var(--orange); }
    .badge-purple { background: var(--purple-dim); color: var(--purple); }
    .badge-red    { background: var(--red-dim);    color: var(--red);   }

    /* ─── Dashboard shell ────────────────────────────────────────────── */
    #dashboard-layout {
      display: flex;
      height: 100vh;
      overflow: hidden;
    }

    /* ── Sidebar ──────────────────────────────────────────────────────── */
    /* ── Sidebar ──────────────────────────────────────────────────────── */
    #sidebar {
      width: 244px;
      min-width: 244px;
      height: 100vh;
      background: var(--bg2);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      transition: width .22s ease, min-width .22s ease;
      overflow: hidden;
      flex-shrink: 0;
      z-index: 110;
    }
    #sidebar.collapsed {
      width: 58px;
      min-width: 58px;
    }

    /* Logo bar */
    .sb-logo {
      display: flex;
      align-items: center;
      gap: .65rem;
      padding: 0 .85rem 0 1rem;
      height: 60px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
      white-space: nowrap;
      overflow: hidden;
    }
    .sb-logo .ico {
      width: 32px; height: 32px; flex-shrink: 0;
      background: linear-gradient(135deg, var(--blue), var(--cyan));
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: .95rem;
      box-shadow: 0 2px 8px rgba(26,127,255,.35);
    }
    .sb-logo-text {
      font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em;
      flex: 1;
      transition: opacity .18s, max-width .22s;
      color: var(--txt0);
    }
    .sb-logo-text span { color: var(--cyan); }

    /* Collapse toggle in logo bar */
    .sb-collapse-toggle {
      width: 28px; height: 28px;
      display: flex; align-items: center; justify-content: center;
      background: none; border: 1px solid var(--border);
      border-radius: 7px; cursor: pointer;
      color: var(--txt2); flex-shrink: 0;
      transition: background .14s, color .14s, border-color .14s;
      padding: 0;
    }
    .sb-collapse-toggle:hover { background: var(--bg4); color: var(--txt0); border-color: var(--blue); }
    .sb-collapse-icon { width: 16px; height: 16px; transition: transform .22s; }
    #sidebar.collapsed .sb-collapse-icon { transform: rotate(180deg); }
    #sidebar.collapsed .sb-logo-text { opacity: 0; max-width: 0; overflow: hidden; }

    /* Collapsed logo bar: hide the app icon, center just the toggle button */
    #sidebar.collapsed .sb-logo {
      justify-content: center;
      padding: 0;
      gap: 0;
    }
    #sidebar.collapsed .sb-logo .ico { display: none; }
    #sidebar.collapsed .sb-collapse-toggle {
      width: 44px;
      height: 44px;
      border-color: var(--border);
      border-radius: 0;
      border-left: none;
      border-right: none;
      border-top: none;
    }

    /* Nav scroll area */
    .sb-nav {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      padding: .6rem 0 .5rem;
    }
    .sb-nav::-webkit-scrollbar { width: 4px; }
    .sb-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

    /* Group wrapper */
    .sb-group { margin-bottom: .1rem; }

    /* Plain group label (non-collapsible) */
    .sb-group-label {
      font-size: .68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .09em;
      color: var(--txt2);
      padding: .85rem 1.1rem .3rem;
      white-space: nowrap;
      overflow: hidden;
      transition: opacity .18s;
    }

    /* Collapsible group header */
    .sb-group-hdr {
      display: flex;
      align-items: center;
      width: 100%;
      background: none;
      border: none;
      cursor: pointer;
      padding: .8rem 1.1rem .3rem;
      gap: .4rem;
      text-align: left;
      transition: color .14s;
    }
    .sb-group-hdr:hover .sb-group-hdr-label { color: var(--txt0); }
    .sb-group-hdr-label {
      font-size: .68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .09em;
      color: var(--txt2);
      flex: 1;
      white-space: nowrap;
      overflow: hidden;
      transition: color .14s, opacity .18s;
    }
    .sb-group-chevron {
      width: 14px; height: 14px;
      color: var(--txt3);
      flex-shrink: 0;
      transition: transform .2s, color .14s;
    }
    .sb-group-hdr:hover .sb-group-chevron { color: var(--txt2); }
    .sb-group-hdr[aria-expanded="true"] .sb-group-chevron { transform: rotate(180deg); }

    /* Collapsible body — hidden by default */
    .sb-group-body {
      display: none;
      overflow: hidden;
    }
    .sb-group-body.open { display: block; }

    /* Nav item */
    .sb-item {
      display: flex;
      align-items: center;
      gap: .75rem;
      padding: .58rem 1rem;
      width: 100%;
      border: none;
      background: none;
      cursor: pointer;
      color: var(--txt0);
      font-size: .9rem;
      font-family: inherit;
      border-left: 3px solid transparent;
      transition: background .12s, color .12s, border-color .12s;
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
    }
    .sb-item:hover {
      background: rgba(255,255,255,.05);
      color: #fff;
      border-left-color: rgba(255,255,255,.12);
    }
    .sb-item.active {
      background: rgba(26,127,255,.16);
      color: #5aabff;
      border-left-color: var(--blue);
      font-weight: 600;
    }
    .sb-item.done { color: var(--green); }
    .sb-item.done .sb-icon::after {
      content: '✓';
      font-size: .6rem;
      position: absolute;
      bottom: -2px; right: -2px;
      background: var(--green);
      color: #000;
      border-radius: 50%;
      width: 11px; height: 11px;
      display: flex; align-items: center; justify-content: center;
      line-height: 1;
    }

    /* Icon cell */
    .sb-icon {
      width: 22px;
      text-align: center;
      flex-shrink: 0;
      font-size: 1.05rem;
      position: relative;
    }

    /* Label */
    .sb-label {
      overflow: hidden;
      text-overflow: ellipsis;
      transition: opacity .18s, max-width .22s;
      max-width: 170px;
    }

    /* Step badge */
    .sb-badge {
      margin-left: auto;
      font-size: .65rem;
      color: var(--txt3);
      background: var(--bg3);
      border-radius: 4px;
      padding: 1px 5px;
      flex-shrink: 0;
      transition: opacity .18s;
    }
    .sb-item.active .sb-badge { color: var(--blue); background: rgba(26,127,255,.18); }
    .sb-item.done .sb-badge   { display: none; }

    /* Sub-items */
    .sb-sub-item {
      padding-left: 2.65rem !important;
      font-size: .85rem !important;
      color: var(--txt1);
      border-left: 3px solid transparent;
    }
    .sb-sub-item:hover { color: #fff; }
    .sb-sub-item.active {
      border-left-color: var(--cyan);
      color: var(--cyan);
      background: rgba(0,212,255,.1);
    }

    /* Collapsed state */
    #sidebar.collapsed .sb-label,
    #sidebar.collapsed .sb-group-label,
    #sidebar.collapsed .sb-group-hdr-label,
    #sidebar.collapsed .sb-group-chevron,
    #sidebar.collapsed .sb-badge { opacity: 0; max-width: 0; overflow: hidden; }
    #sidebar.collapsed .sb-item { padding: .58rem 0; justify-content: center; border-left: none; }
    #sidebar.collapsed .sb-item.active { background: rgba(26,127,255,.18); border-radius: 0; }
    #sidebar.collapsed .sb-sub-item { display: none; }
    #sidebar.collapsed .sb-group-hdr { padding: .4rem 0; justify-content: center; }
    #sidebar.collapsed .sb-group-body.open { display: none; }

    /* ── Header utility bar ──────────────────────────────────────────── */
    .hdr-util-bar {
      display: flex;
      align-items: center;
      gap: .5rem;
      margin-left: auto;
    }
    .hdr-util-group {
      display: flex;
      align-items: center;
      gap: 2px;
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 9px;
      padding: 3px;
    }
    .hdr-util-btn {
      display: flex;
      align-items: center;
      gap: .3rem;
      padding: .3rem .55rem;
      background: none;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      color: var(--txt1);
      font-size: .8rem;
      font-family: inherit;
      white-space: nowrap;
      transition: background .13s, color .13s;
    }
    .hdr-util-btn:hover { background: var(--bg3); color: var(--txt0); }
    .hdr-util-btn--icon { padding: .3rem .4rem; }
    .hdr-util-icon { font-size: .9rem; line-height: 1; }
    .hdr-util-label { font-size: .78rem; font-weight: 500; }
    .hdr-status-dot {
      width: 8px; height: 8px;
      border-radius: 50%;
      background: var(--txt3);
      display: inline-block;
      flex-shrink: 0;
      transition: background .3s;
    }

    /* Layer filter bar (config generation step 5) */
    .layer-filter-bar {
      display: flex; flex-wrap: wrap; gap: .35rem;
      padding: .5rem .75rem; background: var(--bg1);
      border-bottom: 1px solid var(--border);
    }
    .layer-filter-btn {
      font-size: .7rem; padding: .22rem .6rem; border-radius: 10px;
      background: var(--bg3); border: 1px solid var(--border);
      color: var(--txt2); cursor: pointer; transition: all .15s; white-space: nowrap;
    }
    .layer-filter-btn:hover  { border-color: var(--blue); color: var(--txt0); }
    .layer-filter-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

    /* Troubleshooting Engine panel */
    #panel-ts {
      display: none; flex-direction: column; gap: 1.5rem;
      padding: 1.5rem; overflow-y: auto;
    }
    #panel-ts.visible { display: flex; }
    .ts-section {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); padding: 1.25rem;
    }
    .ts-section-hdr {
      font-size: .88rem; font-weight: 700; color: var(--cyan);
      margin-bottom: 1rem; display: flex; align-items: center;
      justify-content: space-between;
    }
    .ts-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
    .ts-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .75rem; }
    @media (max-width: 700px) { .ts-grid-2, .ts-grid-3 { grid-template-columns: 1fr; } }
    .ts-input {
      width: 100%; padding: .4rem .65rem; background: var(--bg3);
      border: 1px solid var(--border); color: var(--txt); border-radius: 6px;
      font-size: .82rem; margin-top: .3rem;
    }
    .ts-input:focus { border-color: var(--blue); outline: none; }
    .ts-label { font-size: .72rem; font-weight: 700; letter-spacing: .05em; color: var(--txt2); }
    .ts-topo-table { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: .75rem; }
    .ts-topo-table th { background: var(--bg3); padding: .4rem .6rem; text-align: left;
      font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--txt2); }
    .ts-topo-table td { padding: .45rem .6rem; border-top: 1px solid var(--border); }
    .ts-topo-table tr:hover td { background: var(--bg3); }
    .ts-event-log {
      background: var(--bg3); border: 1px solid var(--border); border-radius: 6px;
      height: 200px; overflow-y: auto; font-family: monospace; font-size: .76rem;
      padding: .6rem; color: var(--txt2);
    }
    .ts-event-line { padding: .1rem 0; }
    .ts-event-line.err  { color: var(--red); }
    .ts-event-line.warn { color: var(--orange); }
    .ts-event-line.ok   { color: var(--green); }
    .ts-playbook-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: .5rem;
      margin-bottom: .75rem;
    }
    .ts-playbook-btn {
      background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
      padding: .55rem .75rem; cursor: pointer; font-size: .8rem; color: var(--txt);
      text-align: left; transition: all .15s;
    }
    .ts-playbook-btn:hover { border-color: var(--blue); color: var(--cyan); }
    .ts-status-badge {
      display: inline-flex; align-items: center; gap: .3rem;
      font-size: .7rem; padding: .15rem .45rem; border-radius: 4px; font-weight: 700;
    }
    .ts-badge-ok   { background: rgba(0,232,122,.12); color: var(--green); }
    .ts-badge-down { background: rgba(255,82,82,.12);  color: var(--red); }
    .ts-badge-warn { background: rgba(255,140,0,.12);  color: var(--orange); }
    .ts-stat-bar {
      display: flex; gap: 1rem; flex-wrap: wrap;
      background: var(--bg3); border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem;
    }
    .ts-stat { text-align: center; }
    .ts-stat-num { font-size: 1.4rem; font-weight: 800; color: var(--cyan); display: block; }
    .ts-stat-lbl { font-size: .68rem; color: var(--txt2); }

    /* Collapsed: hide text, labels, group labels */
    #sidebar.collapsed .sb-label,
    #sidebar.collapsed .sb-group-label,
    #sidebar.collapsed .sb-logo-text,
    #sidebar.collapsed .sb-badge { opacity: 0; max-width: 0; overflow: hidden; }
    #sidebar.collapsed .sb-item { padding: .52rem 0; justify-content: center; border-left: none; }
    #sidebar.collapsed .sb-item.active { background: rgba(26,127,255,.15); border-radius: 0; }

    /* Sidebar mobile overlay */
    #sb-overlay {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,.55);
      z-index: 105;
    }

    /* ── Content area ─────────────────────────────────────────────────── */
    #content-area {
      flex: 1;
      min-width: 0;
      height: 100vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    /* ─── Layout ─────────────────────────────────────────────────────── */
    #app {
      flex: 1;
      overflow-y: auto;
      padding: 2rem 2rem 2rem;
      max-width: 1100px;
      width: 100%;
    }

    /* ─── Step Panels ────────────────────────────────────────────────── */
    .step-panel {
      display: none;
      animation: fadeUp .35s ease both;
    }
    .step-panel.active { display: block; }

    /* ─── Section Header ─────────────────────────────────────────────── */
    .section-head {
      margin-bottom: 2rem;
    }
    .section-head .label {
      font-size: .7rem; font-weight: 700; letter-spacing: .12em;
      text-transform: uppercase; color: var(--cyan);
      margin-bottom: .4rem;
    }
    .section-head h2 {
      font-size: 1.75rem; font-weight: 700;
      letter-spacing: -.03em; line-height: 1.2;
    }
    .section-head p {
      color: var(--txt1); margin-top: .5rem; max-width: 640px;
    }

    /* ─── Cards Grid ─────────────────────────────────────────────────── */
    .cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 1rem;
    }
    .use-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: var(--radius2);
      padding: 1.5rem;
      cursor: pointer;
      transition: all .25s;
      position: relative;
      overflow: hidden;
    }
    .use-card::before {
      content: '';
      position: absolute; inset: 0;
      opacity: 0;
      transition: opacity .25s;
    }
    .use-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
    .use-card.selected {
      border-color: var(--blue);
      box-shadow: var(--glow-b);
    }
    .use-card .card-icon {
      width: 48px; height: 48px; border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.5rem; margin-bottom: 1rem;
    }
    .use-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .35rem; }
    .use-card p  { font-size: .8rem; color: var(--txt1); line-height: 1.45; }
    .use-card .card-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .85rem; }
    .check-mark {
      position: absolute; top: .85rem; right: .85rem;
      width: 22px; height: 22px; border-radius: 50%;
      background: var(--blue); display: none;
      align-items: center; justify-content: center;
      font-size: .65rem; color: #fff;
    }
    .use-card.selected .check-mark { display: flex; }

    /* ─── Form Layout ────────────────────────────────────────────────── */
    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.25rem;
    }
    .form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
    .form-grid.full  { grid-template-columns: 1fr; }
    /* ─── Sidebar mobile (≤ 768px: sidebar becomes a slide-out drawer) ── */
    @media (max-width: 768px) {
      #sidebar {
        position: fixed; top: 0; left: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform .25s ease, width .22s ease;
        z-index: 120;
        width: 244px !important; min-width: 244px !important;
      }
      #sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,.5);
      }
      #sidebar.mobile-open ~ #sb-overlay,
      #sb-overlay.active { display: block; }
      #content-area { width: 100%; }
      #sb-hamburger { display: flex !important; }
      #logo { display: flex !important; }
      #header-breadcrumb { display: none; }
      /* Restore labels when open on mobile */
      #sidebar.mobile-open .sb-label,
      #sidebar.mobile-open .sb-group-label,
      #sidebar.mobile-open .sb-group-hdr-label,
      #sidebar.mobile-open .sb-group-chevron,
      #sidebar.mobile-open .sb-logo-text,
      #sidebar.mobile-open .sb-badge { opacity: 1; max-width: 180px; }
      #sidebar.mobile-open .sb-item { padding: .58rem 1rem; justify-content: flex-start; border-left: 3px solid transparent; }
      #sidebar.mobile-open .sb-item.active { border-left-color: var(--blue); }
      #sidebar.mobile-open .sb-group-hdr { padding: .8rem 1.1rem .3rem; justify-content: flex-start; }
      /* Hide utility labels on small screens */
      .hdr-util-label { display: none; }
    }

    @media (max-width: 680px) {
      .form-grid, .form-grid.three { grid-template-columns: 1fr; }
    }
    .span2 { grid-column: span 2; }
    .span3 { grid-column: span 3; }

    .form-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: var(--radius2);
      padding: 1.5rem;
      margin-bottom: 1.25rem;
    }
    .form-card-head {
      display: flex; align-items: center; gap: .65rem;
      margin-bottom: 1.25rem;
      padding-bottom: .85rem;
      border-bottom: 1px solid var(--border);
    }
    .form-card-head .ico {
      width: 32px; height: 32px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1rem; flex-shrink: 0;
    }
    .form-card-head h3 { font-size: .95rem; font-weight: 700; }
    .form-card-head p  { font-size: .75rem; color: var(--txt1); }

    /* ─── Form Controls ──────────────────────────────────────────────── */
    .field { display: flex; flex-direction: column; gap: .4rem; }
    .field label {
      font-size: .75rem; font-weight: 600;
      color: var(--txt1); letter-spacing: .04em;
    }
    .field label span { color: var(--red); margin-left: 2px; }

    input[type=text],
    input[type=number],
    input[type=email],
    select,
    textarea {
      background: var(--bg3);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--txt0);
      padding: .6rem .85rem;
      font-size: .875rem;
      width: 100%;
      transition: border-color .2s, box-shadow .2s;
      outline: none;
      appearance: none;
      -webkit-appearance: none;
    }
    input:focus, select:focus, textarea:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(26,127,255,.15);
    }
    select {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235a6e99'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right .85rem center;
      padding-right: 2.2rem;
      cursor: pointer;
    }
    textarea { resize: vertical; min-height: 90px; }
    input[type=number] { -moz-appearance: textfield; }
    input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }

    .field-hint { font-size: .7rem; color: var(--txt2); margin-top: .1rem; }

    /* Toggle chip group */
    .chip-group { display: flex; flex-wrap: wrap; gap: .5rem; }
    .chip {
      padding: .35rem .85rem;
      border-radius: 20px; font-size: .78rem; font-weight: 600;
      border: 1px solid var(--border);
      background: var(--bg3);
      color: var(--txt1); cursor: pointer;
      transition: all .2s; user-select: none;
    }
    .chip:hover { border-color: var(--border-hi); color: var(--txt0); }
    .chip.on {
      background: var(--blue-dim);
      border-color: var(--blue);
      color: var(--cyan);
    }
    .chip.on-green {
      background: var(--green-dim);
      border-color: var(--green);
      color: var(--green);
    }

    /* Range slider */
    .range-wrap { display: flex; align-items: center; gap: .85rem; }
    input[type=range] {
      flex: 1; -webkit-appearance: none; appearance: none;
      height: 4px; background: var(--bg4); border-radius: 2px;
      border: none; padding: 0; cursor: pointer;
    }
    input[type=range]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 16px; height: 16px; border-radius: 50%;
      background: var(--blue); cursor: pointer;
      box-shadow: 0 0 8px rgba(26,127,255,.5);
    }
    .range-val {
      min-width: 40px; text-align: right;
      font-size: .8rem; font-weight: 700; color: var(--cyan);
    }

    /* Segmented control */
    .seg-ctrl {
      display: flex; border: 1px solid var(--border);
      border-radius: var(--radius); overflow: hidden;
      background: var(--bg3);
    }
    .seg-btn {
      flex: 1; padding: .5rem .75rem;
      font-size: .78rem; font-weight: 600;
      color: var(--txt2); background: none; border: none;
      cursor: pointer; transition: all .2s;
      white-space: nowrap;
    }
    .seg-btn:hover { color: var(--txt0); }
    .seg-btn.active {
      background: var(--blue-dim);
      color: var(--cyan);
    }

    /* ─── Summary Sidebar ─────────────────────────────────────────────  */
    .layout-with-aside {
      display: grid;
      grid-template-columns: 1fr 300px;
      gap: 1.5rem;
      align-items: start;
    }
    @media (max-width: 900px) {
      .layout-with-aside { grid-template-columns: 1fr; }
    }
    .sidebar-card {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); padding: 1.25rem;
      position: sticky; top: 76px;
    }
    .sidebar-card h4 {
      font-size: .8rem; font-weight: 700; letter-spacing: .06em;
      text-transform: uppercase; color: var(--txt2);
      margin-bottom: 1rem;
    }
    .summary-row {
      display: flex; justify-content: space-between;
      align-items: center; gap: .5rem;
      padding: .5rem 0;
      border-bottom: 1px solid var(--border);
      font-size: .8rem;
    }
    .summary-row:last-child { border-bottom: none; }
    .summary-row .key { color: var(--txt2); }
    .summary-row .val { font-weight: 600; color: var(--txt0); text-align: right; }

    /* ─── Buttons ────────────────────────────────────────────────────── */
    .btn {
      display: inline-flex; align-items: center; gap: .5rem;
      padding: .65rem 1.4rem;
      border-radius: var(--radius); border: none;
      font-size: .875rem; font-weight: 600;
      cursor: pointer; transition: all .2s;
      text-decoration: none;
    }
    .btn-primary {
      background: var(--blue);
      color: #fff;
    }
    .btn-primary:hover { background: #2288ff; box-shadow: var(--glow-b); }
    .btn-ghost {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--txt1);
    }
    .btn-ghost:hover { border-color: var(--border-hi); color: var(--txt0); }
    .btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid var(--red-dim); }
    .btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

    .btn-lg { padding: .85rem 2rem; font-size: 1rem; border-radius: 10px; }

    /* ─── Bottom Nav ─────────────────────────────────────────────────── */
    #bottom-nav {
      position: sticky; bottom: 0; z-index: 90;
      background: rgba(6,11,24,.97); backdrop-filter: blur(16px);
      border-top: 1px solid var(--border);
      padding: .75rem 1.5rem;
      display: flex; align-items: center; justify-content: space-between;
      gap: 1rem;
      flex-shrink: 0;
    }
    #bottom-nav .left  { display: flex; align-items: center; gap: 1rem; }
    #bottom-nav .right { display: flex; align-items: center; gap: .75rem; }
    #step-info { font-size: .78rem; color: var(--txt2); }
    #step-info strong { color: var(--txt0); }

    /* ─── Divider ────────────────────────────────────────────────────── */
    .divider {
      height: 1px; background: var(--border);
      margin: 1.5rem 0;
    }
    .divider-label {
      display: flex; align-items: center; gap: .85rem;
      margin: 1.5rem 0; color: var(--txt2); font-size: .75rem;
      font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
    }
    .divider-label::before,
    .divider-label::after {
      content: ''; flex: 1; height: 1px; background: var(--border);
    }

    /* ─── Notifications ──────────────────────────────────────────────── */
    #toast-area {
      position: fixed; top: 70px; right: 1.5rem; z-index: 999;
      display: flex; flex-direction: column; gap: .5rem;
    }
    .toast {
      background: var(--bg3); border: 1px solid var(--border);
      border-radius: var(--radius); padding: .75rem 1rem;
      font-size: .82rem; color: var(--txt0);
      box-shadow: var(--shadow);
      animation: fadeUp .25s ease;
      display: flex; align-items: center; gap: .6rem;
      min-width: 260px;
    }
    .toast.success { border-color: var(--green-dim); }
    .toast.error   { border-color: var(--red-dim); }
    .toast.info    { border-color: var(--blue-dim); }

    /* ─── Highlight box ──────────────────────────────────────────────── */
    .info-box {
      background: var(--bg2); border-left: 3px solid var(--blue);
      border-radius: 0 var(--radius) var(--radius) 0;
      padding: .85rem 1rem; font-size: .82rem;
      color: var(--txt1); margin: 1rem 0;
    }
    .info-box strong { color: var(--txt0); }

    /* ─── Collapsible section ────────────────────────────────────────── */
    .collapsible-head {
      display: flex; align-items: center; justify-content: space-between;
      cursor: pointer; padding: .75rem 0;
      user-select: none;
    }
    .collapsible-head h4 { font-size: .9rem; font-weight: 700; }
    .collapsible-arrow { transition: transform .25s; }
    .collapsible-head.open .collapsible-arrow { transform: rotate(180deg); }
    .collapsible-body { overflow: hidden; }

    /* ─── Use-Case color themes ──────────────────────────────────────── */
    [data-uc=campus]  .card-icon { background: rgba(26,127,255,.15); }
    [data-uc=dc]      .card-icon { background: rgba(153,85,255,.15); }
    [data-uc=hybrid]  .card-icon { background: rgba(0,232,122,.15); }
    [data-uc=gpu]     .card-icon { background: rgba(255,140,0,.15);  }
    [data-uc=wan]     .card-icon { background: rgba(0,212,255,.15);  }

    /* ─── Step 1 specific ────────────────────────────────────────────── */
    .industry-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      gap: .65rem;
    }
    .industry-chip {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: .75rem;
      cursor: pointer; transition: all .2s;
      display: flex; flex-direction: column; align-items: center; gap: .4rem;
      font-size: .78rem; font-weight: 600; color: var(--txt1);
      text-align: center;
    }
    .industry-chip .ic { font-size: 1.4rem; }
    .industry-chip:hover { border-color: var(--border-hi); color: var(--txt0); }
    .industry-chip.on {
      border-color: var(--blue); color: var(--cyan);
      background: rgba(26,127,255,.1);
    }

    /* ─── Step 2 specific ────────────────────────────────────────────── */
    .protocol-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      gap: .65rem;
    }
    .proto-card {
      background: var(--bg3); border: 1px solid var(--border);
      border-radius: var(--radius); padding: .75rem 1rem;
      cursor: pointer; transition: all .2s;
      display: flex; align-items: center; gap: .65rem;
      font-size: .82rem; font-weight: 600; color: var(--txt1);
    }
    .proto-card .dot {
      width: 8px; height: 8px; border-radius: 50%;
      background: var(--border); flex-shrink: 0;
      transition: background .2s;
    }
    .proto-card:hover { border-color: var(--border-hi); color: var(--txt0); }
    .proto-card.on {
      border-color: var(--cyan-dim); color: var(--cyan);
      background: rgba(0,212,255,.07);
    }
    .proto-card.on .dot { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }

    /* ─── Skeleton / Loading ─────────────────────────────────────────── */
    .skeleton {
      background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.6s infinite;
      border-radius: var(--radius);
    }
    @keyframes shimmer { to { background-position: -200% 0; } }

    /* ── Demo modal open state ───────────────────────────────────── */
    #demo-modal.open { display: flex !important; }

    /* ── Mobile responsive overrides ────────────────────────────── */
    @media (max-width: 600px) {
      #header { padding: 0 .85rem; gap: .65rem; height: 56px; }
      .logo-text { display: none; }
      #progress-bar .step-dot span:not(.num) { display: none; }
      #app { padding: 1rem .85rem 5rem; }
      .cards-grid { grid-template-columns: 1fr 1fr; }
      .form-grid, .form-grid.three { grid-template-columns: 1fr; }
      .span2, .span3 { grid-column: span 1; }
      .layout-with-aside { grid-template-columns: 1fr; }
      .sidebar-card { position: static; }
      .cfg-layout { grid-template-columns: 1fr; }
      .dev-list-card { position: static; }
      #bottom-nav { padding: .65rem 1rem; }
      .btn-lg { padding: .65rem 1.25rem; font-size: .875rem; }
      #demo-modal > div { grid-template-columns: 1fr !important; }
      .score-row { gap: .5rem; }
      .score-box { padding: .75rem 1rem; }
      .score-box .sb-num { font-size: 1.5rem; }
    }
    @media (max-width: 480px) {
      .cards-grid { grid-template-columns: 1fr; }
      .prod-grid  { grid-template-columns: 1fr; }
      .check-grid { grid-template-columns: 1fr; }
    }

    /* ── Header logo responsive ──────────────────────────────────── */
    #logo .ico { flex-shrink: 0; }

    /* ── Smooth step panel fade ──────────────────────────────────── */
    .step-panel { transition: opacity .15s ease; }
    .step-panel:not(.active) { pointer-events: none; }

    /* ── Focus ring for accessibility ────────────────────────────── */
    :focus-visible {
      outline: 2px solid var(--blue);
      outline-offset: 2px;
      border-radius: 4px;
    }

    /* ── Better scrollbar in config viewer ───────────────────────── */
    #cfg-code-area::-webkit-scrollbar { width: 8px; height: 8px; }
    #cfg-code-area::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 4px; }

    /* ── Print stylesheet ────────────────────────────────────────── */
    @media print {
      #header, #bottom-nav, #toast-area, .export-bar,
      .cfg-actions, .design-tabs, .vendor-tabs, #deploy-action-bar { display: none !important; }
      body { background: white; color: black; }
      .step-panel { display: block !important; }
      .svg-wrap, .lld-table-wrap, .form-card { break-inside: avoid; }
    }

    /* ── Step connector progress animation ───────────────────────── */
    .step-connector { transition: background .5s ease; }
    .step-dot .num  { transition: background .3s ease, box-shadow .3s ease; }

    /* ── Use card selected glow pulse ────────────────────────────── */
    .use-card.selected { animation: glow-pulse 2.5s ease infinite; }

    /* ── Subtle grid background on hero area ─────────────────────── */
    #step-1::before {
      content: '';
      position: fixed; inset: 0; pointer-events: none; z-index: -1;
      background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
      background-size: 48px 48px;
      opacity: .18;
    }

    /* ── Section number badge ────────────────────────────────────── */
    .step-panel > .section-head .label {
      display: inline-flex; align-items: center; gap: .4rem;
    }
    .step-panel > .section-head .label::before {
      content: '';
      display: inline-block; width: 6px; height: 6px;
      border-radius: 50%; background: var(--cyan);
      box-shadow: 0 0 8px var(--cyan);
    }

    /* ── Chip hover active color ─────────────────────────────────── */
    .chip.on { animation: none; }

    /* ── Card enter animation stagger ────────────────────────────── */
    .use-card:nth-child(1) { animation-delay: .05s; }
    .use-card:nth-child(2) { animation-delay: .10s; }
    .use-card:nth-child(3) { animation-delay: .15s; }
    .use-card:nth-child(4) { animation-delay: .20s; }
    .use-card:nth-child(5) { animation-delay: .25s; }

    /* ══════════════════════════════════════════════════════════════
       PART 4 — Configuration Generator Styles
    ══════════════════════════════════════════════════════════════ */
    .cfg-layout {
      display: grid;
      grid-template-columns: 270px 1fr;
      gap: 1.25rem;
      align-items: start;
    }
    @media (max-width: 780px) { .cfg-layout { grid-template-columns: 1fr; } }

    /* Device list sidebar */
    .dev-list-card {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); overflow: hidden;
      position: sticky; top: 76px;
      max-height: calc(100vh - 120px);
      display: flex; flex-direction: column;
    }
    #dev-list-body {
      overflow-y: auto; flex: 1;
    }
    #dev-search-input:focus {
      border-color: var(--blue) !important; box-shadow: 0 0 0 2px rgba(26,127,255,.18);
    }
    .dev-list-head {
      padding: .75rem 1rem; background: var(--bg1);
      border-bottom: 1px solid var(--border);
      font-size: .72rem; font-weight: 700; letter-spacing: .08em;
      text-transform: uppercase; color: var(--txt2);
      display: flex; align-items: center; justify-content: space-between;
    }
    .dev-group-label {
      padding: .45rem 1rem .2rem;
      font-size: .65rem; font-weight: 700; letter-spacing: .1em;
      text-transform: uppercase; color: var(--txt3);
    }
    .dev-item {
      display: flex; align-items: center; gap: .65rem;
      padding: .6rem 1rem; cursor: pointer;
      border-left: 3px solid transparent;
      transition: all .18s; font-size: .82rem;
    }
    .dev-item:hover { background: var(--bg3); }
    .dev-item.active {
      background: rgba(26,127,255,.1);
      border-left-color: var(--blue);
      color: var(--cyan);
    }
    .dev-item .di-icon { font-size: 1rem; width: 22px; text-align: center; flex-shrink: 0; }
    .dev-item .di-info { flex: 1; min-width: 0; }
    .dev-item .di-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .dev-item .di-role { font-size: .68rem; color: var(--txt2); }
    .dev-item .di-os {
      font-size: .6rem; font-weight: 700; padding: .1rem .35rem;
      border-radius: 3px; background: var(--bg4); color: var(--txt2);
      white-space: nowrap;
    }
    .dev-item.active .di-os { background: rgba(26,127,255,.2); color: var(--cyan); }

    /* Config viewer */
    .cfg-viewer-card {
      background: var(--bg1); border: 1px solid var(--border);
      border-radius: var(--radius2); overflow: hidden;
    }
    .cfg-viewer-head {
      padding: .85rem 1.25rem; background: var(--bg2);
      border-bottom: 1px solid var(--border);
      display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
    }
    .cfg-viewer-head .dev-badge {
      display: flex; align-items: center; gap: .5rem;
    }
    .cfg-viewer-head .dev-badge .icon { font-size: 1.2rem; }
    .cfg-viewer-head .dev-badge .name { font-size: 1rem; font-weight: 700; }
    .cfg-viewer-head .dev-badge .os-pill {
      padding: .2rem .6rem; border-radius: 5px; font-size: .68rem; font-weight: 700;
      background: var(--bg4); color: var(--txt1);
    }
    .cfg-viewer-head .spacer { flex: 1; }
    .cfg-actions { display: flex; gap: .5rem; }
    .btn-cfg-action {
      padding: .38rem .8rem; border-radius: 6px;
      border: 1px solid var(--border); background: var(--bg3);
      color: var(--txt1); font-size: .75rem; font-weight: 600;
      cursor: pointer; transition: all .18s;
    }
    .btn-cfg-action:hover { border-color: var(--border-hi); color: var(--txt0); }

    /* Section quick nav */
    .cfg-section-nav {
      display: flex; gap: 0; overflow-x: auto;
      background: var(--bg2); border-bottom: 1px solid var(--border);
    }
    .cfg-snav-btn {
      padding: .45rem .85rem; font-size: .72rem; font-weight: 600;
      color: var(--txt2); background: none; border: none;
      cursor: pointer; white-space: nowrap; transition: all .18s;
      border-bottom: 2px solid transparent;
    }
    .cfg-snav-btn:hover { color: var(--txt0); }
    .cfg-snav-btn.active { color: var(--cyan); border-bottom-color: var(--cyan); }

    /* The actual code area */
    #cfg-code-area {
      padding: 0; overflow: auto;
      max-height: calc(100vh - 280px); min-height: 300px;
      -webkit-overflow-scrolling: touch;
    }
    .cfg-code {
      margin: 0; padding: 1.25rem 1.5rem;
      font-family: 'Courier New', 'Cascadia Code', monospace;
      font-size: .78rem; line-height: 1.65;
      color: #c8d8ff; background: var(--bg0);
      white-space: pre; tab-size: 2;
      counter-reset: line;
    }
    /* Syntax colors */
    .ck  { color: #569cd6; }   /* keyword */
    .cv  { color: #9cdcfe; }   /* value / identifier */
    .cn  { color: #b5cea8; }   /* number / IP */
    .cc  { color: #6a9955; }   /* comment */
    .cs  { color: #ce9178; }   /* string */
    .cm  { color: #4ec9b0; }   /* macro / feature */
    .ce  { color: #f44747; }   /* error / no */
    .ci  { color: #ffd700; }   /* interface name */
    .cp  { color: #c586c0; }   /* param / option */

    /* Copy success flash */
    @keyframes copyFlash {
      0%   { background: rgba(0,232,122,.25); }
      100% { background: transparent; }
    }
    .copy-flash { animation: copyFlash .6s ease; }

    /* ══════════════════════════════════════════════════════════════
       PART 5 — Deploy & Validate Styles
    ══════════════════════════════════════════════════════════════ */

    /* Terminal */
    .terminal-wrap {
      background: #050a0f; border: 1px solid var(--border);
      border-radius: var(--radius2); overflow: hidden;
    }
    .terminal-titlebar {
      background: var(--bg2); border-bottom: 1px solid var(--border);
      padding: .6rem 1rem; display: flex; align-items: center; gap: .75rem;
    }
    .terminal-dots { display: flex; gap: .4rem; }
    .terminal-dots span {
      width: 12px; height: 12px; border-radius: 50%;
    }
    .term-title { font-size: .78rem; font-weight: 600; color: var(--txt2); flex: 1; text-align: center; }
    #terminal-output {
      padding: 1rem 1.25rem;
      font-family: 'Courier New', monospace; font-size: .78rem;
      line-height: 1.7; color: #c8ffb0;
      min-height: 320px; max-height: calc(100vh - 300px); overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    .t-info    { color: #5af; }
    .t-ok      { color: #5f5; }
    .t-warn    { color: #fa5; }
    .t-err     { color: #f55; }
    .t-dim     { color: #556; }
    .t-prompt  { color: #5af; }
    .t-blink   { animation: pulse 1s infinite; }

    /* Deploy step tracker */
    .deploy-steps {
      display: flex; flex-direction: column; gap: .5rem;
      margin-bottom: 1.5rem;
    }
    .deploy-step {
      display: flex; align-items: center; gap: .85rem;
      padding: .65rem 1rem;
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius); transition: all .3s;
    }
    .deploy-step.running { border-color: var(--blue); background: rgba(26,127,255,.06); }
    .deploy-step.done    { border-color: var(--green); background: rgba(0,232,122,.06); }
    .deploy-step.failed  { border-color: var(--red);   background: rgba(255,51,85,.06); }
    .deploy-step.skipped { opacity: .45; }
    .ds-icon { font-size: 1.1rem; width: 24px; text-align: center; flex-shrink: 0; }
    .ds-body  { flex: 1; }
    .ds-name  { font-size: .85rem; font-weight: 700; }
    .ds-desc  { font-size: .72rem; color: var(--txt2); }
    .ds-status {
      font-size: .72rem; font-weight: 700;
      padding: .15rem .55rem; border-radius: 4px;
      white-space: nowrap;
    }
    .ds-status.pending { background: var(--bg3); color: var(--txt2); }
    .ds-status.running { background: rgba(26,127,255,.2); color: var(--cyan); animation: pulse 1.2s infinite; }
    .ds-status.done    { background: var(--green-dim); color: var(--green); }
    .ds-status.failed  { background: var(--red-dim);   color: var(--red); }

    /* Check results dashboard */
    .check-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: .85rem; margin-top: 1.5rem;
    }
    .check-card {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: .85rem 1rem;
      display: flex; gap: .75rem; align-items: flex-start;
      transition: border-color .3s;
    }
    .check-card.pass { border-color: var(--green-dim); }
    .check-card.fail { border-color: var(--red-dim);   }
    .check-card.warn { border-color: var(--orange-dim);}
    .check-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: .05rem; }
    .check-info .ck-name { font-size: .82rem; font-weight: 700; }
    .check-info .ck-detail { font-size: .73rem; color: var(--txt2); margin-top: .15rem; line-height: 1.4; }
    .check-info .ck-val { font-family: monospace; font-size: .72rem; color: var(--cyan); margin-top: .2rem; }

    /* Summary scorecard */
    .score-row {
      display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
    }
    .score-box {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); padding: 1rem 1.5rem;
      text-align: center; flex: 1; min-width: 110px;
    }
    .score-box .sb-num { font-size: 2rem; font-weight: 800; line-height: 1; }
    .score-box .sb-label { font-size: .72rem; color: var(--txt2); margin-top: .35rem; }
    .score-box.pass { border-color: var(--green-dim); }
    .score-box.pass .sb-num { color: var(--green); }
    .score-box.fail { border-color: var(--red-dim); }
    .score-box.fail .sb-num { color: var(--red); }
    .score-box.warn { border-color: var(--orange-dim); }
    .score-box.warn .sb-num { color: var(--orange); }
    .score-box.info .sb-num { color: var(--cyan); }

    /* ══════════════════════════════════════════════════════════════
       PART 3 — HLD / LLD Design Styles
    ══════════════════════════════════════════════════════════════ */

    /* ── Design tabs ─────────────────────────────────────────────── */
    .design-tabs {
      display: flex; gap: 0; margin-bottom: 1.75rem;
      border-bottom: 2px solid var(--border);
    }
    .dtab {
      padding: .65rem 1.5rem; font-size: .88rem; font-weight: 600;
      color: var(--txt2); background: none; border: none;
      cursor: pointer; transition: all .2s;
      border-bottom: 2px solid transparent; margin-bottom: -2px;
    }
    .dtab:hover { color: var(--txt0); }
    .dtab.active { color: var(--cyan); border-bottom-color: var(--cyan); }

    .design-panel { display: none; }
    .design-panel.active { display: block; animation: fadeUp .3s ease; }

    /* ── SVG diagram wrapper ─────────────────────────────────────── */
    .svg-wrap {
      background: var(--bg1); border: 1px solid var(--border);
      border-radius: var(--radius2); overflow: hidden;
      position: relative;
    }
    .svg-toolbar {
      display: flex; align-items: center; gap: .75rem;
      padding: .75rem 1.25rem; border-bottom: 1px solid var(--border);
      background: var(--bg2);
    }
    .svg-toolbar h4 { font-size: .85rem; font-weight: 700; flex: 1; }
    .svg-toolbar .meta { font-size: .75rem; color: var(--txt2); }
    #hld-svg-container {
      width: 100%; overflow-x: auto;
      padding: 1rem;
      min-height: 480px;
    }
    #hld-svg-container svg {
      width: 100%; height: auto;
      min-width: 800px;
    }

    /* SVG element styles (applied inline or via class) */
    .svg-device-box {
      transition: filter .2s;
      cursor: default;
    }
    .svg-device-box:hover { filter: brightness(1.2); }

    @keyframes flowDash {
      from { stroke-dashoffset: 24; }
      to   { stroke-dashoffset: 0; }
    }
    .flow-link {
      animation: flowDash 1.2s linear infinite;
    }
    .flow-link-slow {
      animation: flowDash 2.5s linear infinite;
    }
    @keyframes packetPulse {
      0%,100% { opacity:.95; r:4; }
      50%      { opacity:.5;  r:2.5; }
    }
    .pkt { animation: packetPulse 1.8s ease-in-out infinite; }

    /* ── Legend ──────────────────────────────────────────────────── */
    .svg-legend {
      display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
      padding: .85rem 1.25rem; border-top: 1px solid var(--border);
      background: var(--bg2); font-size: .75rem;
    }
    .legend-item { display: flex; align-items: center; gap: .4rem; color: var(--txt2); }
    .legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
    .legend-line { width: 22px; height: 2px; flex-shrink: 0; }

    /* ── LLD Tables ──────────────────────────────────────────────── */
    .lld-section { margin-bottom: 2rem; }
    .lld-section-head {
      display: flex; align-items: center; gap: .75rem;
      margin-bottom: 1rem;
    }
    .lld-section-head .ico {
      width: 30px; height: 30px; border-radius: 7px;
      display: flex; align-items: center; justify-content: center;
      font-size: .9rem; flex-shrink: 0;
    }
    .lld-section-head h4 { font-size: .95rem; font-weight: 700; }
    .lld-section-head p  { font-size: .75rem; color: var(--txt2); }

    .lld-table-wrap {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); overflow: hidden;
    }
    .lld-table {
      width: 100%; border-collapse: collapse; font-size: .8rem;
    }
    .lld-table th {
      text-align: left; padding: .55rem 1rem;
      font-size: .68rem; font-weight: 700; letter-spacing: .07em;
      text-transform: uppercase; color: var(--txt2);
      background: var(--bg1); border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }
    .lld-table td {
      padding: .55rem 1rem; border-bottom: 1px solid var(--border);
      vertical-align: middle;
    }
    .lld-table tr:last-child td { border-bottom: none; }
    .lld-table tr:hover td { background: rgba(255,255,255,.02); }
    .mono { font-family: 'Courier New', monospace; font-size: .78rem; color: var(--cyan); }
    .pill-layer {
      display: inline-block; padding: .1rem .45rem;
      border-radius: 4px; font-size: .68rem; font-weight: 700;
      white-space: nowrap;
    }
    .pl-access { background: rgba(26,127,255,.15);   color: var(--blue); }
    .pl-dist   { background: rgba(0,212,255,.15);    color: var(--cyan); }
    .pl-core   { background: rgba(153,85,255,.15);   color: var(--purple); }
    .pl-spine  { background: rgba(0,232,122,.15);    color: var(--green); }
    .pl-leaf   { background: rgba(0,232,122,.1);     color: #5dcc8a; }
    .pl-tor    { background: rgba(255,140,0,.15);    color: var(--orange); }
    .pl-fw     { background: rgba(255,51,85,.15);    color: var(--red); }
    .pl-mgmt   { background: rgba(255,208,0,.15);    color: var(--yellow); }
    .pl-wan    { background: rgba(0,212,255,.1);     color: var(--cyan); }

    /* BGP table coloring */
    .asn-badge {
      display: inline-block; font-family: monospace;
      padding: .1rem .5rem; border-radius: 4px;
      background: var(--bg3); border: 1px solid var(--border);
      font-size: .78rem; color: var(--orange);
    }

    /* Download bar */
    .export-bar {
      display: flex; gap: .65rem; flex-wrap: wrap;
      margin-bottom: 1.5rem;
    }

    /* ── IP Plan grid ────────────────────────────────────────────── */
    .ip-plan-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: .85rem; margin-bottom: 1.5rem;
    }
    .ip-block-card {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: .9rem 1rem;
    }
    .ip-block-card .ibc-label {
      font-size: .68rem; font-weight: 700; letter-spacing: .08em;
      text-transform: uppercase; color: var(--txt2); margin-bottom: .4rem;
    }
    .ip-block-card .ibc-subnet {
      font-family: monospace; font-size: 1rem; font-weight: 700;
      color: var(--cyan); margin-bottom: .25rem;
    }
    .ip-block-card .ibc-detail {
      font-size: .75rem; color: var(--txt1);
    }
    .ip-block-card .ibc-range {
      font-family: monospace; font-size: .72rem; color: var(--txt2);
      margin-top: .2rem;
    }

    /* ══════════════════════════════════════════════════════════════
       PART 2 — Product Recommendation Styles
    ══════════════════════════════════════════════════════════════ */

    /* ── Layer section ───────────────────────────────────────────── */
    .layer-section { margin-bottom: 2.5rem; }
    .layer-header {
      display: flex; align-items: center; gap: .85rem;
      margin-bottom: 1.1rem; padding-bottom: .75rem;
      border-bottom: 1px solid var(--border);
    }
    .layer-icon {
      width: 36px; height: 36px; border-radius: 9px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.1rem; flex-shrink: 0;
    }
    .layer-header h3 { font-size: 1.05rem; font-weight: 700; }
    .layer-header .layer-meta { font-size: .78rem; color: var(--txt2); margin-top: .1rem; }
    .layer-header .layer-count {
      margin-left: auto;
      background: var(--bg3); border: 1px solid var(--border);
      border-radius: 20px; padding: .2rem .75rem;
      font-size: .75rem; color: var(--txt1); white-space: nowrap;
    }
    .layer-count strong { color: var(--cyan); }

    /* ── Product cards ───────────────────────────────────────────── */
    .prod-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
      gap: 1rem;
    }
    .prod-card {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); padding: 1.25rem;
      display: flex; flex-direction: column; gap: .9rem;
      transition: all .25s; position: relative;
      overflow: hidden;
    }
    .prod-card::after {
      content: ''; position: absolute; inset: 0;
      border-radius: var(--radius2);
      pointer-events: none;
    }
    .prod-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
    .prod-card.recommended {
      border-color: var(--blue);
      box-shadow: var(--glow-b), inset 0 0 0 1px rgba(26,127,255,.15);
    }
    .prod-card.selected-prod {
      border-color: var(--green);
      box-shadow: var(--glow-g);
    }
    .rec-badge {
      position: absolute; top: 0; right: 1.25rem;
      background: var(--blue); color: #fff;
      font-size: .65rem; font-weight: 700; letter-spacing: .06em;
      padding: .2rem .65rem; border-radius: 0 0 6px 6px;
      text-transform: uppercase;
    }
    .rec-badge.alt { background: var(--purple); }

    /* Card header */
    .prod-head {
      display: flex; align-items: flex-start; gap: .85rem;
    }
    .vendor-logo {
      width: 42px; height: 42px; border-radius: 9px;
      display: flex; align-items: center; justify-content: center;
      font-size: .65rem; font-weight: 800; letter-spacing: -.01em;
      flex-shrink: 0; text-align: center; line-height: 1.1;
    }
    .vl-cisco   { background: #1ba0d7; color: #fff; }
    .vl-arista  { background: #e04f3b; color: #fff; }
    .vl-juniper { background: #009b3a; color: #fff; }
    .vl-nvidia  { background: #76b900; color: #fff; }
    .vl-paloalto{ background: #fa5a28; color: #fff; }
    .vl-fortinet{ background: #e6111a; color: #fff; }
    .vl-aruba   { background: #ff6600; color: #fff; }
    .vl-extreme { background: #6f2ca8; color: #fff; }
    .vl-dell    { background: #007db8; color: #fff; }

    /* ── Price tier badge ──────────────────────────────────────────── */
    .tier-badge {
      display: inline-block;
      font-size: .65rem; font-weight: 700; letter-spacing: .04em;
      padding: 2px 7px; border-radius: 4px;
      margin-top: 3px;
      text-transform: uppercase;
    }

    /* ── Vendor preference chip grid ───────────────────────────────── */
    .vendor-pref-grid {
      display: flex; flex-wrap: wrap; gap: .5rem;
      margin-top: .6rem;
    }
    .vendor-chip {
      display: flex; align-items: center; gap: .4rem;
      padding: .35rem .8rem;
      border: 1px solid var(--border);
      border-radius: 20px;
      background: var(--bg3);
      cursor: pointer;
      font-size: .82rem; font-weight: 600;
      transition: all .18s;
      user-select: none;
    }
    .vendor-chip:hover { border-color: var(--border-hi); background: var(--bg4); }
    .vendor-chip.on {
      border-color: var(--blue);
      background: rgba(26,127,255,.18);
      color: var(--blue);
    }
    .vendor-chip .vc-dot {
      width: 9px; height: 9px; border-radius: 50%;
      display: inline-block;
    }
    .vl-f5      { background: #e4002b; color: #fff; }

    /* ── Reference Architecture Cards ─────────────────────────────── */
    .ref-arch-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 1rem;
      padding: 0 0 1.5rem;
    }
    .ref-card {
      display: flex; flex-direction: column; gap: .5rem;
      padding: 1.1rem 1.2rem;
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 12px;
      text-decoration: none;
      transition: all .2s;
      cursor: pointer;
    }
    .ref-card:hover {
      background: var(--bg3);
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0,0,0,.35);
    }
    .ref-vendor {
      font-size: .72rem; font-weight: 800; letter-spacing: .06em;
      text-transform: uppercase;
    }
    .ref-title {
      font-size: .88rem; font-weight: 700; color: var(--txt0);
      line-height: 1.35;
    }
    .ref-desc {
      font-size: .77rem; color: var(--txt1); line-height: 1.5;
      flex: 1;
    }
    .ref-tags {
      display: flex; flex-wrap: wrap; gap: .3rem;
      margin-top: .25rem;
    }
    .ref-tag {
      font-size: .65rem; font-weight: 600;
      padding: 2px 7px; border-radius: 4px;
      background: var(--bg4); color: var(--txt1);
      border: 1px solid var(--border);
    }
    .ref-link {
      font-size: .72rem; font-weight: 700;
      color: var(--blue); margin-top: .2rem;
    }

    .prod-title { flex: 1; }
    .prod-title .model { font-size: .95rem; font-weight: 700; line-height: 1.2; }
    .prod-title .vendor-name { font-size: .73rem; color: var(--txt2); margin-top: .15rem; }
    .prod-title .series { font-size: .73rem; color: var(--txt1); }

    /* Fit score */
    .fit-score { display: flex; align-items: center; gap: .6rem; }
    .fit-label { font-size: .7rem; color: var(--txt2); white-space: nowrap; }
    .fit-bar { flex: 1; height: 5px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
    .fit-fill { height: 100%; border-radius: 3px; transition: width .6s ease; }
    .fit-pct { font-size: .75rem; font-weight: 700; min-width: 32px; text-align: right; }

    /* Specs grid */
    .specs-grid {
      display: grid; grid-template-columns: 1fr 1fr;
      gap: .4rem .65rem;
    }
    .spec-item { }
    .spec-item .sk { font-size: .67rem; color: var(--txt2); text-transform: uppercase; letter-spacing: .06em; }
    .spec-item .sv { font-size: .8rem; font-weight: 600; color: var(--txt0); margin-top: .05rem; }

    /* Feature pills */
    .feat-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
    .feat-pill {
      background: var(--bg3); border: 1px solid var(--border);
      border-radius: 4px; padding: .1rem .45rem;
      font-size: .67rem; color: var(--txt1);
    }
    .feat-pill.hi { border-color: var(--cyan-dim); color: var(--cyan); background: rgba(0,212,255,.07); }

    /* Card actions */
    .prod-actions { display: flex; gap: .55rem; margin-top: auto; }
    .btn-select-prod {
      flex: 1; padding: .5rem; border-radius: var(--radius);
      border: 1px solid var(--border); background: var(--bg3);
      color: var(--txt1); font-size: .78rem; font-weight: 600;
      cursor: pointer; transition: all .2s; text-align: center;
    }
    .btn-select-prod:hover { border-color: var(--green); color: var(--green); }
    .prod-card.selected-prod .btn-select-prod {
      background: var(--green-dim); border-color: var(--green); color: var(--green);
    }
    .btn-detail {
      padding: .5rem .75rem; border-radius: var(--radius);
      border: 1px solid var(--border); background: var(--bg3);
      color: var(--txt2); font-size: .78rem;
      cursor: pointer; transition: all .2s;
    }
    .btn-detail:hover { color: var(--txt0); border-color: var(--border-hi); }

    /* ── Vendor filter tabs ──────────────────────────────────────── */
    .vendor-tabs {
      display: flex; gap: .5rem; flex-wrap: wrap;
      margin-bottom: 1.5rem;
    }
    .vtab {
      padding: .35rem .85rem; border-radius: 20px;
      border: 1px solid var(--border); background: var(--bg2);
      font-size: .78rem; font-weight: 600; color: var(--txt2);
      cursor: pointer; transition: all .2s;
    }
    .vtab:hover { border-color: var(--border-hi); color: var(--txt0); }
    .vtab.active { background: var(--bg4); border-color: var(--border-hi); color: var(--txt0); }

    /* ── BOM Table ───────────────────────────────────────────────── */
    .bom-section {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); overflow: hidden;
      margin-top: 2.5rem;
    }
    .bom-head {
      padding: 1rem 1.25rem;
      border-bottom: 1px solid var(--border);
      display: flex; align-items: center; justify-content: space-between;
    }
    .bom-head h3 { font-size: .95rem; font-weight: 700; }
    .bom-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
    .bom-table th {
      text-align: left; padding: .65rem 1.25rem;
      font-size: .7rem; font-weight: 700; letter-spacing: .07em;
      text-transform: uppercase; color: var(--txt2);
      background: var(--bg1); border-bottom: 1px solid var(--border);
    }
    .bom-table td {
      padding: .65rem 1.25rem;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
    }
    .bom-table tr:last-child td { border-bottom: none; }
    .bom-table tr:hover td { background: var(--bg3); }
    .bom-table .qty { font-weight: 700; color: var(--cyan); }
    .bom-table .layer-tag {
      display: inline-block;
      padding: .12rem .5rem; border-radius: 4px;
      font-size: .67rem; font-weight: 700;
      background: var(--bg3); color: var(--txt2);
    }
    .bom-footer {
      padding: .85rem 1.25rem;
      border-top: 1px solid var(--border);
      background: var(--bg1);
      display: flex; justify-content: space-between; align-items: center;
      font-size: .82rem; color: var(--txt2);
    }
    .bom-footer strong { color: var(--txt0); }

    /* ── Regen / Recommendation controls ─────────────────────────── */
    #recs-controls {
      display: flex; align-items: center; gap: 1rem;
      margin-bottom: 1.75rem;
      flex-wrap: wrap;
    }
    #recs-controls .recs-title { flex: 1; }
    #recs-controls h3 { font-size: 1.1rem; font-weight: 700; }
    #recs-controls p  { font-size: .8rem; color: var(--txt1); margin-top: .2rem; }

    /* ── Loading skeleton for recs ───────────────────────────────── */
    .recs-loading {
      display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem;
    }
    .skel-card {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); padding: 1.25rem;
      display: flex; flex-direction: column; gap: .75rem;
    }

    /* ── Detail modal ────────────────────────────────────────────── */
    #modal-overlay {
      position: fixed; inset: 0; z-index: 200;
      background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
      display: none; align-items: center; justify-content: center;
      padding: 1.5rem;
    }
    #modal-overlay.open { display: flex; }
    #modal-box {
      background: var(--bg2); border: 1px solid var(--border-hi);
      border-radius: var(--radius2); width: 100%; max-width: 640px;
      max-height: 90vh; overflow-y: auto;
      box-shadow: var(--shadow);
      animation: fadeUp .25s ease;
    }

    /* ── Generic modal overlay class (custom-policy, ZTP, etc.) ── */
    .modal-overlay {
      position: fixed; inset: 0; z-index: 300;
      background: rgba(0,0,0,.8); backdrop-filter: blur(6px);
      display: flex; align-items: flex-start; justify-content: center;
      padding: 1.5rem 1rem;
      overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    .modal-box {
      background: var(--bg2); border: 1px solid var(--border-hi);
      border-radius: var(--radius2); width: 100%;
      box-shadow: var(--shadow);
      animation: fadeUp .25s ease;
      margin: auto 0;
    }
    /* Mobile: full-width cards, stack grids */
    .cp-grid-2 {
      display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
    }
    @media (max-width: 600px) {
      .modal-overlay { padding: .75rem .5rem; }
      .cp-grid-2 { grid-template-columns: 1fr; }
      .cp-row { flex-direction: column; align-items: stretch; }
      .cp-input.cp-vlan-id { width: 100%; }
    }
    .modal-head {
      padding: 1.25rem 1.5rem;
      border-bottom: 1px solid var(--border);
      display: flex; align-items: center; gap: 1rem;
    }
    .modal-body { padding: 1.5rem; }
    .modal-close {
      margin-left: auto; background: none; border: none;
      color: var(--txt2); font-size: 1.2rem; cursor: pointer;
      padding: .25rem .5rem; border-radius: 4px;
    }
    .modal-close:hover { color: var(--txt0); }
    .detail-section { margin-bottom: 1.5rem; }
    .detail-section h4 {
      font-size: .75rem; font-weight: 700; letter-spacing: .08em;
      text-transform: uppercase; color: var(--txt2);
      margin-bottom: .75rem;
    }
    .detail-specs {
      display: grid; grid-template-columns: 1fr 1fr;
      gap: .5rem .85rem;
    }
    .ds-row { display: flex; justify-content: space-between; font-size: .82rem; padding: .35rem 0; border-bottom: 1px solid var(--border); }
    .ds-row:last-child { border-bottom: none; }
    .ds-row .dk { color: var(--txt2); }

    /* ════════════════════════════════════════════════════════════
       LANDING PAGE
    ════════════════════════════════════════════════════════════ */
    @keyframes fadeOut { to { opacity:0; transform:translateY(-20px); } }
    @keyframes landIn  { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:none; } }
    @keyframes floatUp { 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-8px); } }

    #landing {
      position: fixed; inset: 0; z-index: 200;
      background: var(--bg0);
      overflow-y: auto;
      display: flex; flex-direction: column;
    }
    #landing.landing-exit {
      animation: fadeOut .45s ease forwards;
      pointer-events: none;
    }

    /* Landing nav */
    .land-nav {
      display: flex; align-items: center; justify-content: space-between;
      padding: 1rem 2.5rem; border-bottom: 1px solid var(--border);
      background: rgba(6,11,24,.8); backdrop-filter: blur(12px);
      position: sticky; top: 0; z-index: 10;
    }
    .land-logo {
      display: flex; align-items: center; gap: .6rem;
      font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em;
    }

    /* Hero */
    .land-hero {
      max-width: 820px; margin: 0 auto;
      padding: 5rem 2rem 3rem;
      text-align: center;
      animation: landIn .6s ease;
    }
    .land-badge {
      display: inline-block; margin-bottom: 1.5rem;
      background: rgba(26,127,255,.12); border: 1px solid rgba(26,127,255,.3);
      border-radius: 20px; padding: .35rem 1rem;
      font-size: .78rem; font-weight: 600; color: var(--blue);
      letter-spacing: .02em;
    }
    .land-h1 {
      font-size: clamp(2rem, 5vw, 3.5rem);
      font-weight: 900; line-height: 1.12;
      letter-spacing: -.03em;
      margin-bottom: 1.25rem;
    }
    .land-gradient {
      background: linear-gradient(135deg, var(--blue), var(--cyan));
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .land-sub {
      font-size: 1.05rem; color: var(--txt1); line-height: 1.65;
      max-width: 640px; margin: 0 auto 2.25rem;
    }
    .land-ctas {
      display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
      margin-bottom: 2.5rem;
    }
    .land-cta-primary {
      font-size: 1rem; padding: .75rem 2rem;
      border-radius: 10px; font-weight: 700;
      box-shadow: 0 0 24px rgba(26,127,255,.35);
    }
    .land-cta-ghost {
      font-size: 1rem; padding: .75rem 1.75rem;
      border-radius: 10px; font-weight: 600;
    }

    /* Stats */
    .land-stats {
      display: flex; align-items: center; justify-content: center;
      gap: 0; flex-wrap: wrap;
      border: 1px solid var(--border); border-radius: 12px;
      background: var(--bg2); overflow: hidden;
      display: inline-flex;
    }
    .land-stat {
      display: flex; flex-direction: column; align-items: center;
      padding: .85rem 1.75rem; gap: .2rem;
    }
    .land-stat-sep { width: 1px; height: 40px; background: var(--border); }
    .ls-val { font-size: 1.6rem; font-weight: 800; color: var(--cyan); line-height: 1; }
    .ls-lbl { font-size: .72rem; color: var(--txt2); }

    /* Feature cards */
    .land-features {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 1rem;
      max-width: 1100px; margin: 2rem auto;
      padding: 0 2rem;
      animation: landIn .7s .1s ease both;
    }
    .land-feat {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); padding: 1.5rem;
      transition: border-color .2s, transform .2s;
    }
    .land-feat:hover { border-color: var(--border-hi); transform: translateY(-2px); }
    .lf-icon {
      width: 44px; height: 44px; border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.3rem; margin-bottom: 1rem;
    }
    .land-feat h3 { font-size: .92rem; font-weight: 700; margin-bottom: .5rem; }
    .land-feat p  { font-size: .8rem; color: var(--txt2); line-height: 1.55; }

    /* Use cases strip */
    .land-use-cases {
      max-width: 1100px; margin: 1rem auto 2rem;
      padding: 0 2rem; text-align: center;
      animation: landIn .8s .15s ease both;
    }
    .luc-label { font-size: .75rem; font-weight: 700; color: var(--txt2); margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .08em; }
    .luc-chips { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
    .luc-chips span {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: 20px; padding: .3rem .9rem;
      font-size: .78rem; color: var(--txt1);
    }

    /* Landing footer */
    .land-footer {
      display: flex; gap: 1.5rem; justify-content: center; align-items: center;
      padding: 1.5rem 2rem;
      border-top: 1px solid var(--border);
      font-size: .75rem; color: var(--txt2);
    }
    .land-footer a { color: var(--blue); text-decoration: none; }

    /* ════════════════════════════════════════════════════════════
       DEVICE STATUS TABLE (Step 6 — deploy realism)
    ════════════════════════════════════════════════════════════ */
    .dev-status-tbl {
      width: 100%; border-collapse: collapse;
      font-size: .82rem; background: var(--bg2);
      border: 1px solid var(--border); border-radius: var(--radius);
      overflow: hidden;
    }
    .dev-status-tbl th {
      background: var(--bg3); padding: .55rem .9rem;
      font-size: .72rem; font-weight: 700; color: var(--txt2);
      text-transform: uppercase; letter-spacing: .06em;
      border-bottom: 1px solid var(--border); text-align: left;
    }
    .dev-status-tbl td { padding: .55rem .9rem; border-bottom: 1px solid var(--border); }
    .dev-status-tbl tr:last-child td { border-bottom: none; }
    .dsr-icon { font-size: 1rem; margin-right: .2rem; }
    .dsr-os-pill {
      background: var(--bg3); border: 1px solid var(--border);
      border-radius: 4px; padding: .1rem .4rem;
      font-size: .7rem; font-family: var(--mono); color: var(--txt1);
    }
    .dsr-row { transition: background .2s; }
    .dsr-row.dsr-running { background: rgba(26,127,255,.06); }
    .dsr-row.dsr-done    { background: rgba(0,232,122,.04); }
    .dsr-row.dsr-failed  { background: rgba(255,51,85,.06); }
    .dsr-status { font-size: .8rem; }
    .dsr-st-text { font-size: .78rem; color: var(--txt1); }
    .dsr-action {
      font-family: var(--mono); font-size: .72rem;
      max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }

    /* ════════════════════════════════════════════════════════════
       DESIGN SUMMARY TAB
    ════════════════════════════════════════════════════════════ */
    .sum-layout { display: flex; flex-direction: column; gap: 1rem; }
    .sum-card {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); padding: 1.25rem;
    }
    .sum-hero {
      display: flex; align-items: center; gap: 1.25rem;
      padding: 1.5rem;
    }
    .sum-hero-icon {
      width: 56px; height: 56px;
      background: linear-gradient(135deg, var(--blue), var(--cyan));
      border-radius: 14px; display: flex; align-items: center; justify-content: center;
      font-size: 1.8rem; flex-shrink: 0;
    }
    .sum-hero-title  { font-size: 1.05rem; font-weight: 800; margin-bottom: .2rem; }
    .sum-hero-org    { font-size: .82rem; color: var(--txt2); margin-bottom: .4rem; }
    .sum-hero-meta   { display: flex; gap: .75rem; flex-wrap: wrap; font-size: .76rem; color: var(--txt2); }
    .sum-hero-meta span::before { content: '· '; color: var(--txt3); }
    .sum-hero-meta span:first-child::before { content: ''; }
    .sum-export-btn-wrap { margin-left: auto; }
    .sum-export-btn { font-size: .8rem; padding: .4rem .85rem; }

    .sum-stats-row {
      display: flex; gap: 0;
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); overflow: hidden;
    }
    .sum-stat {
      flex: 1; text-align: center; padding: 1rem .5rem;
      border-right: 1px solid var(--border);
    }
    .sum-stat:last-child { border-right: none; }
    .sum-stat-val { font-size: 1.5rem; font-weight: 800; color: var(--cyan); line-height: 1; }
    .sum-stat-lbl { font-size: .7rem; color: var(--txt2); margin-top: .25rem; }

    .sum-two-col {
      display: grid; grid-template-columns: 1.5fr 1fr;
      gap: 1rem;
    }
    @media (max-width: 700px) { .sum-two-col { grid-template-columns: 1fr; } }

    .sum-card-hdr {
      font-size: .78rem; font-weight: 700; color: var(--txt2);
      text-transform: uppercase; letter-spacing: .07em;
      margin-bottom: .85rem;
    }
    .sum-table {
      width: 100%; border-collapse: collapse; font-size: .8rem;
    }
    .sum-table th {
      background: var(--bg3); padding: .4rem .7rem;
      font-size: .7rem; color: var(--txt2); text-align: left;
      border-bottom: 1px solid var(--border);
    }
    .sum-table td { padding: .45rem .7rem; border-bottom: 1px solid var(--border); }
    .sum-table tr:last-child td { border-bottom: none; }

    .sum-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
    .sum-chip {
      background: var(--bg3); border: 1px solid var(--border);
      border-radius: 4px; padding: .15rem .55rem;
      font-size: .75rem; color: var(--txt1);
    }
    .sum-chip-proto { border-color: rgba(0,212,255,.3); color: var(--cyan); background: rgba(0,212,255,.08); }
    .sum-chip-sec   { border-color: rgba(0,232,122,.3); color: var(--green); background: rgba(0,232,122,.07); }

    .sum-export-row {
      display: flex; gap: .75rem; flex-wrap: wrap;
      padding: 1rem 1.25rem;
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2);
    }

    /* ════════════════════════════════════════════════════════════
       EXPORT MODAL OPTIONS
    ════════════════════════════════════════════════════════════ */
    .export-opt {
      display: flex; align-items: center; gap: 1rem;
      padding: .85rem 1rem; border-radius: var(--radius);
      border: 1px solid var(--border); background: var(--bg3);
      cursor: pointer; transition: all .18s;
    }
    .export-opt:hover { border-color: var(--border-hi); background: var(--bg4); }
    .exp-icon {
      width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
    }

    /* ════════════════════════════════════════════════════════════
       PHASE-3 FEATURES: Intent Model · Diff Engine · Simulation
       Rollback · Pipeline Tracking · Observability
    ════════════════════════════════════════════════════════════ */

    /* ── Deploy stage timestamp ──────────────────────────────── */
    .ds-timestamp {
      font-size: .7rem; color: var(--txt3);
      margin-top: .2rem; font-family: var(--mono);
    }
    .ds-status.rolled_back { background: rgba(255,136,0,.15); color: var(--orange); }

    /* ── Intent Model Panel ──────────────────────────────────── */
    .intent-panel {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); margin-bottom: 1.5rem;
      overflow: hidden;
    }
    .intent-panel-hdr {
      display: flex; align-items: center; justify-content: space-between;
      padding: .75rem 1.25rem; cursor: pointer;
      border-bottom: 1px solid var(--border);
      transition: background .15s;
    }
    .intent-panel-hdr:hover { background: var(--bg3); }
    .intent-badge {
      background: rgba(153,85,255,.15); color: #aa77ff;
      border: 1px solid rgba(153,85,255,.25);
      border-radius: 20px; font-size: .68rem; padding: .1rem .5rem;
      font-weight: 600;
    }
    .intent-panel-body { padding: .75rem 1.25rem; }
    .intent-json {
      font-family: var(--mono); font-size: .75rem; line-height: 1.6;
      color: var(--txt1); white-space: pre; overflow-x: auto;
      margin: 0; padding: 0;
    }
    /* JSON syntax colours */
    .ij-key  { color: #7dd3fc; }   /* light blue  */
    .ij-str  { color: #86efac; }   /* light green */
    .ij-num  { color: #fbbf24; }   /* amber       */
    .ij-bool { color: #f472b6; }   /* pink        */
    .ij-null { color: var(--txt3); }

    /* ── Config Diff Engine ──────────────────────────────────── */
    .diff-stats-bar {
      display: flex; align-items: center; gap: 1rem;
      padding: .5rem .85rem; background: var(--bg3);
      border-bottom: 1px solid var(--border);
      font-size: .78rem; flex-wrap: wrap;
    }
    .diff-stat-add  { color: var(--green);  font-weight: 600; }
    .diff-stat-del  { color: #ff5555;       font-weight: 600; }
    .diff-stat-same { color: var(--txt2); }
    .diff-pre { background: var(--bg1) !important; }
    .dfl-add  { display:block; color: var(--green);  background: rgba(0,232,122,.08); }
    .dfl-del  { display:block; color: #ff5555;       background: rgba(255,85,85,.08); }
    .dfl-same { display:block; color: var(--txt2); }
    #btn-diff.diff-active { border-color: var(--orange); color: var(--orange); }

    /* ── Simulation Panel ────────────────────────────────────── */
    .sim-panel {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); padding: 1.5rem;
      margin-bottom: 1.5rem;
    }
    .sim-sec-hdr { margin-bottom: 1.25rem; }
    .sim-sec-hdr h4 { font-size: .95rem; font-weight: 700; margin-bottom: .35rem; }
    .sim-sec-hdr p  { font-size: .82rem; color: var(--txt2); line-height: 1.5; }

    .sim-dev-grid {
      display: flex; flex-wrap: wrap; gap: .5rem;
      margin-bottom: 1rem;
    }
    .sim-dev-btn {
      display: flex; align-items: center; gap: .35rem;
      padding: .35rem .75rem; border-radius: var(--radius);
      border: 1px solid var(--border); background: var(--bg3);
      color: var(--txt1); font-size: .78rem; font-weight: 600;
      cursor: pointer; transition: all .18s;
    }
    .sim-dev-btn:hover { border-color: var(--border-hi); color: var(--txt0); }
    .sim-dev-btn.sim-failed {
      border-color: #ff5555; background: rgba(255,85,85,.12);
      color: #ff5555;
    }

    .sim-impact-list { display: flex; flex-direction: column; gap: .85rem; margin-bottom: 1rem; }
    .sim-impact-card {
      background: var(--bg3); border-radius: var(--radius);
      border: 1px solid var(--border);
      border-left-width: 3px; padding: 1rem;
    }
    .sim-impact-hdr {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: .5rem;
    }
    .sim-dev-name { font-weight: 700; font-size: .88rem; }
    .sim-sev {
      font-size: .68rem; font-weight: 700; padding: .15rem .5rem;
      border-radius: 4px; letter-spacing: .05em;
    }
    .sim-impact-desc { font-size: .82rem; color: var(--txt1); line-height: 1.5; }
    .sim-failover { font-size: .78rem; color: var(--txt2); margin-top: .4rem; }
    .sim-no-ha    { color: var(--orange); }

    .sim-health-wrap { margin-top: .75rem; }
    .sim-health-label {
      display: flex; justify-content: space-between;
      font-size: .8rem; margin-bottom: .35rem;
    }
    .sim-health-track {
      height: 8px; background: var(--bg4); border-radius: 4px; overflow: hidden;
    }
    .sim-health-bar { height: 100%; border-radius: 4px; }
    .sim-empty {
      text-align: center; padding: 2rem; color: var(--txt2); font-size: .88rem;
    }

    /* Reachability Matrix */
    .reach-table-wrap { overflow-x: auto; margin-bottom: 1rem; }
    .reach-table {
      border-collapse: collapse; font-size: .76rem;
      font-family: var(--mono);
    }
    .reach-table th, .reach-table td {
      padding: .35rem .5rem; border: 1px solid var(--border);
      text-align: center; white-space: nowrap;
    }
    .reach-table th { background: var(--bg3); font-weight: 700; font-size: .7rem; }
    .reach-row-lbl  { font-weight: 600; background: var(--bg3); text-align: left !important; }
    .reach-self     { color: var(--txt3); }
    .reach-ok       { color: var(--green);  background: rgba(0,232,122,.07); font-weight: 700; }
    .reach-partial  { color: var(--orange); background: rgba(255,136,0,.07); font-weight: 700; }
    .reach-blocked  { color: #ff5555;       background: rgba(255,85,85,.07); font-weight: 700; }
    .reach-legend   { display: flex; gap: 1.25rem; font-size: .75rem; flex-wrap: wrap; }
    .rleg           { display: flex; align-items: center; gap: .3rem; }
    .rleg-ok        { color: var(--green);  }
    .rleg-partial   { color: var(--orange); }
    .rleg-blocked   { color: #ff5555; }

    /* Route propagation */
    .pfx-code    { font-family: var(--mono); font-size: .78rem; color: var(--cyan); }
    .proto-pill  {
      display: inline-block; background: rgba(153,85,255,.15);
      color: #aa77ff; border: 1px solid rgba(153,85,255,.25);
      border-radius: 4px; padding: .1rem .45rem;
      font-size: .7rem; font-weight: 600; white-space: nowrap;
    }
    .prop-path-cell { font-size: .75rem; }
    .prop-hop   { color: var(--txt1); white-space: nowrap; }
    .prop-arrow { color: var(--txt3); }
    .conv-pill  {
      display: inline-block; background: rgba(0,212,255,.1);
      color: var(--cyan); border-radius: 4px; padding: .1rem .4rem;
      font-size: .7rem; font-family: var(--mono); white-space: nowrap;
    }

    /* ── Observability ───────────────────────────────────────── */
    .obs-section { margin-top: 2rem; }
    .obs-block {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); overflow: hidden; margin-bottom: 1.25rem;
    }
    .obs-block-hdr {
      padding: .75rem 1.25rem; font-size: .82rem; font-weight: 700;
      border-bottom: 1px solid var(--border); background: var(--bg3);
    }
    .obs-placeholder { padding: 1rem 1.25rem; color: var(--txt3); font-size: .82rem; }

    /* Metrics */
    .obs-metric-grid {
      display: flex; gap: 0; margin-bottom: 1.25rem;
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: var(--radius2); overflow: hidden;
    }
    .obs-metric {
      flex: 1; padding: 1rem .75rem; text-align: center;
      border-right: 1px solid var(--border);
    }
    .obs-metric:last-child { border-right: none; }
    .om-val { font-size: 1.6rem; font-weight: 800; line-height: 1; }
    .om-lbl { font-size: .72rem; color: var(--txt2); margin-top: .3rem; }

    /* Timeline */
    .tl-bars { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .65rem; }
    .tl-row  { display: flex; align-items: center; gap: .85rem; }
    .tl-lbl  { font-size: .75rem; color: var(--txt2); min-width: 130px; white-space: nowrap; }
    .tl-track {
      flex: 1; height: 22px; background: var(--bg4);
      border-radius: 4px; position: relative; overflow: hidden;
    }
    .tl-bar {
      position: absolute; height: 100%; border-radius: 4px;
      display: flex; align-items: center; transition: width .3s ease;
      min-width: 4px;
    }
    .tl-dur { font-size: .65rem; color: rgba(255,255,255,.85); padding: 0 .4rem; white-space: nowrap; }
    .tl-status {
      font-size: .68rem; font-weight: 700; min-width: 60px;
      text-align: right; white-space: nowrap;
    }
    .tl-st-success { color: var(--green);  }
    .tl-st-failed  { color: #ff5555;       }
    .tl-st-running { color: var(--blue);   }

    /* Event Log */
    .obs-event-log {
      max-height: 280px; overflow-y: auto; padding: .5rem .75rem;
      font-family: var(--mono); font-size: .73rem;
    }
    .obs-ev {
      display: flex; align-items: baseline; gap: .5rem;
      padding: .2rem 0; border-bottom: 1px solid rgba(255,255,255,.04);
      line-height: 1.4;
    }
    .obs-ev:last-child { border-bottom: none; }
    .obs-time  { color: var(--txt3); min-width: 80px; }
    .obs-icon  { min-width: 14px; text-align: center; font-size: .75rem; }
    .obs-msg   { flex: 1; }
    .obs-stag  {
      background: var(--bg4); color: var(--txt3); border-radius: 3px;
      font-size: .65rem; padding: .05rem .35rem; white-space: nowrap;
    }

    /* ══════════════════════════════════════════════════════════════
       PHASE 5 — Gate · Confidence · Policy · Delta · Rollback
       ══════════════════════════════════════════════════════════════ */

    /* ── Gate + Confidence row layout ──────────────────────────── */
    .gate-confidence-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 1rem;
      margin-bottom: 1.25rem;
      align-items: stretch;
    }
    @media (max-width: 680px) {
      .gate-confidence-row { grid-template-columns: 1fr; }
    }

    /* ── Gate banner ─────────────────────────────────────────────── */
    .gate-panel-wrap { min-width: 0; }
    .gate-banner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: .9rem 1.1rem;
      border-radius: var(--radius2);
      border: 1.5px solid;
      height: 100%;
      flex-wrap: wrap;
    }
    .gate-banner.gate-pending { background: rgba(30,40,80,.5);  border-color: var(--border-hi);           }
    .gate-banner.gate-pass    { background: rgba(0,232,122,.08); border-color: rgba(0,232,122,.4);         }
    .gate-banner.gate-warn    { background: rgba(255,208,0,.07); border-color: rgba(255,208,0,.35);        }
    .gate-banner.gate-blocked { background: rgba(255,51,85,.09); border-color: rgba(255,51,85,.45);        }

    .gate-title         { font-weight: 700; font-size: .9rem; color: var(--txt0); margin-bottom: .2rem; }
    .gate-status-txt    { font-size: .82rem; font-weight: 600; letter-spacing: .03em; }
    .gate-banner.gate-pass    .gate-status-txt { color: var(--green);  }
    .gate-banner.gate-warn    .gate-status-txt { color: var(--yellow); }
    .gate-banner.gate-blocked .gate-status-txt { color: var(--red);    }
    .gate-banner.gate-pending .gate-status-txt { color: var(--txt2);   }
    .gate-reason { font-size: .72rem; color: var(--red); margin-top: .25rem; }

    .gate-signals { display: flex; gap: .5rem; flex-shrink: 0; }
    .gate-signal  {
      display: flex; flex-direction: column; align-items: center;
      gap: .15rem; padding: .4rem .6rem;
      border-radius: 8px; background: var(--bg3);
      min-width: 68px; text-align: center;
    }
    .gs-icon  { font-size: 1rem; line-height: 1; }
    .gs-lbl   { font-size: .62rem; color: var(--txt2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
    .gs-st    { font-size: .65rem; font-weight: 700; letter-spacing: .04em; }
    .gs-pass    .gs-st { color: var(--green);  }
    .gs-warn    .gs-st { color: var(--yellow); }
    .gs-fail    .gs-st { color: var(--red);    }
    .gs-pending .gs-st { color: var(--txt2);   }

    /* Blocked deploy button state */
    #btn-deploy.gate-btn-blocked {
      opacity: .45; cursor: not-allowed;
      background: var(--red-dim) !important; border-color: var(--red) !important;
    }

    /* ── Confidence score ──────────────────────────────────────── */
    .confidence-panel-wrap {
      background: var(--bg2);
      border: 1px solid var(--border-hi);
      border-radius: var(--radius2);
      padding: .85rem 1rem;
      min-width: 240px;
    }
    .conf-wrap      { display: flex; align-items: center; gap: .85rem; }
    .conf-ring-box  { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
    .conf-svg       { width: 100%; height: 100%; transform: rotate(-90deg); }
    .conf-num       { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
                      font-size: 1.25rem; font-weight: 800; font-family: var(--mono); }
    .conf-pct-sign  { font-size: .65rem; margin-top: .15rem; }
    .conf-title     { font-size: .88rem; font-weight: 700; }
    .conf-sub       { font-size: .72rem; color: var(--txt3); margin-bottom: .45rem; }
    .conf-breakdown { display: flex; flex-direction: column; gap: .15rem; }
    .conf-row       { display: flex; justify-content: space-between; font-size: .7rem; color: var(--txt2); gap: .5rem; }
    .conf-pts       { color: var(--green); font-family: var(--mono); font-weight: 600; }

    /* ── Delta deploy summary bar ──────────────────────────────── */
    .delta-summary {
      display: flex; align-items: center; gap: .65rem; flex-wrap: wrap;
      background: rgba(0,212,255,.07); border: 1px solid rgba(0,212,255,.2);
      border-radius: var(--radius); padding: .55rem 1rem;
      margin-bottom: 1rem; font-size: .8rem;
    }
    .delta-tag  { font-weight: 700; color: var(--cyan); }
    .delta-add  { color: var(--green); font-family: var(--mono); font-weight: 600; }
    .delta-del  { color: var(--red);   font-family: var(--mono); font-weight: 600; }
    .delta-same { color: var(--txt2);  font-family: var(--mono); }

    /* ── Policy Engine panel ───────────────────────────────────── */
    .policy-panel-section {
      margin-bottom: 1.75rem;
    }
    #policy-panel { display: flex; flex-direction: column; gap: .5rem; }
    .policy-pass  {
      display: flex; align-items: center; gap: .75rem;
      background: rgba(0,232,122,.07); border: 1px solid rgba(0,232,122,.2);
      border-radius: var(--radius); padding: .75rem 1rem;
      color: var(--txt1);
    }
    .pol-row  {
      display: flex; align-items: flex-start; gap: .75rem;
      padding: .65rem .9rem; border-radius: var(--radius);
      border-left: 3px solid;
    }
    .pol-fail { background: rgba(255,51,85,.08);  border-color: var(--red);    }
    .pol-warn { background: rgba(255,208,0,.07);  border-color: var(--yellow); }
    .pol-info { background: rgba(0,212,255,.06);  border-color: var(--cyan);   }

    .pol-badge {
      font-size: .65rem; font-weight: 700; padding: .2rem .45rem;
      border-radius: 4px; white-space: nowrap; letter-spacing: .05em; flex-shrink: 0; margin-top: .05rem;
    }
    .pol-badge-fail { background: rgba(255,51,85,.2);  color: var(--red);    }
    .pol-badge-warn { background: rgba(255,208,0,.18); color: var(--yellow); }
    .pol-badge-info { background: rgba(0,212,255,.15); color: var(--cyan);   }

    .pol-content { flex: 1; }
    .pol-name    { font-weight: 600; font-size: .82rem; color: var(--txt0); }
    .pol-msg     { font-size: .75rem; color: var(--txt2); margin-top: .2rem; line-height: 1.4; }

    /* ── Granular Rollback Modal ───────────────────────────────── */
    #rollback-modal.open { display: flex !important; }

    .rb-scope-grid {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem;
    }
    @media (max-width: 500px) { .rb-scope-grid { grid-template-columns: 1fr; } }

    .rb-scope-card {
      background: var(--bg3); border: 1px solid var(--border-hi);
      border-radius: var(--radius); padding: .75rem .7rem; cursor: pointer;
      text-align: center; transition: border-color .15s, background .15s;
    }
    .rb-scope-card:hover      { border-color: var(--blue); background: rgba(26,127,255,.1); }
    .rb-scope-full            { border-color: rgba(255,51,85,.3); }
    .rb-scope-full:hover      { border-color: var(--red); background: rgba(255,51,85,.1); }
    .rb-scope-icon  { font-size: 1.4rem; margin-bottom: .35rem; }
    .rb-scope-name  { font-size: .8rem; font-weight: 700; color: var(--txt0); }
    .rb-scope-desc  { font-size: .7rem; color: var(--txt2); margin-top: .2rem; line-height: 1.35; }

    .rb-device-list {
      display: flex; flex-direction: column; gap: .35rem;
      max-height: 160px; overflow-y: auto;
      background: var(--bg3); border-radius: var(--radius);
      padding: .5rem .75rem;
    }
    .rb-dev-check {
      display: flex; align-items: center; gap: .5rem;
      font-size: .8rem; color: var(--txt1); cursor: pointer;
    }
    .rb-dev-check input { accent-color: var(--blue); cursor: pointer; }

    /* ── Backend Settings Modal ────────────────────────────────── */
    #backend-modal.open { display: flex !important; }
    .backend-row   { margin-bottom: 1rem; }
    .backend-label { display: block; font-size: .75rem; font-weight: 600;
                     color: var(--txt2); margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .04em; }
    .backend-input {
      width: 100%; background: var(--bg3); border: 1px solid var(--border-hi);
      border-radius: 6px; color: var(--txt0); font-size: .82rem;
      padding: .45rem .6rem; outline: none; box-sizing: border-box;
    }
    .backend-input:focus { border-color: var(--blue); }

    .mode-btn {
      background: var(--bg3); border: 1px solid var(--border-hi); border-radius: 7px;
      color: var(--txt2); font-size: .8rem; padding: .4rem .85rem; cursor: pointer;
      transition: all .15s;
    }
    .mode-btn.mode-active { background: var(--bg4); border-color: var(--blue); color: var(--txt0); }
    .mode-btn.mode-live.mode-active { border-color: var(--red); color: var(--red); }

    .backend-device-row {
      background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
      padding: .6rem .75rem;
    }

/* ════════════════════════════════════════════════════════════════
   ZTP — Zero Touch Provisioning
════════════════════════════════════════════════════════════════ */

.ztp-section {
  margin-top: 2rem;
}

.ztp-label-badge {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--blue);
  background: rgba(26,127,255,.12);
  border: 1px solid rgba(26,127,255,.25);
  border-radius: 4px;
  padding: .15rem .5rem;
  margin-left: .6rem;
  vertical-align: middle;
}

/* Stats bar */
.ztp-stats-bar {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem 1.25rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.ztp-stat { text-align: center; min-width: 54px; }
.ztp-stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--txt0);
  line-height: 1;
}
.ztp-stat-label { font-size: .68rem; color: var(--txt3); margin-top: .15rem; }
.ztp-stat.ztp-ok  .ztp-stat-num { color: var(--green); }
.ztp-stat.ztp-warn .ztp-stat-num { color: var(--yellow); }
.ztp-stat.ztp-err  .ztp-stat-num { color: var(--red); }

.ztp-progress-wrap {
  flex: 1;
  min-width: 160px;
  position: relative;
  height: 8px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: visible;
}
.ztp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 4px;
  transition: width .6s ease;
}
.ztp-progress-label {
  position: absolute;
  top: -18px;
  right: 0;
  font-size: .68rem;
  color: var(--txt3);
}

/* Board */
.ztp-board-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.ztp-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  flex-wrap: wrap;
  gap: .5rem;
}
.ztp-board-title { font-weight: 600; font-size: .88rem; color: var(--txt0); }
.ztp-toolbar-actions { display: flex; gap: .4rem; }

.ztp-board-scroll { overflow-x: auto; }
.ztp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.ztp-table th {
  background: var(--bg3);
  color: var(--txt3);
  font-size: .7rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .5rem .75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ztp-table td {
  padding: .55rem .75rem;
  border-bottom: 1px solid rgba(30,48,96,.5);
  color: var(--txt1);
  vertical-align: middle;
}
.ztp-table tr:last-child td { border-bottom: none; }
.ztp-table tr:hover td { background: rgba(26,127,255,.04); }

.ztp-icon { font-size: 1.1rem; text-align: center; width: 30px; }
.ztp-empty {
  text-align: center;
  color: var(--txt3);
  padding: 2rem !important;
  font-style: italic;
}

/* State colors */
.ztp-state-waiting     td { opacity: .7; }
.ztp-state-contacted   td { }
.ztp-state-provisioning td { }
.ztp-state-provisioned td { }
.ztp-state-failed      td { }

.ztp-state-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .55rem;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.ztp-state-waiting     { background: rgba(100,120,180,.15); color: #8899cc; border: 1px solid rgba(100,120,180,.3); }
.ztp-state-contacted   { background: rgba(26,127,255,.15);  color: var(--blue); border: 1px solid rgba(26,127,255,.3); }
.ztp-state-provisioning{ background: rgba(255,180,0,.12);   color: var(--yellow); border: 1px solid rgba(255,180,0,.3); }
.ztp-state-provisioned { background: rgba(0,200,100,.12);   color: var(--green);  border: 1px solid rgba(0,200,100,.3); }
.ztp-state-failed      { background: rgba(255,60,60,.12);   color: var(--red);    border: 1px solid rgba(255,60,60,.3); }

/* Platform badges */
.ztp-platform-badge {
  display: inline-block;
  padding: .15rem .45rem;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ztp-platform-badge.ios-xe  { background: rgba(0,120,212,.2); color: #3c9eff; }
.ztp-platform-badge.nxos    { background: rgba(0,120,212,.2); color: #5ab4ff; }
.ztp-platform-badge.eos     { background: rgba(255,140,0,.15); color: #ffb347; }
.ztp-platform-badge.junos   { background: rgba(200,60,0,.15);  color: #ff8060; }
.ztp-platform-badge.sonic   { background: rgba(0,200,150,.15); color: #00e8a0; }

/* Small buttons */
.ztp-btn-sm {
  padding: .2rem .5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--txt1);
  font-size: .75rem;
  cursor: pointer;
  transition: background .15s;
}
.ztp-btn-sm:hover { background: var(--bg4); color: var(--txt0); }
.ztp-btn-danger:hover { background: rgba(255,60,60,.15); border-color: rgba(255,60,60,.4); color: var(--red); }

/* Status message */
.ztp-status-msg {
  padding: .5rem .85rem;
  border-radius: 6px;
  font-size: .8rem;
  margin: .5rem 0;
  border: 1px solid;
}
.ztp-status-info      { background: rgba(26,127,255,.1); border-color: rgba(26,127,255,.3); color: var(--blue); }
.ztp-status-ok        { background: rgba(0,200,100,.1);  border-color: rgba(0,200,100,.3);  color: var(--green); }
.ztp-status-warn      { background: rgba(255,180,0,.1);  border-color: rgba(255,180,0,.3);  color: var(--yellow); }
.ztp-status-error     { background: rgba(255,60,60,.1);  border-color: rgba(255,60,60,.3);  color: var(--red); }

/* Registration form */
.ztp-register-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.ztp-reg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.ztp-reg-actions { display: flex; gap: .4rem; }
.ztp-csv-label { cursor: pointer; user-select: none; }

.ztp-reg-col-labels {
  display: grid;
  grid-template-columns: 1fr 1fr 80px 110px 100px 90px 90px 70px 30px;
  gap: .35rem;
  font-size: .66rem;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 0 .1rem .3rem;
}

.ztp-reg-row {
  display: grid;
  grid-template-columns: 1fr 1fr 80px 110px 100px 90px 90px 70px 30px;
  gap: .35rem;
  margin-bottom: .35rem;
  align-items: center;
}
.ztp-reg-row input,
.ztp-reg-row select {
  padding: .35rem .5rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--txt1);
  font-size: .78rem;
  width: 100%;
  box-sizing: border-box;
}
.ztp-reg-row input:focus,
.ztp-reg-row select:focus {
  outline: none;
  border-color: var(--blue);
}
.ztp-reg-row.ztp-row-error input,
.ztp-reg-row.ztp-row-error select {
  border-color: var(--red);
}

/* Policy options grid */
.policy-gen-options { margin-top: 1.5rem; }
.pgo-hint {
  font-size: .78rem;
  color: var(--txt3);
  margin: .4rem 0 .85rem;
}
.pgo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}
.pgo-toggle { display: block; cursor: pointer; }
.pgo-toggle input[type=checkbox] { display: none; }
.pgo-card {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .85rem .9rem;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s, background .15s;
}
.pgo-toggle input:checked + .pgo-card {
  border-color: var(--blue);
  background: rgba(26,127,255,.07);
}
.pgo-icon { font-size: 1.4rem; line-height: 1; }
.pgo-card strong { font-size: .82rem; color: var(--txt0); }
.pgo-card small  { font-size: .7rem; color: var(--txt3); line-height: 1.35; }

/* DHCP modal content */
.ztp-dhcp-content { padding: .5rem 0 1rem; }
.ztp-dhcp-block {
  margin-bottom: 1rem;
}
.ztp-dhcp-block label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .3rem;
}
.ztp-dhcp-block pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .65rem .85rem;
  font-size: .76rem;
  color: var(--green);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Responsive */
@media (max-width: 768px) {
  .ztp-reg-col-labels,
  .ztp-reg-row {
    grid-template-columns: 1fr 1fr;
    gap: .3rem;
  }
  .ztp-reg-row input:nth-child(n+3),
  .ztp-reg-row select:nth-child(n+3) { display: none; }
  .ztp-board-scroll { font-size: .73rem; }
  .pgo-grid { grid-template-columns: 1fr 1fr; }
}

/* ── ZTP Bake policy extras ────────────────────────────────── */
.ztp-bake-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .15rem .45rem;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 600;
  background: rgba(26,127,255,.12);
  border: 1px solid rgba(26,127,255,.25);
  color: var(--blue);
  white-space: nowrap;
}
.ztp-bake-day0 {
  background: rgba(100,120,180,.1);
  border-color: rgba(100,120,180,.2);
  color: #8899cc;
}

.zrr-bake-label {
  display: flex;
  align-items: center;
  gap: .3rem;
  cursor: pointer;
  white-space: nowrap;
}
.zrr-bake-label input[type=checkbox] {
  width: 14px;
  height: 14px;
  accent-color: var(--blue);
  cursor: pointer;
}
.zrr-bake-txt {
  font-size: .72rem;
  font-weight: 600;
  color: var(--blue);
}

.ztp-reg-col-labels,
.ztp-reg-row {
  grid-template-columns: 1fr 1fr 80px 110px 100px 90px 90px 70px 90px 30px;
}

.ztp-bake-global-row {
  margin-top: 1rem;
  padding: .75rem 1rem;
  background: rgba(26,127,255,.06);
  border: 1px solid rgba(26,127,255,.2);
  border-radius: 8px;
}
.ztp-global-bake-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: .84rem;
  color: var(--blue);
}
.ztp-global-bake-label input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* ════════════════════════════════════════════════════════
   CUSTOM POLICY STYLES
════════════════════════════════════════════════════════ */

.cp-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--txt2);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .3rem;
}

.cp-input {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--txt0);
  font-size: .82rem;
  padding: .4rem .65rem;
  outline: none;
  transition: border-color .15s;
  min-width: 0;
}
.cp-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(26,127,255,.18);
}
.cp-input.cp-vlan-id   { width: 90px; }
.cp-input.cp-vlan-name { flex: 1; }
.cp-input.cp-vlan-desc { flex: 2; }

.cp-select {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--txt0);
  font-size: .82rem;
  padding: .4rem .65rem;
  outline: none;
  cursor: pointer;
}
.cp-select:focus { border-color: var(--blue); }

.cp-textarea {
  width: 100%;
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--txt0);
  font-size: .8rem;
  padding: .5rem .65rem;
  outline: none;
  resize: vertical;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  line-height: 1.5;
}
.cp-textarea:focus { border-color: var(--blue); }

/* Row layout: horizontal flex for compact field groups */
.cp-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}
.cp-row .cp-input { flex: 1; min-width: 100px; }

/* Card for sub-objects (peer group, prefix list) */
.cp-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: .85rem 1rem;
}
.cp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--txt1);
  margin-bottom: .6rem;
}

/* Remove button */
.cp-rm-btn {
  background: none;
  border: 1px solid var(--red-dim);
  border-radius: 6px;
  color: var(--red);
  font-size: .72rem;
  padding: .18rem .42rem;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  transition: background .15s;
}
.cp-rm-btn:hover { background: rgba(255,51,85,.12); }

/* Section titles (inside <details>) */
.cp-section-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--txt0);
  cursor: pointer;
  padding: .45rem 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .4rem;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.cp-section-title::-webkit-details-marker { display: none; }
details[open] > .cp-section-title::after  { content: ' ▲'; font-size: .65rem; color: var(--txt3); margin-left: auto; }
details:not([open]) > .cp-section-title::after { content: ' ▼'; font-size: .65rem; color: var(--txt3); margin-left: auto; }

/* Validation messages */
.cp-msg {
  font-size: .8rem;
  padding: .4rem .7rem;
  border-radius: var(--radius);
  border-left: 3px solid;
}
.cp-msg-error  { background: rgba(255,51,85,.1);  border-color: var(--red);    color: var(--txt0); }
.cp-msg-warn   { background: rgba(255,140,0,.1);  border-color: var(--orange); color: var(--txt0); }
.cp-msg-ok     { background: rgba(0,232,122,.1);  border-color: var(--green);  color: var(--txt0); }

/* Generated config output */
.cp-config-block {
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  overflow: hidden;
  margin-bottom: .75rem;
}
.cp-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg3);
  padding: .5rem .85rem;
  border-bottom: 1px solid var(--border);
}
.cp-config-device {
  font-size: .8rem;
  font-weight: 600;
  color: var(--cyan);
}
.cp-pre {
  background: var(--bg0);
  padding: .85rem 1rem;
  overflow-x: auto;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: .78rem;
  line-height: 1.55;
  color: var(--txt0);
  white-space: pre;
  max-height: 420px;
  overflow-y: auto;
}

/* Spinner / error within output area */
.cp-spinner { color: var(--txt2); font-size: .85rem; padding: 1rem 0; }
.cp-error   { color: var(--red);  font-size: .85rem; padding: .5rem 0; }


/* ═══════════════════════════════════════════════════════════════════
   Policy Rules Editor (pre-* classes)
═══════════════════════════════════════════════════════════════════ */
/* Slim button variants used inside the editor modal */
.btn-sm {
  padding: .35rem .75rem;
  font-size: .8rem;
  border-radius: 6px;
  border: 1px solid var(--bg4);
  background: var(--bg2);
  color: var(--txt0);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn-sm:hover    { background: var(--bg3); border-color: var(--blue); }
.btn-pri         { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }
.btn-pri:hover   { background: rgba(50,140,255,.25); }
.btn-sec         { background: var(--bg2); }
.btn-danger      { background: var(--red-dim); border-color: rgba(255,80,80,.4); color: var(--red); }
.btn-danger:hover{ background: rgba(255,60,60,.18); }

/* YAML editor textarea (contenteditable pre) */
.pre-editor-wrap  { background: var(--bg0); border: 1px solid var(--bg4); border-radius: 8px; overflow: hidden; }
.pre-editor-label { font-size: .7rem; color: var(--txt2); padding: .35rem .75rem; border-bottom: 1px solid var(--bg3); background: var(--bg1); }
.pre-editor {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: .78rem;
  line-height: 1.6;
  color: var(--txt0);
  background: var(--bg0);
  padding: .75rem 1rem;
  min-height: 180px;
  outline: none;
  white-space: pre;
  tab-size: 2;
  border: none;
  resize: none;
}
.pre-editor:empty::before {
  content: attr(placeholder);
  color: var(--txt3, #555);
  white-space: pre;
  pointer-events: none;
}

/* Status bar */
.pre-status-bar   { font-size: .78rem; padding: .3rem .6rem; border-radius: 5px; background: var(--bg1); color: var(--txt1); }
.pre-status-ok    { color: var(--green); }
.pre-status-error { color: var(--red); }
.pre-status-warn  { color: var(--yellow, #f0c040); }
.pre-status-running { color: var(--blue); }
.pre-status-edited  { color: var(--txt2); }
.pre-status-loaded  { color: var(--cyan); }

/* Sidebar */
.pre-sidebar-section { background: var(--bg1); border: 1px solid var(--bg3); border-radius: 7px; padding: .5rem; }
.pre-sidebar-title   { font-size: .7rem; font-weight: 600; color: var(--txt2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }
.pre-list            { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pre-list-empty      { font-size: .75rem; color: var(--txt3, #555); padding: .2rem .3rem; }
.pre-list-item {
  font-size: .75rem;
  padding: .35rem .5rem;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid transparent;
  transition: background .12s;
}
.pre-list-item:hover        { background: var(--bg3); border-color: var(--bg4); }
.pre-list-item--history     { cursor: default; }
.pre-list-item--history:hover { background: transparent; }
.pre-list-name { color: var(--txt0); font-weight: 500; }
.pre-list-meta { color: var(--txt2); font-size: .7rem; }

/* Results panel */
.pre-results-panel  { background: var(--bg1); border: 1px solid var(--bg3); border-radius: 8px; padding: .6rem; }
.pre-gate-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem; font-weight: 700;
  padding: .35rem .75rem; border-radius: 6px; margin-bottom: .6rem;
}
.pre-gate-sub       { font-size: .72rem; font-weight: 400; color: var(--txt2); }
.pre-gate-pass      { background: rgba(50,200,100,.12); color: var(--green); border: 1px solid rgba(50,200,100,.3); }
.pre-gate-warn      { background: rgba(240,192,64,.1);  color: var(--yellow, #f0c040); border: 1px solid rgba(240,192,64,.3); }
.pre-gate-fail      { background: var(--red-dim);  color: var(--red);  border: 1px solid rgba(255,80,80,.3); }
.pre-gate-block     { background: rgba(200,50,50,.18); color: var(--red); border: 2px solid var(--red); }

.pre-result-group   { margin-bottom: .5rem; }
.pre-group-title    { font-size: .72rem; font-weight: 600; color: var(--txt2); text-transform: uppercase; margin-bottom: .25rem; }
.pre-result-item    { padding: .35rem .5rem; border-radius: 5px; background: var(--bg2); margin-bottom: 3px; }
.pre-result-name    { font-size: .8rem; font-weight: 600; color: var(--txt0); }
.pre-result-msg     { font-size: .73rem; color: var(--txt2); margin-top: 2px; white-space: pre-wrap; }
.pre-sev            { font-size: .68rem; font-weight: 700; border-radius: 3px; padding: 1px 5px; margin-right: .4rem; }
.pre-sev-fail, .pre-sev-block { background: var(--red-dim); color: var(--red); }
.pre-sev-warn       { background: rgba(240,192,64,.12); color: var(--yellow, #f0c040); }
.pre-sev-info       { background: rgba(80,160,255,.12); color: var(--blue); }

.pre-all-clear      { font-size: .82rem; color: var(--green); padding: .3rem .5rem; }
.pre-parse-errors   { font-size: .8rem; color: var(--red); }
.pre-parse-errors ul{ margin: .4rem 0 0 1rem; padding: 0; }
