    :root {
      color-scheme: light dark;
      --bg: light-dark(#f4f7fa, #0e1317);
      --panel: light-dark(#ffffff, #151b21);
      --panel-2: light-dark(#f8fafc, #1e262e);
      --line: light-dark(#e0e7ef, #2f3a44);
      --line-2: light-dark(#edf2f7, #25303a);
      --text: light-dark(#17202a, #edf3f8);
      --muted: light-dark(#657280, #9ba8b4);
      --dim: light-dark(#9aa5b1, #74808d);
      --teal: light-dark(#0f8f83, #2dd4bf);
      --blue: light-dark(#2563eb, #60a5fa);
      --red: light-dark(#d92d4b, #fb7185);
      --amber: light-dark(#b77905, #fbbf24);
      --green: light-dark(#168a50, #4ade80);
      --purple: light-dark(#7c3aed, #a78bfa);
      --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 18px rgba(15, 23, 42, .06);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    * { box-sizing: border-box; }
    body { margin: 0; background: var(--bg); color: var(--text); letter-spacing: 0; font-size: 13px; }
    header {
      height: 70px;
      display: grid;
      grid-template-columns: minmax(420px, auto) minmax(220px, 1fr) auto;
      align-items: center;
      gap: 18px;
      padding: 0 24px;
      background: var(--panel);
      border-bottom: 1px solid var(--line);
      box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    }
    .brand { display: flex; align-items: center; gap: 18px; min-width: 420px; }
    .brand-logo {
      width: 220px;
      height: 52px;
      object-fit: contain;
      object-position: left center;
      display: block;
      mix-blend-mode: multiply;
    }
    @media (prefers-color-scheme: dark) {
      .brand-logo {
        background: white;
        border-radius: 6px;
        padding: 3px 6px;
        mix-blend-mode: normal;
      }
    }
    .product-name {
      display: grid;
      gap: 2px;
      line-height: 1.1;
    }
    .product-name strong { font-size: 15px; }
    .product-name span { color: var(--muted); font-size: 12px; font-weight: 650; }
    .title { color: var(--muted); text-align: center; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .title strong { color: var(--text); }
    .header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: max-content; }
    .pill {
      display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 5px 10px;
      border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px;
      color: var(--muted); font-size: 12px; white-space: nowrap;
    }
    .pill.live { color: white; border-color: var(--teal); background: var(--teal); }
    .ghost-button {
      min-height: 28px;
      padding: 5px 10px;
      border: 1px solid var(--line);
      background: var(--panel-2);
      border-radius: 999px;
      color: var(--muted);
      cursor: pointer;
      font: inherit;
      font-size: 12px;
      font-weight: 700;
    }
    .ghost-button:hover { color: var(--text); border-color: color-mix(in srgb, var(--teal) 55%, var(--line)); }
    .user-menu { position: relative; }
    .user-menu-button {
      min-height: 28px;
      padding: 5px 10px;
      border: 1px solid var(--line);
      background: var(--panel-2);
      border-radius: 999px;
      color: var(--muted);
      cursor: pointer;
      font: inherit;
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
    }
    .user-menu-button:hover, .user-menu.open .user-menu-button {
      color: var(--text);
      border-color: color-mix(in srgb, var(--teal) 55%, var(--line));
    }
    .user-dropdown {
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      min-width: 180px;
      display: none;
      padding: 6px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: var(--shadow);
      z-index: 20;
    }
    .user-menu.open .user-dropdown { display: grid; gap: 4px; }
    .menu-item {
      width: 100%;
      min-height: 32px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font: inherit;
      font-size: 12px;
      font-weight: 700;
      text-align: left;
      padding: 7px 9px;
    }
    .menu-item:hover { background: var(--panel-2); color: var(--text); }
    .auth-screen {
      position: fixed;
      inset: 0;
      z-index: 30;
      display: grid;
      place-items: center;
      padding: 24px;
      background:
        radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--red) 18%, transparent), transparent 32%),
        radial-gradient(circle at 78% 26%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 30%),
        linear-gradient(135deg, color-mix(in srgb, var(--panel) 88%, #0b1220), var(--bg));
    }
    .auth-screen.hidden { display: none; }
    .auth-panel {
      width: min(420px, 100%);
      border: 1px solid var(--line);
      background: color-mix(in srgb, var(--panel) 96%, transparent);
      border-radius: 10px;
      box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
      padding: 28px;
    }
    .auth-logo {
      width: 210px;
      height: 50px;
      object-fit: contain;
      object-position: left center;
      display: block;
      margin-bottom: 22px;
      mix-blend-mode: multiply;
    }
    @media (prefers-color-scheme: dark) {
      .auth-logo {
        background: white;
        border-radius: 6px;
        padding: 3px 6px;
        mix-blend-mode: normal;
      }
    }
    .auth-title { font-size: 24px; line-height: 1.1; font-weight: 850; margin-bottom: 8px; }
    .auth-copy { color: var(--muted); line-height: 1.45; margin: 0 0 22px; }
    .auth-form { display: grid; gap: 12px; }
    .auth-field { display: grid; gap: 6px; }
    .auth-field label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 760; }
    .auth-field input {
      width: 100%;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-2);
      color: var(--text);
      padding: 10px 12px;
      font: inherit;
      font-size: 14px;
      outline: none;
    }
    .auth-field input:focus { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 14%, transparent); }
    .auth-submit {
      min-height: 42px;
      border: 1px solid #ed1c24;
      border-radius: 8px;
      background: linear-gradient(135deg, #ed1c24, #b5121b);
      color: white;
      cursor: pointer;
      font: inherit;
      font-weight: 800;
      box-shadow: 0 10px 24px rgba(237, 28, 36, .22);
    }
    .auth-submit:hover { filter: brightness(1.04); }
    .auth-error {
      min-height: 18px;
      color: var(--red);
      font-size: 12px;
      font-weight: 700;
    }
    .settings-grid { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(0, 1.15fr); gap: 14px; align-items: start; }
    .settings-form { display: grid; gap: 12px; }
    .field { display: grid; gap: 6px; }
    .field label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 760; }
    .field input, .field select, .field textarea {
      width: 100%;
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-2);
      color: var(--text);
      padding: 9px 10px;
      font: inherit;
      outline: none;
    }
    .field textarea { min-height: 220px; resize: vertical; line-height: 1.5; }
    .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 14%, transparent); }
    .primary-button {
      min-height: 38px;
      border: 1px solid var(--teal);
      border-radius: 8px;
      background: var(--teal);
      color: white;
      cursor: pointer;
      font: inherit;
      font-weight: 800;
    }
    .danger-button {
      min-height: 30px;
      border: 1px solid color-mix(in srgb, var(--red) 45%, var(--line));
      border-radius: 8px;
      background: color-mix(in srgb, var(--red) 10%, var(--panel));
      color: var(--red);
      cursor: pointer;
      font: inherit;
      font-size: 12px;
      font-weight: 800;
    }
    .settings-note { color: var(--muted); line-height: 1.45; margin: 10px 0 0; }
    .form-message { min-height: 18px; font-size: 12px; font-weight: 750; }
    .form-message.ok { color: var(--green); }
    .form-message.err { color: var(--red); }
    .secret-box {
      display: none;
      margin-top: 12px;
      border: 1px solid color-mix(in srgb, var(--red) 35%, var(--line));
      background: color-mix(in srgb, var(--red) 7%, var(--panel));
      border-radius: 8px;
      padding: 12px;
    }
    .secret-box.visible { display: grid; gap: 8px; }
    .secret-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }
    .secret-box code {
      display: block;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      background: var(--panel-2);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 10px;
      color: var(--text);
    }
    nav { background: var(--panel); border-bottom: 1px solid var(--line); }
    .primary-nav, .sub-nav {
      display: flex;
      gap: 4px;
      padding: 0 24px;
      overflow-x: auto;
    }
    .primary-nav { min-height: 44px; align-items: center; border-bottom: 1px solid var(--line-2); }
    .sub-nav { min-height: 42px; align-items: end; }
    .nav-group {
      min-height: 32px;
      padding: 0 14px;
      border: 1px solid transparent;
      border-radius: 8px;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font: inherit;
      font-weight: 800;
      white-space: nowrap;
    }
    .nav-group.active {
      color: var(--text);
      border-color: var(--line);
      background: var(--panel-2);
    }
    .tab {
      min-height: 42px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px;
      color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: transparent;
      cursor: pointer; font: inherit; font-weight: 650; white-space: nowrap;
    }
    .tab.active { color: var(--teal); border-bottom-color: var(--teal); }
    .tab.hidden { display: none; }
    .tab i { width: 18px; height: 18px; display: grid; place-items: center; font-style: normal; }
    main { padding: 18px 24px 36px; }
    .section { display: none; }
    .section.active { display: block; animation: fade .2s ease; }
    @keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
    .row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
    .col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; }
    .col-6 { grid-column: span 6; } .col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; } .col-12 { grid-column: span 12; }
    .card, .kpi {
      background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
      box-shadow: var(--shadow); min-width: 0;
    }
    .card { padding: 18px 20px; }
    .card h2 {
      margin: 0 0 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px;
      color: var(--muted); display: flex; align-items: center; gap: 8px;
    }
    .card h2::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
    .kpi { padding: 16px 18px; border-left: 3px solid var(--teal); position: relative; overflow: hidden; }
    .kpi.red { border-left-color: var(--red); } .kpi.amber { border-left-color: var(--amber); }
    .kpi.blue { border-left-color: var(--blue); } .kpi.green { border-left-color: var(--green); }
    .kpi .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .55px; font-weight: 700; }
    .kpi .value { margin-top: 5px; font-size: 29px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
    .kpi .sub { margin-top: 4px; color: var(--dim); font-size: 11px; }
    .dns-posture { display:flex; align-items:center; gap:18px; min-height:110px; }
    .dns-donut { width:112px; height:112px; border-radius:50%; display:grid; place-items:center; align-content:center; background:conic-gradient(var(--teal) 0deg, var(--teal) 0deg, var(--panel-2) 0deg); position:relative; flex:0 0 auto; }
    .dns-donut::after { content:""; position:absolute; inset:11px; border-radius:50%; background:var(--panel); }
    .dns-donut b,.dns-donut span { position:relative; z-index:1; }
    .dns-donut b { font-size:24px; }
    .dns-donut span { color:var(--muted); font-size:10px; }
    .dns-posture-copy strong { display:block; font-size:16px; }
    .dns-posture-copy p { color:var(--muted); margin:5px 0 0; font-size:12px; line-height:1.45; }
    .legend-row { display:flex; gap:16px; color:var(--muted); font-size:11px; margin:4px 0 12px; }
    .legend-dot { width:8px; height:8px; border-radius:50%; display:inline-block; margin-right:5px; }
    .legend-dot.approved { background:var(--teal); } .legend-dot.external { background:var(--red); }
    .inline-form { display:flex; gap:8px; align-items:center; }
    .inline-form input { flex:1; min-width:0; }
    .kpi .mini { position: absolute; right: 12px; top: 12px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; font-size: 10px; font-weight: 700; }
    .hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; }
    .risk-dial { display: grid; grid-template-columns: 124px 1fr; gap: 16px; align-items: center; }
    .ring {
      --score: 0; width: 124px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
      background: conic-gradient(var(--red) calc(var(--score) * 1%), var(--line-2) 0); position: relative;
    }
    .ring::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); }
    .ring b { position: relative; z-index: 1; font-size: 30px; }
    .risk-copy strong { display: block; font-size: 17px; margin-bottom: 6px; }
    .risk-copy p, .ai-text, .muted { color: var(--muted); line-height: 1.45; margin: 0; }
    .ai-banner {
      min-height: 100%; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--teal) 35%, var(--line));
      background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 10%, var(--panel)), var(--panel));
      border-radius: 10px; box-shadow: var(--shadow);
    }
    .ai-label { color: var(--teal); text-transform: uppercase; letter-spacing: .7px; font-size: 11px; font-weight: 800; margin-bottom: 8px; }
    .ai-title { font-size: 21px; font-weight: 800; margin-bottom: 8px; line-height: 1.2; }
    .panel-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
    .insight-stack { display: grid; gap: 12px; }
    .insight-block {
      border: 1px solid var(--line-2);
      background: var(--panel-2);
      border-radius: 8px;
      padding: 12px;
    }
    .insight-block b {
      display: block;
      margin-bottom: 6px;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: .5px;
      color: var(--teal);
    }
    .insight-block p { margin: 0; color: var(--muted); line-height: 1.5; }
    .insight-block ul { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.5; }
    .bars { display: grid; gap: 8px; }
    .bar-row { display: grid; grid-template-columns: 112px 1fr 42px; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; }
    .track { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
    .track span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--blue), var(--red)); }
    table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
    th { text-align: left; padding: 9px 10px; color: var(--muted); background: var(--panel-2); border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .45px; font-size: 11px; }
    td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    tr:hover td { background: color-mix(in srgb, var(--teal) 8%, transparent); }
    .tag { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 750; }
    .critical { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
    .high { color: var(--amber); background: color-mix(in srgb, var(--amber) 15%, transparent); }
    .medium { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
    .finding-list { display: grid; gap: 10px; }
    .finding {
      border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 14px 16px;
      border-left: 3px solid var(--red);
      cursor: pointer;
      transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    }
    .finding:hover { border-color: color-mix(in srgb, var(--teal) 60%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 12%, transparent); }
    .finding.selected { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 16%, transparent); }
    .finding-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
    .finding-title { font-weight: 760; line-height: 1.25; overflow-wrap: anywhere; }
    .finding-meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
    .facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0; }
    .fact { border: 1px solid var(--line); background: var(--panel-2); padding: 4px 8px; font-size: 11px; color: var(--muted); border-radius: 999px; }
    .actions { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
    .actions li { border-left: 2px solid var(--teal); padding-left: 8px; line-height: 1.4; }
    .matrix { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
    .cell { min-height: 70px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 10px; color: var(--muted); }
    .cell b { display: block; color: var(--text); font-size: 22px; margin-bottom: 3px; }
    .cell.hot { background: color-mix(in srgb, var(--red) 13%, var(--panel)); }
    .cell.warn { background: color-mix(in srgb, var(--amber) 15%, var(--panel)); }
    .timeline { display: grid; gap: 10px; }
    .event { display: grid; grid-template-columns: 128px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
    .time { color: var(--muted); font-size: 11px; }
    .event strong { display: block; font-size: 12px; margin-bottom: 3px; }
    .event span { color: var(--muted); font-size: 11px; }
    .evidence-workbench { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
    .evidence-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
    .evidence-filter-list { display: grid; gap: 8px; max-height: 680px; overflow: auto; padding-right: 4px; }
    .empty { color: var(--muted); padding: 24px; border: 1px dashed var(--line); background: var(--panel); border-radius: 10px; }
    .detail-layout { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(0, 1.15fr); gap: 14px; align-items: start; }
    .detail-list { display: grid; gap: 8px; max-height: 720px; overflow: auto; padding-right: 4px; }
    .detail-card {
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 8px;
      padding: 12px;
      cursor: pointer;
      border-left: 3px solid transparent;
    }
    .detail-card:hover { border-color: color-mix(in srgb, var(--teal) 55%, var(--line)); }
    .detail-card.active { border-left-color: var(--teal); background: color-mix(in srgb, var(--teal) 8%, var(--panel)); }
    .detail-card-title { font-weight: 750; line-height: 1.25; margin-bottom: 6px; }
    .detail-card-meta { color: var(--muted); font-size: 11px; }
    .detail-panel { min-height: 720px; }
    .detail-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
    .detail-title { font-size: 20px; font-weight: 820; line-height: 1.2; margin-bottom: 6px; }
    .detail-summary { color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
    .detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
    .detail-stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-height: 68px; }
    .detail-stat span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; font-weight: 750; margin-bottom: 5px; }
    .detail-stat b { font-size: 15px; overflow-wrap: anywhere; }
    .evidence-grid { display: grid; gap: 8px; }
    .evidence-row {
      display: grid;
      grid-template-columns: 138px minmax(0, 1fr) 92px;
      gap: 10px;
      border: 1px solid var(--line-2);
      border-radius: 8px;
      padding: 10px;
      background: var(--panel-2);
      align-items: center;
    }
    .evidence-flow { min-width: 0; }
    .evidence-flow strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .evidence-flow span { color: var(--muted); font-size: 11px; }
    @media (max-width: 1100px) {
      .col-3, .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 12; }
      .hero { grid-template-columns: 1fr; }
      header { grid-template-columns: 1fr; height: auto; padding-block: 12px; }
      .brand { min-width: 0; }
      .title { text-align: left; }
      .header-actions { justify-content: flex-start; flex-wrap: wrap; min-width: 0; }
      .matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .detail-layout, .detail-grid, .settings-grid, .evidence-workbench, .evidence-summary { grid-template-columns: 1fr; }
    }

