﻿/* MistDocs feature page — uses the site design tokens */

.md-page { padding-bottom: 72px; }
.md-page .product-hero { padding: 56px 0 20px; }
.md-page .product-hero h1 { letter-spacing: -0.03em; }
.md-page .product-hero p { max-width: 640px; }

.md-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 0 0 8px;
}
.md-jump a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}
.md-jump a:hover { color: var(--accent); opacity: 1; }

.md-section {
  padding: 40px 0 8px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
}
.md-section h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.md-lead {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 40rem;
}

.md-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.md-card { min-width: 0; }
.md-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 12px 0 4px;
  line-height: 1.35;
}
.md-cap {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.md-shot {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  cursor: zoom-in;
  line-height: 0;
  box-shadow: var(--shadow-lg);
}
.md-shot:hover { border-color: var(--accent-border); }
.md-shot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.md-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.md-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.md-end {
  text-align: center;
  padding: 48px 0 8px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}
.md-end p {
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 auto 20px;
  line-height: 1.65;
}

dialog.md-lightbox {
  width: min(1080px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text);
  overflow: auto;
  box-shadow: var(--shadow-lg);
}
dialog.md-lightbox::backdrop {
  background: var(--overlay);
}
.md-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}
.md-lightbox-hint {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.45;
}
.md-lightbox-close {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.md-lightbox-close:hover { border-color: var(--border-light); }
.md-lightbox-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.md-lightbox img {
  display: block;
  width: auto;
  max-width: calc(100% - 24px);
  height: auto;
  max-height: calc(100vh - 168px);
  margin: 0 auto;
  border-radius: 8px;
  background: var(--shot-frame-bg);
  object-fit: contain;
}
.md-lightbox-cap {
  margin: 0;
  padding: 12px 14px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

@media (min-width: 900px) {
  .md-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
  }
}

@media (max-width: 720px) {
  .md-page .product-hero { padding: 28px 0 12px; }
  .md-page .product-hero h1 { font-size: 2rem; }
  .md-section { padding-top: 32px; }
  .md-section h2 { font-size: 1.3rem; }
  .md-lightbox-hint { font-size: 12px; }
  .md-lightbox img { max-height: calc(100vh - 180px); }
}
