/*
 * Synced console guides on the KB article page. Same class vocabulary as the
 * console's guide-article.css, in the site's tokens (css/base/variables.css).
 * Scoped to .crkb-guide; the sync prefixes the guide's classes with g-.
 */

.crkb-guide {
  overflow-wrap: break-word;
  font-size: 16px;
  line-height: 1.7;
}

/* The theme zeroes every margin and padding (style.css `* {}`), so the
   article's rhythm is set here. */
.crkb-guide p {
  margin: 0 0 14px;
}
.crkb-guide ul,
.crkb-guide ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.crkb-guide ul {
  list-style: disc;
}
.crkb-guide ol {
  list-style: decimal;
}
.crkb-guide li {
  margin: 4px 0;
}
.crkb-guide li > ul,
.crkb-guide li > ol {
  margin: 4px 0 0;
}
.crkb-guide strong,
.crkb-guide b {
  font-weight: 600;
}
.crkb-guide em,
.crkb-guide i {
  font-style: italic;
}
.crkb-guide h2 {
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  font-weight: 500;
  line-height: 1.25;
  margin: 48px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--neutral-100, #e5e8ed);
}
.crkb-guide h3 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 28px 0 10px;
}
.crkb-guide h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 20px 0 8px;
}
.crkb-guide .crkb-video + h2,
.crkb-guide .crkb-meta + h2 {
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
}

