/* ============================================================
   KEEYNET dashboard — Guide & Topologies, concept A
   ------------------------------------------------------------
   Styles the question block built by guide-questions.js, and
   compresses what is left of the Live Fabric header into a
   single strip.

   Written in the existing design tokens, so Green / Black /
   Dull White all follow. Scoped to #guide.

   To remove: delete the <link> and <script> tags.
   ============================================================ */


/* ---------- what the script retires --------------------------- */

#guide .gq-retired {
  display: none !important;
}


/* ---------- the live state, as one strip ---------------------- */

/* The heading and the stat bar were two stacked blocks above a
   340px canvas. Without the canvas they read better as one row. */

#guide .kc-lf-heading {
  padding-bottom: 12px !important;
  border-bottom: 1px solid var(--line-soft) !important;
}

/* Network/Security and 3D/Static switched views of the stage.
   With the stage gone they are controls for nothing. */
#guide .kc-lf-control-stack {
  display: none !important;
}

#guide .kc-lf-statbar {
  gap: 10px 24px !important;
  margin: 12px 0 0 !important;
  padding: 12px 16px !important;

  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--surface-soft) !important;
}


/* ---------- the question -------------------------------------- */

#guide .gq-block {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

#guide .gq-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
}

#guide .gq-heading p {
  margin: 6px 0 0;
  max-width: 70ch;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}


/* ---------- the grid ------------------------------------------ */

#guide .gq-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

#guide .gq-card {
  display: flex;
  flex-direction: column;
  gap: 14px;

  box-sizing: border-box;
  padding: 20px;

  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

#guide .gq-card.is-primary {
  border: 1.5px solid var(--accent);
  box-shadow: var(--card-shadow);
}

#guide .gq-badge {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 3px 7px;

  border-radius: 5px;
  background: var(--accent-soft);

  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--success);
}

#guide .gq-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.3;
}

#guide .gq-card-head p {
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}


/* ---------- the little diagrams -------------------------------- */

/* Built from pills and rules rather than one SVG, so they follow
   the theme and stay legible when the text scales. */

#guide .gq-diagram {
  display: flex;
  align-items: center;

  padding: 16px 12px;
  border-radius: 11px;
  background: var(--surface-soft);
}

#guide .gq-rule {
  flex: 1;
  min-width: 8px;
  height: 2px;
  background: var(--border-strong);
}

#guide .gq-node {
  flex: none;
  padding: 7px 10px;

  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);

  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* The fabric is the one thing every design has in common, so it
   is the only filled shape. */
#guide .gq-node.is-fabric {
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  font-weight: 700;
  color: var(--success);
}

/* A connector forwards for something behind it. */
#guide .gq-node.is-edge {
  border: 1.5px solid var(--border-strong);
  font-weight: 700;
}

/* An exit node is the only piece that carries public traffic, so
   it is marked differently — by lightness as well as hue. */
#guide .gq-node.is-warn {
  border: 1.5px solid var(--warning);
  background: var(--warning-soft);
  font-weight: 700;
  color: var(--warning);
}

/* Outside the fabric. */
#guide .gq-node.is-out {
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--muted);
}


/* ---------- facts --------------------------------------------- */

#guide .gq-facts {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#guide .gq-facts > div {
  display: flex;
  gap: 8px;
  font-size: 12px;
}

#guide .gq-facts dt {
  flex: none;
  min-width: 62px;
  color: var(--subtle);
}

#guide .gq-facts dd {
  margin: 0;
}


/* ---------- the action ----------------------------------------- */

#guide .gq-cta {
  margin-top: auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;

  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);

  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

#guide .gq-cta:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

#guide .gq-card.is-primary .gq-cta {
  border-color: transparent;
  background: var(--accent);
  font-weight: 700;
  color: #ffffff;
}

#guide .gq-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}


/* ---------- the last tile -------------------------------------- */

#guide .gq-unsure {
  justify-content: center;
  gap: 11px;
  border-style: dashed;
  border-color: var(--border-strong);
  background: transparent;
}

#guide .gq-unsure p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

#guide .gq-quiet {
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}


/* ---------- narrow screens -------------------------------------- */

@media (max-width: 1080px) {
  #guide .gq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #guide .gq-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The pills stop fitting side by side long before the card
     does, so the path turns vertical. */
  #guide .gq-diagram {
    flex-direction: column;
    gap: 0;
  }

  #guide .gq-rule {
    width: 2px;
    height: 12px;
    min-width: 0;
    flex: none;
  }
}
