@font-face {
  font-family: "Login Figtree";
  src: url("/console/assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Funnel Display";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/docs/assets/fonts/funnel-display-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Funnel Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/docs/assets/fonts/funnel-display-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/docs/assets/fonts/google-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/docs/assets/fonts/google-sans-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/docs/assets/fonts/google-sans-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/docs/assets/fonts/google-sans-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Viga";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/console/assets/fonts/viga-latin-400-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #0b0b0f;
  --muted: #5d6675;
  --faint: #8a93a3;
  --line: #e3e7ee;
  --line-strong: #d0d6df;
  --soft: #f2f4f8;
  --cyan: #27deff;
  --cyan-ink: #00708a;
  --purple: #b100f8;
  --deep: #0048e5;
  --green: #177a4d;
  --green-soft: rgba(23, 122, 77, 0.09);
  --tomato: #c8401d;
  --tomato-soft: rgba(200, 64, 29, 0.07);
  --gap-wire: #b3bac7;
  --yellow-wire: #e2ae00;
  --yellow-bg: #fff9e0;
  --yellow-chip: #fff0b3;
  --yellow-line: #f0d98a;
  --yellow-ink: #6f5200;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: "Google Sans", "Aptos", "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --display: "Funnel Display", var(--sans);
  --shadow: 0 1px 2px rgba(17, 19, 24, 0.05), 0 6px 18px rgba(17, 19, 24, 0.045);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Page edge → map panel, and map panel → its content. The top bar adds both (and the panel's
     1px border), so the LINK lockup starts where the content does. */
  --gutter: max(16px, calc((100vw - 1440px) / 2 + 16px));
  --map-pad: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

code {
  font-family: var(--mono);
}

a {
  color: inherit;
  text-decoration-color: rgba(0, 72, 229, 0.35);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* LINK product lockup (brand-system.html), scaled by --s ------------------------------------ */

.lockup {
  --s: 0.6;
  display: inline-flex;
  align-items: center;
  gap: calc(3px * var(--s));
  color: var(--ink);
  text-decoration: none;
}

.lockup-symbol {
  display: inline-flex;
  flex: none;
  align-items: flex-end;
  height: calc(54px * var(--s));
}

.lockup-symbol img {
  display: block;
  width: calc(53px * var(--s));
  height: calc(53px * var(--s));
  transform: translateY(calc(2.5px * var(--s)));
}

.lockup-type {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.lockup-name {
  font-family: "Viga", var(--sans);
  font-size: calc(46px * var(--s));
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.lockup-byline {
  display: flex;
  align-items: flex-start;
  gap: calc(4px * var(--s));
  margin-top: calc(-2px * var(--s));
  margin-left: calc(2.5px * var(--s));
  line-height: 1;
}

.lockup-by {
  color: #6b6b76;
  font-size: calc(14px * var(--s));
  font-weight: 700;
  line-height: calc(15px * var(--s));
}

.lockup-parent {
  display: flex;
  align-items: flex-start;
  gap: calc(2px * var(--s));
}

.lockup-parent-symbol {
  display: block;
  flex: none;
  width: calc(10.68px * var(--s));
  height: calc(10.3px * var(--s));
  transform: translateY(calc(1.15px * var(--s)));
}

.lockup-wordmark {
  display: block;
  width: calc(90.56px * var(--s));
  height: calc(15px * var(--s));
}

/* Top bar ------------------------------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px calc(var(--gutter) + var(--map-pad) + 1px);
  background: rgba(250, 250, 250, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-right form {
  margin: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.btn-ghost,
.btn-primary {
  appearance: none;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 600 13px var(--sans);
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.12s var(--ease);
}

.btn-ghost:hover {
  background: var(--soft);
}

.btn-primary {
  min-height: 42px;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
}

.btn-primary:hover {
  background: #22232b;
}

.btn-ghost:active,
.btn-primary:active {
  transform: translateY(1px) scale(0.985);
}

.btn-ghost:focus-visible,
.btn-primary:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 2px;
}

/* App shell: a fixed full-screen map on wide screens ---------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

body.app {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.workspace {
  display: flex;
  min-height: 0;
  padding: 14px var(--gutter) 16px;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 640px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}

/* Map ----------------------------------------------------------------------------------------- */

.map {
  position: relative;
  display: grid;
  flex: 1;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 12px var(--map-pad) 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background-color: #f6f7f9;
  background-image: radial-gradient(circle at 1px 1px, rgba(11, 11, 15, 0.085) 1px, transparent 0);
  background-size: 20px 20px;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line-strong);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12.5px;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend svg {
  display: block;
}

.source {
  color: var(--faint);
  font-size: 12px;
}

.source code {
  font-size: 11.5px;
}

.map-empty {
  margin: 0;
  padding: 18px 4px;
  color: var(--muted);
  font-size: 13px;
}

.map-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 480px) minmax(150px, 1fr) minmax(300px, 480px);
  min-height: 0;
  overflow: hidden;
}

.wires {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.col {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.col.products {
  grid-column: 1;
}

.col.carriers {
  grid-column: 3;
}

.col-head {
  display: flex;
  flex: none;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 10px 2px;
}

.col.carriers .col-head {
  padding: 0 2px 10px 12px;
}

.col-title {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.col-sub {
  color: var(--muted);
  font-size: 12.5px;
}

/* Each list scrolls on its own; the padding keeps the ports inside the scroll box. */
.col-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: transparent transparent;
  scrollbar-width: thin;
}

/* A discreet scrollbar: hidden at rest, a faint thumb while the pointer or focus is in the list. */
.col-list:hover,
.col-list:focus-within {
  scrollbar-color: rgb(93 102 117 / 0.22) transparent;
}

.col.products .col-list {
  padding: 2px 12px 18px 2px;
}

.col.carriers .col-list {
  gap: 10px;
  padding: 2px 2px 18px 12px;
}

.group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.col-list > .group-label:first-child {
  margin-top: 0;
}

.group-label.live::before,
.group-label.wip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.group-label.live::before {
  background: var(--green);
}

.group-label.wip {
  color: var(--yellow-ink);
}

.group-label.wip::before {
  background: var(--yellow-wire);
}

/* Product rows -------------------------------------------------------------------------------- */

.product {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 16px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(17, 19, 24, 0.04);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.12s var(--ease),
    opacity 0.18s var(--ease);
}

.product:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.product:active,
.carrier:active {
  transform: translateY(1px) scale(0.992);
}

.product:focus-visible,
.carrier:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 2px;
}

.product.is-selected,
.carrier.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), var(--shadow);
}

.code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--soft);
  font: 600 12px var(--mono);
  letter-spacing: 0.02em;
}

