/* docs/word — layout, tabs, sidebar, screenshots */
.doc-main {
  flex: 1;
  min-width: 0;
  max-width: 860px;
  padding-bottom: 2rem;
}

.content-layout {
  max-width: 1200px !important;
  gap: 1.25rem !important;
  align-items: flex-start;
}

/* sidebar */
.sidebar {
  width: 250px !important;
  flex-shrink: 0;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  position: sticky;
  top: 76px;
  padding-right: 0.35rem;
  scrollbar-width: thin;
}
.sidebar-search {
  position: sticky;
  top: 0;
  z-index: 2;
  background: inherit;
  padding-bottom: 0.55rem;
}
.sidebar-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.42rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border, #e4dcd1);
  background: var(--card, #fff);
  color: inherit;
  font-size: 0.84rem;
}
.sidebar-search input:focus {
  outline: 2px solid var(--primary, #c45c26);
  outline-offset: 1px;
}
.sidebar-nav li a.active {
  background: rgba(196, 92, 38, 0.12);
  color: var(--primary, #c45c26);
  font-weight: 600;
}
.sidebar-nav li a:hover {
  background: rgba(196, 92, 38, 0.08);
  color: var(--primary, #c45c26);
}

/* group tabs — keep page short */
.group-tabs {
  position: sticky;
  top: var(--nav-h, 64px);
  z-index: 18;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.65rem 0 0.75rem;
  margin: 0 0 0.5rem;
  background: color-mix(in srgb, var(--bg, #f7f4ef) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border, #e4dcd1);
}
.group-tabs button {
  border: 1px solid var(--border, #e4dcd1);
  background: var(--card, #fcfaf7);
  color: var(--muted, #78716c);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}
.group-tabs button:hover {
  color: var(--primary, #c45c26);
  border-color: color-mix(in srgb, var(--primary, #c45c26) 35%, var(--border, #e4dcd1));
}
.group-tabs button.active {
  background: var(--primary, #c45c26);
  border-color: var(--primary, #c45c26);
  color: #fff;
}

/* sections */
.doc-group[hidden] {
  display: none !important;
}
.doc-section {
  margin-bottom: 2rem;
  scroll-margin-top: 120px;
}
.doc-section > h3:first-child,
.doc-section > .section-heading {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border, #e4dcd1);
  color: var(--ink, #1c1917);
}

/* ===== Screenshots: compact, centered, never full-bleed ===== */
.screenshot,
.shot-card {
  margin: 1.15rem auto 1.35rem;
  border: 1px solid var(--border, #e4dcd1);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card, #fcfaf7);
  box-shadow: 0 12px 28px -18px rgba(28, 25, 23, 0.28);
  max-width: 100%;
  width: fit-content;
}

.screenshot {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.screenshot img,
.shot-card-frame .shot-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 880px);
  max-height: 300px;
  object-fit: contain;
  margin: 0.85rem auto;
  padding: 0;
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
  box-shadow: 0 3px 12px rgba(28, 25, 23, 0.08);
}

/* wide app screens */
.screenshot.wide-shot img,
.shot-card-frame .shot-img.shot-is-wide {
  max-height: 270px;
  max-width: min(100%, 960px);
}

/* single dialog screenshot */
.screenshot.shot-dialog {
  max-width: 340px;
}
.screenshot.shot-dialog img {
  max-height: 360px;
  max-width: 280px;
  margin: 1rem auto 0.85rem;
}

/* multi-shot card */
.shot-card-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-soft, #ede8e1);
  border-bottom: 1px solid var(--border, #e4dcd1);
  width: 100%;
  box-sizing: border-box;
}
.shot-card-tabs .shot-tab {
  border: 1px solid var(--border, #e4dcd1);
  background: var(--card, #fff);
  color: var(--muted, #78716c);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.25;
}
.shot-card-tabs .shot-tab:hover {
  color: var(--primary, #c45c26);
}
.shot-card-tabs .shot-tab.active {
  background: var(--primary, #c45c26);
  border-color: var(--primary, #c45c26);
  color: #fff;
}

.shot-card-frame {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 0.25rem 0.5rem 0.5rem;
  background: linear-gradient(180deg, #fbf9f6 0%, #f1ebe4 100%);
}
.shot-card-frame .shot-img[hidden] {
  display: none !important;
}

/* dialog multi-shot (login / activate / profile): compact card, centered */
.shot-card.shot-card-dialog {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.shot-card.shot-card-dialog .shot-card-frame {
  min-height: 280px;
  padding: 0.75rem 1rem 1rem;
}
.shot-card.shot-card-dialog .shot-img.shot-is-dialog {
  max-height: 340px;
  max-width: 100%;
  width: auto;
  margin: 0;
}

.screenshot .caption,
.shot-card .caption {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.95rem;
  font-size: 0.78rem;
  color: var(--muted, #78716c);
  background: var(--card, #fcfaf7);
  border-top: 1px solid var(--border, #e4dcd1);
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 720px) {
  .screenshot img,
  .shot-card-frame .shot-img {
    max-height: 210px;
    max-width: 100%;
    width: 100%;
  }
  .screenshot.shot-dialog,
  .shot-card.shot-card-dialog {
    max-width: 100%;
  }
  .screenshot.shot-dialog img,
  .shot-card.shot-card-dialog .shot-img.shot-is-dialog {
    max-height: 300px;
    max-width: 100%;
    width: 100%;
    object-fit: contain;
  }
}

/* a11y */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--primary, #c45c26);
  outline-offset: 2px;
}

/* step layout: let body take full remaining width so shots can center */
.step-item {
  width: 100%;
}
.step-body {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

/* force dialog / normal shot cards to center in content column */
.screenshot,
.shot-card {
  display: block;
  margin-left: auto !important;
  margin-right: auto !important;
}
.screenshot.shot-dialog,
.shot-card.shot-card-dialog {
  width: min(360px, 100%);
  margin-left: auto !important;
  margin-right: auto !important;
}
.shot-card:not(.shot-card-dialog) {
  width: fit-content;
  max-width: 100%;
}