/* Conga Document Merge – one stylesheet for every service. */
:root {
  --ink: #18212b; --ink-2: #4a5663; --ink-3: #6b7783; --line: #dfe4ea; --line-2: #eef1f4;
  --bg: #f5f7f9; --surface: #fff; --brand: #0b5cad; --brand-ink: #fff; --brand-soft: #e8f1fb;
  --ok: #1d7a46; --ok-soft: #e6f4ec; --warn: #8a5a00; --warn-soft: #fdf3dc; --err: #b42318; --err-soft: #fdecea;
  --info: #0b5cad; --info-soft: #e8f1fb; --neutral: #4a5663; --neutral-soft: #eef1f4;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 12px 24px; display: flex; gap: 24px; align-items: center; }
.brand { font-weight: 650; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.logo { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--brand), #3d8fe0); display: inline-block; }
.brand-app { font-weight: 500; color: var(--ink-3); border-left: 1px solid var(--line); padding-left: 10px; text-decoration: none; }
a.brand-app:hover { color: var(--brand); text-decoration: underline; }
.topbar nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.topbar nav a { color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.topbar nav a:hover { color: var(--brand); }
.who { color: var(--ink-3); font-size: .9rem; }
.env-tag { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px;
  border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid; white-space: nowrap; }
.env-light { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: env-glow 2.4s ease-in-out infinite; }
.env-sandbox { color: #9a5b00; background: #fff4d6; border-color: #f5c451; box-shadow: 0 0 10px rgba(245, 166, 35, .45); }
.env-sandbox .env-light { background: #f5a623; }
.env-production { color: #156a3b; background: #e3f6ea; border-color: #7fd3a1; box-shadow: 0 0 10px rgba(34, 168, 90, .4); }
.env-production .env-light { background: #22a85a; }
.env-local { color: var(--ink-2); background: var(--line-2); border-color: #c9d1da; }
.env-local .env-light { background: #8a96a3; animation: none; }
@keyframes env-glow { 0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; } 50% { box-shadow: 0 0 7px 2px currentColor; opacity: .75; } }
.env-sandbox .env-light { color: #f5a623; } .env-production .env-light { color: #22a85a; }
@media (prefers-reduced-motion: reduce) { .env-light { animation: none; } }
.shell { width: 100%; max-width: 920px; margin: 0 auto; padding: 28px 24px 48px; flex: 1; }
.shell-wide { max-width: 1120px; }
.page-head h1 { font-size: 1.6rem; margin: 6px 0 4px; letter-spacing: -.01em; }
.subtitle { color: var(--ink-2); margin: 0 0 20px; max-width: 70ch; }
.footer { color: var(--ink-3); font-size: .82rem; text-align: center; padding: 18px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 760px; margin: 0 auto; }
.footer p { margin: 0 0 6px; }
.footer p:last-child { margin-bottom: 0; }
.footer-team { color: var(--ink-2); }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 18px 0 8px; }
p { margin: 0 0 12px; }
.muted, .hint, .empty { color: var(--ink-3); }
.hint { font-size: .86rem; margin: 4px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 16px 0; box-shadow: var(--shadow); }
.card-muted { background: #fafbfc; box-shadow: none; }
.card-highlight { border-color: #b8d3f0; background: #fbfdff; }
.stepper { list-style: none; padding: 0; margin: 0 0 18px; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: s; }
.step { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; font-size: .88rem; color: var(--ink-3); background: var(--surface); border: 1px solid var(--line); }
.step .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 650; background: var(--line-2); color: var(--ink-2); }
.step-current { color: var(--ink); border-color: var(--brand); font-weight: 600; }
.step-current .dot { background: var(--brand); color: #fff; }
.step-done .dot { background: var(--ok); color: #fff; }
.step-done { color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; font-size: .93rem; cursor: pointer; text-decoration: none; border: 1px solid transparent; line-height: 1.2; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: #094c8f; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: #c9d1da; }
.btn-secondary:hover { background: var(--line-2); }
.btn-danger { background: var(--surface); color: var(--err); border-color: #f1b8b2; }
.btn-link { background: none; color: var(--brand); padding: 6px 4px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-small { padding: 5px 10px; font-size: .85rem; }
.btn.is-busy, .btn.is-busy[disabled] { opacity: .65; cursor: progress; pointer-events: none; }
.btn.is-busy::before { content: ""; width: 13px; height: 13px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::before { animation-duration: 2s; } }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.actions-end { justify-content: flex-end; }
.actions-between { justify-content: space-between; }
.field { margin: 0 0 14px; }
fieldset.field { border: 0; padding: 0; }
fieldset.field legend { font-weight: 600; font-size: .9rem; margin-bottom: 5px; padding: 0; }
.field select.input { width: 100%; }
.field label, .copy label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.input { width: 100%; padding: 9px 11px; border: 1px solid #c9d1da; border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
.input:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid #9cc3ee; outline-offset: 1px; }
textarea.input { resize: vertical; }
.copy { margin: 10px 0; }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1; font-size: .85rem; }
.alert { border-radius: 8px; padding: 11px 14px; margin: 12px 0; border: 1px solid; }
.alert-info { background: var(--info-soft); border-color: #c4dbf3; }
.alert-success { background: var(--ok-soft); border-color: #bfe3cd; }
.alert-warning { background: var(--warn-soft); border-color: #f3dca5; }
.alert-error { background: var(--err-soft); border-color: #f3c3bd; }
.badge { display: inline-block; font-size: .78rem; font-weight: 650; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-success { background: var(--ok-soft); color: var(--ok); }
.badge-warning { background: var(--warn-soft); color: var(--warn); }
.badge-error { background: var(--err-soft); color: var(--err); }
.badge-neutral { background: var(--neutral-soft); color: var(--neutral); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); background: #fafbfc; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .row-title { font-weight: 600; }
.sub { display: block; color: var(--ink-3); font-size: .84rem; font-weight: 400; }
.table td { overflow-wrap: anywhere; }
.table-buttons { table-layout: fixed; }
.table-fit { overflow-x: hidden; }
.table-buttons .c-button { width: 31%; } .table-buttons .c-template { width: 21%; } .table-buttons .c-output { width: 9%; }
.table-buttons .c-status { width: 27%; } .table-buttons .c-action { width: 12%; }
.table-buttons .cell-action { text-align: right; }
.table-buttons .cell-action .btn { white-space: nowrap; }
.next-step { margin-top: 4px; }
.section-row td { background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .85rem; }
.howto { margin: 0; padding-left: 22px; } .howto li { margin: 4px 0; }
.group-row td { background: #fafbfc; font-weight: 650; color: var(--ink-2); font-size: .85rem; }
.definition { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 8px 18px; margin: 0; }
.definition dt { color: var(--ink-3); font-size: .9rem; }
.definition dd { margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.chip { text-decoration: none; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); padding: 5px 12px; border-radius: 999px; font-size: .88rem; }
.chip-active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.chip-count { font-weight: 700; margin-left: 4px; }
.details { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin: 12px 0; }
.details summary { cursor: pointer; padding: 11px 14px; font-weight: 600; }
.details > div { padding: 0 14px 12px; }
.list { margin: 6px 0 12px; padding-left: 20px; }
.list li { margin: 3px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 4px; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fafbfc; }
.stat strong { display: block; font-size: 1.4rem; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; cursor: pointer; }
.choice input { margin-top: 4px; }
.samples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 12px; font-size: .88rem; }
.suggest button { border: 1px dashed #b7c3cf; background: #fff; border-radius: 999px; padding: 3px 10px; cursor: pointer; font: inherit; font-size: .85rem; color: var(--ink-2); }
.suggest button:hover { border-color: var(--brand); color: var(--brand); }
.result-ok { color: var(--ok); font-weight: 600; }
.result-fail { color: var(--err); font-weight: 600; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.progress { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.doc-card { display: flex; gap: 16px; align-items: center; }
.doc-icon { width: 46px; height: 56px; border-radius: 6px; background: var(--brand-soft); border: 1px solid #c4dbf3; display: grid; place-items: center; font-weight: 700; font-size: .78rem; color: var(--brand); flex: none; }
.inline-form { display: inline; }
.hidden { display: none !important; }
@media (max-width: 720px) {
  .definition, .split, .samples { grid-template-columns: 1fr; }
  .table-buttons colgroup, .table-buttons thead { display: none; }
  .table-buttons, .table-buttons tbody, .table-buttons tr, .table-buttons td { display: block; width: 100%; }
  .table-buttons tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .table-buttons td { border: 0; padding: 4px 12px; }
  .table-buttons td[data-label="Template"]::before, .table-buttons td[data-label="Output"]::before { content: attr(data-label) ": "; color: var(--ink-3); font-size: .84rem; }
  .table-buttons .cell-action { text-align: left; padding-bottom: 10px; }
  .topbar-inner { flex-wrap: wrap; gap: 10px; }
  /* a corner flag: pinned to the header's top-right corner, with room left above the brand */
  .topbar { position: relative; }
  .topbar-inner { padding-top: 26px; }
  .env-tag { position: absolute; top: 0; right: 0; margin: 0; border-width: 0 0 1px 1px; border-radius: 0 0 0 10px;
             padding: 3px 10px 3px 9px; font-size: .66rem; }
}
/* Demo Salesforce record page */
.sf-shell { max-width: 1120px; }
.sf-header { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; box-shadow: var(--shadow); }
.sf-object { color: var(--ink-3); font-size: .85rem; }
.sf-title { font-size: 1.35rem; font-weight: 650; margin: 2px 0 0; }
.sf-buttons { display: flex; gap: 0; flex-wrap: wrap; }
.sf-buttons .btn { border-radius: 0; margin-left: -1px; }
.sf-buttons .btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.sf-buttons .btn:last-child { border-radius: 0 8px 8px 0; }
.sf-tag { display: block; font-size: .7rem; font-weight: 600; color: var(--ink-3); }
.topbar.sf-banner { background: #032d60; border-bottom-color: #032d60; }
.topbar.sf-banner .topbar-inner { color: #fff; }
.topbar.sf-banner .brand-app, .topbar.sf-banner nav a, .topbar.sf-banner .who { color: #d5e5f7; border-color: #3b5f8c; }
.topbar.sf-banner nav a:hover { color: #fff; }
.guide-step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.guide-step:first-child { border-top: 0; }
.guide-num { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; }

/* Demo walkthrough (/demo/ on the setup service): banner, step bar, disabled actions */
.demo-banner { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--line);
  padding: 8px 16px; font-size: .875rem; text-align: center; }
.demo-banner a { color: inherit; font-weight: 600; }
body.demo { padding-bottom: 120px; }
.demo-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface);
  border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(16,24,40,.08); }
.demo-nav-inner { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 16px;
  align-items: center; justify-content: space-between; }
.demo-step { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.demo-count { font-weight: 600; font-size: .875rem; }
.demo-note { color: var(--ink-2); font-size: .875rem; }
.demo-actions { display: flex; gap: 8px; flex: none; }
.demo-off { opacity: .45; pointer-events: none; cursor: default; }
.demo-list { margin: 0 0 16px; padding-left: 0; list-style: none; }
.demo-list li { padding: 8px 0; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; }
.demo-list .sub { color: var(--ink-3); font-size: .875rem; }
@media (max-width: 720px) {
  body.demo { padding-bottom: 170px; }
  .demo-nav-inner { flex-direction: column; align-items: stretch; gap: 8px; }
  .demo-actions .btn { flex: 1; text-align: center; }
}
