/*
  Shared documentation-page components for the WASPrFlow site.
  Used by install-guide.html, privacy.html, and release-history.html.
  Loaded after wisprflow-system.css so the shared light shell is the base.
*/

.docs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: 56px 0 14px;
}

.docs-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.08;
  max-width: 18ch;
}

.docs-hero .hero-copy p {
  margin: 0;
}

.docs-hero .callout {
  margin-top: 16px;
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-badge {
  width: min(100%, 280px);
  padding: 20px;
  border: 1px solid var(--wf-border);
  border-radius: 22px;
  background: var(--wf-panel);
  box-shadow: var(--wf-shadow-soft);
}

.hero-badge img {
  width: 100%;
  height: auto;
  border: 0;
  background: transparent;
}

.docs-main {
  padding: 8px 0 32px;
}

.docs-main section {
  padding: 18px 0;
}

.docs-main section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.18;
}

.docs-main .hero {
  padding: 2px 0 8px;
}

.callout {
  padding: 14px 16px;
}

.callout p {
  margin: 0;
}

.callout strong {
  color: var(--wf-text);
}

.step {
  margin-top: 14px;
  padding: 18px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.25;
}

.step p {
  margin: 0 0 10px;
  font-size: 0.96rem;
}

.list {
  margin: 0;
  padding-left: 20px;
}

figure {
  margin: 0;
}

.step img,
.docs-main figure img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--wf-border);
  background: #fff;
}

