/* Interactive guide surfaces keep the KHS paper-and-signal system while
   giving workbench pages their own denser operating feel. */

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 1.4rem;
}

.guide-action {
  border: 1px solid var(--brand-rule-strong);
  border-radius: 3px;
  color: var(--md-default-fg-color);
  display: inline-flex;
  font-weight: 600;
  gap: 0.4rem;
  line-height: 1.2;
  padding: 0.55rem 0.7rem;
  text-decoration: none;
}

.guide-action.primary {
  background: var(--brand-signal);
  border-color: var(--brand-signal);
  color: #050609;
}

.guide-action:hover,
.guide-action:focus-visible {
  border-color: var(--brand-signal);
  outline: 2px solid transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-action:focus-visible {
  box-shadow: 0 0 0 3px var(--brand-signal-surface);
}

.guide-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin: 1rem 0 1.4rem;
}

.guide-figure {
  background: var(--md-code-bg-color);
  border: 1px solid var(--brand-rule);
  border-radius: 4px;
  margin: 1.3rem 0 1.5rem;
  overflow: hidden;
}

.guide-figure img {
  cursor: zoom-in;
  display: block;
  height: auto;
  width: 100%;
}

.guide-figure img:focus-visible {
  outline: 3px solid var(--brand-signal);
  outline-offset: -3px;
}

.guide-figure figcaption {
  border-top: 1px solid var(--brand-rule);
  color: var(--md-default-fg-color--light);
  font-size: 0.74rem;
  line-height: 1.45;
  margin: 0;
  padding: 0.65rem 0.8rem;
}

[data-md-color-scheme="default"] .guide-figure {
  background: #fff;
  box-shadow: 0 8px 28px rgba(5, 6, 9, 0.08);
}

[data-md-color-scheme="slate"] .guide-figure {
  background: rgba(17, 24, 32, 0.82);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.guide-image-viewer {
  align-items: center;
  background: rgba(5, 6, 9, 0.88);
  display: grid;
  inset: 0;
  justify-items: center;
  opacity: 0;
  padding: clamp(0.8rem, 3vw, 2rem);
  position: fixed;
  transition: opacity 120ms ease;
  z-index: 10000;
}

.guide-image-viewer.is-open {
  opacity: 1;
}

.guide-image-viewer__frame {
  align-items: center;
  display: grid;
  height: min(86vh, 100%);
  justify-items: center;
  width: min(96vw, 1280px);
}

.guide-image-viewer__frame img {
  border: 1px solid rgba(240, 243, 247, 0.22);
  border-radius: 4px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.42);
  cursor: zoom-out;
  display: block;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.guide-image-viewer__close {
  background: rgba(17, 24, 32, 0.92);
  border: 1px solid rgba(240, 243, 247, 0.28);
  border-radius: 3px;
  color: #f0f3f7;
  cursor: pointer;
  font: 600 0.72rem var(--md-text-font-family);
  padding: 0.45rem 0.65rem;
  position: fixed;
  right: clamp(0.8rem, 3vw, 1.5rem);
  top: clamp(0.8rem, 3vw, 1.5rem);
}

.guide-image-viewer__close:focus-visible,
.guide-image-viewer__close:hover {
  border-color: var(--brand-signal);
  outline: 2px solid transparent;
}

.guide-card {
  border: 1px solid var(--brand-rule);
  border-left: 2px solid var(--brand-signal);
  border-radius: 3px;
  padding: 0.85rem;
}

.guide-card h3 {
  margin-top: 0;
}

.guide-meta {
  color: var(--md-default-fg-color--lighter);
  font-family: var(--md-code-font-family);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-warning {
  border-color: rgba(215, 164, 71, 0.55);
  border-left-color: #d7a447;
}

.guide-ready {
  border-color: rgba(79, 189, 138, 0.45);
  border-left-color: #4fbd8a;
}
