/* Styles shared by docs.html and every docs-*.html guide page. Loaded after
   style.css, whose CSS variables it reuses. Keep this file free of build
   tokens: the build substitutes *.html, robots.txt and sitemap.xml only, and
   then fails on any double-brace token left anywhere in the output. */

.docs-section {
  padding: 80px 0 120px;
}

.docs-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.docs-content {
  flex: 1;
  min-width: 0;
  max-width: 760px;
}

.docs-content h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.docs-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 44px 0 14px;
  scroll-margin-top: 84px;
}

.docs-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 30px 0 10px;
  scroll-margin-top: 84px;
}

.docs-content p {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.docs-content p strong {
  color: var(--text);
}

.docs-content ul, .docs-content ol {
  color: var(--text-muted);
  margin: 0 0 14px 22px;
}

.docs-content li {
  margin-bottom: 6px;
}

.docs-content li strong {
  color: var(--text);
}

.docs-content a {
  color: var(--accent);
}

/* The accent link color above would otherwise win over .btn-primary and
   render yellow text on the yellow button background. */
.docs-content a.btn-primary {
  color: #000;
}

/* Back-to-index link above the page title. */
.docs-crumb {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.docs-content a.docs-crumb {
  color: var(--text-muted);
}

.docs-content a.docs-crumb:hover {
  color: var(--accent);
}

.docs-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.docs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 18px 0;
}

.docs-card p:last-child {
  margin-bottom: 0;
}

.tip-card {
  background: rgba(240,165,0,0.06);
  border: 1px solid rgba(240,165,0,0.25);
}

.tip-card .tip-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
}

.warn-card {
  background: rgba(220,68,68,0.06);
  border: 1px solid rgba(220,68,68,0.28);
}

.warn-card .tip-label {
  color: #e06666;
}

/* Cards on the docs home page, one per guide. */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin: 26px 0 10px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}

.guide-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.guide-step {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
}

.docs-content .guide-card .guide-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.guide-desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Tables must scroll inside their own box on a phone — the page itself
   never scrolls sideways. */
.table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

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

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

.docs-table th {
  color: var(--text);
  font-weight: 600;
  background: var(--surface);
  white-space: nowrap;
}

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

.docs-table td strong {
  color: var(--text);
}

/* Names of buttons and fields exactly as they appear in the apps. */
.ui {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.docs-content code {
  font-family: monospace;
  font-size: 0.88em;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}

/* Previous / next links at the foot of each guide. */
.page-nav {
  display: flex;
  gap: 14px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.page-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.page-nav-link:hover {
  border-color: var(--accent);
}

.page-nav-next {
  text-align: right;
}

.page-nav-dir {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.docs-content .page-nav-link .page-nav-title {
  font-weight: 600;
  color: var(--text);
}

.docs-toc {
  position: sticky;
  top: 84px;
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.docs-toc .toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.docs-toc ul {
  list-style: none;
}

.docs-toc li {
  margin-bottom: 6px;
}

.docs-toc a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.docs-toc a:hover {
  color: var(--accent);
}

.docs-toc a.active {
  color: var(--accent);
  font-weight: 600;
}

/* Sections of the page you are on, nested under its index entry. */
.docs-toc .toc-sub {
  margin: 6px 0 10px 12px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.docs-toc .toc-sub a {
  font-size: 0.8rem;
}

.docs-cta {
  margin-top: 40px;
}

@media (max-width: 900px) {
  .docs-toc {
    display: none;
  }
  .docs-section {
    padding: 60px 0 80px;
  }
  .page-nav {
    flex-direction: column;
  }
  .page-nav-next {
    text-align: left;
  }
}
