/* Mobile-first, scoped styles. Container queries also support narrow theme columns. */
.rnx {
  --rnx-ink: #20384e;
  --rnx-quiet: #4d6579;
  --rnx-blue: #17679b;
  --rnx-border: #c9dbe8;
  container: rnx / inline-size;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: clamp(12px, 2vw, 20px);
  border: 1px solid var(--rnx-border);
  border-radius: 14px;
  background: #fff;
  color: var(--rnx-ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.rnx *, .rnx *::before, .rnx *::after { box-sizing: border-box; }
.rnx button, .rnx input, .rnx select { font: inherit; letter-spacing: normal; text-transform: none; margin: 0; }
.rnx button { appearance: none; cursor: pointer; box-shadow: none; }
.rnx button, .rnx select, .rnx-external-link { min-height: 44px; }
.rnx button:focus-visible, .rnx select:focus-visible, .rnx a:focus-visible { outline: 3px solid #17679b; outline-offset: 3px; }
.rnx [hidden] { display: none !important; }
.rnx-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rnx-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.rnx-toolbar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 100%; min-width: 0; }
.rnx-select-label { font-size: 14px; font-weight: 600; }
.rnx-role { flex: 1; width: 100%; min-width: 0; max-width: 100%; padding: 8px 28px 8px 10px; border: 1px solid var(--rnx-border); border-radius: 8px; background-color: #fff; color: var(--rnx-ink); font-size: 16px; }
.rnx-search { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; height: 44px; min-width: 0; padding: 0 12px; border: 1px solid var(--rnx-border); border-radius: 8px; background: #fff; }
/* Bootstrap/Kerge labels carry a bottom margin that shifts the search above the select. */
.rnx .rnx-toolbar-left > label { margin: 0; }
.rnx .rnx-role, .rnx .rnx-search { height: 44px; min-height: 44px; max-height: 44px; align-self: center; }
.rnx-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--rnx-quiet); stroke-width: 1.8; }
/* Kerge/Unyson input rules otherwise add a second oversized search border. */
.rnx .rnx-search > input[type="search"] {
  display: block !important;
  position: static !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  background: transparent !important;
  transform: none !important;
  appearance: none;
  color: var(--rnx-ink);
  font-size: 16px;
  line-height: normal;
}
.rnx-search:focus-within { outline: 3px solid #17679b; outline-offset: 2px; }
.rnx-search input::placeholder { color: var(--rnx-quiet); opacity: 1; }
.rnx-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; }
.rnx-types button, .rnx-areas button, .rnx-clear { border: 1px solid var(--rnx-border); border-radius: 8px; padding: 8px 12px; background: #fff; color: var(--rnx-ink); font-size: 14px; font-weight: 600; line-height: 1.3; }
.rnx-types button[aria-pressed="true"], .rnx-areas button[aria-pressed="true"] { color: #124b77; background: #e2f1fc; border-color: #438bbd; box-shadow: inset 0 0 0 1px #438bbd; }
.rnx-areas { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.rnx-areas button { flex: 1 1 auto; min-width: 0; white-space: normal; }
.rnx-network { display: grid; grid-template-areas: "summary" "skills" "work"; grid-template-columns: minmax(0, 1fr); gap: 14px; position: relative; isolation: isolate; }
.rnx-lines { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.rnx-curve { fill: none; stroke: #98c3df; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.rnx-curve-on { stroke: #17679b; stroke-width: 2; }
.rnx-middle { grid-area: summary; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; z-index: 1; }
.rnx-hub { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--rnx-border); border-radius: 10px; background: #f0f8fd; min-width: 0; }
.rnx-hub-name { font-size: 15px; font-weight: 700; color: #164466; }
.rnx-hub-number { font-size: 13px; color: var(--rnx-quiet); }
.rnx-clear { flex: none; color: var(--rnx-blue); }
.rnx-side { min-width: 0; position: relative; z-index: 1; padding: 12px; border: 1px solid var(--rnx-border); border-radius: 10px; background: #fff; }
.rnx-skills-side { grid-area: skills; }
.rnx-work-side { grid-area: work; }
.rnx .rnx-colhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; padding: 0 0 10px; border-bottom: 1px solid #dce7ef; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--rnx-ink); }
.rnx-colhead [data-skills-count], .rnx-colhead [data-work-count] { flex: none; min-width: 28px; padding: 2px 7px; border-radius: 20px; background: #edf5fa; color: #385c76; font-size: 13px; text-align: center; }
.rnx-skill-list, .rnx-work-list { padding: 10px 3px 3px; scrollbar-color: #799cb6 transparent; scrollbar-width: thin; }
.rnx-skill-list { display: flex; flex-wrap: wrap; align-content: start; gap: 6px; }
.rnx-skill { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 9px 10px; border: 1px solid var(--rnx-border); border-radius: 7px; background: #f8fbfe; color: #233a50; font-size: 14px; line-height: 1.4; text-align: start; }
.rnx-skill-indicator { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #4888b2; }
.rnx-skill.is-selected { color: #124b77; border-color: #17679b; box-shadow: inset 0 0 0 1px #17679b; background: #e0f1fc; font-weight: 700; }
.rnx-work-list { display: grid; align-content: start; gap: 8px; }
.rnx-work { min-width: 0; border: 1px solid var(--rnx-border); border-radius: 9px; background: #fafcfe; }
.rnx-work.is-selected { border-color: #17679b; box-shadow: inset 0 0 0 1px #17679b; background: #f0f8fd; }
.rnx-work-button { display: block; width: 100%; padding: 12px; border: 0; border-radius: 8px; background: transparent; color: var(--rnx-ink); text-align: start; }
/* Keep theme button states from painting a second selection over the open card. */
.rnx .rnx-work-button,
.rnx .rnx-work-button:hover,
.rnx .rnx-work-button:focus,
.rnx .rnx-work-button:active { background: transparent; color: var(--rnx-ink); box-shadow: none; }
.rnx .rnx-work-button .rnx-work-title { color: var(--rnx-ink); }
.rnx .rnx-work-button:focus-visible { outline: 3px solid #17679b; outline-offset: 3px; }
.rnx-work-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin-bottom: 5px; }
.rnx-kind { font-size: 12px; font-weight: 700; color: #22638e; }
.rnx-date { font-size: 12px; color: var(--rnx-quiet); }
.rnx-work-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.4; }
.rnx-work-subtitle { display: block; margin-top: 4px; font-size: 13px; color: var(--rnx-quiet); }
.rnx-detail { padding: 12px; border-top: 1px solid var(--rnx-border); font-size: 14px; }
.rnx-detail p { margin: 0 0 10px; white-space: pre-line; }
.rnx-detail-label { margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--rnx-quiet); }
.rnx-related { display: flex; flex-wrap: wrap; gap: 6px; }
.rnx-related button { max-width: 100%; padding: 8px 10px; border: 1px solid var(--rnx-border); border-radius: 6px; background: #fff; color: #225979; font-size: 13px; text-align: start; line-height: 1.4; }
.rnx-external-link { display: inline-flex; align-items: center; color: #145d8b; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rnx-empty { margin: 8px 2px; color: var(--rnx-quiet); font-size: 14px; }
.rnx-caption { margin: 14px 0 0; padding: 0; color: var(--rnx-quiet); font-size: 13px; }
@media (hover: hover) {
  .rnx button:not(.rnx-work-button):hover { border-color: #438bbd; background-color: #edf7fd; }
}
@container rnx (min-width: 560px) {
  .rnx-toolbar-left { flex-wrap: nowrap; }
  .rnx-role { flex: 0 1 210px; }
  .rnx-search { flex: 1; }
  .rnx-types { display: flex; flex-wrap: wrap; }
  .rnx-areas button { flex: 0 1 auto; }
  .rnx-network { grid-template-areas: "summary summary" "skills work"; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); align-items: start; }
  .rnx-skill-list { display: grid; grid-template-columns: minmax(0, 1fr); }
  .rnx-skill-list, .rnx-work-list { max-height: 36rem; overflow: auto; }
}
@container rnx (min-width: 900px) {
  .rnx-network { grid-template-areas: "skills summary work"; grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1.25fr); gap: 18px; }
  .rnx-middle { align-self: center; flex-direction: column; }
  .rnx-hub { width: 140px; min-height: 140px; justify-content: center; border-radius: 50%; text-align: center; }
  .rnx-hub-name { font-size: 14px; }
  .rnx-lines { display: block; }
}
@media (forced-colors: active) {
  .rnx button[aria-pressed="true"], .rnx-work.is-selected { outline: 2px solid Highlight; outline-offset: -3px; }
  .rnx-lines { display: none; }
}
/* Keep related work within reach on phones, even with many skill tags. */
@container rnx (max-width: 559px) {
  .rnx-skill-list { max-height: 18rem; overflow-y: auto; }
}
