/* Zoho Analytics SDK documentation
   Swiss / International Typographic. Hairlines, not cards.
   Generated by tools/sdkdocs -- edit the generator, not this file. */

:root {
    --paper: #FBFAF7;
    --paper2: #F1EEE7;
    --paper3: #E7E3D9;
    --ink: #15140F;
    --ink2: #5A554A;
    --ink3: #7D776A;
    --rule: #DAD5C9;
    --accent: #B01208;
    --accentInk: #FBFAF7;
    --accentWash: #F6E7E3;
    --measure: 74ch;
    --rail: 17rem;
    --index: 15.5rem;
    --gutter: clamp(1.25rem, 4vw, 4.5rem);

    /* Type: grotesque for structure, serif for prose, mono for data. */
    --font-ui: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-prose: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Strict scale. Nothing outside this list is used. */
    --t-2xs: 0.6875rem;
    --t-xs:  0.75rem;
    --t-sm:  0.8125rem;
    --t-md:  0.9375rem;
    --t-base: 1.0625rem;
    --t-lg:  1.1875rem;
    --t-xl:  1.5rem;
    --t-2xl: 2.125rem;
    --t-3xl: 3rem;
    --t-4xl: clamp(2.75rem, 7vw, 5rem);

    --lede: 1.25rem;
    --step: 1.5rem;
    --section: 4rem;
    --tracking-kicker: 0.16em;
    --speed: 160ms;
}

[data-theme="dark"] {
    --paper: #100F0C;
    --paper2: #1A1915;
    --paper3: #24231D;
    --ink: #F4F1E8;
    --ink2: #A49E90;
    --ink3: #8A8477;
    --rule: #2E2C26;
    --accent: #FF6B52;
    --accentInk: #100F0C;
    --accentWash: #2A1A16;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
    --paper: #100F0C;
    --paper2: #1A1915;
    --paper3: #24231D;
    --ink: #F4F1E8;
    --ink2: #A49E90;
    --ink3: #8A8477;
    --rule: #2E2C26;
    --accent: #FF6B52;
    --accentInk: #100F0C;
    --accentWash: #2A1A16;
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-prose);
    font-size: var(--t-base);
    line-height: 1.65;
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
}

/* ---------------------------------------------------------------- a11y */

.skip {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--accent); color: var(--accentInk);
    padding: 0.85rem 1.25rem;
    font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600;
    letter-spacing: 0.04em; text-decoration: none;
}
.skip:focus { left: 0; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 1px;
}

::selection { background: var(--accent); color: var(--accentInk); }

/* ------------------------------------------------------------- shell */

.shell {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    min-height: 100vh;
}

/* ------------------------------------------------------- navigation */

.rail {
    border-right: 1px solid var(--rule);
    padding: 2rem 1.5rem 4rem;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--paper);
}

.brand { display: block; text-decoration: none; color: inherit; margin-bottom: 2.25rem; }
.brand__mark {
    font-family: var(--font-mono); font-size: var(--t-2xs); font-weight: 700;
    letter-spacing: var(--tracking-kicker); text-transform: uppercase;
    color: var(--accent); display: block; margin-bottom: 0.4rem;
}
.brand__name {
    font-family: var(--font-ui); font-size: var(--t-lg); font-weight: 600;
    letter-spacing: -0.02em; line-height: 1.15; display: block;
}
.brand__lang {
    font-family: var(--font-mono); font-size: var(--t-xs);
    color: var(--ink2); display: block; margin-top: 0.3rem;
}

.nav h2 {
    font-family: var(--font-mono); font-size: var(--t-2xs); font-weight: 700;
    letter-spacing: var(--tracking-kicker); text-transform: uppercase;
    color: var(--ink3); margin: 2rem 0 0.75rem;
    padding-bottom: 0.5rem; border-bottom: 1px solid var(--rule);
}
.nav h2:first-child { margin-top: 0; }
.nav ul { list-style: none; margin: 0; padding: 0; }

.nav a {
    display: block; padding: 0.4rem 0 0.4rem 0.85rem;
    font-family: var(--font-ui); font-size: var(--t-md);
    color: var(--ink2); text-decoration: none;
    border-left: 2px solid transparent;
    transition: color var(--speed), border-color var(--speed);
}
.nav a:hover { color: var(--ink); border-left-color: var(--rule); }
.nav a[aria-current="page"] {
    color: var(--accent); font-weight: 600; border-left-color: var(--accent);
}

