/* htsapi.dev: one stylesheet for every page (2026-11-19). A utility design: one column, system
   fonts, plain lists and tables, no ornament. Pages add no CSS of their own. */
:root {
  --ink: #1c2126; --muted: #5b6570; --line: #d9dee3; --soft: #f4f6f8; --bg: #ffffff;
  --link: #1d5fa8; --accent: #1d5fa8; --warn: #8a5a00; --bad: #a3261f;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e6e9ec; --muted: #9aa4ae; --line: #333a41; --soft: #1b2025; --bg: #121619;
          --link: #7fb2ea; --accent: #7fb2ea; --warn: #e0b45c; --bad: #ef8a83; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
.wrap { max-width: 46rem; margin: 0 auto; padding-inline: 1rem; }   /* inline only: main and the bars set their own block padding */

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: baseline; padding-block: .8rem; }
header.site .name { font-weight: 700; color: var(--ink); text-decoration: none; margin-right: auto; }
header.site nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .95rem; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--ink); }

main { padding-block: 2rem 3rem; }
h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 .6rem; text-wrap: balance; }
h2 { font-size: 1.2rem; margin: 2.2rem 0 .5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
h3 { font-size: 1rem; margin: 1.4rem 0 .3rem; }
p, ul, ol, table, pre { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: .3rem; }
a { color: var(--link); }
.lead { font-size: 1.1rem; }
.muted, .asof { color: var(--muted); }
.asof { font-size: .85rem; }
code, pre, kbd { font-family: var(--mono); font-size: .88em; }
code { background: var(--soft); padding: .1em .3em; border-radius: 3px; }
pre { background: var(--soft); border: 1px solid var(--line); border-radius: 4px; padding: .8rem 1rem; overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; }
.table { overflow-x: auto; margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .45rem .6rem .45rem 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.note { border-left: 3px solid var(--line); padding: .2rem 0 .2rem .9rem; color: var(--muted); }

button, .button { font: inherit; cursor: pointer; border-radius: 4px; padding: .5rem .9rem; border: 1px solid var(--accent);
                  background: var(--accent); color: var(--bg); text-decoration: none; display: inline-block; }
button.quiet, .button.quiet { background: transparent; color: var(--accent); }
button:disabled { opacity: .6; cursor: default; }
input, select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: .5rem .6rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row > input { flex: 1 1 14rem; min-width: 0; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
footer.site .wrap { padding-block: 1.2rem 2rem; }
footer.site p { margin-bottom: .4rem; }

/* the homepage demo's result card */
.result { border: 1px solid var(--line); border-radius: 4px; padding: 1rem; margin-top: 1rem; display: none; }
.result.show { display: block; }
.result .code { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; }
.result .sect { margin-top: .9rem; }
.result .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .2rem; }
.result .line { display: flex; justify-content: space-between; gap: 1rem; }
.result .err { color: var(--bad); }
.result pre.json { display: none; margin-top: .8rem; font-size: .8rem; max-height: 24rem; }
.result pre.json.show { display: block; }

/* dialogs (sign in, buy credits) */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 10; }
.modal > div { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; max-width: 26rem; width: 100%; padding: 1.4rem; }
.modal input { width: 100%; margin-bottom: .8rem; }
.modal .err { display: none; color: var(--bad); margin-bottom: .8rem; }
