/* RinsePay hardware.rinsepay.app — installation guide
 *
 * Brand palette:
 *   --rp-bg    #F2F0EF   (warm off-white, matches brand feedback memos)
 *   --rp-brown #733e24   (the "Pay" brown — locked per brand rules)
 *   --rp-teal  #208078   (QR-code teal)
 *   --rp-ink   #1f1d1c
 */

:root {
  --rp-bg: #F2F0EF;
  --rp-brown: #733e24;
  --rp-teal: #208078;
  --rp-teal-hover: #166b64;
  --rp-ink: #1f1d1c;
  --rp-muted: #635f5d;
  --rp-border: #d8d4d1;
  --rp-card: #ffffff;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--rp-bg);
  color: var(--rp-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--rp-teal); text-decoration: underline; }
a:hover { color: var(--rp-teal-hover); }

/* --- Header --- */
.site-header {
  padding: 32px 24px 16px;
  max-width: 1100px;
  margin: 0 auto;
  border-bottom: 1px solid var(--rp-border);
}
.brand {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.brand-rinse { color: var(--rp-teal); }
.brand-pay { color: var(--rp-brown); }
.site-header h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-header .subtitle {
  margin: 8px 0 0;
  color: var(--rp-muted);
  font-size: 16px;
}

/* --- Layout: two-column on wide screens, stacked on phones --- */
.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .toc { position: static; max-height: none; }
}

/* --- Table of contents --- */
.toc {
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--rp-card);
  border: 1px solid var(--rp-border);
  border-radius: 10px;
  padding: 16px;
}
.toc h3 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rp-muted);
}
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc li { margin-bottom: 6px; }
.toc a {
  display: block;
  padding: 4px 8px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--rp-ink);
  font-size: 14px;
}
.toc a:hover { background: rgba(32, 128, 120, 0.08); color: var(--rp-teal); }
.toc a.active { background: rgba(32, 128, 120, 0.15); color: var(--rp-teal); font-weight: 600; }

/* --- Content sections --- */
.content { min-width: 0; }
.guide-section {
  background: var(--rp-card);
  border: 1px solid var(--rp-border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 16px;
  scroll-margin-top: 16px;
}
.guide-section h2 {
  margin: 0 0 12px;
  font-size: 22px;
  color: var(--rp-brown);
  font-weight: 700;
}
.guide-section p {
  margin: 0 0 12px;
  color: var(--rp-ink);
}
.guide-section p:last-child { margin-bottom: 0; }
.guide-section strong { font-weight: 600; color: var(--rp-ink); }
.guide-section .section-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* --- Diagrams block --- */
.diagrams {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rp-border);
}
.diagrams h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rp-muted);
}
.diagrams ul { margin: 0; padding: 0; list-style: none; }
.diagrams li { margin-bottom: 6px; font-size: 15px; }
.diagrams a { text-decoration: none; font-weight: 600; }
.diagrams a:hover { text-decoration: underline; }
.diagrams .source { color: var(--rp-muted); font-weight: 400; font-size: 13px; }

/* --- Footer --- */
.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--rp-border);
  color: var(--rp-muted);
  font-size: 14px;
  text-align: center;
}
