/* ============================================================
   GoNesting — Documentation page
   Same palette as home.css / pricing.css / features.css: brand
   blue with the blue→indigo gradient on badges; Beta (cyan) and
   Pro (amber) pills only. Only documentation.html loads this file.
   Screenshots live in assets/img/docs/ and are real app captures.
   ============================================================ */

:root {
  --d-rgb: 37 99 235;
  --d-grad: linear-gradient(135deg, var(--blue-600), var(--indigo-600));
}

/* ── Icons (sprite at the top of the page) ────────────────── */
.dc-i {
  width: 1.25rem; height: 1.25rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.dc-i.sm { width: 1rem; height: 1rem; }
.dc-i.xs { width: 0.8rem; height: 0.8rem; }

/* ── Header band ──────────────────────────────────────────── */
.dc-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(34rem 26rem at 100% -20%, rgb(59 130 246 / 0.16), transparent 70%),
    radial-gradient(24rem 20rem at -6% 120%, rgb(99 102 241 / 0.10), transparent 70%),
    linear-gradient(160deg, #ffffff 0%, var(--blue-50) 60%, #ffffff 100%);
}
.dc-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--blue-100) 1px, transparent 1px),
    linear-gradient(to bottom, var(--blue-100) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 30% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 90% at 30% 30%, #000 20%, transparent 75%);
  pointer-events: none;
}
.dc-hero-inner { position: relative; padding-block: 3.5rem 3rem; }
@media (min-width: 1024px) { .dc-hero-inner { padding-block: 4.5rem 3.75rem; } }
.dc-crumbs { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--gray-500); }
.dc-crumbs a { color: var(--gray-600); font-weight: 500; }
.dc-crumbs a:hover { color: var(--blue-700); }
.dc-title {
  margin-top: 1rem;
  max-width: 44rem;
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.032em;
  color: var(--gray-900);
  text-wrap: balance;
}
.dc-grad-text {
  background: var(--d-grad);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dc-lead { margin-top: 1rem; max-width: 42rem; font-size: 1.08rem; line-height: 1.7; color: var(--gray-600); }
.dc-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1.25rem; }
.dc-meta li { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--gray-500); }
.dc-meta .dc-i { color: var(--blue-600); }

/* Step strip: the six steps, each a link to its section */
.dc-strip { list-style: none; display: grid; gap: 0.625rem; margin-top: 2.25rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px)  { .dc-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .dc-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.dc-strip a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  padding: 0.875rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--blue-100);
  background: rgb(255 255 255 / 0.9);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.dc-strip a:hover { border-color: var(--blue-300); box-shadow: 0 14px 26px -18px rgb(var(--d-rgb) / 0.75); transform: translateY(-2px); }
.dc-strip-top { display: flex; align-items: center; justify-content: space-between; }
.dc-strip-icon {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.6rem;
  background: var(--d-grad);
  color: #ffffff;
  box-shadow: 0 6px 14px -6px rgb(var(--d-rgb) / 0.75);
}
.dc-strip-icon .dc-i { width: 1rem; height: 1rem; }
.dc-strip-num { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; color: var(--blue-600); }
.dc-strip-name { font-size: 0.84rem; font-weight: 700; line-height: 1.3; color: var(--gray-900); }

/* ── Layout: sticky contents + article ────────────────────── */
.dc-layout { display: grid; gap: 2.5rem; padding-block: 3rem 5rem; }
@media (min-width: 1024px) { .dc-layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; padding-block: 3.5rem 6rem; } }
.dc-toc { display: none; }
@media (min-width: 1024px) {
  .dc-toc { display: block; position: sticky; top: 5.5rem; align-self: start; max-height: calc(100vh - 7rem); overflow-y: auto; }
}
.dc-toc-group + .dc-toc-group { margin-top: 1.5rem; }
.dc-toc-title { font-family: var(--font-mono); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 0.5rem; }
.dc-toc ul { list-style: none; display: flex; flex-direction: column; gap: 0.125rem; border-left: 1.5px solid var(--border); }
.dc-toc ul a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: -1.5px;
  padding: 0.35rem 0.75rem;
  border-left: 1.5px solid transparent;
  font-size: 0.86rem;
  color: var(--gray-600);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.dc-toc ul a:hover { color: var(--gray-900); }
