/* ─────────────────────────────────────────────────────────────────────────────
   IBM Cloud VPC Synergies Map — app.css
   IBM Carbon design tokens, dark/light themes, 10 lane colour slots
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Fonts (IBM Carbon official CDN) ────────────────────────────────────────── */
@import url('https://1.www.s81c.com/common/carbon/plex/plex-full.css');

/* ── Design tokens — dark theme (Carbon Gray 100 / Gray 90) ─────────────────── */
:root, [data-theme="dark"], [data-theme="g100"] {
  --bg-primary:    #161616; /* Carbon $background / Gray 100 */
  --bg-secondary:  #262626; /* Carbon $layer-01 / Gray 90 */
  --bg-tertiary:   #393939; /* Carbon $layer-02 / Gray 80 */
  --bg-hover:      #353535; /* Carbon $layer-hover */
  --border:        #525252; /* Carbon $border-subtle / $border-strong */
  --border-subtle: #393939; /* Carbon $border-subtle */
  --text-primary:  #f4f4f4; /* Carbon $text-primary / Gray 10 */
  --text-secondary:#c6c6c6; /* Carbon $text-secondary / Gray 30 */
  --text-muted:    #8d8d8d; /* Carbon $text-muted / $text-placeholder */
  --text-link:     #78a9ff; /* Carbon $link-primary / Blue 40 */
  --accent:        #0f62fe; /* Carbon $interactive / Blue 60 */
  --accent-hover:  #0353e9; /* Carbon $interactive-hover / Blue 70 */
  --tag-bg:        #393939; /* Carbon $tag-background-gray */
  --tag-text:      #f4f4f4;
  --badge-partner: #eb6200; /* Carbon Orange 50 */
  --badge-warn:    #f1c21b; /* Carbon Yellow 30 */
  --status-ga:     #24a148; /* Carbon $support-success / Green 50 */
  --sidebar-bg:    #262626;
  --sidebar-width: 400px;
  --header-height: 48px;
  --filter-height: 0px;

  /* Lane colour slots — Official Carbon Color Palette v10 */
  --play-0: #0f62fe; /* VPC Core    — Carbon Blue 60 */
  --play-1: #8a3ffc; /* Compute     — Carbon Purple 60 */
  --play-2: #1192e8; /* Networking  — Carbon Cyan 50 */
  --play-3: #007d79; /* Storage     — Carbon Teal 60 */
  --play-4: #ee5396; /* Security    — Carbon Magenta 50 */
  --play-5: #da1e28; /* Connectivity— Carbon Red 60 */
  --play-6: #24a148; /* Platform    — Carbon Green 50 */
  --play-7: #f1c21b; /* Reserved    — Carbon Yellow 30 */
  --play-8: #ff832b; /* Reserved    — Carbon Orange 40 */
  --play-9: #8d8d8d; /* Reserved    — Carbon Gray 50 */

  --play-0-muted: rgba(15, 98, 254, 0.2);
  --play-1-muted: rgba(138, 63, 252, 0.2);
  --play-2-muted: rgba(17, 146, 232, 0.2);
  --play-3-muted: rgba(0, 125, 121, 0.2);
  --play-4-muted: rgba(238, 83, 150, 0.2);
  --play-5-muted: rgba(218, 30, 40, 0.2);
  --play-6-muted: rgba(36, 161, 72, 0.2);
  --play-7-muted: rgba(241, 194, 27, 0.2);
  --play-8-muted: rgba(255, 131, 43, 0.2);
  --play-9-muted: rgba(141, 141, 141, 0.2);
}