/* ------------------------------------------------------------ main */

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: 0.75rem var(--gutter);
    border-bottom: 1px solid var(--rule);
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(8px);
}

.crumbs {
    font-family: var(--font-mono); font-size: var(--t-xs);
    color: var(--ink3); letter-spacing: 0.04em;
    display: flex; gap: 0.5rem; align-items: center; min-width: 0;
}
.crumbs a { color: var(--ink2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs span[aria-hidden] { color: var(--rule); }

.controls { display: flex; gap: 0.5rem; align-items: center; }

button.ctl {
    min-height: 44px; min-width: 44px;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    background: transparent; color: var(--ink2);
    border: 1px solid var(--rule); border-radius: 2px;
    font-family: var(--font-mono); font-size: var(--t-xs);
    letter-spacing: 0.06em; text-transform: uppercase;
    padding: 0 0.85rem; cursor: pointer;
    transition: color var(--speed), border-color var(--speed);
}
button.ctl:hover { color: var(--accent); border-color: var(--accent); }

button.nav-toggle { display: none; }

/* --------------------------------------------------------- content */

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--index);
    gap: var(--gutter);
    padding: 0 var(--gutter) 6rem;
    align-items: start;
}

.article { max-width: var(--measure); padding-top: 3.5rem; min-width: 0; }

/* Editorial page header */
.page-head { margin-bottom: var(--section); }
.page-head__kicker {
    font-family: var(--font-mono); font-size: var(--t-2xs); font-weight: 700;
    letter-spacing: var(--tracking-kicker); text-transform: uppercase;
    color: var(--accent); margin: 0 0 1.25rem;
    display: flex; align-items: center; gap: 0.75rem;
}
.page-head__kicker::after {
    content: ""; flex: 1; height: 1px; background: var(--rule);
}
.page-head h1 {
    font-family: var(--font-ui); font-weight: 700;
    font-size: var(--t-4xl); line-height: 0.98; letter-spacing: -0.035em;
    margin: 0 0 1.25rem; text-wrap: balance;
}
.page-head__lede {
    font-size: var(--lede); line-height: 1.5; color: var(--ink2);
    margin: 0; max-width: 58ch;
}

/* Prose */
.article h2 {
    font-family: var(--font-ui); font-weight: 600;
    font-size: var(--t-2xl); line-height: 1.12; letter-spacing: -0.025em;
    margin: var(--section) 0 1rem;
    padding-top: 1.25rem; border-top: 1px solid var(--rule);
    position: relative;
}
.article h3 {
    font-family: var(--font-ui); font-weight: 600;
    font-size: var(--t-xl); line-height: 1.2; letter-spacing: -0.02em;
    margin: 2.75rem 0 0.75rem;
}
.article h4 {
    font-family: var(--font-mono); font-weight: 700;
    font-size: var(--t-sm); letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ink2); margin: 2rem 0 0.6rem;
}
.article p { margin: 0 0 var(--step); }
.article > p:first-of-type { margin-top: 0; }

.article a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.article a:hover { text-decoration-thickness: 2px; }

.anchor {
    margin-left: 0.5rem; color: var(--ink3); text-decoration: none;
    font-family: var(--font-mono); font-weight: 400;
    opacity: 0; transition: opacity var(--speed);
    font-size: 0.7em;
}
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor,
.anchor:focus-visible { opacity: 1; }

:target { scroll-margin-top: 6rem; }
:target > .anchor { opacity: 1; color: var(--accent); }

.article ul, .article ol { margin: 0 0 var(--step); padding-left: 1.3rem; }
.article li { margin-bottom: 0.4rem; }
.article li::marker { color: var(--accent); }
.article ul ul, .article ol ol { margin: 0.4rem 0 0; }

.article code {
    font-family: var(--font-mono); font-size: 0.86em;
    background: var(--paper2); border: 1px solid var(--rule);
    padding: 0.1em 0.35em; border-radius: 2px;
    word-break: break-word;
}

hr { border: 0; border-top: 1px solid var(--rule); margin: var(--section) 0; }

