/* Rimo Global Hotels API docs. Brand: pink #E36397 + blue #167EFE, Montserrat. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --surface: #ffffff;
  --ink: #1b1d29;
  --ink-2: #4a4d5e;
  --muted: #6b6e80;
  --line: #e4e6ef;
  --pink: #e36397;
  --pink-ink: #b8306c;
  --blue: #167efe;
  --blue-ink: #0b5fc2;
  --ok: #0f8a5f;
  --ok-bg: #e8f7f0;
  --bad: #c0362c;
  --bad-bg: #fdecea;
  --warn: #9a6200;
  --warn-bg: #fff4e0;
  --code-bg: #12141f;
  --code-ink: #e6e8f2;
  --code-k: #8cc4ff;
  --code-s: #f7a8c8;
  --code-n: #ffd479;
  --code-b: #b9a2ff;
  --radius: 12px;
  --side-w: 248px;
  --top-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1118;
    --bg-soft: #161925;
    --surface: #161925;
    --ink: #eceef6;
    --ink-2: #c3c6d6;
    --muted: #9396a8;
    --line: #2a2e3f;
    --pink-ink: #f08ab4;
    --blue-ink: #6fb0ff;
    --ok: #4fd1a0;
    --ok-bg: #11291f;
    --bad: #ff8a80;
    --bad-bg: #2e1514;
    --warn: #ffc56b;
    --warn-bg: #2b2010;
    --code-bg: #0a0b11;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1118; --bg-soft: #161925; --surface: #161925; --ink: #eceef6; --ink-2: #c3c6d6; --muted: #9396a8; --line: #2a2e3f;
  --pink-ink: #f08ab4; --blue-ink: #6fb0ff; --ok: #4fd1a0; --ok-bg: #11291f; --bad: #ff8a80; --bad-bg: #2e1514; --warn: #ffc56b; --warn-bg: #2b2010; --code-bg: #0a0b11;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.65 Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--blue-ink); text-underline-offset: 3px; }
a:hover { color: var(--pink-ink); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; margin: 6px 0 14px; }
h2 { font-size: 28px; font-weight: 800; margin: 0 0 12px; }
h3 { font-size: 17px; font-weight: 700; margin: 28px 0 10px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 50; height: var(--top-h); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { height: 100%; max-width: 1360px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { display: block; height: 27px; width: auto; }
.brand-tag { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: linear-gradient(110deg, var(--pink), var(--blue)); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.top-nav { margin-left: auto; display: flex; gap: 4px; }
.top-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; padding: 10px 12px; border-radius: 8px; }
.top-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.menu-btn { display: none; margin-left: auto; font: inherit; font-weight: 700; font-size: 14px; color: var(--ink); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; min-height: 44px; cursor: pointer; }

/* layout */
.layout { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
.side { position: sticky; top: var(--top-h); align-self: start; height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 24px 16px 40px 24px; border-right: 1px solid var(--line); }
.side-h { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px 10px; }
.side-h:first-child { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a { display: block; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600; padding: 7px 10px; border-radius: 8px; }
.side a:hover { background: var(--bg-soft); color: var(--ink); }
.side a.on { background: color-mix(in srgb, var(--pink) 12%, transparent); color: var(--pink-ink); }
main { padding: 0 48px 48px; min-width: 0; }

/* hero */
.hero { padding: 48px 0 40px; border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pink-ink); margin: 0 0 6px; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 720px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 26px 0; }
.facts div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.facts dt { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 4px 0 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.facts dd code { background: none; border: 0; padding: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* capabilities + onboarding stages */
.caps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 26px; }
.cap { border-top: 3px solid; border-image: linear-gradient(90deg, var(--pink), var(--blue)) 1; padding: 12px 2px 0; }
.cap-t { font-weight: 800; margin: 0 0 4px; }
.cap p:last-child { font-size: 14px; color: var(--ink-2); margin: 0; }
.stages { list-style: none; padding: 0; margin: 18px 0; max-width: 860px; }
.stages li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.stages li:last-child { border-bottom: 0; }
.stage-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--pink), var(--blue)); }
.stage-t { font-weight: 800; margin: 4px 0 4px; }
.stages p:last-child { margin: 0; color: var(--ink-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--blue); color: var(--blue-ink); }
.btn.primary { background: linear-gradient(110deg, var(--pink), var(--blue)); color: #fff; border: 0; }
.btn.primary:hover { filter: brightness(1.06); color: #fff; }
.btn.ghost { background: transparent; }

/* sections */
.doc { padding: 44px 0 8px; border-bottom: 1px solid var(--line); }
.doc > p, .doc > ul, .doc > ol { max-width: 820px; }
.ep-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.ep-url code { font-size: 15px; font-weight: 600; }
.method { font-size: 12px; font-weight: 800; letter-spacing: .05em; color: #fff; background: var(--blue); border-radius: 6px; padding: 3px 8px; }
.steps, .rules { padding-left: 22px; }
.steps li, .rules li { margin-bottom: 10px; }
.rules { list-style: disc; }
.rules.num { list-style: decimal; }

/* code */
.code { background: var(--code-bg); border-radius: var(--radius); margin: 12px 0 18px; overflow: hidden; max-width: 900px; }
.code-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 16px; border-bottom: 1px solid rgba(255,255,255,.08); color: #a7abc0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.code pre { margin: 0; padding: 16px; overflow-x: auto; max-height: 560px; }
.code pre code { background: none; border: 0; padding: 0; color: var(--code-ink); font-size: 13px; line-height: 1.6; overflow-wrap: normal; white-space: pre; }
.code .k { color: var(--code-k); } .code .s { color: var(--code-s); } .code .n { color: var(--code-n); } .code .b { color: var(--code-b); }
.copy { font: inherit; font-size: 12px; font-weight: 700; color: #d6d9e8; background: rgba(255,255,255,.08); border: 0; border-radius: 6px; padding: 0 12px; min-height: 32px; cursor: pointer; }
.copy:hover { background: rgba(255,255,255,.16); }
.copy.small { color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line); }
.copy.done { color: #4fd1a0; }

/* tables */
.tbl { overflow-x: auto; margin: 12px 0 18px; border: 1px solid var(--line); border-radius: var(--radius); max-width: 900px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--bg-soft); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.fields td:first-child, .fields td:nth-child(2) { white-space: nowrap; }
.fields td:nth-child(3) { min-width: 260px; }

/* notes */
.note { border-left: 4px solid var(--blue); background: color-mix(in srgb, var(--blue) 7%, var(--bg)); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; margin: 16px 0 22px; max-width: 900px; }
.note.warn { border-color: var(--warn); background: var(--warn-bg); }
.note-title { font-weight: 800; margin-bottom: 6px; }
.note ul { margin: 0; padding-left: 20px; }
.note li { margin-bottom: 6px; }
.note p:last-child { margin-bottom: 0; }

/* flow */
.flow { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; max-width: 980px; counter-reset: s; }
.flow li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.flow li:not(:last-child)::after { content: ""; position: absolute; right: -11px; top: 50%; width: 10px; height: 2px; background: var(--line); }
.step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--pink), var(--blue)); }
.step-name { font-weight: 800; }
.step-what { font-size: 13px; color: var(--ink-2); }
.step-tag { margin-top: auto; align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--pink-ink); background: color-mix(in srgb, var(--pink) 12%, transparent); border-radius: 999px; padding: 2px 8px; }
.flow-cancel { color: var(--ink-2); }

