/* Salesift guides. Same palette and type as the landing page (/home/). */
:root {
  --bg: #f8f8f8; --surface: #eeeeee; --card: #ffffff; --ink: #0a0a0a; --muted: #5f5f5c;
  --line: #e2e2df; --accent: #1f6b3a; --accent-soft: #e3f4e8; --accent-ink: #0a3d1d;
  --mint: #c3edce; --pink: #f8c7c9; --pink-ink: #8a2a30; --warn-soft: #fbefd9; --warn-ink: #6b4a0e;
  --code-bg: #0f1110; --code-ink: #e6e6e3; --code-k: #8fd9a3; --code-s: #f8c7c9; --code-c: #8e928c; --code-n: #f5d48b;
  --font: "Familjen Grotesk", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --r: 14px; --wrap: 1200px; --gutter: 24px; --head: 64px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0c0b; --surface: #161816; --card: #121412; --ink: #f1f2ef; --muted: #a2a5a0;
  --line: #262926; --accent: #8fd9a3; --accent-soft: #15281b; --accent-ink: #c3edce;
  --pink-ink: #f8c7c9; --warn-soft: #2a2312; --warn-ink: #f5d48b;
  --code-bg: #060706;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--head) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 99px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* header */
.dh { position: sticky; top: 0; z-index: 20; height: var(--head); background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.dh__in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: 100%; display: flex; align-items: center; gap: 28px; }
.dh__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.dh__logo img { height: 26px; width: auto; display: block; }
.dh__logo span { font-size: 15px; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line); line-height: 1.2; }
.dh__nav { display: flex; gap: 4px; }
.dh__nav a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 99px; color: var(--muted); transition: color .15s, background-color .15s; }
.dh__nav a:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.dh__nav a[aria-current="page"] { color: var(--ink); background: color-mix(in oklab, var(--ink) 9%, transparent); }
.dh__end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.dh__end .signin { font-size: 15px; font-weight: 500; text-decoration: none; height: 40px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 99px; background: var(--ink); color: var(--bg); transition: transform .15s; }
.dh__end .signin:hover { transform: translateY(-1px); }
.dh__menu { display: none; }
@media (max-width: 960px) {
  .dh__nav { display: none; }
  .dh__logo span { display: none; }
  .dh__menu { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--ink); cursor: pointer; }
  .dh.is-open .dh__nav { display: flex; flex-direction: column; position: fixed; inset: var(--head) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 20px; }
  .dh.is-open .dh__nav a { font-size: 20px; padding: 12px 0; border-radius: 0; background: none; }
}
@media (max-width: 520px) { .dh__end .signin { display: none; } .dh__in { gap: 12px; } }

/* page layout: on-page contents on the left, the article on the right */
.dl { max-width: var(--wrap); margin: 0 auto; padding: 56px var(--gutter) 96px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; }
.toc { position: sticky; top: calc(var(--head) + 32px); align-self: start; max-height: calc(100vh - var(--head) - 64px); overflow: auto; font-size: 14px; }
.toc p { margin: 0 0 10px; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--accent); }
@media (max-width: 960px) { .dl { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; } .toc { display: none; } }

/* article */
.doc { max-width: 760px; min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); margin: 0 0 14px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.doc h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 500; margin: 0 0 18px; }
.lede { font-size: 20px; line-height: 1.5; color: var(--muted); margin: 0 0 32px; max-width: 640px; }
.doc h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.025em; font-weight: 500; margin: 72px 0 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; margin: 36px 0 8px; }
.doc h4 { font-size: 16px; font-weight: 600; margin: 24px 0 6px; }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; }
.doc li { margin: 4px 0; }
.doc li::marker { color: var(--muted); }
.doc strong { font-weight: 600; }
.doc a:not(.card):not(.btn) { color: var(--ink); text-decoration-color: color-mix(in oklab, var(--accent) 70%, transparent); text-decoration-thickness: 2px; }
.doc a:not(.card):not(.btn):hover { text-decoration-color: var(--accent); }
.doc code { font: 500 .88em/1 var(--mono); background: var(--surface); padding: 3px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.ui { font-weight: 600; white-space: nowrap; }
.ui::before { content: ""; }
kbd { font: 500 13px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--card); }

/* numbered steps */
.steps { list-style: none; padding: 0; counter-reset: step; margin: 20px 0 24px; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 48px; margin: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font: 600 14px/30px var(--font); text-align: center; }
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 14.5px; top: 34px; bottom: 4px; width: 1px; background: var(--line); }

/* callouts */
.note { border-radius: var(--r); padding: 16px 20px; margin: 20px 0 24px; background: var(--accent-soft); color: var(--ink); font-size: 16px; }
.note > :last-child { margin-bottom: 0; }
.note b:first-child { display: block; margin-bottom: 2px; color: var(--accent-ink); }
.note--warn { background: var(--warn-soft); }
.note--warn b:first-child { color: var(--warn-ink); }