blockquote {
    margin: 0 0 var(--step); padding-left: 1.25rem;
    border-left: 2px solid var(--accent); color: var(--ink2); font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

/* Code blocks: hairline frame, tinted fill, no shadow, no big radius. */
figure.code {
    margin: 0 0 var(--step); border: 1px solid var(--rule); border-radius: 2px;
    background: var(--paper2); overflow: hidden;
}
figure.code figcaption {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 0.85rem; border-bottom: 1px solid var(--rule);
    font-family: var(--font-mono); font-size: var(--t-2xs);
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3);
    background: var(--paper3);
}
figure.code pre {
    margin: 0; padding: 1.1rem 1.25rem; overflow-x: auto;
    font-family: var(--font-mono); font-size: var(--t-sm); line-height: 1.7;
    tab-size: 4;
}
figure.code pre code {
    background: none; border: 0; padding: 0; font-size: inherit; word-break: normal;
}
/* The default scrollbar renders as a bright bar against the dark theme. */
figure.code pre, .table-scroll, .index ul, .rail {
    scrollbar-width: thin;
    scrollbar-color: var(--rule) transparent;
}
figure.code pre::-webkit-scrollbar, .table-scroll::-webkit-scrollbar { height: 8px; }
figure.code pre::-webkit-scrollbar-track, .table-scroll::-webkit-scrollbar-track { background: transparent; }
figure.code pre::-webkit-scrollbar-thumb, .table-scroll::-webkit-scrollbar-thumb {
    background: var(--rule); border-radius: 4px;
}
button.copy {
    background: none; border: 1px solid transparent; color: var(--ink3);
    font: inherit; letter-spacing: inherit; text-transform: inherit;
    cursor: pointer; padding: 0.2rem 0.45rem; border-radius: 2px;
}
button.copy:hover { color: var(--accent); border-color: var(--rule); }
button.copy[data-copied] { color: var(--accent); }

/* Tables: rules only, no zebra fills, numerals aligned. */
.table-scroll { overflow-x: auto; margin: 0 0 var(--step); border-top: 1px solid var(--ink); }
table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: var(--t-md); }
th, td { padding: 0.7rem 1rem 0.7rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
th {
    font-family: var(--font-mono); font-size: var(--t-2xs); font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink2);
    white-space: nowrap;
}
td code { font-size: 0.85em; }
.ta-right { text-align: right; font-variant-numeric: tabular-nums; }
.ta-center { text-align: center; }

/* Callouts: a rule and a label, not a rounded tinted card. */
.callout {
    margin: 0 0 var(--step); padding: 1.1rem 0 1.1rem 1.35rem;
    border-left: 3px solid var(--accent); background: var(--accentWash);
    padding-right: 1.35rem; border-radius: 0 2px 2px 0;
}
.callout__kind {
    font-family: var(--font-mono); font-size: var(--t-2xs); font-weight: 700;
    letter-spacing: var(--tracking-kicker); text-transform: uppercase;
    color: var(--accent); margin: 0 0 0.35rem;
}
.callout__title {
    font-family: var(--font-ui); font-weight: 600; font-size: var(--t-lg);
    letter-spacing: -0.015em; margin: 0 0 0.5rem; line-height: 1.3;
}
.callout__body > :last-child { margin-bottom: 0; }
.callout__body { font-size: var(--t-md); }
.callout--note    { border-left-color: var(--ink2); background: var(--paper2); }
.callout--note .callout__kind { color: var(--ink2); }
.callout--limit   { border-left-color: var(--ink); background: var(--paper2); }
.callout--limit .callout__kind { color: var(--ink); }
.callout--tip     { border-left-color: var(--ink3); background: var(--paper2); }
.callout--tip .callout__kind { color: var(--ink2); }
.callout--danger  { border-left-width: 5px; }

/* ------------------------------------------------- method reference */

.method {
    border-top: 1px solid var(--rule);
    padding-top: 1.75rem; margin-top: 2.5rem;
}
.method__sig {
    font-family: var(--font-mono); font-size: var(--t-sm); line-height: 1.6;
    background: var(--paper2); border: 1px solid var(--rule); border-radius: 2px;
    padding: 0.75rem 0.9rem; margin: 0 0 1rem; overflow-x: auto;
    white-space: pre-wrap; word-break: break-word;
}
.method h3 { margin-top: 0; }

/* ------------------------------------------------------ index rail */

