/* Studio shell styles - extracted verbatim from ui.html (served at /ui/styles.css). */
      /* ===================================================================
         Design system — "MentionBeat Console" handoff (hi-fi).
         Brand tokens kept under their original names so component CSS
         (editor, dissect, audit, modals) keeps working unchanged.
         =================================================================== */
      :root {
        --thunder: #0a2a3d;          /* navy — sidebar, headings, dark cards */
        --thunder-2: #0e3447;        /* navy panel (plan card) */
        --ember: #fb6432;            /* accent — primary actions, your-brand */
        --accent: #fb6432;
        --misty: #91c1b9;            /* focus ring tint */
        --line: #e2e8e6;             /* card & control borders */
        --line-soft: #eef2f2;        /* inner dividers */
        --line-hover: #cbd6d6;       /* control hover border */
        --fill: #f2f5f5;             /* input fills, bar tracks */
        --subtle: #fafcfc;           /* hover rows, preview blocks */
        --bg: #f6f8f8;               /* page background */
        --ink: #27353c;              /* primary body text */
        --strong: #1b2a31;           /* titles in lists */
        --muted: #5b6b72;            /* descriptions */
        --faint: #8597a0;            /* captions, sub-labels */
        --side-text: #9fb6bf;        /* sidebar nav text */
        --good: #0e7a5f; --good-bg: #e5f4ee; --good-bd: #bfe3d5;
        --warn: #a86512; --warn-bg: #fbf0dd;
        --bad: #b23a2e; --bad-bg: #fcebe8;
        --delta-bad: #c0392b;
        --neutral-bar: #c3d0d0;
        --card-shadow: 0 1px 2px rgba(10,42,61,.04);
        --lift-shadow: 0 8px 22px rgba(10,42,61,.07);
        --accent-shadow: 0 6px 16px rgba(251,100,50,.28);
        --r-card: 14px; --r-ctl: 9px; --r-inner: 11px;
      }
      * { box-sizing: border-box; }
      html, body { margin: 0; padding: 0; }
      body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); height: 100vh; overflow: hidden; background: var(--bg); -webkit-font-smoothing: antialiased; }
      ::selection { background: rgba(251,100,50,.2); }
      a { color: inherit; }
      .vc-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
      .vc-scroll::-webkit-scrollbar-thumb { background: #cdd8d8; border-radius: 8px; border: 2px solid var(--bg); }
      .vc-scroll::-webkit-scrollbar-track { background: transparent; }

      button { padding: 9px 16px; border: 0; border-radius: var(--r-ctl); background: var(--thunder); color: #fff; cursor: pointer; font: inherit; font-weight: 700; font-size: 0.86rem; transition: filter .15s, transform .12s, box-shadow .15s, border-color .15s; }
      button:hover { filter: brightness(1.06); }
      button:active { transform: translateY(1px); }
      button:disabled { opacity: 0.45; cursor: default; filter: none; }
      button.primary { background: var(--ember); box-shadow: var(--accent-shadow); }
      button.ghost { background: #fff; border: 1px solid var(--line); color: var(--thunder); box-shadow: none; font-weight: 600; }
      button.ghost:hover { filter: none; border-color: var(--line-hover); }
      button.sm { padding: 6px 12px; font-size: 0.8rem; }
      select { padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--r-ctl); font: inherit; background: #fff; color: var(--ink); font-weight: 600; max-width: 340px; }
      input { font-family: inherit; }
      .badge { padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
      .approved, .published { background: var(--good-bg); color: var(--good); }
      .partial_review, .draft { background: var(--warn-bg); color: var(--warn); }
      .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

      /* ===== Login (split-screen) ===== */
      #login { position: fixed; inset: 0; display: grid; grid-template-columns: 1.05fr 1fr; z-index: 100; }
      #login .brandside { background: radial-gradient(900px 600px at 20% 10%, #1a5066 0%, #0a2a3d 55%, #06202e 100%); color: #fff; padding: 56px 56px; display: flex; flex-direction: column; }
      #login .brandside .mark { font-weight: 800; letter-spacing: 0.16em; font-size: 1.2rem; }
      #login .brandside .mark span { color: var(--ember); }
      #login .brandside h2 { font-size: 2.1rem; line-height: 1.18; margin: auto 0 18px; max-width: 14ch; letter-spacing: -.01em; }
      #login .brandside ul { list-style: none; padding: 0; margin: 0 0 6px; }
      #login .brandside li { display: flex; gap: 11px; align-items: flex-start; margin: 13px 0; color: #d7e6e1; font-size: 0.98rem; max-width: 42ch; }
      #login .brandside li .ck { color: var(--misty); font-weight: 800; }
      #login .formside { background: #fff; display: flex; align-items: center; justify-content: center; padding: 30px; }
      #login .card { width: min(380px, 92vw); }
      #login h1 { margin: 0 0 4px; font-size: 1.5rem; color: var(--thunder); }
      #login .tag { color: var(--muted); font-size: 0.9rem; margin: 0 0 24px; }
      #login label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin: 13px 0 5px; }
      #login input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.95rem; }
      #login input:focus { outline: 2px solid var(--misty); border-color: var(--misty); }
      #login button { width: 100%; margin-top: 22px; padding: 12px; background: var(--ember); box-shadow: 0 8px 20px rgba(251,100,50,.3); }
      #login .note { font-size: 0.78rem; color: var(--muted); margin: 16px 0 0; text-align: center; }
      @media (max-width: 820px) { #login { grid-template-columns: 1fr; } #login .brandside { display: none; } }

      /* ===== App shell ===== */
      #app { display: none; height: 100vh; }
      #app.show { display: grid; grid-template-columns: 248px 1fr; }
      #sidebar { background: var(--thunder); color: #c7d6dc; display: flex; flex-direction: column; min-height: 0; }
      #sidebar .logo { padding: 22px 22px 18px; display: flex; align-items: center; gap: 11px; }
      #sidebar .logo .glyph { width: 30px; height: 30px; border-radius: 8px; background: var(--ember); display: flex; align-items: center; justify-content: center; flex: none; }
      #sidebar .logo .wm { line-height: 1.1; }
      #sidebar .logo .wm b { color: #fff; font-weight: 800; letter-spacing: .13em; font-size: 15px; display: block; }
      #sidebar .logo .wm small { color: #7e96a0; font-size: 10px; letter-spacing: .08em; }
      #sidebar nav { flex: 1; overflow-y: auto; padding: 2px 12px; }
      .navgroup { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #5e7682; padding: 14px 14px 5px; }
      .navgroup:first-child { padding-top: 6px; }
      .navitem { display: flex; align-items: center; gap: 11px; padding: 9px 12px; color: var(--side-text); cursor: pointer; font-size: 13.5px; font-weight: 600; border-radius: var(--r-ctl); margin: 2px 0; text-decoration: none; transition: background .12s, color .12s, box-shadow .12s; }
      .navitem svg { width: 17px; height: 17px; flex: none; }
      .navitem .ico { width: 17px; text-align: center; flex: none; font-size: 15px; }
      .navitem .tag { margin-left: auto; font-size: 10px; font-weight: 600; background: rgba(255,255,255,.1); color: #a9bec6; padding: 1px 7px; border-radius: 999px; }
      .navitem:hover { background: rgba(255,255,255,.06); color: #fff; }
      .navitem.active { background: rgba(255,255,255,.09); color: #fff; box-shadow: inset 3px 0 0 var(--ember); }
      #sidebar .actions { padding: 10px 16px 4px; display: flex; flex-direction: column; gap: 8px; }
      #sidebar .actions button { width: 100%; }
      #sidebar .actions .primary { background: var(--ember); }
      #sidebar .actions .side-ghost { background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.16); box-shadow: none; font-weight: 600; }
      #sidebar .actions .side-ghost:hover { background: rgba(255,255,255,.12); filter: none; }
      #sidebar .plan { margin: 12px 16px 18px; background: var(--thunder-2); border: 1px solid #1c4357; border-radius: 12px; padding: 13px 14px; }
      #sidebar .plan .ptop { display: flex; align-items: center; justify-content: space-between; }
      #sidebar .plan .ptop b { color: #fff; font-weight: 700; font-size: 12.5px; }
      #sidebar .plan .ptop span { font-size: 10px; color: var(--side-text); }
      #sidebar .plan .pbar { height: 6px; border-radius: 999px; background: #1c4357; margin-top: 9px; overflow: hidden; }
      #sidebar .plan .pbar i { display: block; height: 100%; background: var(--ember); border-radius: 999px; }
      #sidebar .plan .psub { font-size: 10.5px; color: var(--side-text); margin-top: 9px; }

      /* Studio sub-nav (auto-expands when a Studio view is active) */
      .subnav { display: none; flex-direction: column; gap: 1px; margin: 1px 0 3px; padding-left: 4px; }
      .subnav.open { display: flex; }
      .subitem { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 16px; margin-left: 16px; border-left: 1px solid rgba(255,255,255,.1); color: var(--side-text); cursor: pointer; font-size: 12.5px; font-weight: 600; text-decoration: none; transition: color .12s; }
      .subitem .sdot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; opacity: .55; }
      .subitem:hover { color: #fff; }
      .subitem.active { color: #fff; }
      .subitem.active .sdot { background: var(--ember); opacity: 1; }

      /* Sidebar product quick-switcher */
      .prodswitch { padding: 6px 16px 2px; }
      .prodswitch label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5e7682; margin-bottom: 5px; }
      .prodswitch select { width: 100%; max-width: none; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); color: #dce8ec; font-size: 12.5px; font-weight: 600; padding: 7px 9px; }
      .prodswitch select option { color: #1b2a31; }

      /* Sidebar collapse toggle */
      #sidebarToggle { background: transparent; color: var(--muted); border: 1px solid var(--line); width: 34px; height: 34px; padding: 0; border-radius: 9px; box-shadow: none; display: flex; align-items: center; justify-content: center; flex: none; }
      #sidebarToggle:hover { filter: none; border-color: var(--line-hover); color: var(--thunder); }

      /* ===== Collapsed sidebar (icon rail) ===== */
      #app.sidebar-collapsed.show { grid-template-columns: 66px 1fr; }
      #app.sidebar-collapsed #sidebar .logo { justify-content: center; padding: 22px 0 18px; }
      #app.sidebar-collapsed #sidebar .logo .wm,
      #app.sidebar-collapsed .navgroup,
      #app.sidebar-collapsed .navitem .lbl,
      #app.sidebar-collapsed .navitem .tag,
      #app.sidebar-collapsed .subnav,
      #app.sidebar-collapsed .prodswitch,
      #app.sidebar-collapsed .actions .lbl,
      #app.sidebar-collapsed .plan { display: none; }
      #app.sidebar-collapsed .navitem { justify-content: center; padding: 11px 0; gap: 0; }
      #app.sidebar-collapsed #sidebar nav { padding: 6px 10px; }
      #app.sidebar-collapsed .actions { align-items: center; }
      #app.sidebar-collapsed .actions button { width: 44px; height: 40px; padding: 0; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; }

      #content { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
      #appbar { display: flex; align-items: center; gap: 18px; padding: 0 26px; height: 62px; border-bottom: 1px solid var(--line); background: #fff; flex: none; }
      .tenant { display: flex; align-items: center; gap: 9px; background: var(--fill); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 7px 13px; cursor: pointer; }
      .tenant:hover { filter: none; border-color: var(--line-hover); }
      .tenant .chip { width: 18px; height: 18px; border-radius: 5px; background: var(--thunder); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 9px; font-weight: 800; }
      .tenant b { font-weight: 700; font-size: 13.5px; color: var(--thunder); }
      .searchwrap { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 9px; background: var(--fill); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 8px 13px; }
      .searchwrap input { border: none; background: transparent; outline: none; font-size: 13.5px; color: var(--ink); width: 100%; }
      #appbar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
      #appbar .model-wrap { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--muted); }
      #appbar .model-wrap select { padding: 6px 9px; font-size: 0.78rem; }
      #runbtn { display: flex; align-items: center; gap: 8px; background: var(--ember); color: #fff; border-radius: var(--r-ctl); padding: 9px 16px; font-weight: 700; font-size: 13.5px; box-shadow: var(--accent-shadow); }
      #helpbtn { background: transparent; color: var(--muted); border: 1px solid var(--line); width: 34px; height: 34px; padding: 0; border-radius: 50%; box-shadow: none; font-weight: 700; }

      #usermenu { position: relative; }
      #userbtn { display: flex; align-items: center; justify-content: center; background: transparent; color: var(--ink); border: 0; padding: 0; box-shadow: none; }
      #userbtn .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--thunder); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.82rem; }
      #userbtn .uname { display: none; }
      #userdrop { position: absolute; right: 0; top: 46px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 16px 40px rgba(10,42,61,.2); min-width: 210px; display: none; overflow: hidden; z-index: 30; }
      #userdrop.show { display: block; }
      #userdrop .who { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); }
      #userdrop .who b { display: block; color: var(--thunder); margin-top: 2px; }
      #userdrop a { display: block; padding: 11px 16px; font-size: 0.9rem; color: var(--ink); cursor: pointer; }
      #userdrop a:hover { background: var(--bg); }

      #views { flex: 1; min-height: 0; position: relative; }
      .view { position: absolute; inset: 0; display: none; flex-direction: column; min-height: 0; }
      .view.active { display: flex; }
      .scroll { overflow-y: auto; padding: 30px 38px 60px; }
      .wrap { max-width: 1180px; margin: 0 auto; width: 100%; }

      /* ===== Shared page-head pattern ===== */
      .kicker { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ember); }
      .kicker .sq { width: 9px; height: 9px; background: var(--ember); border-radius: 2px; }
      .vh1 { margin: 8px 0 4px; font-size: 26px; font-weight: 800; color: var(--thunder); letter-spacing: -.02em; }
      .vsub { margin: 0; color: var(--muted); font-size: 14px; max-width: 64ch; }
      .head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
      .head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
      .backbtn { display: inline-flex; align-items: center; gap: 7px; background: none; border: none; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 0; margin-bottom: 14px; box-shadow: none; }
      .backbtn:hover { color: var(--thunder); filter: none; }

      /* ===== Generic card + bars ===== */
      .card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--card-shadow); }
      .card.pad { padding: 20px 22px; }
      .card h3.ttl { margin: 0; font-size: 15px; font-weight: 800; color: var(--thunder); }
      .card .csub { margin: 3px 0 0; font-size: 12px; color: var(--faint); }
      .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
      .bar-track { flex: 1; height: 14px; background: var(--fill); border-radius: 999px; overflow: hidden; }
      .bar-track i { display: block; height: 100%; border-radius: 999px; }
      .pill { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }

      /* ===== Workspace ===== */
      .loop-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
      .loop-card { flex: 1; min-width: 150px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
      .loop-card .lh { display: flex; align-items: center; gap: 8px; }
      .loop-card .ln { width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
      .loop-card .lt { font-weight: 700; font-size: 13.5px; color: var(--thunder); }
      .loop-card .ls { font-size: 12px; color: var(--faint); margin-top: 7px; }
      .vtable-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); margin-top: 13px; overflow: hidden; }
      table.vtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
      table.vtable thead tr { background: var(--subtle); }
      table.vtable th { text-align: left; padding: 12px 18px; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
      table.vtable th.r, table.vtable td.r { text-align: right; }
      table.vtable td { padding: 13px 18px; border-bottom: 1px solid var(--line-soft); }
      table.vtable tbody tr { cursor: pointer; }
      table.vtable tbody tr:hover { background: var(--subtle); }
      table.vtable .pname { font-weight: 700; color: var(--thunder); }
      table.vtable .pcat { font-size: 11.5px; color: var(--faint); }
      .mini-geo { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
      .mini-geo .mt { width: 42px; height: 6px; border-radius: 999px; background: var(--fill); overflow: hidden; }
      .mini-geo .mt i { display: block; height: 100%; border-radius: 999px; }

      /* ===== KPI / metric cards (handoff) ===== */
      .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
      .kpis.m5 { grid-template-columns: repeat(5, 1fr); }
      .kpis.m6 { grid-template-columns: repeat(6, 1fr); }
      @media (max-width: 1180px) { .kpis.m6 { grid-template-columns: repeat(3, 1fr); } }
      @media (max-width: 720px) { .kpis.m5, .kpis.m6 { grid-template-columns: repeat(2, 1fr); } }
      .convbadge { display: inline-flex; align-items: center; gap: 7px; background: var(--fill); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 700; color: var(--thunder); cursor: pointer; }
      .convbadge:hover { border-color: var(--line-hover); }
      .convbadge .cdot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); }

      /* Prompt Lab */
      .usage-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--fill); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: 12px; font-weight: 600; color: var(--muted); }
      .usage-chip .udot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); }
      .pl-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-top: 1px solid var(--line-soft); border-radius: 8px; }
      .pl-row:first-child { border-top: none; }
      .pl-row:hover { background: var(--subtle); }
      .pl-row .checkbox { cursor: pointer; }
      .pl-answer { margin: 0 8px 10px 38px; padding: 11px 13px; background: #f8fafa; border: 1px solid var(--line-soft); border-left: 3px solid var(--misty); border-radius: 9px; }
      .pl-eng { padding: 8px 0; border-top: 1px dashed var(--line-soft); }
      .pl-eng:first-child { border-top: none; padding-top: 0; }
      .plchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; }
      .plchip:hover { border-color: var(--line-hover); }
      .plchip.on { background: var(--navy, #0A2A3D); border-color: var(--navy, #0A2A3D); color: #fff; }
      .kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 17px; box-shadow: var(--card-shadow); }
      .kpi .label { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
      .kpi .valrow { display: flex; align-items: baseline; gap: 8px; margin-top: 9px; }
      .kpi .val { font-size: 29px; font-weight: 800; color: var(--thunder); line-height: 1; letter-spacing: -.02em; }
      .kpi .val small { font-size: 1rem; color: var(--faint); font-weight: 600; }
      .kpi .delta { font-size: 12px; font-weight: 700; }
      .kpi .spark { width: 100%; height: 26px; margin-top: 9px; display: block; }
      .kpi .knote { font-size: 10.5px; color: var(--faint); margin-top: 7px; }

      /* ===== Studio hub cards ===== */
      .studio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 22px; }
      .scard { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; cursor: pointer; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s, border-color .15s; }
      .scard:hover { border-color: var(--line-hover); transform: translateY(-2px); box-shadow: var(--lift-shadow); }
      .scard .ico-tile { width: 38px; height: 38px; border-radius: 10px; background: #fff1ea; display: flex; align-items: center; justify-content: center; margin-bottom: 13px; }
      .scard h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 800; color: var(--thunder); }
      .scard p { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.55; }
      .scard .cta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ember); }
      .listcard-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }

      /* ===== Measurement tabs ===== */
      .mtabs { display: flex; gap: 4px; margin-top: 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
      .mtab { padding: 11px 16px; background: none; border: none; font-size: 13.5px; font-weight: 700; cursor: pointer; margin-bottom: -1px; color: var(--faint); border-bottom: 2.5px solid transparent; box-shadow: none; }
      .mtab:hover { filter: none; color: var(--thunder); }
      .mtab.on { color: var(--thunder); border-bottom-color: var(--ember); }
      .mpanel { display: none; }
      .mpanel.on { display: block; }
      .actrow { display: flex; align-items: flex-start; gap: 13px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
      .barrow { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
      .barrow .blabel { flex: none; font-size: 13px; font-weight: 600; text-align: right; }
      .barrow .bval { width: 42px; flex: none; font-weight: 700; font-size: 13px; color: var(--thunder); text-align: right; }
      .barrow .ci-track { flex: 1; position: relative; height: 18px; background: var(--fill); border-radius: 999px; }
      .barrow .ci-track .ci { position: absolute; top: 50%; transform: translateY(-50%); height: 7px; border-radius: 999px; background: rgba(251,100,50,.22); }
      .barrow .ci-track .fill { position: absolute; top: 0; left: 0; height: 18px; border-radius: 999px; }

      /* Drill-down affordances + detail drawer */
      .kpi.drill { cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
      .kpi.drill:hover { border-color: var(--line-hover); box-shadow: var(--lift-shadow); transform: translateY(-2px); }
      .actrow.drill, .barrow.drill, .kvrow.drill, tr.drill { transition: background .12s; border-radius: 8px; }
      .actrow.drill:hover, .kvrow.drill:hover, tr.drill:hover { background: var(--subtle); }
      .barrow.drill:hover .bval { color: var(--ember); }
      circle.drill:hover { stroke: var(--ember); }
      #drillBack { position: fixed; inset: 0; background: rgba(10,42,61,.45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 70; }
      #drillBack.open { opacity: 1; pointer-events: auto; }
      #drill { position: fixed; top: 0; right: 0; height: 100vh; width: min(460px, 94vw); background: #fff; border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(10,42,61,.18); transform: translateX(100%); transition: transform .24s cubic-bezier(.4,0,.2,1); z-index: 71; display: flex; flex-direction: column; }
      #drill.open { transform: none; }
      #drill > header { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
      #drill > header h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--thunder); letter-spacing: -.01em; }
      #drill > header p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
      #drill > header button { margin-left: auto; flex: none; }
      #drillBody { flex: 1; overflow-y: auto; padding: 18px 22px 30px; }

      /* Prompts & answers (transcript) */
      .txbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 16px 0 4px; }
      .txbar .txlabel { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-right: 2px; }
      .txchip { background: #fff; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-weight: 600; box-shadow: none; }
      .txchip:hover { filter: none; border-color: var(--line-hover); color: var(--thunder); }
      .txchip.on { background: var(--thunder); border-color: var(--thunder); color: #fff; }
      .txcard { margin-top: 14px; }
      .txq { display: flex; align-items: flex-start; gap: 9px; font-size: 15px; font-weight: 700; color: var(--thunder); line-height: 1.4; }
      .txq svg { flex: none; margin-top: 3px; }
      .txmeta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 9px 0 4px; font-size: 12px; color: var(--muted); }
      .txrows { margin-top: 6px; }
      .txans { border-top: 1px solid var(--line-soft); }
      .txans > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 12.5px; color: var(--muted); }
      .txans > summary::-webkit-details-marker { display: none; }
      .txans > summary b { color: var(--strong); font-size: 13px; }
      .txans .txmodel { font-size: 11px; color: var(--faint); font-family: ui-monospace, Menlo, monospace; }
      .txans .txchev { margin-left: auto; transition: transform .15s; color: var(--faint); }
      .txans[open] .txchev { transform: rotate(90deg); }
      .txbody { padding: 0 0 12px; }
      .txbody p { margin: 0 0 9px; font-size: 13px; line-height: 1.6; color: var(--ink); background: #f8fafa; border: 1px solid var(--line-soft); border-left: 3px solid var(--misty); border-radius: 9px; padding: 11px 13px; }
      .txcites { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
      .txcite { font-size: 11px; color: var(--strong); font-family: ui-monospace, Menlo, monospace; background: var(--fill); border-radius: 6px; padding: 2px 8px; }

      /* ===== Donut + sub-scores (dissect / create) ===== */
      .donut-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
      .subscore { display: flex; align-items: center; gap: 11px; }
      .subscore .sl { flex: none; font-size: 12.5px; color: var(--ink); font-weight: 600; }
      .subscore .sv { width: 30px; flex: none; font-size: 12px; font-weight: 700; color: var(--thunder); text-align: right; }
      .finding { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
      .finding .glyph { flex: none; width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; margin-top: 1px; }
      .finding .ft { font-size: 13.5px; font-weight: 700; color: var(--strong); }
      .finding .fd { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
      .finding .fcta { flex: none; font-size: 12px; font-weight: 700; color: var(--ember); white-space: nowrap; margin-top: 2px; }
      .kvrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
      .kvrow .k { font-size: 12px; color: var(--faint); flex: none; }
      .kvrow .v { font-size: 12.5px; color: var(--strong); font-weight: 600; text-align: right; display: inline-flex; align-items: center; gap: 7px; }
      .chipwrap { display: flex; flex-wrap: wrap; gap: 8px; }
      .schemachip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); }

      /* ===== Segmented control ===== */
      .seg2 { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; margin-top: 18px; }
      .seg2 button { background: #fff; color: var(--muted); border: 0; border-radius: 0; padding: 9px 18px; font-weight: 700; font-size: 0.84rem; box-shadow: none; }
      .seg2 button.on { background: var(--thunder); color: #fff; }
      .seg2 button:not(.on):hover { background: var(--bg); color: var(--thunder); filter: none; }
      .subview { display: none; }
      .subview.on { display: block; }

      /* ===== URL bar ===== */
      .urlbar { display: flex; align-items: center; gap: 11px; margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-inner); padding: 9px 11px 9px 14px; box-shadow: var(--card-shadow); }
      .urlbar input { border: none; background: transparent; outline: none; font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--ink); width: 100%; }
      .urlbar button { flex: none; }
      .metastrip { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 11px; font-size: 12px; color: var(--muted); }

      /* ===== Create page family ===== */
      .toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line-soft); cursor: pointer; }
      .toggle-row .tname { font-size: 13.5px; font-weight: 700; color: var(--strong); }
      .toggle-row .tdesc { font-size: 11.5px; color: var(--faint); }
      .toggle-row .twt { flex: none; font-size: 11px; font-weight: 700; color: var(--faint); }
      .switch { flex: none; width: 40px; height: 23px; border-radius: 999px; position: relative; transition: background .15s; }
      .switch i { position: absolute; top: 2.5px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
      .wireframe { margin-top: 18px; border: 1px solid var(--line-soft); border-radius: var(--r-inner); overflow: hidden; }
      .wireframe .wf-url { background: var(--subtle); border-bottom: 1px solid var(--line-soft); padding: 8px 12px; font-size: 11px; color: var(--faint); font-family: ui-monospace, Menlo, monospace; }
      .wireframe .wf-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
      .wf-block { border-radius: 8px; padding: 11px 13px; background: var(--subtle); border: 1px solid var(--line-soft); }
      .wf-block .wt { display: flex; align-items: center; gap: 7px; }
      .wf-block .wt b { font-size: 12.5px; font-weight: 700; color: var(--thunder); }
      .wf-block .wschema { font-size: 9.5px; font-weight: 700; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; font-family: ui-monospace, Menlo, monospace; }
      .wf-block .wl { font-size: 11px; color: var(--faint); margin-top: 3px; }

      /* ===== Export to CMS ===== */
      .destcard { background: #fff; border: 2px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; cursor: pointer; display: flex; gap: 13px; align-items: flex-start; transition: border-color .15s; }
      .destcard:hover { border-color: var(--line-hover); }
      .destcard.sel { border-color: var(--ember); }
      .destcard .dtile { flex: none; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
      .destcard .dname { font-size: 14.5px; font-weight: 800; color: var(--thunder); }
      .destcard .dbody { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
      .exrow { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-top: 1px solid var(--line-soft); border-radius: 8px; transition: background .12s; }
      .exrow:hover { background: var(--subtle); }
      .exrow.exhead { padding-top: 4px; padding-bottom: 8px; }
      .checkbox { flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-hover); background: #fff; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
      .checkbox.on { background: var(--ember); border-color: var(--ember); }
      .jsonld-card { background: var(--thunder); border-radius: var(--r-card); padding: 20px 22px; color: #c7d6dc; }
      .jsonld-card pre { margin: 0; font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; line-height: 1.65; color: #a9c6d2; white-space: pre-wrap; word-break: break-word; }

      /* ===== Knowledge base ===== */
      .kb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 22px; }
      .kb-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; cursor: pointer; transition: border-color .15s; }
      .kb-card:hover { border-color: var(--line-hover); }
      .kb-card .kk { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ember); }
      .kb-card h3 { margin: 7px 0 6px; font-size: 15.5px; font-weight: 800; color: var(--thunder); }
      .kb-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }

      /* ===== empty + section label ===== */
      .section-label { font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 13px; }
      .empty { text-align: center; color: var(--muted); padding: 50px 20px; border: 2px dashed var(--line); border-radius: 16px; background: #fff; }
      .empty h3 { color: var(--thunder); margin: 0 0 6px; }

      /* ===== compatibility (preserved views: SSOT, settings, about, dissect tools) ===== */
      .muted { color: var(--muted); }
      .page-head { margin-bottom: 22px; }
      .page-head h1 { margin: 8px 0 4px; font-size: 26px; font-weight: 800; color: var(--thunder); letter-spacing: -.02em; }
      .page-head p { margin: 0; color: var(--muted); font-size: 14px; }
      .box { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 14px 0; background: #fff; box-shadow: var(--card-shadow); }
      input[type="text"], input[type="url"], input[type="email"], input[type="password"], .pane input, .box input { font-family: inherit; }
      .pane input, .box input { padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-ctl); font-size: 0.9rem; }
      .pane input:focus, .box input:focus { outline: 2px solid var(--misty); border-color: var(--misty); }

      /* ===== Editor ===== */
      #editorbar { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
      #editorbar .back { background: transparent; color: var(--muted); border: 1px solid var(--line); box-shadow: none; }
      #editorbar h2 { margin: 0; font-size: 1.05rem; color: var(--thunder); }
      #editorbar .spacer { flex: 1; }
      #plan { padding: 9px 22px; border-bottom: 1px solid var(--line); font-size: 0.82rem; color: var(--muted); line-height: 1.55; background: #fafcfb; }
      #plan b { color: var(--ink); } #plan .on { color: var(--good); font-weight: 600; } #plan .off { color: #9aa7ad; }
      #editor { flex: 1; display: flex; min-height: 0; }
      #left { width: 390px; min-width: 330px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: #fff; }
      #right { flex: 1; display: flex; flex-direction: column; min-width: 0; }
      #log { flex: 1; overflow: auto; padding: 16px; }
      .msg { margin-bottom: 10px; padding: 10px 13px; border-radius: 13px; max-width: 92%; font-size: 0.92rem; line-height: 1.5; }
      .user { background: #e3edf3; margin-left: auto; border-bottom-right-radius: 4px; }
      .bot { background: #f1f5f4; border-bottom-left-radius: 4px; }
      .bot.ok { background: var(--good-bg); } .bot.err { background: #fdeceb; }
      .edits { font-size: 0.8rem; background: #fffbe6; border: 1px solid #fde68a; border-radius: 8px; padding: 8px; margin-top: 6px; overflow-x: auto; }
      .edits code { background: #fff; display: inline-block; margin: 1px 0; padding: 1px 4px; border-radius: 4px; }
      #actions { padding: 0 16px 10px; display: flex; gap: 8px; }
      #compose { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fafcfb; }
      #compose textarea { flex: 1; resize: none; height: 56px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 0.92rem; }
      #compose textarea:focus { outline: 2px solid var(--misty); }
      #tabs { display: flex; gap: 4px; align-items: center; padding: 8px 14px 0; background: #e9efed; border-bottom: 1px solid var(--line); }
      .tab { padding: 8px 16px; border-radius: 9px 9px 0 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 0.86rem; border: 1px solid transparent; border-bottom: 0; }
      .tab.active { background: #fff; color: var(--thunder); border-color: var(--line); }
      .tab:hover { filter: none; color: var(--thunder); }
      #tabs a { margin-left: auto; font-size: 0.84rem; color: var(--thunder); padding-bottom: 6px; }
      iframe { flex: 1; border: 0; width: 100%; background: #fff; }

      /* ===== Settings / About ===== */
      .pane { max-width: 780px; }
      .pane h3 { color: var(--thunder); margin: 22px 0 4px; }
      .pane h3:first-child { margin-top: 0; }
      .pane p { color: var(--muted); line-height: 1.6; }
      .pane .box { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 14px 0; background: #fff; box-shadow: var(--card-shadow); }
      .pane code { background: #eef3f1; padding: 1px 6px; border-radius: 5px; }
      .kv { display: flex; gap: 10px; margin: 7px 0; font-size: 0.92rem; }
      .kv b { width: 150px; color: var(--ink); }

      /* ===== Import HTML (dissect) ===== */
      .dz-grid { display: grid; grid-template-columns: 1fr 290px; gap: 22px; align-items: start; }
      .dz-side { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--card-shadow); }
      .hl-chk { display: flex; gap: 9px; align-items: flex-start; font-size: 0.88rem; color: var(--ink); margin-bottom: 14px; line-height: 1.4; }
      .hl-chk small { color: var(--muted); }
      .hl-lbl { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
      .hl-lbl small { font-weight: 400; }
      .hl-input { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 0.86rem; }
      .hl-input:focus { outline: 2px solid var(--misty); border-color: var(--misty); }
      #hresult { margin-top: 26px; }
      #hresult .hsec { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }
      #hhistory { margin-top: 26px; }
      #hhistory .hsec { display: flex; align-items: center; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
      #hhistory .hsec .clear { margin-left: auto; font-size: 0.72rem; text-transform: none; letter-spacing: 0; color: var(--muted); background: none; border: 0; box-shadow: none; cursor: pointer; padding: 2px 6px; font-weight: 600; }
      #hhistory .hsec .clear:hover { color: var(--bad); }
      .himports { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
      .hitem { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; box-shadow: var(--card-shadow); cursor: pointer; transition: transform .12s, box-shadow .12s; }
      .hitem:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(10,42,61,.1); }
      .hitem .nm { font-weight: 700; color: var(--thunder); font-size: 0.9rem; word-break: break-all; line-height: 1.3; }
      .hitem .sub { font-size: 0.76rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
      .hitem .htop { display: flex; align-items: flex-start; gap: 6px; }
      .hitem .htop .nm { flex: 1; }
      .hitem .star { background: none; border: 0; box-shadow: none; color: var(--warn); cursor: pointer; font-size: 1.05rem; line-height: 1; padding: 0 2px; }
      .hitem .star:not(.on) { color: var(--line); }
      .hitem .star.on { color: #e0a800; }
      .hitem .hacts { display: flex; gap: 6px; margin-top: 4px; }
      .hitem .hacts button { background: none; border: 0; box-shadow: none; color: var(--muted); cursor: pointer; font-size: 0.76rem; padding: 2px 4px; }
      .hitem .hacts button:hover { color: var(--thunder); }
      .hitem .rm:hover { color: var(--bad) !important; }
      /* audit panel */
      .auditcard { padding: 6px 4px; }
      .auditrow { display: flex; gap: 11px; align-items: flex-start; padding: 9px 14px; }
      .auditrow .adot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none; }
      .auditrow b { display: block; font-size: 0.9rem; color: var(--ink); }
      .auditrow span:last-child { font-size: 0.82rem; color: var(--muted); }
      .auditrow.good .adot { background: var(--good); }
      .auditrow.warn .adot { background: #e0a800; }
      .auditrow.bad .adot { background: var(--bad); }
      /* images grid */
      .imgsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
      .imgcard { background: #fff; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; box-shadow: var(--card-shadow); display: flex; flex-direction: column; }
      .imgthumb { height: 110px; background: repeating-linear-gradient(45deg, #fbfdfc, #fbfdfc 10px, #f1f5f4 10px, #f1f5f4 20px); display: flex; align-items: center; justify-content: center; }
      .imgthumb img { max-width: 100%; max-height: 110px; object-fit: contain; }
      .imgthumb .imgna { font-size: 0.72rem; color: var(--muted); padding: 8px; text-align: center; }
      .imgrow { display: flex; gap: 6px; padding: 8px 10px 4px; }
      .imgrow input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; font-size: 0.72rem; background: #fafcfb; }
      .imgalt { font-size: 0.74rem; color: var(--muted); padding: 0 10px 10px; }
      .imgalt.noalt { color: var(--warn); }
      #hresult .seg { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 24px 0 4px; background: #fff; }
      #hresult .segbtn { background: #fff; color: var(--muted); border: 0; border-radius: 0; padding: 9px 18px; font-weight: 600; box-shadow: none; }
      #hresult .segbtn.on { background: var(--thunder); color: #fff; }
      #hresult .segbtn:not(.on):hover { background: var(--bg); color: var(--thunder); filter: none; }
      #hresult .overview { background: #eef4f8; border: 1px solid #cfe0ea; border-radius: 10px; padding: 12px 16px; color: #33505e; font-size: 0.92rem; margin-bottom: 6px; }
      #hresult .note { background: var(--warn-bg); border: 1px solid #fde68a; border-radius: 9px; padding: 9px 13px; font-size: 0.85rem; color: #6b4e00; margin: 7px 0; }
      .bcard { background: #fff; border: 1px solid var(--line); border-radius: 13px; margin: 12px 0; overflow: hidden; box-shadow: var(--card-shadow); }
      .bcard > header { display: flex; align-items: center; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
      .bcard > header h3 { margin: 0; font-size: 0.98rem; color: var(--thunder); flex: 1; min-width: 180px; }
      .bcard .tagchip { font-size: 0.7rem; font-weight: 700; color: var(--thunder); background: #e7eef0; border-radius: 5px; padding: 2px 7px; }
      .bcard .dest { flex-basis: 100%; font-size: 0.8rem; color: var(--muted); }
      .bcard .desc { padding: 6px 16px 0; font-size: 0.88rem; color: #33505e; }
      .bcard .pv { display: block; width: calc(100% - 32px); margin: 12px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; height: 260px; }
      .bcard .pv.pvbig { height: 560px; }
      .bcard .pvnote { font-size: 0.76rem; color: var(--muted); padding: 10px 16px 0; }
      .bcard details { border-top: 1px solid var(--line); }
      .bcard details summary { cursor: pointer; padding: 9px 16px; font-size: 0.84rem; color: var(--muted); user-select: none; }
      .bcard textarea { display: block; width: calc(100% - 32px); margin: 0 16px 12px; height: 150px; font-family: Consolas, monospace; font-size: 0.77rem; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fafcfb; white-space: pre; }
      .bfield { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid #f0f4f2; font-size: 0.88rem; }
      .bfield:last-child { border-bottom: 0; }
      .bfield label { width: 180px; color: var(--muted); flex: none; }
      .bfield input { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: 0.84rem; background: #fafcfb; }
      @media (max-width: 860px) { .dz-grid { grid-template-columns: 1fr; } }

      /* ===== toast + spinner ===== */
      #toast { position: fixed; bottom: 18px; right: 18px; background: var(--thunder); color: #fff; padding: 12px 18px; border-radius: 11px; font-size: 0.9rem; box-shadow: 0 12px 30px rgba(10,42,61,.4); opacity: 0; transform: translateY(8px); transition: 0.25s; pointer-events: none; max-width: 420px; z-index: 80; }
      #toast.show { opacity: 1; transform: none; }
      .spin { display: inline-block; width: 13px; height: 13px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: r 0.8s linear infinite; vertical-align: -2px; margin-right: 7px; }
      @keyframes r { to { transform: rotate(360deg); } }

      /* ===== modals ===== */
      .overlay { position: fixed; inset: 0; background: rgba(10,42,61,.55); display: none; align-items: center; justify-content: center; z-index: 60; }
      .overlay.show { display: flex; }
      .modal { background: #fff; border-radius: 16px; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.35); max-height: 92vh; }
      .modal header { padding: 17px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
      .modal header h2 { margin: 0; font-size: 1.08rem; color: var(--thunder); flex: 1; }
      .modal .body { padding: 18px 22px; overflow: auto; }
      .modal footer { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
      .modal .step { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ember); margin: 0 0 6px; }
      .modal p.hint { font-size: 0.86rem; color: var(--muted); margin: 4px 0 10px; }
      .modal textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px; font-size: 0.86rem; resize: vertical; }
      #newmodal { width: min(860px, 94vw); }
      #info { height: 170px; font-family: inherit; }
      #yaml { height: 300px; font-family: Consolas, monospace; white-space: pre; display: none; }
      .modal .row { display: flex; gap: 10px; margin: 10px 0 4px; align-items: center; flex-wrap: wrap; }
      .modal .err { color: var(--bad); font-size: 0.86rem; white-space: pre-wrap; }
      label.chk { font-size: 0.84rem; color: var(--muted); margin-right: auto; display: none; }
      #xmodal { width: min(560px, 94vw); }
      label.xopt { display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; margin: 9px 0; cursor: pointer; font-size: 0.92rem; }
      label.xopt:hover { border-color: var(--misty); background: #fafcfb; }
      label.xopt input { margin-top: 3px; }
      label.xopt small { color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
      /* drag & drop */
      #dropzone { border: 1.5px dashed transparent; border-radius: 12px; transition: border-color .15s, background .15s; padding: 2px; }
      #dropzone.drag { border-color: var(--ember); background: #fff7f3; }
      .bigdrop { border: 2px dashed var(--line); border-radius: 14px; padding: 26px; text-align: center; transition: border-color .15s, background .15s; cursor: pointer; }
      .bigdrop.drag { border-color: var(--ember); background: #fff7f3; }
      .bigdrop-inner { display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--ink); font-size: 0.92rem; }
      #blist { margin: 14px 0 0; display: flex; flex-direction: column; gap: 6px; }
      #blist .frow { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; }
      #blist .frow .rm { margin-left: auto; cursor: pointer; color: var(--muted); background: none; border: 0; padding: 0 4px; box-shadow: none; }
      #bresult { margin-top: 14px; }
      #bresult .frow { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; padding: 7px 11px; border-radius: 8px; margin: 5px 0; }
      #bresult .ok { background: var(--good-bg); color: var(--good); }
      #bresult .bad { background: #fdeceb; color: var(--bad); }
