/* ============================================================
   Trickle — shared styles for legal + support pages
   Matches the landing page vocabulary (Nunito, forest-green, soft cards).
   Depends on colors_and_type.css being loaded first.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: #2d7a4e; text-decoration: underline; text-underline-offset: 3px; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.doc-wrap { max-width: 820px; margin: 0 auto; padding: 0 28px; }

/* =============== Nav — mirrors the landing page =============== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248,250,244,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; gap: 24px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 20px; letter-spacing: -0.01em;
  color: var(--foreground);
}
.nav-brand:hover { color: var(--foreground); text-decoration: none; }
.nav-brand img { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
  color: var(--muted-foreground);
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover {
  color: var(--foreground); background: var(--muted);
  text-decoration: none;
}
.nav-links a.active {
  color: var(--foreground); background: var(--card);
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary) !important; color: #fff !important;
  padding: 10px 18px !important; border-radius: 999px;
  font-size: 14px; font-weight: 800 !important;
  white-space: nowrap;
  box-shadow: 0 4px 14px -4px rgba(58,155,99,.45);
  transition: transform .15s, box-shadow .15s;
  margin-left: 8px;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -4px rgba(58,155,99,.55) !important;
  text-decoration: none;
}

/* =============== Page hero =============== */
.doc-hero {
  position: relative;
  padding: 64px 0 40px;
  overflow: hidden;
}
.doc-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 85% 20%, rgba(58,155,99,0.08), transparent 70%),
    radial-gradient(50% 40% at 10% 80%, rgba(244,198,61,0.10), transparent 70%);
  pointer-events: none;
}
.doc-hero-inner { position: relative; }
.doc-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--primary);
  white-space: nowrap;
  margin-bottom: 18px;
}
.doc-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--primary);
}
.doc-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 900; line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--foreground);
}
.doc-updated {
  font-size: 14px; font-weight: 700;
  color: var(--muted-foreground);
  margin: 0 0 8px;
}
.doc-lead {
  margin: 18px 0 0;
  font-size: 18px; font-weight: 600; line-height: 1.5;
  color: var(--muted-foreground);
  max-width: 640px;
}

/* =============== Body =============== */
.doc-body { padding: 24px 0 80px; }

.doc-body h2 {
  font-size: 26px; font-weight: 900;
  letter-spacing: -0.015em; line-height: 1.2;
  margin: 56px 0 16px;
  color: var(--foreground);
  scroll-margin-top: 80px;
}
.doc-body h2:first-child { margin-top: 16px; }

.doc-body h3 {
  font-size: 18px; font-weight: 800;
  line-height: 1.3;
  margin: 32px 0 10px;
  color: var(--foreground);
  scroll-margin-top: 80px;
}

.doc-body p {
  margin: 0 0 14px;
  font-size: 15px; font-weight: 500;
  line-height: 1.65;
  color: var(--foreground);
}
.doc-body p strong { font-weight: 800; }

.doc-body ul, .doc-body ol {
  padding-left: 22px; margin: 0 0 18px;
}
.doc-body li {
  margin-bottom: 8px;
  font-size: 15px; font-weight: 500;
  line-height: 1.6;
}
.doc-body li strong { font-weight: 800; }
.doc-body li::marker { color: var(--primary); font-weight: 900; }

/* =============== Callouts =============== */
.callout {
  background: var(--card);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 24px 0;
  box-shadow: var(--shadow-bubble);
  border-left: 4px solid var(--primary);
  position: relative;
}
.callout::before {
  content: '';
  position: absolute; top: 22px; left: -11px;
  width: 18px; height: 18px;
  background: var(--primary);
  border-radius: 999px;
  border: 3px solid var(--background);
  box-shadow: 0 0 0 2px var(--primary);
}
.callout p { margin-bottom: 10px; font-weight: 600; }
.callout p:last-child { margin-bottom: 0; }
.callout p strong { font-weight: 900; }

.callout.warn {
  border-left-color: var(--lab-coral);
  background: var(--lab-coral-light);
}
.callout.warn::before {
  background: var(--lab-coral);
  box-shadow: 0 0 0 2px var(--lab-coral);
}
.callout.warn p { color: #7d2d1a; }

.callout.info {
  border-left-color: var(--lab-purple);
  background: var(--lab-purple-light);
}
.callout.info::before {
  background: var(--lab-purple);
  box-shadow: 0 0 0 2px var(--lab-purple);
}

/* =============== Table of contents =============== */
.toc {
  background: #fff;
  border-radius: 20px;
  padding: 24px 28px;
  margin: 32px 0;
  box-shadow: var(--shadow-bubble);
}
.toc-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.toc-head .ic {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.toc-head .ic svg { width: 16px; height: 16px; stroke-width: 2.5; }
.toc h3 {
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-foreground);
}
.toc ol {
  columns: 2; column-gap: 32px;
  padding-left: 0; margin: 0;
  list-style: none; counter-reset: toc;
}
.toc li {
  margin: 0 0 8px;
  font-size: 14px; font-weight: 700;
  counter-increment: toc;
  break-inside: avoid;
  padding-left: 28px;
  position: relative;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-size: 11px; font-weight: 900;
  color: var(--primary);
  letter-spacing: 0.04em;
}
.toc a {
  color: var(--foreground);
  font-weight: 700;
  transition: color .15s;
}
.toc a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* =============== Tables =============== */
.table-wrap {
  margin: 24px 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-bubble);
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-weight: 600;
}
th, td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
th {
  background: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255,255,255,0.4); }
