/* Royal Pay API docs. Reads fully without docs.js; that only adds code tabs and copy buttons. */
:root {
  --bg: #f6f6f2; --panel: #fff; --ink: #191a20; --muted: #5d6068; --line: #e3e3dc;
  --brand: #191a20; --gold: #e9c46a; --link: #1d5fd1; --code-bg: #15161c; --code-ink: #e9e9ee;
  --inline-bg: #ecece6; --callout: #fff7e0; --callout-line: #f0d98c;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111217; --panel: #17181f; --ink: #ececf1; --muted: #a0a3ad; --line: #2a2c35;
    --link: #8ab4ff; --code-bg: #0b0c10; --inline-bg: #24262f; --callout: #2a2414; --callout-line: #5a4a1c; }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875em; }

.top { position: sticky; top: 0; z-index: 5; height: 60px; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 1.5rem; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.mono { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: var(--gold); font-weight: 800; }
@media (prefers-color-scheme: dark) { .mono { outline: 1px solid var(--line); } }
.tag { font-weight: 500; color: var(--muted); font-size: .9rem; }
.top .links { display: flex; gap: 1.1rem; font-size: .9rem; }

.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 210px; max-width: 1400px; margin: 0 auto; }
.side { position: sticky; top: 60px; align-self: start; max-height: calc(100vh - 60px); overflow: auto; padding: 1.5rem 1rem 2rem 1.5rem; }
.side summary { display: none; }
.side p { margin: 1.25rem 0 .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: block; padding: .3rem .6rem; border-radius: 6px; color: var(--ink); font-size: .93rem; }
.side li a:hover { background: var(--inline-bg); text-decoration: none; }
.side li a[aria-current="page"] { background: var(--brand); color: #fff; font-weight: 600; }
@media (prefers-color-scheme: dark) { .side li a[aria-current="page"] { background: var(--inline-bg); color: var(--ink); } }

.doc { padding: 2rem 2.5rem 4rem; min-width: 0; }
.doc article { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 2.25rem 2.5rem; }
.doc h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 1rem; letter-spacing: -.01em; }
.doc h2 { font-size: 1.4rem; margin: 2.4rem 0 .8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.doc h3 { font-size: 1.1rem; margin: 1.8rem 0 .6rem; }
.anchor { opacity: 0; margin-left: .35rem; color: var(--muted); font-weight: 400; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
.doc p code, .doc li code, .doc td code, .callout code { background: var(--inline-bg); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
.doc li { margin: .25rem 0; }
li.check { list-style: none; position: relative; }
ul:has(> li.check) { padding-left: 1.6rem; }
li.check .box { position: absolute; left: -1.6rem; top: .35em; width: 1rem; height: 1rem; border: 2px solid var(--muted); border-radius: 4px; }

.table { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
th { background: var(--inline-bg); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

.callout { margin: 1rem 0; padding: .9rem 1.1rem; background: var(--callout); border: 1px solid var(--callout-line); border-radius: 10px; }

figure.code { margin: 1rem 0; border-radius: 10px; overflow: hidden; background: var(--code-bg); position: relative; }
figure.code figcaption { padding: .45rem 1rem; font-size: .78rem; color: #a7a9b4; border-bottom: 1px solid #262833; }
figure.code pre { margin: 0; padding: 1rem; overflow-x: auto; color: var(--code-ink); line-height: 1.5; }
.codes { margin: 1rem 0; }
.codes > figure.code + figure.code { margin-top: .5rem; }
/* docs.js turns a group into tabs */
.codes.tabbed { border-radius: 10px; overflow: hidden; background: var(--code-bg); }
.codes.tabbed figure.code { margin: 0; border-radius: 0; }
.codes.tabbed figcaption { display: none; }
.codes.tabbed figure.code:not(.on) { display: none; }
.tabbar { display: flex; gap: .15rem; padding: .35rem .5rem 0; border-bottom: 1px solid #262833; overflow-x: auto; }
.tabbar button { background: none; border: 0; color: #a7a9b4; font: 600 .8rem system-ui, sans-serif; padding: .45rem .75rem; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabbar button[aria-selected="true"] { color: #fff; border-color: var(--gold); }
.copy { position: absolute; right: .5rem; top: .35rem; background: #262833; color: #d5d6de; border: 0; border-radius: 6px; font: 600 .75rem system-ui, sans-serif; padding: .3rem .6rem; cursor: pointer; }
.copy:hover { background: #343747; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.pager a { flex: 1; max-width: 48%; padding: .9rem 1.1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 600; }
.pager a:hover { border-color: var(--muted); text-decoration: none; }
.pager small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.pager .next { text-align: right; margin-left: auto; }
.doc footer { margin-top: 1.5rem; color: var(--muted); font-size: .85rem; }

.toc { position: sticky; top: 60px; align-self: start; padding: 2rem 1.5rem 2rem 0; font-size: .87rem; }
.toc p { margin: 0 0 .5rem; font-weight: 700; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.toc li a { display: block; padding: .2rem 0; color: var(--muted); }
.toc li a:hover { color: var(--ink); }

@media (max-width: 1150px) { .layout { grid-template-columns: 230px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 800px) {
  .layout { display: block; }
  .side { position: static; max-height: none; padding: .75rem 1rem 0; }
  .side summary { display: list-item; cursor: pointer; font-weight: 600; padding: .4rem 0; }
  .doc { padding: 1rem; }
  .doc article { padding: 1.4rem 1.2rem; border-radius: 12px; }
  .doc h1 { font-size: 1.65rem; }
  .top { padding: 0 1rem; }
  .top .links a:not(:first-child) { display: none; }
}

/* Field names never break mid-word; endpoint lines get a method badge. */
td:first-child code { white-space: nowrap; overflow-wrap: normal; }
.endpoint { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .5rem 0 1.25rem; padding: .7rem .9rem;
  background: var(--inline-bg); border: 1px solid var(--line); border-radius: 10px; }
.endpoint code { background: none !important; padding: 0 !important; font-size: .95rem; overflow-wrap: anywhere; }
.method { font: 700 .75rem ui-monospace, monospace; letter-spacing: .04em; padding: .25rem .55rem; border-radius: 6px; color: #fff; }
.method.get { background: #1d7a46; }
.method.post { background: #1d5fd1; }
.method.put, .method.patch { background: #a86a00; }
.method.delete { background: #b42318; }