.crkb-guide .crkb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--text-muted, #808080);
  font-size: 14px;
  margin: 0 0 24px;
}
.crkb-guide .crkb-sep {
  color: var(--neutral-300, #d7dde5);
}
.crkb-guide .crkb-kicker {
  color: var(--brand-primary-600, #166e6c);
  font-weight: 600;
}
.crkb-guide a.crkb-pdf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border: 1px solid var(--brand-primary-600, #166e6c);
  border-radius: var(--button-border-radius, 54px);
  color: var(--brand-primary-600, #166e6c);
  font-weight: 600;
  text-decoration: none;
}
.crkb-guide a.crkb-pdf:hover {
  background: var(--brand-primary-600, #166e6c);
  color: #fff;
}

/* Videos. */
.crkb-guide .crkb-video {
  margin: 0 0 28px;
}
.crkb-guide .crkb-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--border-radius-sm, 16px);
}
.crkb-guide .crkb-video figcaption {
  margin-top: 8px;
  font-size: 14px;
}
.crkb-guide .crkb-dur {
  color: var(--text-muted, #808080);
  margin-left: 6px;
}

/* Headings get room under the sticky header when the TOC jumps to them. */
.crkb-guide h2,
.crkb-guide h3,
.crkb-guide h4 {
  scroll-margin-top: calc(var(--top-stack-height, 110px) + 16px);
}

.crkb-guide a {
  color: var(--brand-primary-600, #166e6c);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.crkb-guide code,
.crkb-guide kbd {
  font-family: ui-monospace, Consolas, 'Cascadia Mono', Menlo, monospace;
  font-size: 0.88em;
  background: var(--neutral-75, #f7f8fc);
  border: 1px solid var(--neutral-100, #e5e8ed);
  border-radius: 5px;
  padding: 1px 5px;
}
.crkb-guide pre {
  background: var(--neutral-75, #f7f8fc);
  border: 1px solid var(--neutral-100, #e5e8ed);
  border-radius: var(--border-radius-xs, 8px);
  padding: 10px 12px;
  margin: 8px 0 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  font-size: 13px;
}
.crkb-guide pre code {
  border: 0;
  padding: 0;
  background: none;
}

/* "Settings → Identity" UI paths. */
.crkb-guide .g-ui,
.crkb-guide .g-field {
  font-weight: 600;
}
.crkb-guide .g-ui .g-arr {
  color: var(--brand-accent-300, #009d61);
  padding: 0 3px;
}

/* Numbered steps: the first <strong> is the step's title. */
.crkb-guide ol.g-steps {
  list-style: none;
  counter-reset: crkb-step;
  padding-left: 0;
  margin: 8px 0 22px;
}
.crkb-guide ol.g-steps > li {
  counter-increment: crkb-step;
  position: relative;
  padding: 2px 0 14px 46px;
  margin: 0;
}
.crkb-guide ol.g-steps > li::before {
  content: counter(crkb-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-primary, #004442);
  color: var(--brand-accent, #00ff9d);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crkb-guide ol.g-steps > li > strong:first-child {
  display: block;
  margin-bottom: 2px;
}

/* Callouts. */
.crkb-guide .g-callout {
  border: 1px solid var(--neutral-100, #e5e8ed);
  border-left-width: 4px;
  border-radius: var(--border-radius-xs, 8px);
  padding: 12px 16px;
  margin: 16px 0 20px;
  background: var(--neutral-75, #f7f8fc);
}
.crkb-guide .g-callout > .g-ct {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.crkb-guide .g-callout p:last-child,
.crkb-guide .g-callout ul:last-child {
  margin-bottom: 0;
}
.crkb-guide .g-callout.g-note {
  background: var(--info-color-100, #e8f4ff);
  border-left-color: var(--info-color, #184379);
}
.crkb-guide .g-callout.g-note > .g-ct {
  color: var(--info-color, #184379);
}
.crkb-guide .g-callout.g-tip {
  background: var(--success-color-100, #c2e4c9);
  border-left-color: var(--success-color, #295832);
}
.crkb-guide .g-callout.g-tip > .g-ct {
  color: var(--success-color, #295832);
}
.crkb-guide .g-callout.g-important {
  background: var(--warning-color-100, #fff6e8);
  border-left-color: var(--warning-color, #7e4f0d);
}
.crkb-guide .g-callout.g-important > .g-ct {
  color: var(--warning-color, #7e4f0d);
}
.crkb-guide .g-callout.g-warning {
  background: var(--danger-color-100, #ffe8eb);
  border-left-color: var(--danger-color, #7c0d14);
}
.crkb-guide .g-callout.g-warning > .g-ct {
  color: var(--danger-color, #7c0d14);
}

/* Tables scroll sideways in their box on narrow screens. */
.crkb-guide .g-tbl,
.crkb-guide > table {
  display: block;
  width: 100%;
  overflow-x: auto;
}
.crkb-guide .g-tbl {
  margin: 12px 0 22px;
  border: 1px solid var(--neutral-100, #e5e8ed);
  border-radius: var(--border-radius-xs, 8px);
}
.crkb-guide table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
.crkb-guide th,
.crkb-guide td {
  /* The theme's body has word-break: break-word, which lets a column shrink
     to one letter; tables scroll sideways instead. */
  overflow-wrap: normal;
  word-break: normal;
  min-width: 7em;
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border-bottom: 1px solid var(--neutral-100, #e5e8ed);
}
.crkb-guide th {
  background: var(--neutral-75, #f7f8fc);
  font-weight: 600;
  font-size: 13px;
}
.crkb-guide tr:last-child td {
  border-bottom: 0;
}
.crkb-guide .g-yes {
  color: var(--success-color, #295832);
  font-weight: 600;
}
.crkb-guide .g-no {
  color: var(--text-muted, #808080);
}

/* Something to copy. */
.crkb-guide .g-copybox {
  display: block;
  font-family: ui-monospace, Consolas, 'Cascadia Mono', Menlo, monospace;
  font-size: 13.5px;
  background: var(--neutral-75, #f7f8fc);
  border: 1px dashed var(--neutral-300, #d7dde5);
  border-radius: var(--border-radius-xs, 8px);
  padding: 9px 12px;
  margin: 8px 0 12px;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* The "which one?" decision list. */
.crkb-guide .g-decision {
  border: 1px solid var(--neutral-100, #e5e8ed);
  border-radius: var(--border-radius-xs, 8px);
  padding: 4px 16px;
  margin: 16px 0 24px;
}
.crkb-guide .g-decision .g-q {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--neutral-100, #e5e8ed);
  align-items: center;
}
.crkb-guide .g-decision .g-q:last-child {
  border-bottom: 0;
}
.crkb-guide .g-decision .g-q a {
  white-space: nowrap;
  font-weight: 600;
  text-decoration: none;
}
@media (max-width: 560px) {
  .crkb-guide .g-decision .g-q {
    grid-template-columns: 1fr;
  }
}