.index { position: sticky; top: 5rem; padding-top: 3.5rem; font-family: var(--font-ui); }
.index h2 {
    font-family: var(--font-mono); font-size: var(--t-2xs); font-weight: 700;
    letter-spacing: var(--tracking-kicker); text-transform: uppercase;
    color: var(--ink3); margin: 0 0 0.85rem;
    padding-bottom: 0.5rem; border-bottom: 1px solid var(--rule);
}
.index ul { list-style: none; margin: 0; padding: 0; max-height: 70vh; overflow-y: auto; }
.index li a {
    display: block; padding: 0.3rem 0 0.3rem 0.75rem;
    font-size: var(--t-sm); color: var(--ink3); text-decoration: none;
    border-left: 2px solid var(--rule); line-height: 1.4;
    overflow-wrap: anywhere; hyphens: auto;
}
.index li a:hover { color: var(--ink); }
.index li a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); }
.index li.lvl-3 a { padding-left: 1.5rem; font-size: var(--t-xs); }

/* ---------------------------------------------------------- pager */

.pager {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    margin-top: var(--section); border-top: 1px solid var(--rule);
    background: var(--rule);
}
.pager a {
    background: var(--paper); padding: 1.5rem 0; text-decoration: none; color: inherit;
}
.pager a:last-child { text-align: right; padding-left: 1.5rem; }
.pager a:first-child { padding-right: 1.5rem; }
.pager span {
    display: block; font-family: var(--font-mono); font-size: var(--t-2xs);
    letter-spacing: var(--tracking-kicker); text-transform: uppercase;
    color: var(--ink3); margin-bottom: 0.35rem;
}
.pager strong {
    font-family: var(--font-ui); font-size: var(--t-lg); font-weight: 600;
    letter-spacing: -0.02em; color: var(--ink);
}
.pager a:hover strong { color: var(--accent); }

/* --------------------------------------------------- landing cards */
/* Index list, not a grid of boxes: numbered editorial rows. */
.toc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.toc-list li { border-bottom: 1px solid var(--rule); }
.toc-list a {
    display: grid; grid-template-columns: 3.5rem 1fr; gap: 1.25rem;
    padding: 1.4rem 0; text-decoration: none; color: inherit; align-items: baseline;
}
.toc-list .num {
    font-family: var(--font-mono); font-size: var(--t-xl); font-weight: 700;
    color: var(--rule); line-height: 1; font-variant-numeric: tabular-nums;
    transition: color var(--speed);
}
.toc-list a:hover .num { color: var(--accent); }
.toc-list .ttl {
    font-family: var(--font-ui); font-size: var(--t-xl); font-weight: 600;
    letter-spacing: -0.02em; display: block; margin-bottom: 0.3rem; line-height: 1.2;
}
.toc-list a:hover .ttl { color: var(--accent); }
.toc-list .dsc { color: var(--ink2); font-size: var(--t-md); display: block; }

footer.foot {
    border-top: 1px solid var(--rule); margin-top: var(--section);
    padding-top: 1.5rem; font-family: var(--font-mono); font-size: var(--t-xs);
    color: var(--ink3); display: flex; flex-wrap: wrap; gap: 1rem;
    justify-content: space-between;
}
footer.foot a { color: var(--ink2); }

/* ------------------------------------------------------ responsive */

@media (max-width: 1180px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .index { display: none; }
}

@media (max-width: 900px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    button.nav-toggle { display: inline-flex; }
    .rail {
        position: fixed; inset: 0 auto 0 0; width: min(21rem, 86vw);
        z-index: 40; transform: translateX(-100%);
        transition: transform var(--speed) ease;
        border-right: 1px solid var(--rule);
    }
    .rail[data-open="true"] { transform: none; }
    .scrim {
        position: fixed; inset: 0; z-index: 30; border: 0; padding: 0;
        background: color-mix(in srgb, var(--ink) 45%, transparent);
    }
    .article { padding-top: 2.5rem; }
    .page-head { margin-bottom: 2.5rem; }
    :root { --section: 3rem; }
}

@media print {
    .rail, .index, .topbar, .pager, button { display: none !important; }
    .shell, .layout { display: block; }
    body { background: #fff; color: #000; }
    .article { max-width: none; }
    figure.code, .callout { break-inside: avoid; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