/* tables */
.tw { overflow-x: auto; margin: 16px 0 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
th { text-align: left; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td:first-child { white-space: nowrap; }
td code { white-space: nowrap; }
.req { display: inline-block; font: 600 11px/1 var(--font); text-transform: uppercase; letter-spacing: .05em; padding: 4px 6px; border-radius: 4px; background: var(--pink); color: #8a2a30; margin-left: 6px; vertical-align: 1px; }
.opt { color: var(--muted); font-size: 13px; margin-left: 6px; }

/* code */
.code { position: relative; margin: 16px 0 24px; border-radius: var(--r); background: var(--code-bg); color: var(--code-ink); overflow: hidden; }
.code__bar { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 16px; border-bottom: 1px solid #1f221f; font: 500 13px var(--font); color: var(--code-c); }
.code__bar .tab { background: none; border: 0; color: var(--code-c); font: inherit; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.code__bar .tab[aria-selected="true"] { color: var(--code-ink); background: #1f221f; }
.code__bar .tab:hover { color: var(--code-ink); }
.code__copy { margin-left: auto; background: none; border: 1px solid #2c302c; color: var(--code-ink); font: 500 13px var(--font); border-radius: 99px; padding: 5px 12px; cursor: pointer; transition: background-color .15s; }
.code__copy:hover { background: #1f221f; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 400 14px/1.65 var(--mono); tab-size: 2; }
.code pre[hidden] { display: none; }
.code .k { color: var(--code-k); } .code .s { color: var(--code-s); } .code .c { color: var(--code-c); } .code .n { color: var(--code-n); }

/* method + path line */
.ep { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); font: 500 15px var(--mono); overflow-wrap: anywhere; }
.ep b { font: 600 12px/1 var(--font); letter-spacing: .05em; padding: 6px 8px; border-radius: 6px; background: var(--mint); color: #0a3d1d; }
.ep b.put { background: #f5d48b; color: #4a3505; }
.ep b.get { background: #cfe3f7; color: #0d3557; }

/* guide hub */
.hub { max-width: var(--wrap); margin: 0 auto; padding: 88px var(--gutter) 96px; }
.hub h1 { font-size: clamp(44px, 7vw, 84px); line-height: .98; letter-spacing: -0.045em; font-weight: 500; margin: 0 0 20px; max-width: 900px; }
.hub .lede { max-width: 620px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-decoration: none; min-height: 300px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--ink) 22%, transparent); box-shadow: 0 18px 40px -28px rgb(0 0 0 / .45); }
.card h2 { font-size: 26px; letter-spacing: -0.02em; line-height: 1.1; font-weight: 500; margin: 8px 0 0; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card ul { margin: auto 0 0; padding: 16px 0 0; list-style: none; border-top: 1px solid var(--line); font-size: 15px; display: grid; gap: 6px; }
.card ul li::before { content: "→ "; color: var(--accent); }
.card .mark { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); }
.card .mark svg { width: 28px; height: 28px; }
.card:nth-child(2) .mark { background: color-mix(in oklab, var(--pink) 55%, var(--card)); }
.card:nth-child(3) .mark { background: var(--surface); }
.hub__foot { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; font-size: 15px; color: var(--muted); }
.hub__foot strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 900px) { .cards, .hub__foot { grid-template-columns: minmax(0, 1fr); } .card { min-height: 0; } .hub { padding-top: 48px; } }

/* next page links at the end of a guide */
.next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 72px; }
.next a { display: block; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none !important; background: var(--card); transition: transform .2s, border-color .2s; }
.next a:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--ink) 22%, transparent); }
.next small { display: block; color: var(--muted); font-size: 14px; }
.next span { font-size: 18px; font-weight: 500; }
@media (max-width: 600px) { .next { grid-template-columns: minmax(0, 1fr); } }

/* footer */
.df { border-top: 1px solid var(--line); }
.df__in { max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gutter) 40px; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; font-size: 14px; color: var(--muted); }
.df__in a { text-decoration: none; } .df__in a:hover { color: var(--ink); }
.df__in span { margin-right: auto; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* code inside a code block keeps the block's look */
.doc pre code { background: none; padding: 0; border-radius: 0; font: inherit; color: inherit; overflow-wrap: normal; }

/* tables stack into cards on a phone */
@media (max-width: 640px) {
  .tw { border: 0; background: none; overflow: visible; }
  .tw table, .tw tbody, .tw tr, .tw td { display: block; width: 100%; }
  .tw thead { display: none; }
  .tw tr { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 12px 14px; margin-bottom: 10px; }
  .tw td { border: 0; padding: 2px 0; white-space: normal; }
  .tw td:first-child { font-weight: 600; padding-bottom: 6px; }
  .tw td code { white-space: normal; }
  .tw td:nth-child(2) { color: var(--muted); font-size: 14px; }
}
