/* developers.linknetik.com — one hand-written stylesheet, no build step.
   The blues (--brand, --brand-dark, --brand-light) and the navy (--ink,
   --code-bg) are the colours of the logo; config.php sets them in the page
   <head>, and the values below are the same ones, as a fallback. */

:root {
    --brand: #2080F0;
    --brand-dark: #1565D8;
    --brand-light: #3D97FF;
    --ink: #0B1F44;
    --text: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --tint: #eef6fe;
    --code-bg: #0B1F44;
    --code-ink: #E6EEFB;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --side: 264px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
    margin: 0; color: var(--text); background: #fff;
    font: 16px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); }
a:hover { color: var(--ink); }
code { font-family: var(--mono); font-size: .875em; background: #f1f5f9; color: var(--ink); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; border: 2px solid var(--brand); border-radius: 6px; z-index: 100; }

/* ---- top bar ---------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 0 20px; min-height: 60px; display: flex; align-items: center; gap: 8px 28px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.brand img { height: 30px; width: auto; display: block; }
.brand .brand-name { color: var(--text); font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.brand span { border-left: 1px solid var(--line); padding-left: 10px; }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav a { text-decoration: none; color: var(--text); font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 6px; }
.topnav a:hover { background: var(--soft); color: var(--ink); }
.topnav a.on { color: var(--brand-dark); background: var(--tint); }
.topout { margin-left: auto; font-size: 14px; text-decoration: none; color: var(--muted); }
.topout:hover { color: var(--ink); }

/* ---- layout ----------------------------------------------------------- */
.shell { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
.side { border-right: 1px solid var(--line); padding: 24px 16px 40px 20px; font-size: 14px; }
.side-toggle { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
.side-toggle > summary { display: none; cursor: pointer; font-weight: 600; color: var(--ink); padding: 8px 0; }
.side-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.side-title:first-child { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: block; text-decoration: none; color: var(--text); padding: 5px 10px; border-radius: 6px; }
.side li a:hover { background: var(--soft); color: var(--ink); }
.side li a.on { background: var(--tint); color: var(--brand-dark); font-weight: 600; }
.side-sub { margin: 2px 0 6px 10px !important; border-left: 1px solid var(--line); }
.side-sub a { font-size: 13px; color: var(--muted) !important; padding: 3px 10px !important; }

.doc { padding: 36px 40px 80px; min-width: 0; max-width: 900px; }
.doc > :first-child { margin-top: 0; }

/* ---- text ------------------------------------------------------------- */
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; text-wrap: balance; }
h1 { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 12px; }
h2 { font-size: 23px; font-weight: 600; margin: 44px 0 12px; padding-top: 4px; }
h3 { font-size: 18px; font-weight: 600; margin: 28px 0 8px; }
p { margin: 0 0 14px; }
.lead { font-size: 18px; color: var(--muted); margin-bottom: 26px; }
ul.plain, ol.plain { padding-left: 22px; margin: 0 0 14px; }
ul.plain li, ol.plain li { margin-bottom: 6px; }

/* ---- code blocks ------------------------------------------------------ */
pre { position: relative; background: var(--code-bg); color: var(--code-ink); padding: 16px 18px; border-radius: 10px; overflow-x: auto; font: 13.5px/1.6 var(--mono); margin: 0 0 18px; }
pre code { background: none; color: inherit; padding: 0; font-size: inherit; overflow-wrap: normal; }
.copy { position: absolute; top: 8px; right: 8px; font: 500 12px Inter, system-ui, sans-serif; color: #cbd5e1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.copy:hover { background: rgba(255,255,255,.16); color: #fff; }

/* ---- tables ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 0 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--soft); border-top: 1px solid var(--line); white-space: nowrap; }
td p:last-child { margin-bottom: 0; }
td .req { color: #b45309; font-size: 12px; font-weight: 600; margin-left: 6px; }
.yes { color: #047857; font-weight: 600; }
.no { color: #94a3b8; }

/* ---- notes ------------------------------------------------------------ */
.note { border: 1px solid var(--line); border-left: 4px solid var(--brand); background: var(--tint); border-radius: 8px; padding: 12px 16px; margin: 0 0 18px; }
.note-warn { border-left-color: #d97706; background: #fffbeb; }
.note p:last-child { margin-bottom: 0; }

/* ---- cards (home, quick links) ---------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 0 0 26px; }
.card { display: block; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--brand); box-shadow: 0 8px 24px -14px rgba(32,128,240,.55); color: var(--text); }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); }
.card .meta { margin-top: 12px; font-size: 13px; color: var(--brand-dark); font-weight: 600; }
.hero { padding: 8px 0 6px; }
.hero h1 { font-size: 40px; }

/* ---- API reference ---------------------------------------------------- */
.base-url { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 0 0 8px; background: var(--soft); }
.base-url span { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tag-desc { color: var(--muted); margin-top: -4px; }
.op { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 20px; overflow: hidden; }
.op-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; background: var(--soft); border-bottom: 1px solid var(--line); }
.op-head .path { font: 600 14.5px var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.op-head .scope { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.op-head .scope code { background: #fff; border: 1px solid var(--line); }
.op-body { padding: 14px 16px 2px; }
.op-body h3 { margin: 0 0 6px; font-size: 17px; }
.op-body h4 { margin: 18px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.method { font: 700 11.5px var(--mono); letter-spacing: .03em; padding: 3px 8px; border-radius: 5px; color: #fff; }
.m-get { background: #0f766e; }
.m-post { background: #1d4ed8; }
.m-patch, .m-put { background: #b45309; }
.m-delete { background: #b91c1c; }
.oplist { list-style: none; padding: 0; margin: 0 0 18px; }
.oplist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.oplist a { font-family: var(--mono); font-size: 13.5px; text-decoration: none; }
.oplist a:hover { text-decoration: underline; }
.oplist .sum { color: var(--muted); }

/* ---- footer ----------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); background: var(--soft); font-size: 13px; color: var(--muted); }
.foot-in { max-width: 1280px; margin: 0 auto; padding: 18px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { color: var(--muted); }

/* ---- small screens ---------------------------------------------------- */
@media (max-width: 900px) {
    /* The bar wraps onto two or three rows here: let it scroll away rather
       than cover the heading an anchor link jumps to. */
    .topbar { position: static; }
    html { scroll-padding-top: 12px; }
    .shell { grid-template-columns: minmax(0, 1fr); }
    .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 16px; }
    .side-toggle { position: static; max-height: none; }
    .side-toggle > summary { display: block; }
    .doc { padding: 24px 16px 60px; }
    h1 { font-size: 28px; }
    .hero h1 { font-size: 31px; }
    .topout { display: none; }
    .op-head .scope { margin-left: 0; width: 100%; }
}