.pname {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
}

.pstatus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pstatus::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pstatus.ok {
  color: var(--green);
}

.pstatus.gap {
  color: var(--tomato);
}

.port {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  border: 2px solid var(--gap-wire);
  border-radius: 50%;
  background: var(--surface);
}

.product .port {
  right: -6.5px;
}

.product.ready .port {
  border-color: var(--purple);
}

/* Integration cards --------------------------------------------------------------------------- */

.carrier {
  position: relative;
  display: block;
  width: 100%;
  padding: 14px 16px 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.12s var(--ease),
    opacity 0.18s var(--ease);
}

.carrier:hover {
  border-color: var(--line-strong);
}

.carrier .port {
  top: 30px;
  left: -6.5px;
  margin-top: 0;
  border-color: var(--cyan);
}

.carrier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge.live {
  border-color: rgba(23, 122, 77, 0.22);
  background: var(--green-soft);
  color: var(--green);
}

.badge.live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2.4s var(--ease) infinite;
}

.badge.wip {
  border-color: var(--yellow-line);
  background: var(--yellow-chip);
  color: var(--yellow-ink);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(23, 122, 77, 0.45);
  }
  70%,
  100% {
    box-shadow: 0 0 0 6px rgba(23, 122, 77, 0);
  }
}

.carrier-name {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.carrier-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.carrier-meta code {
  font-size: 11.5px;
}

.carrier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
}

.chip img {
  display: block;
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.chip.muted {
  color: var(--faint);
}

.envs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.env {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
}

.env b {
  font: 700 11px var(--mono);
}

.env.on {
  border-color: rgba(0, 166, 200, 0.3);
  background: rgba(39, 222, 255, 0.1);
  color: var(--cyan-ink);
}

.env.off {
  background: var(--soft);
  color: var(--faint);
}

.caps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
}

.caps li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.caps li::before {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}

.caps li.on::before {
  content: "✓";
  background: var(--green-soft);
  color: var(--green);
}

.caps li.off {
  color: var(--faint);
}

.caps li.off::before {
  content: "";
  border: 1.5px dashed var(--line-strong);
}