/* ── Design tokens — light theme (Carbon White / Gray 10) ───────────────────── */
[data-theme="light"], [data-theme="white"] {
  --bg-primary:    #ffffff; /* Carbon $background / White */
  --bg-secondary:  #f4f4f4; /* Carbon $layer-01 / Gray 10 */
  --bg-tertiary:   #e0e0e0; /* Carbon $layer-02 / Gray 20 */
  --bg-hover:      #e5e5e5; /* Carbon $layer-hover */
  --border:        #c6c6c6; /* Carbon $border-subtle / $border-strong */
  --border-subtle: #e0e0e0; /* Carbon $border-subtle / Gray 20 */
  --text-primary:  #161616; /* Carbon $text-primary / Gray 100 */
  --text-secondary:#525252; /* Carbon $text-secondary / Gray 70 */
  --text-muted:    #6f6f6f; /* Carbon $text-muted / Gray 60 */
  --text-link:     #0f62fe; /* Carbon $link-primary / Blue 60 */
  --accent:        #0f62fe; /* Carbon $interactive / Blue 60 */
  --accent-hover:  #0353e9; /* Carbon $interactive-hover / Blue 70 */
  --tag-bg:        #e0e0e0; /* Carbon $tag-background-gray */
  --tag-text:      #161616;
  --badge-partner: #ba4e00; /* Carbon Orange 60 */
  --badge-warn:    #b28600; /* Carbon Yellow 50 */
  --status-ga:     #198038; /* Carbon $support-success / Green 60 */
  --sidebar-bg:    #f4f4f4;

  --play-0: #0f62fe; /* Carbon Blue 60 */
  --play-1: #8a3ffc; /* Carbon Purple 60 */
  --play-2: #0072c3; /* Carbon Cyan 60 */
  --play-3: #007d79; /* Carbon Teal 60 */
  --play-4: #d12771; /* Carbon Magenta 60 */
  --play-5: #da1e28; /* Carbon Red 60 */
  --play-6: #198038; /* Carbon Green 60 */
  --play-7: #b28600; /* Carbon Yellow 50 */
  --play-8: #ba4e00; /* Carbon Orange 60 */
  --play-9: #6f6f6f; /* Carbon Gray 60 */

  --play-0-muted: rgba(15, 98, 254, 0.12);
  --play-1-muted: rgba(138, 63, 252, 0.12);
  --play-2-muted: rgba(0, 114, 195, 0.12);
  --play-3-muted: rgba(0, 125, 121, 0.12);
  --play-4-muted: rgba(209, 39, 113, 0.12);
  --play-5-muted: rgba(218, 30, 40, 0.12);
  --play-6-muted: rgba(25, 128, 56, 0.12);
  --play-7-muted: rgba(178, 134, 0, 0.12);
  --play-8-muted: rgba(186, 78, 0, 0.12);
  --play-9-muted: rgba(111, 111, 111, 0.12);
}

/* ── Reset & base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  z-index: 100;
}

.header-left  { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.header-center{ flex: 1; display: flex; justify-content: center; }
.header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.header-product {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.header-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── View tabs ──────────────────────────────────────────────────────────────── */
.view-tabs { display: flex; gap: 2px; }

.view-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 5px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.view-tab:hover    { background: var(--bg-hover); color: var(--text-primary); }
.view-tab.is-active{
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Search ─────────────────────────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 5px 10px 5px 32px;
  font-size: 13px;
  font-family: inherit;
  border-radius: 3px;
  width: 220px;
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.search-input:focus {
  border-color: var(--accent);
  background: var(--bg-primary);
}
.search-input::placeholder { color: var(--text-muted); }

/* ── Theme toggle ───────────────────────────────────────────────────────────── */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px; height: 32px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.theme-icon {
  width: 16px;
  height: 16px;
}

/* ── Main layout ────────────────────────────────────────────────────────────── */
.app-main {
  margin-top: calc(var(--header-height) + var(--filter-height));
  padding: 20px 16px;
  transition: margin-right 0.25s ease;
}
.app-main.sidebar-open {
  margin-right: var(--sidebar-width);
}
.app-main.is-map {
  padding: 0;
  margin-top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}
.app-main.is-map.sidebar-open {
  margin-right: var(--sidebar-width);
}

/* ── Loading / error states ─────────────────────────────────────────────────── */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Map view (radial) ──────────────────────────────────────────────────────── */
.map-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  overflow: hidden;
}

.synergy-map {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  font-family: inherit;
}

