.ari-graph-demo {
      margin: 0;
      min-height: 100dvh;
      background: #07111f;
    }

    #ariInfrastructureGraph {
      --bg: #07111f;
      --panel: rgba(12, 18, 31, 0.88);
      --panel-strong: rgba(7, 12, 22, 0.96);
      --line: rgba(255, 255, 255, 0.14);
      --text: #f8fafc;
      --muted: #9fb0c7;
      --gold: #f4c35b;
      --green: #41c99a;
      --blue: #60a5fa;
      --violet: #a78bfa;
      --rose: #fb7185;
      --teal: #2dd4bf;
      --orange: #fb923c;
      --shadow: rgba(0, 0, 0, 0.38);
    }

    #ariInfrastructureGraph,
    #ariInfrastructureGraph * {
      box-sizing: border-box;
    }

    #ariInfrastructureGraph {
      color: var(--text);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      height: min(900px, 82dvh);
      min-height: 640px;
      overflow: hidden;
      position: relative;
    }

    #ariInfrastructureGraph .app {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      height: 100%;
      min-height: 100%;
    }

    #ariInfrastructureGraph .topbar {
      align-items: center;
      background: var(--panel-strong);
      border-bottom: 1px solid var(--line);
      display: flex;
      gap: 20px;
      justify-content: space-between;
      padding: 16px 20px;
      position: relative;
      z-index: 5;
    }

    #ariInfrastructureGraph .title-group {
      min-width: 0;
    }

    #ariInfrastructureGraph .kicker {
      color: var(--gold);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0;
      margin: 0 0 4px;
      text-transform: uppercase;
    }

    #ariInfrastructureGraph h1 {
      font-size: 22px;
      letter-spacing: 0;
      line-height: 1.15;
      margin: 0;
    }

    #ariInfrastructureGraph .top-actions {
      align-items: center;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
    }

    #ariInfrastructureGraph button {
      appearance: none;
      background: rgba(255, 255, 255, 0.07);
      border: 1px solid var(--line);
      color: var(--text);
      cursor: pointer;
      font: inherit;
      font-size: 13px;
      font-weight: 700;
      line-height: 1;
      min-height: 36px;
      padding: 10px 12px;
    }

    #ariInfrastructureGraph button:hover,
    #ariInfrastructureGraph button:focus {
      border-color: rgba(244, 195, 91, 0.72);
      outline: none;
    }

    #ariInfrastructureGraph .main {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
      min-height: 0;
    }

    #ariInfrastructureGraph .canvas-zone {
      min-width: 0;
      position: relative;
    }

    #ariInfrastructureGraph canvas {
      display: block;
      height: 100%;
      width: 100%;
    }

    #ariInfrastructureGraph .legend {
      bottom: 18px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      left: 18px;
      position: absolute;
      z-index: 2;
    }

    #ariInfrastructureGraph .legend span,
    #ariInfrastructureGraph .viewport-chip {
      align-items: center;
      background: rgba(7, 12, 22, 0.78);
      border: 1px solid var(--line);
      color: var(--muted);
      display: inline-flex;
      font-size: 12px;
      font-weight: 800;
      gap: 8px;
      min-height: 30px;
      padding: 8px 10px;
    }

    #ariInfrastructureGraph .legend i {
      border-radius: 50%;
      display: inline-block;
      height: 10px;
      width: 10px;
    }

    #ariInfrastructureGraph .viewport-chip {
      left: 18px;
      position: absolute;
      top: 18px;
      z-index: 2;
    }

    #ariInfrastructureGraph .sidebar {
      background: var(--panel-strong);
      border-left: 1px solid var(--line);
      box-shadow: -18px 0 40px var(--shadow);
      display: grid;
      grid-template-rows: auto minmax(0, 1fr) auto;
      min-height: 0;
      min-width: 0;
    }

    #ariInfrastructureGraph .sidebar-header,
    #ariInfrastructureGraph .sidebar-footer {
      border-bottom: 1px solid var(--line);
      padding: 18px;
    }

    #ariInfrastructureGraph .sidebar-footer {
      border-bottom: 0;
      border-top: 1px solid var(--line);
    }

    #ariInfrastructureGraph .node-type {
      color: var(--gold);
      font-size: 11px;
      font-weight: 900;
      letter-spacing: 0;
      margin: 0 0 7px;
      text-transform: uppercase;
    }

    #ariInfrastructureGraph .sidebar h2 {
      font-size: 24px;
      letter-spacing: 0;
      line-height: 1.12;
      margin: 0;
    }

    #ariInfrastructureGraph .sidebar-body {
      min-height: 0;
      overflow: auto;
      padding: 18px;
    }

    #ariInfrastructureGraph .section + .section {
      border-top: 1px solid var(--line);
      margin-top: 16px;
      padding-top: 16px;
    }

    #ariInfrastructureGraph .section h3 {
      color: var(--gold);
      font-size: 12px;
      font-weight: 900;
      letter-spacing: 0;
      margin: 0 0 8px;
      text-transform: uppercase;
    }

    #ariInfrastructureGraph .section p {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.5;
      margin: 0;
    }

    #ariInfrastructureGraph .relation-list {
      display: grid;
      gap: 8px;
    }

    #ariInfrastructureGraph .relation {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--line);
      padding: 10px;
    }

    #ariInfrastructureGraph .relation small {
      color: var(--teal);
      display: block;
      font-size: 11px;
      font-weight: 900;
      margin-bottom: 5px;
      text-transform: uppercase;
    }

    #ariInfrastructureGraph .relation button {
      align-items: center;
      display: flex;
      justify-content: space-between;
      line-height: 1.2;
      min-height: 34px;
      padding: 8px 10px;
      text-align: left;
      width: 100%;
    }

    #ariInfrastructureGraph .attribution {
      border: 1px solid rgba(244, 195, 91, 0.42);
      color: var(--gold);
      display: inline-flex;
      font-size: 12px;
      font-weight: 900;
      min-height: 34px;
      padding: 10px 12px;
    }

    #ariInfrastructureGraph .empty-hint {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
    }

    #ariInfrastructureGraph .modal-backdrop {
      align-items: center;
      background: rgba(2, 6, 23, 0.72);
      display: none;
      inset: 0;
      justify-content: center;
      padding: 24px;
      position: fixed;
      z-index: 20;
    }

    #ariInfrastructureGraph .modal-backdrop.is-open {
      display: flex;
    }

    #ariInfrastructureGraph .modal {
      background: rgba(7, 12, 22, 0.98);
      border: 1px solid rgba(255, 255, 255, 0.18);
      box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
      display: grid;
      grid-template-rows: auto minmax(0, 1fr) auto;
      max-height: min(820px, calc(100vh - 48px));
      max-width: 920px;
      min-height: 0;
      width: min(920px, 100%);
    }

    #ariInfrastructureGraph .modal-header,
    #ariInfrastructureGraph .modal-footer {
      border-bottom: 1px solid var(--line);
      padding: 20px 22px;
    }

    #ariInfrastructureGraph .modal-header {
      align-items: start;
      display: flex;
      gap: 18px;
      justify-content: space-between;
    }

    #ariInfrastructureGraph .modal-header h2 {
      font-size: 26px;
      line-height: 1.1;
      margin: 0;
    }

    #ariInfrastructureGraph .modal-kicker {
      color: var(--gold);
      font-size: 11px;
      font-weight: 900;
      letter-spacing: 0;
      margin: 0 0 7px;
      text-transform: uppercase;
    }

    #ariInfrastructureGraph .modal-close {
      flex: 0 0 auto;
      min-width: 38px;
      padding: 10px;
    }

    #ariInfrastructureGraph .modal-body {
      min-height: 0;
      overflow: auto;
      padding: 4px 22px 20px;
    }

    #ariInfrastructureGraph .logic-step {
      border-bottom: 1px solid var(--line);
      display: grid;
      gap: 8px;
      grid-template-columns: 36px minmax(0, 1fr);
      padding: 18px 0;
    }

    #ariInfrastructureGraph .logic-step:last-child {
      border-bottom: 0;
    }

    #ariInfrastructureGraph .logic-index {
      align-items: center;
      border: 1px solid rgba(244, 195, 91, 0.42);
      color: var(--gold);
      display: inline-flex;
      font-size: 13px;
      font-weight: 900;
      height: 30px;
      justify-content: center;
      width: 30px;
    }

    #ariInfrastructureGraph .logic-step h3 {
      font-size: 16px;
      line-height: 1.2;
      margin: 0 0 6px;
    }

    #ariInfrastructureGraph .logic-step p {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.52;
      margin: 0;
    }

    #ariInfrastructureGraph .logic-step strong {
      color: var(--text);
      font-weight: 800;
    }

    #ariInfrastructureGraph .modal-footer {
      border-bottom: 0;
      border-top: 1px solid var(--line);
    }

    #ariInfrastructureGraph .modal-summary {
      color: var(--text);
      font-size: 14px;
      line-height: 1.55;
      margin: 0;
    }

    @media (max-width: 920px) {
      #ariInfrastructureGraph {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
      }

      #ariInfrastructureGraph .app {
        min-height: 100vh;
      }

      #ariInfrastructureGraph .topbar,
      #ariInfrastructureGraph .main {
        display: block;
      }

      #ariInfrastructureGraph .top-actions {
        justify-content: flex-start;
        margin-top: 14px;
      }

      #ariInfrastructureGraph .canvas-zone {
        height: 62vh;
        min-height: 480px;
      }

      #ariInfrastructureGraph .sidebar {
        border-left: 0;
        border-top: 1px solid var(--line);
      }

      #ariInfrastructureGraph .modal-backdrop {
        padding: 14px;
      }

      #ariInfrastructureGraph .logic-step {
        grid-template-columns: 1fr;
      }
    }