.caps small {
  color: var(--faint);
  font-size: 11px;
}

.carrier.wip {
  padding-top: 12px;
  padding-bottom: 12px;
  border-color: var(--yellow-line);
  background: var(--yellow-bg);
  box-shadow: none;
}

.carrier.wip.is-selected {
  border-color: var(--yellow-ink);
  box-shadow: 0 0 0 1px var(--yellow-ink);
}

.carrier.wip .port {
  top: 50%;
  margin-top: -5.5px;
  border-color: var(--yellow-wire);
  background: var(--yellow-bg);
}

.card-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.card-id .carrier-name {
  margin: 0;
  font-size: 16px;
}

.card-id .carrier-meta {
  margin: 0;
}

.monogram {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #ffe07a;
  color: var(--yellow-ink);
  font: 700 13px var(--display);
  letter-spacing: 0.02em;
}

.carrier.live .monogram {
  background: var(--soft);
  color: var(--ink);
}

.logo-tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--yellow-line);
  border-radius: 9px;
  background: #fff;
}

.carrier.live .logo-tile {
  border-color: var(--line);
}

.logo-tile img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* With the organization's color (console.js sets it from data-color), the square is that color and
   an icon fills it, as the webapp's workspace marks do; a logo or monogram sits on the color. */
.logo-tile.has-color {
  border-color: transparent;
}
.logo-tile.has-color.is-icon {
  overflow: hidden;
}
.logo-tile.has-color.is-icon img {
  width: 100%;
  height: 100%;
}

/* The seven integration stages, as pills in one row on every card: a passed stage is a green
   check, the next one is yellow, the rest are pending. The row always fits its card: where the
   seven labels do not, a passed stage keeps only its check (its name stays for screen readers and
   in the title), and a last-resort ellipsis covers the narrowest phones. */
.stage-track {
  container: stages / inline-size;
}