.dc-toc ul a.is-active { border-left-color: var(--blue-600); color: var(--blue-700); font-weight: 600; background: linear-gradient(90deg, var(--blue-50), transparent); }
.dc-toc-num { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; color: var(--blue-500); }
.dc-toc-help {
  margin-top: 1.75rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--blue-200);
  background: var(--blue-50);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--gray-600);
}
.dc-toc-help strong { display: block; margin-bottom: 0.2rem; color: var(--gray-900); }
.dc-toc-help a { color: var(--blue-700); font-weight: 600; }

/* Mobile contents: a collapsible list at the top of the article */
.dc-mtoc { margin-bottom: 2rem; border-radius: var(--radius-lg); border: 1.5px solid var(--border); background: #ffffff; }
@media (min-width: 1024px) { .dc-mtoc { display: none; } }
.dc-mtoc summary { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.875rem 1rem; cursor: pointer; font-weight: 700; font-size: 0.9rem; color: var(--gray-900); list-style: none; }
.dc-mtoc summary::-webkit-details-marker { display: none; }
.dc-mtoc summary .dc-i { transition: transform var(--transition); color: var(--gray-500); }
.dc-mtoc[open] summary .dc-i { transform: rotate(180deg); }
.dc-mtoc ol { list-style: none; padding: 0 1rem 1rem; display: grid; gap: 0.125rem; }
.dc-mtoc a { display: flex; gap: 0.5rem; padding: 0.4rem 0; font-size: 0.88rem; color: var(--gray-700); }

/* ── Article ──────────────────────────────────────────────── */
.dc-article { min-width: 0; }
.dc-sec { scroll-margin-top: 5.5rem; }
.dc-sec + .dc-sec { margin-top: 4rem; padding-top: 4rem; border-top: 1px solid var(--border); }
.dc-sec-head { display: flex; align-items: flex-start; gap: 1rem; }
.dc-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.875rem;
  background: var(--d-grad);
  color: #ffffff;
  box-shadow: 0 12px 24px -12px rgb(var(--d-rgb) / 0.85), inset 0 1px 0 rgb(255 255 255 / 0.25);
}
.dc-badge.soft { background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--blue-600); box-shadow: none; }
.dc-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-700); }
.dc-kicker .dc-app-name { padding: 0.05rem 0.45rem; border-radius: var(--radius-sm); background: var(--blue-100); letter-spacing: 0.04em; text-transform: none; font-family: var(--font-sans); font-size: 0.72rem; }
.dc-h2 { margin-top: 0.35rem; font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: var(--gray-900); text-wrap: balance; }
.dc-h3 { margin-top: 2.25rem; font-size: 1.1rem; font-weight: 700; color: var(--gray-900); }

.dc-prose { margin-top: 1.25rem; max-width: 46rem; font-size: 0.98rem; line-height: 1.75; color: var(--gray-700); }
.dc-prose > * + * { margin-top: 0.875rem; }
.dc-prose strong { color: var(--gray-900); font-weight: 600; }
.dc-prose em { font-style: normal; font-weight: 600; color: var(--gray-900); }
.dc-prose a { color: var(--blue-700); font-weight: 600; text-decoration: underline; text-decoration-color: var(--blue-300); text-underline-offset: 3px; }
.dc-prose ul { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }
.dc-prose ul > li { position: relative; padding-left: 1.5rem; }
.dc-prose ul > li::before {
  content: '';
  position: absolute;
  left: 0.3rem;
  top: 0.7rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  background: var(--blue-500);
  transform: rotate(45deg);
}
.dc-prose ul ul { margin-top: 0.625rem; gap: 0.4rem; }
.dc-prose ul ul > li::before { background: var(--blue-300); }
.dc-kbd {
  display: inline-block;
  padding: 0 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: #ffffff;
  font-size: 0.86em;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
}