figcaption {
  margin-top: 8px;
  color: var(--wf-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.status {
  display: grid;
  gap: 8px;
}

.status .row {
  padding: 10px 12px;
  border: 1px solid var(--wf-border);
  border-radius: 12px;
  background: var(--wf-panel);
  line-height: 1.55;
}

.status .row b {
  color: var(--wf-text);
}

.good { color: #059669; }
.warn { color: #d97706; }
.bad { color: #dc2626; }

.timeline {
  display: grid;
  gap: 10px;
}

.entry {
  padding: 14px;
  border: 1px solid var(--wf-border);
  border-radius: 14px;
  background: var(--wf-panel);
}

.entry-head {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 6px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--wf-accent) 20%, transparent);
  background: var(--wf-accent-soft);
  color: var(--wf-text);
  font-size: 0.84rem;
  font-weight: 700;
}

.date {
  color: var(--wf-muted);
  font-size: 0.92rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.docs-main a:not(.btn):not(.cta) {
  color: var(--wf-accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docs-main a:not(.btn):not(.cta):hover {
  color: var(--wf-text);
}

.video-callout {
  margin-top: 16px;
  border-left: 4px solid var(--wf-accent);
}

.screenshot-note {
  margin: 10px 0 0;
  color: var(--wf-muted-2);
  font-size: 0.9rem;
  line-height: 1.5;
}

.video-callout a {
  color: var(--wf-accent-2);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docs-main ul {
  margin: 8px 0 0 18px;
}

.docs-main li + li {
  margin-top: 4px;
}

/* ---- Install guide ---- */

.guide-eyebrow {
  margin: 0 0 10px;
  color: var(--wf-accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.guide-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--wf-border);
  border-radius: 999px;
  background: var(--wf-panel);
  color: var(--wf-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.guide-chip strong {
  color: var(--wf-text);
  font-weight: 700;
}

.guide-toc {
  margin: 10px 0 4px;
  padding: 16px 18px;
}

.guide-toc .toc-title {
  display: block;
  margin-bottom: 8px;
  color: var(--wf-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2px 18px;
}

.docs-main .toc-grid a {
  display: block;
  padding: 6px 0;
  border-bottom: 0;
  color: var(--wf-text);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.docs-main .toc-grid a::before {
  content: "\2192";
  margin-right: 7px;
  color: var(--wf-accent);
  font-weight: 800;
}

.docs-main .toc-grid a:hover {
  color: var(--wf-accent-2);
}

.quick-steps {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.quick-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--wf-border);
  border-radius: 14px;
  background: var(--wf-panel);
}

.quick-steps h3 {
  margin: 0 0 3px;
  font-size: 0.98rem;
  line-height: 1.3;
}

.quick-steps p {
  margin: 0;
  color: var(--wf-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.qs-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--wf-accent-soft);
  color: var(--wf-text);
  font-size: 0.85rem;
  font-weight: 800;
}

.table-scroll {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--wf-border);
  border-radius: 14px;
  background: var(--wf-panel);
}

.docs-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.docs-table th,
.docs-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--wf-border);
  text-align: left;
  vertical-align: top;
}

.docs-table th {
  background: color-mix(in srgb, var(--wf-bg) 65%, white);
  color: var(--wf-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.docs-table tr:last-child td {
  border-bottom: 0;
}

.docs-table td:first-child {
  color: var(--wf-text);
  font-weight: 700;
  white-space: nowrap;
}

.docs-table code {
  white-space: nowrap;
}

.docs-main .step .list + p,
.docs-main .step .quick-steps + p {
  margin-top: 10px;
}

.docs-main section[id] {
  scroll-margin-top: 78px;
}

@media (max-width: 700px) {
  .docs-table {
    min-width: 0;
  }

  .docs-table td:first-child {
    white-space: normal;
  }

  .hero-badge {
    width: min(100%, 180px);
  }
}

.kbd {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--wf-text) 22%, transparent);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  color: var(--wf-text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.82em;
  line-height: 1.4;
}

.bar-mock {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  padding: 9px 14px;
  border: 1px solid #4a4a4a;
  border-radius: 999px;
  background: #2b2b2b;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
}

.bar-mock .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6b7280;
}

.bar-mock .dot-live {
  background: #ef4444;
}

.bar-mock .dot-ok {
  background: #22c55e;
}

.bar-mock .bar-hint {
  color: #c7c9d1;
  font-weight: 500;
}

.bar-mock .bar-key {
  padding: 2px 8px;
  border-radius: 999px;
  background: #3f3f46;
  color: #e5e7eb;
  font-size: 0.78rem;
}

.faq {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--wf-border);
  border-radius: 12px;
  background: var(--wf-panel);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  color: var(--wf-text);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--wf-accent-2);
  font-weight: 800;
}

.faq[open] summary::after {
  content: "\2013";
}

.faq .faq-body {
  padding: 0 16px 14px;
  color: var(--wf-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq .faq-body p {
  margin: 0 0 8px;
}

.faq .faq-body p:last-child {
  margin-bottom: 0;
}

.guide-footnote {
  margin-top: 18px;
  color: var(--wf-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.feature-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature-matrix .panel {
  padding: 16px;
}

.feature-matrix h3 {
  margin: 0 0 7px;
  font-size: 1rem;
}

.feature-matrix p {
  margin: 0;
  color: var(--wf-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.pair-demo {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.pair-demo span {
  padding: 10px;
  border: 1px solid var(--wf-border);
  border-radius: 8px;
  background: var(--wf-panel);
  color: var(--wf-text);
  font-weight: 700;
  text-align: center;
}

.pair-demo b {
  color: var(--wf-accent-2);
  font-size: 1.2rem;
}

.language-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.language-group {
  padding: 16px;
}

.language-group h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.language-group p {
  margin: 0;
  color: var(--wf-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.mode-flow {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.mode-flow div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-left: 3px solid var(--wf-accent);
  background: color-mix(in srgb, var(--wf-panel) 75%, var(--wf-accent-soft));
}

.mode-flow span {
  color: var(--wf-muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .docs-hero {
    grid-template-columns: 1fr;
    padding-top: 36px;
  }

  .hero-art {
    justify-content: flex-start;
  }

  .hero-badge {
    width: min(100%, 200px);
  }

  .feature-matrix,
  .language-groups {
    grid-template-columns: 1fr;
  }
}