td strong { font-weight: 800; color: var(--foreground); }

/* =============== Support-specific =============== */
.contact-card {
  background: var(--primary);
  color: #fff;
  border-radius: 24px;
  padding: 32px 36px;
  margin: 24px 0 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -20px rgba(58,155,99,.4);
}
.contact-card::after {
  content: ''; position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
}
.contact-card::before {
  content: ''; position: absolute;
  right: 40px; bottom: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
}
.contact-card-label {
  font-size: 11px; font-weight: 900;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-bottom: 10px;
}
.contact-card h2 {
  color: #fff !important;
  font-size: 28px !important;
  margin: 0 0 14px !important;
  line-height: 1.2;
  position: relative; z-index: 1;
}
.contact-card p {
  color: rgba(255,255,255,.88) !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  line-height: 1.55 !important;
  margin-bottom: 10px !important;
  position: relative; z-index: 1;
}
.contact-card a {
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  font-weight: 800;
}
.contact-card a:hover { color: var(--accent) !important; }
.contact-card .reply-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 800;
  position: relative; z-index: 1;
}
.contact-card .reply-chip svg { width: 14px; height: 14px; stroke-width: 2.5; }

/* FAQ cards */
.faq-section { margin: 16px 0 32px; }
.faq-card {
  background: var(--card);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-bubble);
  transition: transform .15s, box-shadow .15s;
}
.faq-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px -6px rgba(58, 155, 99, 0.22);
}
.faq-card h3 {
  margin: 0 0 10px !important;
  font-size: 17px !important;
  display: flex; align-items: flex-start; gap: 10px;
}
.faq-card h3::before {
  content: '?';
  width: 24px; height: 24px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  margin-top: 1px;
}
.faq-card p:last-child { margin-bottom: 0; }
.faq-card ul:last-child { margin-bottom: 0; }

/* Quicklinks grid */
.quicklinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 28px 0 40px;
}
.quicklink {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-bubble);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .15s, box-shadow .15s;
  color: var(--foreground);
}
.quicklink:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 10px 30px -8px rgba(58,155,99,.28);
}
.quicklink .ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.quicklink .ic svg { width: 18px; height: 18px; stroke-width: 2.5; }
.quicklink .t { font-size: 15px; font-weight: 900; }
.quicklink .d { font-size: 13px; font-weight: 700; color: var(--muted-foreground); line-height: 1.45; }

/* =============== Footer — mirrors landing =============== */
.foot {
  padding: 72px 0 40px;
  background: var(--card);
  margin-top: 80px;
}
.foot-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.foot-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 900;
  margin-bottom: 10px;
  color: var(--foreground);
}
.foot-brand img { width: 32px; height: 32px; }
.foot-tag {
  font-size: 14px; font-weight: 600;
  color: var(--muted-foreground);
  line-height: 1.55;
  max-width: 380px;
}
.foot-col h4 {
  margin: 0 0 14px;
  font-size: 11px; font-weight: 900;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted-foreground);
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 10px; }
.foot-col a {
  font-size: 14px; font-weight: 700;
  color: var(--foreground);
  transition: color .15s;
}
.foot-col a:hover { color: var(--primary); text-decoration: none; }

.foot-bottom {
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 700;
  color: var(--muted-foreground);
  flex-wrap: wrap; gap: 12px;
}

/* =============== Responsive =============== */
@media (max-width: 820px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-links a.keep-mobile { display: inline-flex; }
  .toc ol { columns: 1; }
  .doc-hero { padding: 40px 0 24px; }
  .doc-body { padding: 16px 0 40px; }
  .doc-body h2 { font-size: 22px; margin: 40px 0 12px; }
  .doc-body h3 { font-size: 17px; }
  .contact-card { padding: 24px; border-radius: 20px; }
  .contact-card h2 { font-size: 22px !important; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .foot-top > :first-child { grid-column: 1 / -1; }
  th, td { padding: 12px 14px; font-size: 13px; }
}