/* Screenshot figure */
.dc-shot { margin-top: 1.75rem; }
.dc-shot-frame {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  background: #ffffff;
  box-shadow: 0 28px 56px -34px rgb(15 23 42 / 0.45);
  cursor: zoom-in;
  text-align: left;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.dc-shot-frame:hover { border-color: var(--blue-300); box-shadow: 0 32px 60px -30px rgb(var(--d-rgb) / 0.55); }
.dc-shot-frame:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 3px; }
.dc-shot-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.875rem;
  border-bottom: 1px solid var(--border);
  background: var(--gray-50);
}
.dc-dots { display: inline-flex; gap: 0.3rem; }
.dc-dots i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--gray-300); }
.dc-shot-label { flex: 1; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-shot-zoom { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; font-weight: 600; color: var(--gray-400); }
.dc-shot-frame:hover .dc-shot-zoom { color: var(--blue-600); }
.dc-shot img { display: block; width: 100%; height: auto; }
.dc-shot figcaption { margin-top: 0.75rem; display: flex; gap: 0.5rem; font-size: 0.84rem; line-height: 1.55; color: var(--gray-500); }
.dc-shot figcaption .dc-i { margin-top: 0.15rem; color: var(--blue-600); }
.dc-shot.narrow { max-width: 38rem; }
.dc-shot + .dc-shot { margin-top: 1.25rem; }

/* Callouts */
.dc-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-top: 1.5rem;
  max-width: 46rem;
  padding: 1rem 1.125rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--blue-200);
  background: var(--blue-50);
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--gray-700);
}
.dc-callout strong { color: var(--gray-900); }
.dc-callout a { color: var(--blue-700); font-weight: 600; }
.dc-callout-icon { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 0.625rem; background: #ffffff; color: var(--blue-600); box-shadow: var(--shadow-xs); }
.dc-callout.plain { border-color: var(--border); background: var(--gray-50); }

/* Two-column cards (file support, spacing) */
.dc-cards { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 720px) { .dc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 720px) { .dc-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dc-card { padding: 1.125rem 1.25rem; border-radius: var(--radius-lg); border: 1.5px solid var(--border); background: #ffffff; }
.dc-card-title { display: flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; font-weight: 700; color: var(--gray-900); }
.dc-card-title .dc-i { color: var(--blue-600); }
.dc-card.no .dc-card-title .dc-i { color: var(--gray-400); }
.dc-card p { margin-top: 0.4rem; font-size: 0.88rem; line-height: 1.6; color: var(--gray-600); }

/* Spacing table */
.dc-table-wrap { margin-top: 1.25rem; max-width: 46rem; overflow-x: auto; border-radius: var(--radius-lg); border: 1.5px solid var(--border); background: #ffffff; }
.dc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.dc-table th, .dc-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.dc-table thead th { background: var(--gray-50); font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-500); }
.dc-table tbody tr:last-child th, .dc-table tbody tr:last-child td { border-bottom: 0; }
.dc-table tbody th { font-weight: 600; color: var(--gray-900); white-space: nowrap; }
.dc-table td { color: var(--gray-600); }
.dc-table .val { font-family: var(--font-mono); font-weight: 700; color: var(--blue-700); white-space: nowrap; }

/* Next-step link at the end of a step */
.dc-next { margin-top: 1.5rem; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.86rem; font-weight: 600; color: var(--blue-700); }
.dc-next:hover { text-decoration: underline; text-underline-offset: 3px; }

/* FAQ (static, matches its JSON-LD) */
.dc-faq { margin-top: 1.5rem; max-width: 46rem; display: flex; flex-direction: column; gap: 0.75rem; }
.dc-faq-item { padding: 1.125rem 1.25rem; border-radius: var(--radius-lg); border: 1.5px solid var(--border); background: #ffffff; }
.dc-faq-q { display: flex; gap: 0.625rem; font-size: 0.98rem; font-weight: 700; color: var(--gray-900); }
.dc-faq-q .dc-i { margin-top: 0.15rem; color: var(--blue-600); }
.dc-faq-a { margin-top: 0.5rem; padding-left: 1.875rem; font-size: 0.92rem; line-height: 1.7; color: var(--gray-600); }

/* ── Lightbox ─────────────────────────────────────────────── */
.dc-lightbox {
  width: min(96vw, 1400px);
  max-width: none;
  max-height: 94vh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 40px 80px -20px rgb(0 0 0 / 0.5);
  overflow: hidden;
}
.dc-lightbox::backdrop { background: rgb(15 23 42 / 0.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dc-lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--border); background: var(--gray-50); }
.dc-lightbox-title { font-size: 0.86rem; font-weight: 600; color: var(--gray-700); }
.dc-lightbox-close { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #ffffff; color: var(--gray-600); cursor: pointer; }
.dc-lightbox-close:hover { border-color: var(--blue-300); color: var(--blue-700); }
.dc-lightbox-body { max-height: calc(94vh - 3.25rem); overflow: auto; }
.dc-lightbox img { display: block; width: 100%; height: auto; }
/* On small screens show the screenshot at a readable size and let it pan. */
@media (max-width: 767px) { .dc-lightbox img { width: 1280px; max-width: none; } }

@media (prefers-reduced-motion: reduce) {
  .dc-strip a, .dc-shot-frame, .dc-toc a { transition: none; }
  .dc-strip a:hover { transform: none; }
}
