/* Developer documentation at api.azantimes.in. The pages are generated by
   scripts/docs-pages.mjs; js/brand-controls.js reads the colour tokens below. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2?v=ccb4573ce18a') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2?v=ccb4573ce18a') format('woff2');
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-next-latin.woff2?v=ccb4573ce18a') format('woff2');
}

:root {
  color-scheme: light;
  /* To match the dashboard, set --sans to 'Atkinson Hyperlegible Next' first. */
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --forest: #173b33;
  --green: #245b47;
  --green-dark: #163f32;
  --gold: #c5a366;
  --gold-light: #d7bc78;
  --gold-text: #8a6a23;
  --bg: #f8f9f5;
  --surface: #fff;
  --soft: #edf3ec;
  --shade: #e6efe3;
  --cream: #f3f1e6;
  --cream-line: #e4d9b8;
  --text: #273d35;
  --muted: #5f6d65;
  --line: #e6eae3;
  --line-strong: #d5ddd2;
  --ok: #3f9a6b;
  --danger: #9e4735;
  --code-bg: #102620;
  --code-bar: #0b1d18;
  --code-line: #21423a;
  --code-text: #e2e9df;
  --code-muted: #a8bfb3;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--text); font: 15px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
button, select, input { font: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 50; padding: 10px 16px; border-radius: 7px; background: var(--forest); color: #fff; transform: translateY(-160%); }
.skip:focus { transform: none; color: #fff; }
.ic { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* No ligatures in code: => and === must look exactly as they are typed. */
.mono, code, pre { font-family: var(--mono); font-variant-ligatures: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); border-top: 3px solid var(--gold); border-bottom: 1px solid var(--line); }
.hdr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; min-height: 64px; padding: 8px clamp(16px, 3vw, 28px); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: auto; height: 32px; }
.brand-div { width: 1px; height: 22px; background: var(--line-strong); }
.brand-name { color: var(--forest); font-size: 15px; font-weight: 600; }
.hdr-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.hdr-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.tl { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--text); font-size: 14px; font-weight: 500; }
.tl:hover { color: var(--forest); text-decoration: none; box-shadow: inset 0 -2px 0 var(--line-strong); }
.tl[aria-current] { color: var(--forest); font-weight: 600; box-shadow: inset 0 -2px 0 var(--gold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid transparent; border-radius: 7px; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.btn:hover { text-decoration: none; }
.btn-p { background: var(--forest); color: #fff; }
.btn-p:hover { background: #0f2b24; color: #fff; }
.btn-s { background: var(--surface); color: var(--forest); border-color: var(--line-strong); }
.btn-s:hover { background: var(--bg); color: var(--forest); border-color: var(--gold); }

/* Shell: sidebar and content */
.shell { display: flex; flex-wrap: wrap; align-items: stretch; }
.side { flex: 1 1 240px; min-width: 0; max-width: 290px; background: var(--bg); border-right: 1px solid var(--line); }
.side-in { position: sticky; top: var(--header-h); max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 20px 14px 32px; }
.version { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13.5px; }
.version span:first-child { color: var(--muted); }
.version strong { display: inline-flex; align-items: center; gap: 6px; color: var(--forest); font-weight: 600; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.sg { margin: 22px 10px 4px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.sl { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border-radius: 6px; color: var(--text); font-size: 14px; }
.sl:hover { background: var(--soft); color: var(--forest); text-decoration: none; }
.sl[aria-current] { background: var(--shade); color: var(--green-dark); font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
.main { flex: 999 1 560px; min-width: 0; padding: 36px clamp(16px, 4vw, 56px) 64px; }
.wrap { max-width: 1000px; }
.mnav { display: none; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.mnav > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px; color: var(--forest); font-weight: 600; list-style: none; cursor: pointer; }
.mnav > summary::-webkit-details-marker { display: none; }
.mnav[open] > summary .ic { transform: rotate(180deg); }
.mnav > nav { padding: 0 8px 8px; }
.mnav .sg:first-child { margin-top: 4px; }

/* Typography */
.crumb { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--forest); }
.crumb .sep { margin: 0 6px; color: var(--gold); }
.h1 { color: var(--forest); font-size: clamp(28px, 3.2vw, 36px); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
.h2 { color: var(--forest); font-size: 22px; font-weight: 650; line-height: 1.3; letter-spacing: -.015em; }
.h3 { color: var(--forest); font-size: 16px; font-weight: 600; line-height: 1.4; }
.h4 { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.lead { max-width: 720px; margin-top: 10px; font-size: 16.5px; line-height: 1.7; }
.lead-lg { font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sec { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.mt-s { margin-top: 12px; }
.mt { margin-top: 24px; }
.mt-l { margin-top: 36px; }
.c { padding: 1px 6px; border: 1px solid #e9e3cf; border-radius: 5px; background: var(--cream); color: var(--forest); font-size: .86em; white-space: nowrap; }
.pl { color: var(--gold-text); }
.mb { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 36px; padding: 2px 6px; border-radius: 4px; background: var(--shade); color: var(--green); font: 700 11px/1.45 var(--mono); letter-spacing: .03em; }
.mb-d { background: #1d4337; color: #9bc7ab; }
.pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 5px; background: var(--shade); color: var(--green); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill-g { background: var(--cream); color: #6e5320; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(var(--min, 240px), 1fr)); }
ul.list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; padding: 0 0 0 20px; font-size: 14.5px; }

/* Cards, tiles and notes */
.tile { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.tile-k { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.tile-v { color: var(--forest); font-size: 15px; font-weight: 600; }
.tile-copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.tile-copy code { color: var(--forest); font-size: 13.5px; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px 24px; margin: 12px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { color: var(--muted); font-size: 13px; }
.stats dd { margin: 0; color: var(--forest); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.card { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.card p { margin-top: 10px; font-size: 14.5px; }
.card-t { display: flex; align-items: center; gap: 10px; }
.icb { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--soft); color: var(--green); }
.num { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--forest); color: var(--gold-light); font-size: 13px; font-weight: 700; }
.ql { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 14px; line-height: 1.55; }
.ql .ic { color: var(--gold-text); }
.ql:hover { border-color: var(--gold); color: var(--text); text-decoration: none; box-shadow: 0 2px 10px rgba(23, 59, 51, .07); }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--cream-line); border-radius: 10px; background: var(--cream); font-size: 14.5px; }
.note > .ic { margin-top: 2px; color: var(--gold-text); }
.note strong { color: var(--forest); }
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
/* Paths break after a slash (<wbr>), and only mid-word when a segment cannot fit. */
.path code { min-width: 0; color: var(--forest); font-size: 13.5px; overflow-wrap: anywhere; }
.ep-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 32px; }
.ep-link code { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.ep-name { color: var(--forest); font-size: 13.5px; font-weight: 600; }
.params { border-top: 1px solid var(--line); }
.param { padding: 12px 0; border-bottom: 1px solid var(--line); }
.param-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.param-h code { color: var(--forest); font-size: 13.5px; font-weight: 600; }
.param-t { color: var(--muted); font-size: 13px; }
.param-r { color: var(--gold-text); font-size: 12px; font-weight: 600; }
.param p { margin-top: 4px; font-size: 14.5px; }
.tree { margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--line-strong); }
.tr { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; font-size: 14px; line-height: 2; }
.tr code { color: var(--forest); }
.tr .dir { font-weight: 600; }
.tr span:last-child:not(:first-child) { color: var(--muted); font-size: 13.5px; }
.link-a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 600; }

/* Tables */
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--text); line-height: 1.55; text-align: left; vertical-align: top; }
.tbl thead th { background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.tbl tbody th { color: var(--forest); font-weight: 500; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl .mono { font-size: 13px; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.status-dot.bad::before { background: var(--danger); }

/* Code blocks */
.cb { overflow: hidden; border: 1px solid var(--forest); border-radius: 10px; background: var(--code-bg); }
.cbh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; min-height: 44px; padding: 0 8px 0 4px; border-bottom: 1px solid var(--code-line); background: var(--code-bar); }
.cb-label { padding-left: 10px; color: var(--code-muted); font: 12.5px var(--mono); }
.tabs { display: flex; flex-wrap: wrap; }
.tab { min-height: 44px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--code-muted); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.tab:hover { color: #fff; }
.tab[aria-selected="true"] { border-bottom-color: var(--gold); color: #fff; }
.code { margin: 0; padding: 14px 0; overflow-x: auto; color: var(--code-text); font-size: 13px; line-height: 21px; tab-size: 2; counter-reset: line; }
.code code { display: block; min-width: max-content; padding: 0 16px; font: inherit; }
.code.numbered code { padding-left: 0; }
.code.numbered .line::before { display: inline-block; width: 46px; padding-right: 16px; color: #7a9788; text-align: right; counter-increment: line; content: counter(line); user-select: none; }
.cb-out { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 16px; border-top: 1px solid var(--code-line); background: var(--code-bar); font: 13px var(--mono); }
.cb-out span { color: var(--gold-light); }
.cb-out code { color: var(--code-text); white-space: pre-wrap; }
.t-k { color: #9bc7ab; }
.t-s { color: var(--gold-light); }
.t-n { color: #b9d3e3; }
.t-p { color: #82a092; }
.t-c { color: #8fa697; font-style: italic; }
.t-kw { color: #ecb38f; }
.cp, .cpl { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none; }
.cp { border: 1px solid #2c4d43; background: transparent; color: #c9dacf; }
.cp:hover { border-color: var(--gold); color: #fff; text-decoration: none; }
.cpl { border: 1px solid var(--line-strong); background: var(--surface); color: var(--forest); }
.cpl:hover { border-color: var(--gold); }

/* Try it */
.try-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--bg); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-wide { flex: 1 1 320px; }
.field label { color: var(--forest); font: 600 13px var(--mono); }
.field .bc-control, .field select { width: 100%; max-width: 420px; }
.field select { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); }
.try-none { color: var(--muted); font-size: 14px; }
.try-form .btn { margin-left: auto; }
.console { overflow: hidden; border: 1px solid var(--forest); border-radius: 0 0 10px 10px; background: var(--code-bg); }
.console-url { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--code-line); }
.console-url .mb { margin-top: 1px; }
.console-url code { flex: 1 1 240px; min-width: 0; color: var(--code-text); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.console-url code .base { color: #82a092; white-space: nowrap; }
.console-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--code-line); background: var(--code-bar); }
.console-status { display: inline-flex; align-items: center; gap: 8px; color: #c9dacf; font: 12.5px var(--mono); }
.console-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7a9788; }
.console-status[data-state="ok"]::before { background: #5fbf8a; }
.console-status[data-state="error"]::before { background: #e08a74; }
.segs { display: flex; gap: 2px; }
.seg { min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--code-muted); font-size: 13px; font-weight: 500; cursor: pointer; }
.seg:hover { color: #fff; }
.seg[aria-pressed="true"] { background: #1d4337; color: #fff; }
.console-body { max-height: 560px; overflow: auto; }
.console-body .code { overflow: visible; }
.console-error { margin: 0; padding: 14px 16px; color: #f2c2b4; font-size: 14px; }
.console-preview { max-height: 560px; overflow: auto; padding: 20px; background: var(--bg); }
.console[aria-busy="true"] .console-body { opacity: .6; }

/* Preview of a response */
.pv-card { max-width: 760px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pv-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pv-name { color: var(--forest); font-size: 16px; font-weight: 600; }
.pv-sub { color: var(--muted); font-size: 13.5px; }
.pv-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 14px; }
.pv-time { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.pv-time span { display: block; color: var(--muted); font-size: 13px; }
.pv-time strong { display: block; color: var(--forest); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pv-time code { color: var(--gold-text); font-size: 11.5px; }
.pv-note { margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.pv-note code { color: var(--forest); font-size: 12.5px; }
.pv-foot { margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.pv-rows { max-width: 760px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pv-row { display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 10px 14px; border-bottom: 1px solid #eef2ec; }
.pv-row:last-child { border-bottom: 0; }
.pv-row dt { flex: 0 0 130px; color: var(--forest); font-size: 13.5px; font-weight: 600; }
.pv-row dd { flex: 1 1 220px; min-width: 0; margin: 0; font-size: 14px; }

/* Pager and footer */
.pager { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.pg { display: flex; flex: 1 1 220px; flex-direction: column; gap: 2px; max-width: calc(50% - 6px); min-height: 44px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--forest); font-weight: 600; }
.pg:hover { border-color: var(--gold); color: var(--forest); text-decoration: none; }
.pg span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.pg-next { align-items: flex-end; margin-left: auto; text-align: right; }
.site-footer { border-top: 3px solid var(--gold); background: var(--forest); color: #ccdfd0; }
.ftr { max-width: 1440px; margin: 0 auto; padding: 44px clamp(16px, 3vw, 28px) 28px; }
.ftr-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 48px; }
.ftr-brand { flex: 1 1 280px; min-width: 0; }
.ftr-brand img { display: block; width: auto; height: 32px; }
.ftr-brand p { max-width: 320px; margin-top: 12px; font-size: 14px; }
.fl { display: flex; flex: 0 1 160px; flex-direction: column; }
.fl h2 { margin-bottom: 4px; color: var(--gold-light); font-size: 13px; font-weight: 600; }
.fl a { display: inline-flex; align-items: center; min-height: 36px; color: #ccdfd0; font-size: 14px; }
.fl a:hover { color: #fff; }
.ftr-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 32px; padding-top: 20px; border-top: 1px solid #2c5146; }
.ftr-bottom > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 13.5px; }
.ftr-bottom img { display: block; width: auto; height: 24px; }
.ftr-bottom p { max-width: 620px; color: #b5cbbd; font-size: 13px; }

@media (max-width: 860px) {
  .site-header { position: static; }
  .side { display: none; }
  .mnav { display: block; }
  .hide-sm { display: none; }
  .hdr-end { margin-left: 0; }
  .pg { max-width: none; }
}
/* Moving between pages: the header and sidebar stay in place while the content fades,
   in browsers with cross-document view transitions. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-header { view-transition-name: docs-header; }
.side-in { view-transition-name: docs-sidebar; }
::view-transition-group(root) { animation-duration: .2s; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