.spoke {
  stroke-width: 1;
  opacity: 0.22;
  stroke-linecap: round;
  pointer-events: none;
  transition: opacity 0.15s;
}
.spoke.is-dimmed { opacity: 0.06; }
.spoke.is-lit    { opacity: 0.55; stroke-width: 1.5; }

.inode {
  cursor: pointer;
  outline: none;
}
.inode text.fg {
  fill: var(--text-secondary);
  pointer-events: none;
  text-anchor: middle;
  font-weight: 600;
  font-size: 12px;
  transition: fill 0.15s;
}
.inode:hover text.fg,
.inode:focus-visible text.fg {
  fill: var(--ic) !important;
}
.inode.is-active text.fg,
.inode.is-highlighted text.fg,
.inode.is-query-hit text.fg {
  fill: var(--ic) !important;
  font-weight: 700;
}
.inode.is-dimmed { opacity: 0.22; }
.inode.is-query-hit text.fg {
  paint-order: stroke;
  stroke: var(--accent);
  stroke-width: 0.6px;
  stroke-opacity: 0.45;
}

.arc-lbl {
  pointer-events: none;
}
.arc-lbl-text {
  font-size: 13px;
  font-weight: 700;
  fill: #fff;
  letter-spacing: 0.04em;
  dominant-baseline: middle;
}

.hub {
  cursor: pointer;
  outline: none;
}
.hub .hc {
  fill: var(--hc, var(--play-0));
  transition: filter 0.2s;
}
.hub:hover .hc,
.hub:focus-visible .hc { filter: brightness(1.12); }
.hub.is-active .hc,
.hub.is-highlighted .hc { filter: brightness(1.1); }
.hub.is-dimmed { opacity: 0.35; }
.hub text {
  fill: #fff;
  text-anchor: middle;
  pointer-events: none;
}
.hub .hub-ibm {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.8;
}
.hub .hub-nm {
  font-size: 36px;
  font-weight: 700;
}
.hub .hub-st {
  font-size: 11px;
  fill: rgba(22, 22, 22, 0.85);
  font-weight: 600;
}

/* ── Cards (integration / legacy) ───────────────────────────────────────────── */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
  border-left: 3px solid var(--lane-color, var(--border));
}
.card:hover { background: var(--bg-hover); border-color: var(--lane-color, var(--accent)); }

.card.is-active {
  border-color: var(--lane-color, var(--accent));
  background: var(--bg-hover);
  box-shadow: 0 0 0 1px var(--lane-color, var(--accent));
}
.card.is-highlighted { opacity: 1; }
.card.is-dimmed      { opacity: 0.25; }
.card.is-query-hit   { box-shadow: 0 0 0 2px var(--accent); }

.card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}
.card-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.card.is-hub {
  border-left-width: 4px;
  background: var(--bg-tertiary);
}
.card.is-hub .card-label { font-size: 14px; }

/* Status badges */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 2px;
  margin-top: 4px;
}
.badge-partner    { background: var(--badge-partner); color: #fff; }
.badge-restricted { background: var(--badge-warn); color: #161616; }
.badge-coming-soon{ background: var(--bg-tertiary); color: var(--text-muted); border: 1px solid var(--border); }
.badge-deprecated { background: var(--text-muted); color: var(--bg-primary); }

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar.is-open { transform: translateX(0); }

.sidebar-close {
  position: absolute;
  top: 12px; right: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
}
.sidebar-close:hover { color: var(--text-primary); background: var(--bg-hover); }

.sidebar-content { padding: 48px 20px 32px; }

.sidebar-empty {
  color: var(--text-muted);
  padding: 40px 0;
}
.sidebar-empty h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.sidebar-empty p { font-size: 13px; line-height: 1.6; }

/* Sidebar sections */
.sb-lane-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 2px;
  margin-bottom: 10px;
  color: #fff;
}
.sb-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}
.sb-status {
  font-size: 11px;
  color: var(--status-ga);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.sb-status.restricted { color: var(--badge-warn); }
.sb-status.partner    { color: var(--badge-partner); }

.sb-section { margin-top: 18px; }
.sb-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
}
.sb-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.sb-value {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  font-style: italic;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--bg-tertiary);
  border-radius: 0 3px 3px 0;
}
.sb-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sb-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.sb-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.sb-questions li::before { content: '?'; color: var(--accent); font-weight: 600; }

