/* Gated docs viewer styling (portal). Self-contained — defines its own tokens
   so it doesn't depend on the portal's main stylesheet. Mirrors the marketing
   site's look. */

:root {
  --ink: #121F16;
  --cream: #FBFAF6;
  --green: #16A34A;
  --green-dark: #15803D;
  --green-deep: #0E5A3C;
  --green-tint: #EBF7EE;
  --muted: #50685A;
  --faint: #71867A;
  --line: rgba(18, 31, 22, 0.09);
  --amber: #D97706;
  --amber-bg: #FFFBEB;
  --amber-border: #F8E5B9;
  --font-display: 'Gabarito', sans-serif;
  --font-body: 'Onest', sans-serif;
  --font-mono: 'Fragment Mono', monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

/* Top bar */
.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.docs-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; color: var(--ink); text-decoration: none; }
.docs-brand img { width: 30px; height: 30px; }
.docs-brand em { color: var(--green); font-style: normal; }
.docs-topbar__back { color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.docs-topbar__back:hover { color: var(--green); }

/* Layout */
.docs-wrap { max-width: 1140px; margin: 0 auto; padding: 40px 32px 80px; }
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }

.docs-nav { position: sticky; top: 88px; align-self: start; }
.docs-nav__title { font-family: var(--font-display); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 14px; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 15px; line-height: 1.35; border-left: 2px solid transparent; }
.docs-nav a:hover { background: var(--green-tint); color: var(--green-dark); }
.docs-nav a.is-active { background: var(--green-tint); color: var(--green-deep); border-left-color: var(--green); font-weight: 600; }

/* Article */
.docs-content { max-width: 820px; }
.docs-content h1 { font-family: var(--font-display); font-size: 40px; line-height: 1.1; font-weight: 800; margin: 0 0 20px; }
.docs-content h2 { font-family: var(--font-display); font-size: 27px; font-weight: 700; margin: 52px 0 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.docs-content h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin: 32px 0 12px; }
.docs-content h4 { font-size: 16px; font-weight: 700; margin: 24px 0 8px; }
.docs-content p { color: var(--muted); line-height: 1.7; margin: 0 0 16px; }
.docs-content ul, .docs-content ol { color: var(--muted); line-height: 1.7; padding-left: 22px; margin: 0 0 16px; }
.docs-content li { margin: 6px 0; }
.docs-content a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 2px; }
.docs-content a:hover { color: var(--green); }
.docs-content strong { color: var(--ink); font-weight: 600; }
.docs-content hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

.docs-content code { font-family: var(--font-mono); font-size: 0.86em; background: var(--green-tint); color: var(--green-deep); padding: 2px 6px; border-radius: 5px; }
.docs-content pre { background: var(--ink); color: #E7F0E9; border-radius: 12px; padding: 18px 20px; overflow-x: auto; margin: 0 0 20px; }
.docs-content pre code { font-family: var(--font-mono); font-size: 13px; line-height: 1.6; background: none; color: inherit; padding: 0; border-radius: 0; }

.docs-content table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 14.5px; }
.docs-content th, .docs-content td { text-align: left; padding: 10px 14px; border: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.docs-content th { background: var(--green-tint); color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 13.5px; }
.docs-content tbody tr:nth-child(even) { background: #fff; }

.docs-content blockquote { margin: 0 0 20px; padding: 14px 18px; background: var(--amber-bg); border: 1px solid var(--amber-border); border-left: 3px solid var(--amber); border-radius: 10px; color: var(--ink); line-height: 1.6; }
.docs-content blockquote strong { color: var(--amber); }

/* States */
.docs-btn { display: inline-block; margin-top: 8px; padding: 10px 18px; border-radius: 10px; background: var(--green); color: #fff; font-weight: 600; font-family: var(--font-display); }
.docs-content a.docs-btn, .docs-content a.docs-btn:hover { text-decoration: none; color: #fff; }
.docs-btn:hover { background: var(--green-dark); }
.docs-msg { color: var(--muted); }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: 28px; }
  .docs-wrap { padding: 28px 20px 60px; }
  .docs-nav { position: static; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
  .docs-content h1 { font-size: 32px; }
  .docs-topbar { padding: 12px 20px; }
}
