/* desktop-books.css: GENERATED by scripts/build-assets.ts (P6). Don't edit by hand: colors come from src/brands.ts,
   polish from POLISH_CSS, page components from the units' exported CSS. Regenerate: bun scripts/build-assets.ts --css-only */

.brand-desktop-books {
  --ink: #10241F;
  --muted: #4F6662;
  --surface: #F4FAF9;
  --accent: #0B7B6E;
  --accent-ink: #ffffff;
  --accent-hover: #096a5f;
  --link: #0B7B6E;
  --focus: #0B7B6E;
  --tint: #eef9f8;
  --tint-line: #d0edea;
  --tint-strong: #c4e9e4;
  --line: #dde1e7;
  --line-strong: #c4cad3;
  --top: #2CC7B2;
  --base: #12A594;
  --deep: #0B7B6E;
  --paper: #FBF7EF;
}

.brand-desktop-books .top { border-bottom-color: #d4efec; }

/* P6 polish (scripts/build-assets.ts POLISH_CSS) */
html { scroll-padding-top: 84px; }
body { background: #fff; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
::selection { background: var(--tint-strong); }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.top-in { min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.logo { font-size: 1.12rem; letter-spacing: -0.01em; gap: 10px; min-height: 44px; }
.logo img { width: 28px; height: 28px; border-radius: 7px; }
.nav { gap: 2px; }
.nav a { padding: 8px 12px; border-radius: 8px; font-size: 0.97rem; min-height: 40px; display: inline-flex; align-items: center; }
.nav a:not(.btn):hover { background: var(--surface); }
.nav a.btn-cta { margin-left: 8px; }
@media (max-width: 720px) {
  /* phones: logo and the CTA share the first row; the links get their own row and scroll sideways if they must */
  .top-in { position: relative; gap: 4px 12px; }
  .nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -8px; padding: 0 8px 4px; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .nav a.btn-cta { position: absolute; top: 10px; right: 20px; margin: 0; min-height: 40px; padding: 8px 16px; }
  .nav:has(> a:only-child) { width: auto; margin: 0 0 0 auto; padding: 0; }
  .nav:has(> a:only-child) a.btn-cta { position: static; }
}

/* type */
main { padding-top: 28px; }
main > h1:first-child, main > .crumbs + h1 { margin-top: 16px; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(1.85rem, 1.15rem + 2.6vw, 2.85rem); line-height: 1.12; letter-spacing: -0.022em; font-weight: 750; max-width: 22em; }
h2 { font-size: clamp(1.3rem, 1.05rem + 0.9vw, 1.6rem); line-height: 1.25; letter-spacing: -0.012em; }
h3 { font-size: 1.12rem; line-height: 1.3; }
p, li { text-wrap: pretty; }
main > p, main > ul, main > ol, section > p, section > ul, section > ol { max-width: 46em; }
.lead { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem); line-height: 1.55; color: var(--muted); }
.crumbs { margin: 0 0 4px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--link); text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 10px; font-weight: 650; line-height: 1.2; border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.btn-cta, .nav a.btn-cta { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(16,24,40,.12), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-cta:hover, .nav a.btn-cta:hover { background: var(--accent-hover); }
.btn-cta:active { transform: translateY(1px); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-quiet:hover { border-color: var(--accent); }
.cta-block { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 20px 22px; border-radius: 14px; background: var(--tint); border: 1px solid var(--tint-line); }
.cta-block .muted { margin: 0; }
.hero-actions .btn-cta { padding-left: 24px; padding-right: 24px; }

/* cards, lists, callouts */
.card { background: #fff; border-color: var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card h3:first-child, .card h2:first-child { margin-top: 0; }
a.card, .card:has(> a:only-child) { text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(16,24,40,.08); }
.callout { border-radius: 10px; padding: 14px 18px; }
.callout > :first-child { margin-top: 0; } .callout > :last-child { margin-bottom: 0; }
.callout-warn { background: #fff8eb; border-color: #b4770a; }
.callout-good { background: #edf7f0; border-color: #277443; }
.notice { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.badge { white-space: nowrap; }
.link-list li::marker { color: var(--muted); }

/* tables */
.table-wrap { border: 1px solid var(--line); border-radius: 12px; margin: 14px 0; background: #fff; -webkit-overflow-scrolling: touch; }
.table-wrap > table { margin: 0; }
table { font-variant-numeric: tabular-nums; }
th { font-weight: 650; background: var(--surface); color: var(--ink); font-size: 0.9rem; }
th, td { padding: 10px 12px; }
tbody tr:last-child td { border-bottom: 0; }
caption { padding: 10px 12px 8px; color: var(--ink); }
.sheet-grid th, .sheet-grid td { padding: 4px 8px; }
.sheet-grid th { background: #f1f3f4; font-size: 13px; }
.sheet { background: #fff; }

/* code */
:not(pre) > code { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 0.88em; overflow-wrap: anywhere; }
pre { background: #161b26; color: #eef1f5; border-radius: 12px; padding: 16px 18px; line-height: 1.5; font-size: 13.5px; tab-size: 2; }
pre code { background: none; border: 0; padding: 0; color: inherit; }

/* FAQ */
.faq h3 { margin: 22px 0 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.faq h3:first-of-type { border-top: 0; padding-top: 0; }
.faq p { margin: 0; max-width: 46em; color: #2d3544; }

/* pricing */
.plans { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; margin: 20px 0; }
.plans > .plan:only-child { max-width: 560px; }
.plan { display: flex; flex-direction: column; gap: 6px; padding: 22px; }
.plan > :last-child { margin-bottom: 0; }
.plan .btn-cta { margin-top: auto; align-self: flex-start; }
.plan h2, .plan h3 { margin: 0 0 4px; }
.plan-pro { border: 2px solid var(--accent); box-shadow: 0 6px 24px rgba(16,24,40,.08); }
.plan-held { background: var(--surface); border-style: dashed; }
.price { font-size: 2.3rem; line-height: 1.1; letter-spacing: -0.02em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.per, .price .per { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-per { color: var(--muted); font-size: 0.95rem; margin: 0; }
.plan-features { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; gap: 8px; }
.plan-features li { position: relative; padding-left: 26px; }
.plan-features li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 12px; height: 7px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.period-toggle { display: inline-flex; gap: 0; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; margin: 8px 0 4px; background: #fff; }
.period-toggle legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.period-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.period-toggle label { padding: 8px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 0.95rem; min-height: 40px; display: inline-flex; align-items: center; }
.period-toggle input:checked + label { background: var(--accent); color: var(--accent-ink); }
.period-toggle input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }

/* forms (signed-in app, setup, contact) */
label { font-weight: 600; }
input[type="text"], input[type="email"], input[type="search"], input[type="url"], input[type="password"], input[type="number"], select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; max-width: 32em; }
textarea { min-height: 120px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--accent); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b3261e; }
.field { display: grid; gap: 6px; margin: 0 0 16px; }
.field-hint { color: var(--muted); font-size: 0.9rem; margin: 0; }
.field-error { color: #b3261e; font-size: 0.92rem; font-weight: 600; margin: 0; }
button { font: inherit; }
button.btn { cursor: pointer; }

/* status pills and empty states */
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #80868b; }
.status-ok::before { background: #1e8e3e; } .status-warn::before { background: #b4770a; } .status-bad::before { background: #b3261e; }
.empty-state { text-align: center; padding: 40px 20px; border: 1.5px dashed var(--line-strong); border-radius: 16px; background: var(--surface); color: var(--muted); }
.empty-state::before { content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 12px; background: url(/img/duck.svg) no-repeat center / contain; opacity: 0.9; }
.empty-state h2, .empty-state h3 { color: var(--ink); margin: 0 0 6px; }
.empty-state p { margin: 0 auto 14px; max-width: 32em; }

/* images and figures */
figure { margin: 18px 0; }
figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }
main img { border-radius: 10px; box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 30px rgba(16,24,40,.07); background: #fff; }
main .logo img, main .tile img, main img[width="24"], main img[width="32"] { box-shadow: none; border: 0; }

/* footer */
.foot { margin-top: 48px; background: var(--surface); }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot .fine:last-child::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; background: url(/img/duck.svg) no-repeat center / contain; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .top, .foot, .cta-block, .hero-actions { display: none; } a { color: inherit; } }

/* from D6 */
.brand-desktop-books .hero-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 18px 0 8px; }
.brand-desktop-books .callout-info { border-left-color: var(--accent); background: var(--tint); }
.brand-desktop-books .need p { margin: 0; }
.brand-desktop-books .cards { list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.brand-desktop-books .cards > li { margin: 0; }
.brand-desktop-books section > ul.cards, .brand-desktop-books main > ul.cards, .brand-desktop-books nav > ul.cards { max-width: none; }
.brand-desktop-books td:first-child > code { white-space: nowrap; overflow-wrap: normal; }
.brand-desktop-books .card p:last-child { margin-bottom: 0; }
.brand-desktop-books .card-link { text-decoration: none; color: var(--ink); }
.brand-desktop-books .card-link strong { color: var(--link); }
.brand-desktop-books .card-link:hover strong { text-decoration: underline; }
.brand-desktop-books .db-use h3 { margin-top: 0; }
.brand-desktop-books .db-steps { padding-left: 1.3em; display: grid; gap: 8px; max-width: 46em; }
.brand-desktop-books .db-dash { margin: 16px 0 8px; }
.brand-desktop-books .db-dash-cap { font-size: 0.9rem; color: var(--muted); margin: 0 0 6px; }
.brand-desktop-books .db-dash td:nth-child(3) { min-width: 14em; }
.brand-desktop-books .status-pill { white-space: normal; }
.brand-desktop-books .plans { display: grid; gap: 16px; list-style: none; padding: 0; }
.brand-desktop-books .plan .btn-cta { margin-top: auto; }
.brand-desktop-books .db-url { border: 1px solid var(--tint-line, var(--line)); background: var(--tint, var(--surface)); border-radius: 12px; padding: 14px 18px; margin: 18px 0; }
.brand-desktop-books .db-url p { margin: 0 0 6px; }
.brand-desktop-books .db-url p:last-child { margin: 0; }
.brand-desktop-books .db-url-label { font-weight: 650; font-size: 0.9rem; color: var(--ink); }
.brand-desktop-books .db-url-value { font-size: 1rem; overflow-wrap: anywhere; user-select: all; }
.brand-desktop-books .code-caption { margin: 16px 0 6px; font-weight: 600; }
.brand-desktop-books pre { overflow-x: auto; max-width: 100%; }
.brand-desktop-books .checked { color: var(--muted); font-size: 0.92rem; }
.brand-desktop-books .docs-main { min-width: 0; }
.brand-desktop-books .docs-main > h1 { margin-top: 0.2em; }
.brand-desktop-books .docs-nav { border-top: 1px solid var(--line); padding-top: 16px; }
.brand-desktop-books .docs-nav-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; padding: 0 10px; cursor: pointer; }
.brand-desktop-books .docs-nav details > summary { list-style: none; }
.brand-desktop-books .docs-nav details > summary::-webkit-details-marker { display: none; }
.brand-desktop-books .docs-nav details > summary::after { content: " +"; }
.brand-desktop-books .docs-nav details[open] > summary::after { content: " -"; }
.brand-desktop-books .docs-nav a { min-height: 36px; display: flex; align-items: center; }
@media (min-width: 900px) {
  .brand-desktop-books .docs-layout > .docs-nav { order: -1; border-top: 0; padding-top: 0; max-height: calc(100vh - 100px); overflow-y: auto; }
}
.brand-desktop-books .pager { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 36px 0 8px; }
@media (min-width: 640px) { .brand-desktop-books .pager { grid-template-columns: 1fr 1fr; } }
.brand-desktop-books .pager a { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 600; }
.brand-desktop-books .pager a:hover { border-color: var(--accent); }
.brand-desktop-books .pager-next { text-align: right; grid-column: -2 / -1; }
.brand-desktop-books .endpoint code { background: none; border: 0; padding: 0; }
.brand-desktop-books .news-list { list-style: none; padding: 0; }
.brand-desktop-books .news-list li { border-top: 1px solid var(--line); padding: 14px 0; }
.brand-desktop-books .news-list h2 { margin: 0 0 6px; font-size: 1.2rem; }
.brand-desktop-books .news-list p { margin: 0 0 4px; }
.brand-desktop-books .cta-block .btn-secondary { margin-left: 0; }

/* P6 overrides (after the units' CSS) */
.report, .report-preview, .sp-panel, .block { min-width: 0; }
.report, .report-preview { grid-template-columns: minmax(0, 1fr); }
.kpis { grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); }
.kpi, .card { min-width: 0; }
.kpi-value { overflow-wrap: anywhere; }
.report-table th, .report-table td { padding: 7px 10px; }
/* report tables size to their columns (a two-column pivot doesn't stretch across the page) */
.report-table { width: auto; min-width: min(100%, 380px); }
.report-table td.n { padding-left: 28px; }
.table-wrap:has(> .report-table) { width: fit-content; max-width: 100%; }
.badge { width: fit-content; justify-self: start; align-self: start; }
/* a numeric column's header sits over its numbers */
.report-table:has(tbody tr:first-child > td.n:nth-child(1)) th:nth-child(1),
.report-table:has(tbody tr:first-child > td.n:nth-child(2)) th:nth-child(2),
.report-table:has(tbody tr:first-child > td.n:nth-child(3)) th:nth-child(3),
.report-table:has(tbody tr:first-child > td.n:nth-child(4)) th:nth-child(4),
.report-table:has(tbody tr:first-child > td.n:nth-child(5)) th:nth-child(5),
.report-table:has(tbody tr:first-child > td.n:nth-child(6)) th:nth-child(6),
.report-table:has(tbody tr:first-child > td.n:nth-child(7)) th:nth-child(7),
.report-table:has(tbody tr:first-child > td.n:nth-child(8)) th:nth-child(8) { text-align: right; }
.sheet-preview .table-wrap { border-radius: 8px; }
main { overflow-wrap: break-word; }
main img, main svg, main video { max-width: 100%; height: auto; }
@media (max-width: 720px) {
  .nav a:not(.btn) { padding: 8px 10px; }
  .nav a:not(.btn):first-child { padding-left: 0; }
}
/* phones: hero buttons stack full width on both brands */
@media (max-width: 560px) { .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; } .hero-actions .btn { flex: 1 1 100%; text-align: center; } }
.hero { display: grid; gap: 24px 40px; align-items: center; }
.hero-art img { width: 100%; height: auto; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }

/* P6 Desktop Books extras (docs, API reference) */
.docs-layout { display: grid; gap: 28px; }
.docs-nav { font-size: 0.95rem; }
.docs-nav ul { list-style: none; padding: 0; margin: 0 0 16px; }
.docs-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.docs-nav a:hover, .docs-nav a[aria-current="page"] { background: var(--tint); color: var(--link); }
@media (min-width: 900px) { .docs-layout { grid-template-columns: 220px minmax(0, 1fr); } .docs-nav { position: sticky; top: 84px; align-self: start; } }
.endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.95rem; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow-wrap: anywhere; }
.method { display: inline-block; min-width: 56px; text-align: center; padding: 2px 8px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; color: #fff; background: #3e4c63; }
.method-get { background: var(--accent); } .method-post { background: #1f5fa3; } .method-delete { background: #b23f23; } .method-patch, .method-put { background: #5b3f9c; }
/* the docs nav's collapsible groups get a chevron instead of a typed "+"/"-" */
.brand-desktop-books .docs-nav details > summary::after, .brand-desktop-books .docs-nav details[open] > summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }
.brand-desktop-books .docs-nav details[open] > summary::after { transform: rotate(45deg); vertical-align: 3px; }
.kbd, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: #fff; }