.sb-docs-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-link);
  margin-top: 4px;
}
.sb-docs-link::after { content: '↗'; font-size: 11px; }

/* Connection cards in sidebar */
.conn-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.conn-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--conn-color, var(--border));
  border-radius: 3px;
  padding: 8px 10px;
}
.conn-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.conn-card-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.conn-card-note {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}
.conn-card-kind {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 4px;
}
.conn-card-kind.native   { color: var(--status-ga); }
.conn-card-kind.platform { color: var(--text-link); }
.conn-card-kind.optional { color: var(--text-muted); }

/* ── Integration view ────────────────────────────────────────────────────────── */
.int-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Hub block — centred VPC Core card + pillar buttons below it */
.int-hub-row {
  display: flex;
  justify-content: center;
}

.int-hub-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 320px;
  width: 100%;
}

.int-hub-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.int-hub-cards {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Pillar buttons */
.int-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.int-pillar {
  padding: 8px 20px;
  border-radius: 4px;
  border: 1px solid var(--pillar-color, var(--border));
  background: transparent;
  color: var(--pillar-color, var(--text-primary));
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.int-pillar:hover {
  background: color-mix(in srgb, var(--pillar-color) 15%, transparent);
}
.int-pillar.is-active {
  background: var(--pillar-color);
  color: #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pillar-color) 50%, transparent);
}

.int-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  min-height: 18px;
}

/* Column grid — one column per pillar */
.int-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: start;
}

.int-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 0.2s;
}

.int-column-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 3px;
  border-left: 3px solid var(--pillar-color, var(--border));
  background: color-mix(in srgb, var(--pillar-color) 15%, transparent);
  color: var(--text-secondary);
}

.int-column-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Network view ─────────────────────────────────────────────────────────────── */
.net-area {
  padding: 24px 32px 40px;
  max-width: 1400px;
}

.net-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 20px 148px;
  height: 18px;
}

.net-stats {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 24px;
  margin-left: 148px;
  letter-spacing: 0.03em;
}

.net-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
  padding: 10px 0;
}

.net-row + .net-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 140px;
  right: 0;
  height: 1px;
  background: var(--border-subtle);
}

.net-row-label {
  width: 140px;
  flex-shrink: 0;
  padding-top: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  user-select: none;
}

.net-row-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
}

.net-card {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 10px 14px;
  border: 1.5px solid var(--border-subtle);
  border-left: 4px solid var(--net-color, var(--accent));
  border-radius: 4px;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: opacity 0.15s, background 0.12s, box-shadow 0.12s, border-color 0.12s;
  min-width: 180px;
  max-width: 280px;
  user-select: none;
  position: relative;
}

.net-card:hover {
  background: var(--bg-hover);
  border-top-color:    var(--net-color, var(--accent));
  border-right-color:  var(--net-color, var(--accent));
  border-bottom-color: var(--net-color, var(--accent));
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.net-card-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--net-color, var(--accent));
  opacity: 0.85;
  margin-right: 10px;
  align-self: flex-start;
  margin-top: 1px;
}

.net-card-body {
  min-width: 0;
  flex: 1;
}

.net-card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.net-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* Badge inside net-card — float top-right */
.net-card .badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  padding: 1px 5px;
}

/* Selected card */
.net-card.is-selected {
  background: color-mix(in srgb, var(--net-color, var(--accent)) 15%, var(--bg-secondary));
  border-top-color:    var(--net-color, var(--accent));
  border-right-color:  var(--net-color, var(--accent));
  border-bottom-color: var(--net-color, var(--accent));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--net-color, var(--accent)) 45%, transparent),
              0 2px 12px rgba(0,0,0,0.15);
}

