/* jscdns.net site styles. Flat colours only, no gradients. */
:root {
  --ink: #0f1419;
  --ink-2: #1a2129;
  --ink-3: #27303b;
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --line: #e2e5ea;
  --text: #1b2028;
  --muted: #5c6672;
  --accent: #f2b705;
  --accent-hover: #d9a404;
  --link: #0b5cad;
  --code-bg: #12171d;
  --code-text: #e4e7eb;
  --ok: #1f7a4d;
  --radius: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bs-body-font-family: var(--font);
  --bs-body-color: var(--text);
  --bs-link-color-rgb: 11, 92, 173;
  --bs-border-color: var(--line);
}

body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 1rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: .875em; color: #a3361f; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }

.skip-link { position: absolute; left: 1rem; top: 1rem; z-index: 2000; background: var(--accent); color: var(--ink); padding: .5rem 1rem; border-radius: 6px; }

/* Header */
.site-header { background: var(--ink); border-bottom: 1px solid var(--ink-3); position: sticky; top: 0; z-index: 1030; }
.site-header .navbar { padding: .8rem 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark { display: inline-flex; align-items: flex-end; justify-content: flex-end; width: 32px; height: 32px; background: var(--accent); color: var(--ink); font-family: var(--mono); font-weight: 500; font-size: .95rem; line-height: 1; padding: 0 4px 4px 0; border-radius: 6px; }
.brand-name { color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-tld { color: #8b96a3; font-weight: 500; }
.site-header .nav-link { color: #c3cad3; font-weight: 500; font-size: .95rem; padding: .5rem .9rem !important; border-radius: 6px; }
.site-header .nav-link:hover { color: #fff; background: var(--ink-2); }
.site-header .nav-link.active { color: #fff; background: var(--ink-3); }
.navbar-toggler { border-color: var(--ink-3); }
.navbar-toggler:focus { box-shadow: 0 0 0 2px var(--accent); }

/* Buttons */
.btn { font-weight: 600; border-radius: 8px; padding: .6rem 1.15rem; }
.btn-accent { background: var(--accent); border: 1px solid var(--accent); color: var(--ink); }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--ink); }
.btn-ink { background: var(--ink); border: 1px solid var(--ink); color: #fff; }
.btn-ink:hover, .btn-ink:focus { background: var(--ink-3); border-color: var(--ink-3); color: #fff; }
.btn-outline-ink { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-outline-ink:hover, .btn-outline-ink:focus { background: var(--ink); color: #fff; }
.btn:focus-visible, .btn-copy:focus-visible, .chip:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }

/* Hero */
.hero { background: var(--ink); color: #c3cad3; padding: 5rem 0 5.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent); margin-bottom: 1rem; }
.hero-title { color: #fff; font-size: clamp(2.1rem, 4.5vw, 3.25rem); line-height: 1.12; margin-bottom: 1.25rem; }
.notfound .hero-title { color: var(--ink); }
.hero-lead { font-size: 1.15rem; max-width: 34rem; margin-bottom: 2rem; }
.hero-search { display: flex; gap: .5rem; max-width: 34rem; }
.hero-search .form-control { background: var(--ink-2); border: 1px solid var(--ink-3); color: #fff; padding: .7rem 1rem; border-radius: 8px; }
.hero-search .form-control::placeholder { color: #7d8896; }
.hero-search .form-control:focus { border-color: var(--accent); box-shadow: none; background: var(--ink-2); color: #fff; }
.hero-links { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.25rem; font-size: .95rem; }
.hero-links a { color: #fff; text-decoration: none; border-bottom: 1px solid var(--ink-3); padding-bottom: 2px; }
.hero-links a:hover { border-color: var(--accent); }
.hero-code { background: var(--code-bg); border: 1px solid var(--ink-3); border-radius: var(--radius); overflow: hidden; }
.hero-code-bar { display: flex; align-items: center; gap: 6px; padding: .7rem 1rem; border-bottom: 1px solid var(--ink-3); background: var(--ink-2); }
.hero-code-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.hero-code-bar em { font-style: normal; font-family: var(--mono); font-size: .8rem; color: #8b96a3; margin-left: .6rem; }
.hero-code pre { margin: 0; padding: 1.25rem; font-family: var(--mono); font-size: .82rem; color: var(--code-text); line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.c-tag { color: #8b96a3; }

/* Stats */
.stats { border-bottom: 1px solid var(--line); background: var(--bg); }
.stat { padding: 1.75rem 1rem; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 1.6rem; color: var(--ink); letter-spacing: -0.02em; }
.stat span { font-size: .9rem; color: var(--muted); }
@media (max-width: 767.98px) {
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* Sections */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-ink { background: var(--ink); color: #c3cad3; }
.section-ink .section-title { color: #fff; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .6rem; }
.section-lead { color: var(--muted); font-size: 1.08rem; max-width: 40rem; }
.section-ink .section-lead { color: #c3cad3; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.section-head .section-lead { margin-bottom: 0; }

/* Library cards */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.lib-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; text-decoration: none; color: var(--text); background: var(--bg); transition: border-color .15s, transform .15s; }
.lib-card:hover { border-color: var(--ink); transform: translateY(-2px); color: var(--text); }
.lib-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .5rem; }
.lib-name { font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.lib-version { font-family: var(--mono); font-size: .75rem; background: var(--bg-alt); border: 1px solid var(--line); color: var(--muted); padding: .1rem .45rem; border-radius: 5px; white-space: nowrap; }
.lib-summary { font-size: .92rem; color: var(--muted); flex-grow: 1; margin-bottom: 1rem; }
.lib-meta { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .75rem; }

/* Steps */
.step { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; height: 100%; }
.step h3 { font-size: 1.15rem; margin: 1rem 0 .5rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--ink); color: var(--accent); font-family: var(--mono); font-weight: 500; }

/* URL anatomy */
.url-anatomy { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; background: var(--bg-alt); }
.url-line { font-family: var(--mono); font-size: clamp(.78rem, 1.6vw, 1rem); background: var(--code-bg); color: var(--code-text); padding: 1rem 1.25rem; border-radius: 8px; word-break: break-all; }
.u-base { color: #8b96a3; }
.u-lib { color: var(--accent); }
.u-ver { color: #6cb6ff; }
.u-file { color: #7ee2a8; }
.url-legend { margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.url-legend div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; }
.url-legend dt { font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.url-legend dd { margin: 0; color: var(--muted); }
.key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.key-lib { background: var(--accent); }
.key-ver { background: #6cb6ff; }
.key-file { background: #7ee2a8; }

/* Page head */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 3rem 0 2.5rem; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .5rem; }
.page-head p { color: var(--muted); font-size: 1.08rem; max-width: 44rem; margin: 0; }
.breadcrumb { font-size: .9rem; margin-bottom: 1rem; }
.lib-title { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: .5rem; }
.lib-title h1 { margin: 0; }
.lib-version-lg { font-size: .9rem; padding: .2rem .6rem; background: var(--bg); }

/* Filter */
.filter-bar { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }
.filter-bar .form-control { max-width: 28rem; padding: .7rem 1rem; border-radius: 8px; }
.filter-bar .form-control:focus { border-color: var(--ink); box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 999px; padding: .35rem .9rem; font-size: .88rem; font-weight: 500; }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.result-count { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.empty-state { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state h2 { font-size: 1.2rem; }
.empty-state p { color: var(--muted); margin: 0; }

/* Code blocks */
.code { position: relative; background: var(--code-bg); border-radius: var(--radius); margin: 1rem 0 1.5rem; border: 1px solid var(--ink-3); overflow: hidden; }
.code pre { margin: 0; padding: 1.1rem 1.25rem; overflow-x: auto; }
.code pre code { font-family: var(--mono); font-size: .82rem; color: var(--code-text); line-height: 1.7; white-space: pre; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: .45rem .6rem .45rem 1.1rem; background: var(--ink-2); border-bottom: 1px solid var(--ink-3); }
.code-head span { font-family: var(--mono); font-size: .76rem; color: #8b96a3; }
.btn-copy { font-family: var(--font); font-size: .78rem; font-weight: 600; border: 1px solid var(--ink-3); background: var(--ink-3); color: #e4e7eb; border-radius: 6px; padding: .25rem .65rem; cursor: pointer; }
.btn-copy:hover { background: #343e4a; }
.btn-copy.copied { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-copy-float { position: absolute; top: .5rem; right: .5rem; }

/* File table */
.file-table { font-size: .92rem; margin-bottom: 2.5rem; }
.file-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; border-bottom-width: 1px; }
.file-table td { vertical-align: middle; padding: .85rem .5rem; }
.file-path { font-family: var(--mono); font-size: .85rem; color: var(--ink); margin-right: .6rem; word-break: break-all; }
.file-kind { font-size: .7rem; font-weight: 600; padding: .1rem .45rem; border-radius: 4px; white-space: nowrap; }
.kind-js { background: #fff4cc; color: #6b5200; }
.kind-esm { background: #dcecff; color: #0b4a8a; }
.kind-css { background: #dff5e8; color: #17603c; }
.file-actions { text-align: right; white-space: nowrap; }
.file-actions .btn-copy { background: var(--bg); color: var(--ink); border-color: var(--line); margin-left: .25rem; }
.file-actions .btn-copy:hover { border-color: var(--ink); background: var(--bg); }
.file-actions .btn-copy.copied { background: var(--ok); border-color: var(--ok); color: #fff; }
@media (max-width: 767.98px) {
  .file-table thead { display: none; }
  .file-table tr { display: block; border-bottom: 1px solid var(--line); padding: .75rem 0; }
  .file-table td { display: block; border: 0; padding: .2rem 0; }
  .file-actions { text-align: left; white-space: normal; }
  .file-actions .btn-copy { margin: .4rem .35rem 0 0; }
}

.block-title { font-size: 1.4rem; margin: 0 0 .5rem; scroll-margin-top: 90px; }
.block-title ~ .block-title { margin-top: 1rem; }
h3.sub { font-size: 1.05rem; margin-top: 1.5rem; }

.callout { border-left: 4px solid var(--accent); background: #fffbeb; padding: 1rem 1.25rem; border-radius: 0 8px 8px 0; margin: 1.5rem 0; font-size: .95rem; }

/* Side cards */
.side-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1rem; background: var(--bg); }
.side-card-muted { background: var(--bg-alt); }
.side-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: .75rem; }
.facts { margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-weight: 500; color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 500; }
.side-links { display: flex; flex-direction: column; gap: .4rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .92rem; font-weight: 500; }
.base-url { display: block; font-size: .78rem; word-break: break-all; background: var(--bg); border: 1px solid var(--line); padding: .6rem .7rem; border-radius: 6px; color: var(--ink); }
@media (min-width: 992px) { aside .side-card:first-child { position: sticky; top: 90px; } }

/* Docs */
.docs-nav { position: sticky; top: 90px; }
.docs-nav ul { border-left: 1px solid var(--line); }
.docs-nav a { display: block; padding: .3rem 0 .3rem 1rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .92rem; }
.docs-nav a:hover { color: var(--ink); }
.docs-nav a.active { color: var(--ink); border-left-color: var(--accent); font-weight: 600; }
.docs h2 { font-size: 1.55rem; margin: 3rem 0 .9rem; padding-top: .5rem; scroll-margin-top: 90px; }
.docs h2:first-child { margin-top: 0; }
.docs p, .docs li { color: #303844; }
.docs-table { font-size: .92rem; }
.docs-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.faq { margin-top: 1rem; }
.faq .accordion-button { font-weight: 600; color: var(--ink); }
.faq .accordion-button:not(.collapsed) { background: var(--bg-alt); box-shadow: none; }
.faq .accordion-button:focus { box-shadow: 0 0 0 2px var(--accent); }
@media (max-width: 991.98px) { .docs-nav { position: static; } .docs-nav ul { columns: 2; } }

/* Footer */
.site-footer { background: var(--ink); color: #9aa5b1; padding: 3.5rem 0 1.5rem; font-size: .92rem; }
.footer-text { max-width: 26rem; }
.footer-heading { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a { color: #c3cad3; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--ink-3); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .82rem; }

.notfound { padding: 7rem 0; }

@media (prefers-reduced-motion: reduce) { .lib-card { transition: none; } .lib-card:hover { transform: none; } }
