#career-map {
  position: relative;
  width: 100%;
  min-height: 220px;
  flex: 1 1 auto;
}

.career-map {
  --map-paper: #FBFAF5;
  --map-paper-2: #EEF7F2;
  --map-ink: #21332E;
  --map-muted: #6E7D77;
  --map-line: rgba(25, 92, 76, 0.34);
  --map-green: #1F7A65;
  --map-teal: #3FA89A;
  --map-clay: #BE684A;
  --map-ochre: #B89132;
  --map-violet: #6D63C7;
  --map-shadow: rgba(36, 70, 61, 0.13);
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 1px solid rgba(83, 74, 183, 0.11);
  border-radius: 8px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 248, 243, 0.92) 46%, rgba(252, 244, 235, 0.86)),
    linear-gradient(180deg, var(--map-paper), var(--map-paper-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 18px 50px rgba(36, 70, 61, 0.08);
}

.career-map::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(31, 122, 101, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 122, 101, 0.06) 1px, transparent 1px),
    radial-gradient(circle, rgba(109, 99, 199, 0.09) 1px, transparent 1.4px);
  background-size: 72px 72px, 72px 72px, 26px 26px;
  background-position: 0 0, 0 0, 9px 8px;
  opacity: 0.72;
}

.career-map::after {
  content: '';
  position: absolute;
  inset: 1rem;
  z-index: 0;
  border: 1px solid rgba(31, 122, 101, 0.08);
  border-radius: 8px;
  pointer-events: none;
}

.graph-canvas,
.graph-node-layer,
.graph-note-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.graph-canvas {
  z-index: 1;
}

.graph-node-layer {
  z-index: 2;
  pointer-events: none;
}

.graph-note-layer {
  z-index: 3;
  pointer-events: none;
}

.graph-grid path {
  fill: none;
  stroke: rgba(72, 102, 94, 0.14);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.graph-edge {
  fill: none;
  stroke: var(--map-line);
  stroke-linecap: round;
  stroke-width: 1.35;
  opacity: 0.72;
  transition: opacity 0.16s ease, stroke 0.16s ease, stroke-width 0.16s ease;
  vector-effect: non-scaling-stroke;
}

.graph-edge.dashed {
  stroke: rgba(190, 104, 74, 0.58);
  stroke-dasharray: 7 8;
}

.graph-edge.dotted {
  stroke: rgba(184, 145, 50, 0.60);
  stroke-dasharray: 1 7;
}

.graph-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--mark);
  height: var(--mark);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: default;
  outline: none;
  pointer-events: auto;
}

.node-halo,
.node-dot {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.node-halo {
  inset: 3px;
  border: 1px solid color-mix(in srgb, var(--node, var(--map-green)) 28%, transparent);
  background: color-mix(in srgb, var(--node, var(--map-green)) 10%, transparent);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--node, var(--map-green)) 6%, transparent);
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.node-dot {
  width: var(--dot);
  height: var(--dot);
  background: var(--node, var(--map-green));
  border: 2px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--node, var(--map-green)) 28%, transparent);
  transition: transform 0.16s ease, background 0.16s ease;
}

.graph-node.core {
  width: 86px;
  height: 86px;
}

.graph-node.core .node-halo {
  inset: 0;
  border-color: rgba(31, 122, 101, 0.20);
  background: rgba(31, 122, 101, 0.08);
  box-shadow:
    0 0 0 14px rgba(31, 122, 101, 0.055),
    0 0 0 29px rgba(190, 104, 74, 0.045);
}

.graph-node.core .node-dot {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #1F7A65, #4265A8 62%, #BE684A);
}