/* Reachable (in path) */
.net-card.is-reachable {
  background: color-mix(in srgb, var(--net-color, var(--accent)) 8%, var(--bg-secondary));
  border-top-color:    color-mix(in srgb, var(--net-color, var(--accent)) 55%, transparent);
  border-right-color:  color-mix(in srgb, var(--net-color, var(--accent)) 55%, transparent);
  border-bottom-color: color-mix(in srgb, var(--net-color, var(--accent)) 55%, transparent);
  opacity: 1;
}

/* Dimmed — not in current path */
.net-card.is-dimmed {
  opacity: 0.2;
  filter: grayscale(0.4);
}

/* Dark theme adjustments */
[data-theme="dark"] .net-card.is-selected {
  background: color-mix(in srgb, var(--net-color, var(--accent)) 20%, var(--bg-secondary));
}

[data-theme="dark"] .net-card.is-reachable {
  background: color-mix(in srgb, var(--net-color, var(--accent)) 12%, var(--bg-secondary));
}

/* Row 0 — hub anchor row */
.net-row[data-row="0"] .net-card {
  min-width: 220px;
}

/* Intent toggle cards (Row 1 — Secure / Public Connections) */
.net-card--intent {
  min-width: 200px;
  max-width: 260px;
  padding: 12px 18px;
  border-left-width: 5px;
  background: color-mix(in srgb, var(--net-color) 10%, var(--bg-secondary));
}

.net-card--intent .net-card-label {
  font-size: 14px;
  font-weight: 700;
}

.net-card--intent:hover {
  background: color-mix(in srgb, var(--net-color) 18%, var(--bg-secondary));
}

.net-card--intent.is-selected {
  background: color-mix(in srgb, var(--net-color) 22%, var(--bg-secondary));
}

[data-theme="dark"] .net-card--intent {
  background: color-mix(in srgb, var(--net-color) 14%, var(--bg-secondary));
}

[data-theme="dark"] .net-card--intent.is-selected {
  background: color-mix(in srgb, var(--net-color) 26%, var(--bg-secondary));
}

/* ==========================================================================
   Architecture Reference View Styles (High-Level VPC Reference Architecture)
   ========================================================================== */

.arch-view-wrapper {
  padding: 24px;
  max-width: 1680px;
  margin: 0 auto;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
}

/* ── Top Bar ── */
.arch-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent);
  padding: 14px 20px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.arch-top-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16px;
}

.arch-title-icon {
  color: var(--accent);
}

.arch-traffic-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.arch-legend-note {
  color: var(--text-muted);
  font-weight: 500;
}

.arch-traffic-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}

.arch-traffic-pill .pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.pill-public {
  background: rgba(15, 98, 254, 0.12);
  color: #0f62fe;
  border-color: rgba(15, 98, 254, 0.3);
}
.pill-public .pill-dot { background: #0f62fe; }

.pill-private {
  background: rgba(36, 161, 72, 0.12);
  color: #24a148;
  border-color: rgba(36, 161, 72, 0.3);
}
.pill-private .pill-dot { background: #24a148; }

.pill-secure {
  background: rgba(218, 30, 40, 0.12);
  color: #da1e28;
  border-color: rgba(218, 30, 40, 0.3);
}
.pill-secure .pill-dot { background: #da1e28; }

/* ── 3-Column Diagram Grid ── */
.arch-diagram-grid {
  display: grid;
  grid-template-columns: 180px 1fr 200px;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 1200px) {
  .arch-diagram-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Outer Columns ── */
.arch-col {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

.arch-col-consumer,
.arch-col-provider {
  border-color: rgba(15, 98, 254, 0.4);
}

.arch-col-header {
  padding: 12px 14px;
  background: rgba(15, 98, 254, 0.08);
  border-bottom: 1px solid var(--border-subtle);
}

.arch-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.arch-col-body {
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.arch-consumer-flow,
.arch-provider-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.arch-v-line {
  width: 2px;
  height: 28px;
  background: #0f62fe;
}

/* ── Center Column: Cloud Region ── */
.arch-col-cloud {
  background: transparent;
  border: none;
}

.arch-region-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 18px;
}

.arch-region-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-subtle);
}

.arch-cloud-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0f62fe;
}

.arch-region-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.arch-vpcs-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── VPC Cards ── */
.arch-vpc-card {
  background: var(--bg-primary);
  border: 1.5px solid #0072c3;
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.arch-vpc-mgmt {
  border-color: #0072c3;
}

.arch-vpc-workload {
  border-color: #0072c3;
}

.arch-vpc-header {
  margin-bottom: 12px;
}

.arch-vpc-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.arch-vpc-icon {
  color: #0072c3;
}

.arch-vpc-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16px;
}

.arch-vpc-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  margin-left: 6px;
}

.mgmt-badge {
  background: rgba(218, 30, 40, 0.15);
  color: #da1e28;
  border: 1px solid rgba(218, 30, 40, 0.3);
}

.workload-badge {
  background: rgba(255, 131, 43, 0.15);
  color: #ff832b;
  border: 1px solid rgba(255, 131, 43, 0.3);
}

.arch-vpc-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Connection Options Bar (Inside VPC box) ── */
.arch-conn-options-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.secure-options-bar {
  border-left: 3px solid #da1e28;
}

.public-options-bar {
  border-left: 3px solid #ff832b;
}

.arch-conn-options-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.arch-conn-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Zone Box (Inside VPC) ── */
.arch-zone-box {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-subtle);
  border-radius: 4px;
  padding: 14px;
}