.stages {
  display: flex;
  gap: 3px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.stage {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.stage-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@container stages (max-width: 423px) {
  .stage.done {
    flex: 0 0 auto;
  }

  .stage.done .stage-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

@container stages (max-width: 330px) {
  .stages {
    gap: 2px;
  }

  .stage {
    padding: 1px 3px;
    font-size: 9px;
  }
}

/* The narrowest phones: only the next stage keeps its name; "Próximo" names it below as well. */
@container stages (max-width: 240px) {
  .stage:not(.done):not(.next) {
    flex: 0 0 auto;
    min-width: 12px;
  }

  .stage:not(.done):not(.next) .stage-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

.stage.done {
  border-color: rgba(23, 122, 77, 0.22);
  background: var(--green-soft);
  color: var(--green);
}

.stage.next {
  border-color: var(--yellow-line);
  background: var(--yellow-chip);
  color: var(--yellow-ink);
}

.stage-check {
  font-size: 9px;
  font-weight: 700;
}

.steps-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.carrier.wip .steps-label {
  color: var(--yellow-ink);
}

.steps-label b {
  font-weight: 600;
}

.mobile-products {
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.mobile-products .code {
  min-width: 0;
  font-size: 11px;
}

/* Wires --------------------------------------------------------------------------------------- */

.wire {
  fill: none;
  transition: opacity 0.18s var(--ease), stroke-width 0.18s var(--ease);
}

.wire.live {
  stroke: url(#wire-live);
  stroke-width: 2;
}

.wire.gap {
  stroke: var(--gap-wire);
  stroke-width: 1.6;
}

.wire.wip {
  stroke: var(--yellow-wire);
  stroke-width: 1.4;
  stroke-dasharray: 4 6;
  opacity: 0.45;
}

/* A line whose row is scrolled out of view stays pinned to the column edge, faded. */
.wire.is-offscreen {
  opacity: 0.22;
}

.wire-flow.is-offscreen {
  opacity: 0;
}

.wire-flow {
  fill: none;
  stroke: url(#wire-live);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 0.1 72;
  pointer-events: none;
  animation: flow 2.6s linear infinite;
  transition: opacity 0.18s var(--ease);
}

@keyframes flow {
  to {
    stroke-dashoffset: -72.1;
  }
}

.wire-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
  pointer-events: stroke;
  cursor: pointer;
}

.wire.is-selected {
  stroke-width: 3.2;
  opacity: 1;
}

.wire.wip.is-selected {
  stroke-width: 2.2;
}

.map.is-hovering .wire,
.map.is-hovering .wire-flow {
  opacity: 0.09;
}

.map.is-hovering .wire.is-on,
.map.is-hovering .wire-flow.is-on {
  opacity: 1;
}

.map.is-hovering .wire.is-on {
  stroke-width: 2.6;
}

.map.is-hovering .product:not(.is-related),
.map.is-hovering .carrier:not(.is-related) {
  opacity: 0.42;
}

/* Integration dialog -------------------------------------------------------------------------- */

.dialog {
  width: min(1080px, calc(100vw - 32px));
  max-width: none;
  height: min(780px, calc(100dvh - 48px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(11, 11, 15, 0.22);
}

.dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  animation: dialog-in 0.16s var(--ease);
}

.dialog::backdrop {
  background: rgba(11, 11, 15, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.dialog-id {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dialog-id h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.dialog-id .carrier-meta {
  margin: 1px 0 0;
}

.dialog-logo {
  display: block;
  width: auto;
  max-width: 140px;
  height: 26px;
}

.dialog-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  appearance: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font: 400 20px/1 var(--sans);
  cursor: pointer;
  transition: background 0.12s var(--ease), transform 0.12s var(--ease);
}

.icon-btn:hover {
  background: var(--soft);
  color: var(--ink);
}

.icon-btn:active {
  transform: translateY(1px) scale(0.985);
}

.icon-btn:focus-visible,
.dialog-product:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 2px;
}

.dialog-body {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 0;
}

.dialog-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
  scrollbar-color: #cfd5de transparent;
  scrollbar-width: thin;
}

.dialog-main {
  min-height: 0;
  padding: 18px 22px 26px;
  overflow-y: auto;
  scrollbar-color: #cfd5de transparent;
  scrollbar-width: thin;
}

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

.side-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.dialog-side .envs,
.dialog-side .caps,
.dialog-side .carrier-chips {
  margin-top: 0;
}

.dialog-side .caps {
  grid-template-columns: 1fr;
}

.dialog-side .links {
  margin-top: 0;
}

.dialog-products {
  display: grid;
  gap: 3px;
}

.dialog-product {
  appearance: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: 500 13px var(--sans);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s var(--ease);
}

.dialog-product:hover {
  background: var(--soft);
}

.dialog-product[aria-current="true"] {
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(17, 19, 24, 0.05);
}

.dialog-product .code {
  min-width: 40px;
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.status-dot.gap {
  background: var(--tomato);
}

.status-dot.wip {
  background: var(--yellow-wire);
}

/* The radar: products a carrier offers that the platform does not sell yet. Hollow, muted and
   dashed, so they never read as something we can quote. */
.status-dot.radar {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--faint);
}

.dialog-products.radar .dialog-product {
  color: var(--muted);
}

.pill.radar {
  border-style: dashed;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--muted);
}

.howto {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.main-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.main-section + .main-section {
  margin-top: 22px;
}

.main-section h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
}

.main-section h3 + .checklist,
.main-section h3 + .kv {
  margin-top: 10px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.pill.ok {
  border-color: rgba(23, 122, 77, 0.22);
  background: var(--green-soft);
  color: var(--green);
}

.pill.bad {
  border-color: rgba(200, 64, 29, 0.25);
  background: var(--tomato-soft);
  color: var(--tomato);
}

.pill.wip {
  border-color: var(--yellow-line);
  background: var(--yellow-chip);
  color: var(--yellow-ink);
}

.note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12.5px;
}

.note code {
  font-size: 11.5px;
}

.contract {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.contract th {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.contract td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--soft);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.contract td code {
  font-size: 12px;
}

.contract td:first-child code {
  color: var(--purple);
}

.contract td:nth-child(2) code {
  color: #0f5f73;
}

.contract .yes {
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}

.contract .no {
  color: var(--tomato);
  font-weight: 600;
  white-space: nowrap;
}

.contract tr.missing td {
  background: var(--tomato-soft);
}

.table-foot {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 12px;
}

.codepanel {
  overflow: hidden;
  border-radius: 12px;
  background: #0f141b;
  color: #e6f3ff;
}

.codetabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.codetab {
  appearance: none;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(230, 243, 255, 0.6);
  font: 600 12px var(--sans);
  cursor: pointer;
}

.codetab[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.codepanel pre {
  margin: 0;
  padding: 14px 16px 16px;
  overflow-x: auto;
  font: 12.5px/1.65 var(--mono);
}

.codepanel pre[hidden] {
  display: none;
}

.m {
  display: inline-block;
  min-width: 42px;
  margin-right: 6px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.m.post,
.m.put {
  background: rgba(126, 226, 184, 0.14);
  color: #7ee2b8;
}

.m.get {
  background: rgba(124, 199, 255, 0.14);
  color: #7cc7ff;
}

.c-com {
  color: rgba(230, 243, 255, 0.42);
}

.c-key {
  color: #e7a8ff;
}

.c-str {
  color: #9fe8ff;
}

.c-st {
  color: #ffd479;
}

.rules {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12.5px;
}

.rules li {
  display: flex;
  gap: 8px;
}

.rules li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 500;
}

.checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checklist li::before {
  display: grid;
  flex: none;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.checklist li.done::before {
  content: "✓";
  background: var(--yellow-wire);
  color: #fff;
}

.checklist li.todo::before {
  content: "";
  border: 1.5px dashed var(--yellow-wire);
}

.checklist li.todo {
  color: var(--muted);
}

.checklist small {
  display: block;
  color: var(--faint);
  font-size: 12px;
}

.kv {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
  font-size: 13.5px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
}

.kv code {
  font-size: 12.5px;
  color: #0f5f73;
}

/* Sign-in ------------------------------------------------------------------------------------- */

/* Match Chat, Spot and Hub without changing the console map's controls. */
.login {
  --ink: oklch(0.145 0 0);
  --line: oklch(0.922 0 0);
  --sans: "Login Figtree", ui-sans-serif, system-ui, sans-serif;
  display: flex;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
}

.login-panel {
  display: flex;
  width: 100%;
  max-width: 384px;
  flex-direction: column;
  gap: 32px;
}

.login-panel > .lockup {
  --s: 1;
  align-self: center;
}

.login .lockup-symbol img {
  width: auto;
  transform: translateY(1.5px);
}

.login .lockup-by {
  color: oklch(0.556 0 0);
  font-family: sans-serif;
}

.login-card {
  width: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.login-form input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: 400 16px/24px var(--sans);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: color 150ms, box-shadow 150ms;
}

.login-form input:focus-visible {
  border-color: oklch(0.708 0 0);
  box-shadow: 0 0 0 3px oklch(0.708 0 0 / 0.5);
}

.login-form .btn-primary {
  display: inline-flex;
  height: 36px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  outline: none;
  background: var(--purple);
  color: #fff;
  font: 500 14px/20px var(--sans);
  transform: none;
}

.login-form .btn-primary:hover {
  background: color-mix(in oklch, var(--purple) 90%, transparent);
}

.login-form .btn-primary:focus-visible {
  box-shadow: 0 0 0 3px oklch(0.708 0 0 / 0.5);
}

.login-form .btn-primary svg {
  flex: none;
}

.login-error {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: oklch(0.577 0.245 27.325);
  font-size: 14px;
  line-height: 20px;
}

@media (min-width: 768px) {
  .login {
    padding: 40px;
  }

  .login-form input {
    font-size: 14px;
    line-height: 20px;
  }
}

/* Responsive ---------------------------------------------------------------------------------- */

@media (max-width: 900px) {
  :root {
    --gutter: 16px;
    --map-pad: 16px;
  }

  body.app {
    display: block;
    height: auto;
    overflow: visible;
  }

  .topbar {
    position: sticky;
    top: 0;
  }

  .workspace {
    display: block;
    padding: 16px var(--gutter);
  }

  .map {
    display: block;
    padding: var(--map-pad);
    background-image: none;
  }

  .map-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    overflow: visible;
  }

  .col.products,
  .col.carriers {
    grid-column: 1;
  }

  .col-head,
  .col.carriers .col-head {
    padding: 0 0 10px;
  }

  .col-list,
  .col.products .col-list,
  .col.carriers .col-list {
    padding: 0;
    overflow: visible;
  }

  .wires,
  .port {
    display: none;
  }

  .mobile-products {
    display: flex;
  }

  .dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .dialog-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .dialog-side {
    max-height: 40dvh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .topbar .lockup {
    --s: 0.5;
  }

  .kv {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .kv dd {
    margin-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wire-flow {
    display: none;
  }

  .badge.live::before {
    animation: none;
  }

  * {
    transition: none !important;
  }
}