/* statuses */
.statuses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 900px; }
.status { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.status p:last-child { margin: 0; font-size: 14px; color: var(--ink-2); }
.status-name { font-weight: 800; margin: 0 0 4px; }
.status.ok { background: var(--ok-bg); } .status.ok .status-name { color: var(--ok); }
.status.bad { background: var(--bad-bg); } .status.bad .status-name { color: var(--bad); }
.status.warn { background: var(--warn-bg); } .status.warn .status-name { color: var(--warn); }

/* downloads */
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 900px; margin: 16px 0; }
.dl-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--surface); min-width: 0; }
.dl-card:hover { border-color: var(--pink); color: var(--ink); }
.dl-t { font-weight: 800; }
.dl-t::before { content: "↓ "; color: var(--pink); }
.dl-f { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* checklist */
.cl { max-width: 900px; }
.cl-head { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; margin: 18px 0; }
.cl-company { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); flex: 1 1 260px; }
.cl-company input { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; min-height: 44px; }
.cl-progress { flex: 1 1 260px; }
.cl-progress .bar { height: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.cl-progress .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--blue)); transition: width .2s; }
.cl-progress p { margin: 6px 0 0; font-size: 14px; font-weight: 700; }
.cl-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px 10px; margin: 0 0 14px; }
.cl-group legend { font-weight: 800; padding: 0 6px; }
.cl-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 44px; }
.cl-item:last-child { border-bottom: 0; }
.cl-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cl-item .box { flex: none; width: 22px; height: 22px; margin-top: 2px; border: 2px solid var(--muted); border-radius: 6px; display: grid; place-items: center; }
.cl-item input:checked + .box { background: linear-gradient(135deg, var(--pink), var(--blue)); border-color: transparent; }
.cl-item input:checked + .box::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.cl-item input:focus-visible + .box { outline: 3px solid var(--blue); outline-offset: 2px; }
.cl-item input:checked ~ .txt { color: var(--muted); }
.cl-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }

.foot { padding: 32px 0 8px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.foot p { margin: 0; }

/* tablet / phone */
@media (max-width: 1100px) {
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow li::after { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .top-nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; position: fixed; inset: var(--top-h) 0 0 0; height: auto; z-index: 40; background: var(--bg); border-right: 0; padding: 16px 24px 40px; }
  .side.open { display: block; }
  main { padding: 0 16px 40px; }
  .top-in { padding: 0 16px; }
}
@media (max-width: 640px) {
  h2 { font-size: 24px; }
  .hero { padding-top: 32px; }
  .lead { font-size: 16px; }
  .facts, .statuses, .dl, .caps { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .brand-tag { display: none; }
  .fields td:first-child { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .cl-progress .bar span { transition: none; } }
@media (max-width: 640px) { .ep-url code { font-size: 13px; } }

@media print {
  .top, .side, .hero-cta, .cl-actions, .copy, .skip { display: none !important; }
  .layout { display: block; }
  main { padding: 0; }
  .doc { break-inside: avoid-page; }
  body { font-size: 12px; }
  .code pre { max-height: none; white-space: pre-wrap; }
  body.print-checklist main > *:not(#checklist) { display: none !important; }
}