.arch-zone-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.arch-zone-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: stretch;
}

.arch-ingress-node-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-right: 12px;
  border-right: 1px dashed var(--border-subtle);
}

/* ── ACL Subnets Grid ── */
.arch-acls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.arch-acl-block {
  background: var(--bg-primary);
  border: 1px solid #0072c3;
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arch-acl-header {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #0072c3;
  margin-bottom: 8px;
  padding-bottom: 4px;
  width: 100%;
  border-bottom: 1px solid var(--border-subtle);
}

.arch-acl-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

/* ── Transit Gateway Interconnect Banner ── */
.arch-tgw-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 114, 195, 0.08);
  border: 1px solid rgba(0, 114, 195, 0.35);
  border-radius: 4px;
  padding: 12px 18px;
}

.arch-tgw-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.arch-tgw-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.arch-tgw-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Cloud Services Bottom Panel ── */
.arch-cloud-services-box {
  background: var(--bg-primary);
  border: 1.5px solid #0072c3;
  border-radius: 6px;
  padding: 16px;
}

.arch-cloud-services-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0072c3;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.arch-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.arch-service-group {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 10px;
}

.arch-service-group-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
}

.arch-service-group-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

/* ── Interactive Architecture Node Card (Clickable Icon Block) ── */
.arch-node {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-align: center;
  min-width: 64px;
  max-width: 140px;
  outline: none;
  user-select: none;
}

.arch-node:hover {
  background: var(--bg-hover);
  border-color: var(--arch-color, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.arch-node:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.arch-node.is-selected {
  background: color-mix(in srgb, var(--arch-color, var(--accent)) 20%, var(--bg-primary));
  border-color: var(--arch-color, var(--accent));
  box-shadow: 0 0 0 2px var(--arch-color, var(--accent));
}

.arch-node.is-dimmed {
  opacity: 0.3;
}

.arch-node.is-query-hit {
  box-shadow: 0 0 0 2px #f1c21b;
  border-color: #f1c21b;
}

.arch-node-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-bottom: 4px;
}

.arch-icon-svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.arch-node-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  word-break: break-word;
}

.arch-node-type {
  font-size: 9.5px;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

/* Specific Node Variant Tweaks */
.arch-conn-node {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  min-width: 130px;
  max-width: 220px;
  text-align: left;
}

.arch-conn-node .arch-node-icon-box {
  margin-bottom: 0;
  flex-shrink: 0;
}

.arch-conn-node .arch-node-label {
  font-size: 11.5px;
}

.arch-gateway-node {
  min-width: 80px;
  padding: 10px 8px;
}

.arch-consumer-node,
.arch-provider-node {
  width: 100%;
  max-width: 150px;
  padding: 10px 8px;
}