.tone-core { --node: #1F7A65; }
.tone-memory { --node: #3FA89A; }
.tone-profile { --node: #6D63C7; }
.tone-chat { --node: #BE684A; }
.tone-model { --node: #6D63C7; }
.tone-guard { --node: #2E7B86; }
.tone-tool { --node: #B89132; }
.tone-system { --node: #7A8A3E; }
.tone-infer { --node: #1F7A65; }
.tone-infra { --node: #4F8477; }
.tone-delivery { --node: #955B3E; }
.tone-ops { --node: #4F8477; }
.tone-agent { --node: #B89132; }
.tone-career { --node: #955B3E; }

.graph-note {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 142px;
  padding: 8px 10px 9px;
  border: 1px solid color-mix(in srgb, var(--node, var(--map-green)) 22%, rgba(255, 255, 255, 0.86));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--map-ink);
  font: inherit;
  text-align: left;
  box-shadow: 0 14px 34px var(--map-shadow);
  backdrop-filter: blur(12px);
  cursor: default;
  outline: none;
  pointer-events: auto;
  transition: opacity 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.graph-note::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--node, var(--map-green));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--node, var(--map-green)) 10%, transparent);
}

.graph-note span,
.graph-note small {
  display: block;
  padding-left: 15px;
}

.graph-note span {
  color: var(--map-ink);
  font-family: 'Noto Sans SC', 'DM Mono', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}

.graph-note small {
  margin-top: 4px;
  color: var(--map-muted);
  font-family: 'DM Mono', 'Noto Sans SC', monospace;
  font-size: 9px;
  line-height: 1.45;
}

.graph-note.anchor-center {
  width: 154px;
  min-height: 68px;
  padding: 13px 14px 12px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.graph-note.anchor-center::before {
  display: none;
}

.graph-note.anchor-center span,
.graph-note.anchor-center small {
  padding-left: 0;
}

.graph-note.core {
  border-color: rgba(31, 122, 101, 0.26);
  background: linear-gradient(135deg, rgba(31, 122, 101, 0.96), rgba(46, 123, 134, 0.94));
  box-shadow: 0 22px 54px rgba(31, 122, 101, 0.22);
}

.graph-note.core span {
  color: #FFFFFF;
  font-size: 16px;
  letter-spacing: 0;
}

.graph-note.core small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-note.anchor-left { transform: translate(calc(-100% - 20px), -50%); }
.graph-note.anchor-right { transform: translate(20px, -50%); }
.graph-note.anchor-top { transform: translate(-50%, calc(-100% - 18px)); }
.graph-note.anchor-bottom { transform: translate(-50%, 18px); }

.graph-legend {
  position: absolute;
  left: 1.3rem;
  right: 1.3rem;
  bottom: 1.15rem;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(31, 122, 101, 0.10);
  color: rgba(33, 51, 46, 0.58);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.graph-legend i {
  width: 31px;
  height: 2px;
  border-radius: 999px;
  background: rgba(31, 122, 101, 0.42);
}

.graph-legend i.dashed {
  background: repeating-linear-gradient(90deg, rgba(190, 104, 74, 0.74) 0 6px, transparent 6px 10px);
}

.graph-legend i.dotted {
  background: repeating-linear-gradient(90deg, rgba(184, 145, 50, 0.78) 0 2px, transparent 2px 7px);
}

.career-map.has-active .graph-node,
.career-map.has-active .graph-edge,
.career-map.has-active .graph-note {
  opacity: 0.28;
}

.career-map.has-active .graph-node.is-active,
.career-map.has-active .graph-node.is-linked,
.career-map.has-active .graph-edge.is-active,
.career-map.has-active .graph-note.is-active,
.career-map.has-active .graph-note.is-linked {
  opacity: 1;
}

.career-map.has-active .graph-edge.is-active {
  stroke: rgba(190, 104, 74, 0.90);
  stroke-width: 2;
}

.career-map.has-active .graph-node.is-active .node-halo,
.career-map.has-active .graph-node.is-linked .node-halo {
  border-color: color-mix(in srgb, var(--node, var(--map-green)) 46%, transparent);
  transform: scale(1.08);
}

.career-map.has-active .graph-node.is-active .node-dot {
  transform: scale(1.16);
}

.career-map.has-active .graph-note.is-active,
.career-map.has-active .graph-note.is-linked,
.graph-note:focus-visible,
.graph-node:focus-visible .node-halo {
  border-color: color-mix(in srgb, var(--node, var(--map-green)) 52%, rgba(255, 255, 255, 0.6));
  box-shadow: 0 18px 44px color-mix(in srgb, var(--node, var(--map-green)) 18%, transparent);
}

.assistant-popover {
  position: fixed;
  left: 292px;
  top: 1.45rem;
  width: min(740px, calc(100vw - 326px));
  max-height: calc(100vh - 2.9rem);
  z-index: 30;
}

.assistant-popover::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 31px;
  width: 16px;
  height: 16px;
  border-left: 1px solid rgba(20, 95, 85, 0.18);
  border-bottom: 1px solid rgba(20, 95, 85, 0.18);
  background: #20332E;
  transform: rotate(45deg);
}

.assistant-popover[hidden] {
  display: none;
}

.assistant-card {
  position: relative;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  max-height: calc(100vh - 2.9rem);
  border: 1px solid rgba(20, 95, 85, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background: #FBFAF5;
  box-shadow:
    0 34px 90px rgba(15, 32, 28, 0.30),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.assistant-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  z-index: 2;
  background: linear-gradient(90deg, #145F55, #C26436 54%, #D7A84B);
}

.assistant-rail {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px 12px 14px;
  background:
    linear-gradient(180deg, #20332E, #101715 72%),
    #101715;
  color: rgba(239, 246, 240, 0.68);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  line-height: 1;
}

.assistant-rail-mark {
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border: 0;
  border-radius: 8px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.20));
}

.assistant-rail-step,
.assistant-rail-guard {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 52px;
  padding: 9px 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(239, 246, 240, 0.64);
}

.assistant-rail-step span,
.assistant-rail-guard span {
  color: #F7F2E9;
  font-size: 11px;
  line-height: 1.1;
}

.assistant-rail-step small,
.assistant-rail-guard small {
  color: rgba(207, 231, 221, 0.56);
  font-size: 9px;
  line-height: 1.15;
}

.assistant-rail-step.is-active,
.assistant-rail-guard.is-active {
  border-color: rgba(116, 210, 189, 0.42);
  background: rgba(116, 210, 189, 0.13);
  box-shadow: 0 0 0 1px rgba(116, 210, 189, 0.08) inset;
}

.assistant-rail-step.is-active small,
.assistant-rail-guard.is-active small {
  color: #E3C46F;
}

.assistant-rail-step.is-done {
  border-color: rgba(227, 196, 111, 0.24);
  background: rgba(227, 196, 111, 0.08);
}

.assistant-rail-guard {
  margin-top: auto;
  border-color: rgba(194, 100, 54, 0.22);
}

.assistant-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.assistant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem 0.95rem 1.15rem;
  border-bottom: 1px solid rgba(20, 95, 85, 0.12);
  background:
    linear-gradient(90deg, rgba(233, 241, 237, 0.94), rgba(255, 255, 255, 0.86)),
    #FFFFFF;
}

.assistant-kicker {
  display: block;
  margin-bottom: 3px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: #A34622;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: uppercase;
}

.assistant-title {
  font-size: 18px;
  font-weight: 500;
  color: #17231F;
  line-height: 1.25;
}

.assistant-state {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.assistant-state span {
  border: 1px solid rgba(20, 95, 85, 0.15);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.70);
  color: #4F5C59;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  line-height: 1.2;
}

.assistant-close {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid rgba(20, 95, 85, 0.12);
  border-radius: 8px;
  background: #FFFFFF;
  color: #4F5C59;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.assistant-close:hover,
.assistant-close:focus-visible {
  color: #A34622;
  border-color: rgba(194, 100, 54, 0.40);
  background: #F5E8DE;
  outline: none;
}

.assistant-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  background:
    linear-gradient(rgba(20, 95, 85, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 95, 85, 0.024) 1px, transparent 1px),
    #F7F2E9;
  background-size: 32px 32px;
}

.assistant-msg {
  width: fit-content;
  max-width: 90%;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.72;
  box-shadow: 0 10px 28px rgba(20, 95, 85, 0.08);
}

.assistant-msg.user {
  align-self: flex-end;
  margin-top: 0;
  border: 1px solid rgba(20, 95, 85, 0.22);
  color: #F7F2E9;
  background: #20332E;
  box-shadow: 0 10px 26px rgba(20, 95, 85, 0.16);
}

.assistant-stream {
  min-height: 330px;
  max-height: min(54vh, 560px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px 16px;
  scrollbar-width: thin;
}

.assistant-msg.bot {
  align-self: flex-start;
  border: 1px solid rgba(20, 95, 85, 0.14);
  border-top: 3px solid #145F55;
  background: rgba(255, 255, 255, 0.94);
}

.assistant-answer-title {
  color: #17231F;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
}

.assistant-answer-lead {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.75;
  white-space: pre-wrap;
}

.assistant-route-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.assistant-route-chips span {
  border: 1px solid rgba(194, 100, 54, 0.26);
  border-radius: 999px;
  padding: 3px 8px;
  color: #A34622;
  background: #F5E8DE;
  font-family: 'DM Mono', 'Noto Sans SC', monospace;
  font-size: 10px;
  line-height: 1.3;
}

.assistant-answer-section {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(20, 95, 85, 0.11);
}

.assistant-answer-section strong {
  display: block;
  color: #145F55;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 6px;
}

.assistant-answer-section ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
  list-style: none;
}

.assistant-answer-section li {
  position: relative;
  padding-left: 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.assistant-answer-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 5px;
  height: 1px;
  background: #C26436;
}

.assistant-suggestions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
  padding: 12px 14px 11px;
  border-bottom: 1px solid rgba(20, 95, 85, 0.10);
  overflow-x: auto;
  scrollbar-width: thin;
  background:
    linear-gradient(180deg, #FFFFFF, rgba(233, 241, 237, 0.78)),
    #FFFFFF;
}

.assistant-suggestions button {
  flex: 0 0 184px;
  min-height: 54px;
  border: 1px solid rgba(20, 95, 85, 0.14);
  border-radius: 8px;
  padding: 9px 10px;
  background:
    linear-gradient(180deg, #FFFFFF, #F8F6EF);
  color: #2C3D38;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.assistant-suggestions button:hover,
.assistant-suggestions button:focus-visible {
  border-color: rgba(194, 100, 54, 0.48);
  background: #F5E8DE;
  color: #A34622;
  outline: none;
  transform: translateY(-1px);
}

.assistant-suggestions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.assistant-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(20, 95, 85, 0.12);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), #FFFFFF);
  box-shadow: 0 -12px 30px rgba(20, 95, 85, 0.06);
}

.assistant-form:focus-within {
  box-shadow: 0 -14px 32px rgba(194, 100, 54, 0.10);
}

.assistant-form input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(20, 95, 85, 0.14);
  border-radius: 8px;
  outline: 0;
  background: #FBFAF5;
  color: #17231F;
  font: inherit;
  font-size: 13px;
  padding: 0 12px;
}

.assistant-form input:focus {
  border-color: rgba(194, 100, 54, 0.45);
  background: #FFFFFF;
}

.assistant-form input::placeholder {
  color: var(--faint);
}

.assistant-form button {
  min-width: 64px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #C26436;
  color: #F9F6ED;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 22%, transparent);
}

.assistant-form button:hover,
.assistant-form button:focus-visible {
  background: #145F55;
  outline: none;
}

.assistant-form input:disabled,
.assistant-form button:disabled {
  cursor: wait;
  opacity: 0.58;
}

@media (max-height: 760px) {
  .graph-note {
    width: 126px;
    padding: 7px 9px;
  }

  .graph-note small {
    display: none;
  }

  .graph-note.anchor-center {
    width: 136px;
    min-height: 54px;
  }

  .graph-legend {
    bottom: 0.8rem;
  }
}

@media (max-width: 980px) {
  .assistant-popover {
    display: none;
  }
}
