/* сторінка гайду по API; решта - style.css */
.doc { padding-bottom: 24px; }
.doc h2 { margin: 30px 4px 10px; font-size: 21px; font-weight: 700; }
.doc h3.cap { margin: 18px 4px 8px; }
.doc p { margin: 0 0 12px; line-height: 1.5; }
.doc p:last-child { margin-bottom: 0; }
.lead { margin: 0 4px 12px; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); }
.ask { text-align: center; margin: 30px 0 6px; color: var(--muted); }
.ask a { color: var(--primary-ink); font-weight: 600; text-decoration: none; }
code { font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace; font-size: .9em; padding: 1px 6px; border-radius: 6px; background: rgba(99, 102, 241, .14); color: var(--primary-ink); overflow-wrap: anywhere; }
.back { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--primary-soft); border: 1px solid rgba(99, 102, 241, .35); color: var(--primary-ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.back:hover { background: rgba(99, 102, 241, .28); }
.doc .hero { margin-top: 14px; }
.doc .hero h1 { font-size: 28px; }
.doc .hero .sub { margin-top: 10px; line-height: 1.5; position: relative; z-index: 1; }
.ideas { display: grid; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.idea { display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border-radius: 14px; background: rgba(99, 102, 241, .1); border: 1px solid rgba(99, 102, 241, .25); }
.idea b { font-size: 15px; }
.idea span { font-size: 13px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn { min-height: 38px; padding: 0 16px; border-radius: 999px; background: var(--primary-soft); border: 1px solid rgba(99, 102, 241, .4); color: var(--primary-ink); font-weight: 700; font-size: 13.5px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.btn:hover { background: rgba(99, 102, 241, .3); }
.btn.pri { background: var(--grad); color: #fff; border-color: rgba(139, 92, 246, .6); }
.btn.sm { min-height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn:disabled { opacity: .5; }
.urlbox { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.urlbox code { display: block; padding: 11px 12px; border-radius: 12px; background: rgba(2, 6, 23, .6); border: 1px solid var(--line); color: #e2e8f0; font-size: 13px; line-height: 1.45; word-break: break-all; }
.urlbox .btn { align-self: flex-start; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 9px 0; border-top: 1px solid var(--line); line-height: 1.45; display: flex; flex-direction: column; gap: 2px; }
.facts li:first-child { border-top: 0; padding-top: 0; }
.facts li:last-child { padding-bottom: 0; }
.facts li > span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.facts li > code { align-self: flex-start; }

/* ендпоінти */
.ep { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.ep-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.get { padding: 2px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 700; background: rgba(74, 222, 128, .15); color: var(--green); border: 1px solid rgba(74, 222, 128, .3); }
.ep-h b { font-size: 16px; }
.ep-path { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; color: var(--primary-ink); word-break: break-all; }
.ep p { margin: 8px 0 0; color: #cbd5e1; }
.tbl { overflow-x: auto; margin: 12px 0 0; border-radius: 12px; border: 1px solid var(--line); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; vertical-align: top; border-top: 1px solid var(--line); line-height: 1.4; }
.tbl th { border-top: 0; font-size: 12px; color: var(--muted); font-weight: 600; background: rgba(2, 6, 23, .35); }
.tbl td:first-child { white-space: nowrap; }
.try { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fld { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; min-width: 0; }
.fld input { min-height: 42px; padding: 0 12px; border-radius: 12px; background: rgba(2, 6, 23, .6); border: 1px solid rgba(71, 85, 105, .6); outline: none; font-size: 14px; min-width: 0; width: 100%; }
.fld input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.try-url { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; padding: 9px 12px; border-radius: 12px; background: rgba(2, 6, 23, .6); border: 1px solid var(--line); color: #e2e8f0; word-break: break-all; line-height: 1.45; }
.try-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.out { display: none; }
.out.on { display: block; }
.out-meta { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.out-meta.bad { color: var(--rose); }

/* JSON і код */
pre { margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(2, 6, 23, .7); border: 1px solid var(--line); overflow: auto; font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace; font-size: 12.5px; line-height: 1.55; color: #e2e8f0; tab-size: 2; }
pre.json { max-height: 380px; }
pre.plain { margin-top: 12px; color: #cbd5e1; }
.t-k { color: #a5b4fc; } .t-s { color: #86efac; } .t-n { color: #fcd34d; } .t-b { color: #f0abfc; } .t-p { color: #64748b; }
.t-c { color: #64748b; } .t-f { color: #7dd3fc; }
.codebox { position: relative; margin-top: 12px; }
.codebox .btn { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(30, 41, 59, .95); }
.codebox pre { padding-top: 42px; }
.tabs { display: flex; gap: 6px; }
.tab { min-height: 36px; padding: 0 14px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--muted); border: 1px solid var(--line); background: rgba(30, 41, 59, .5); }
.tab.on { background: var(--grad); color: #fff; border-color: rgba(139, 92, 246, .6); }

/* стани уроку */
.states { display: grid; gap: 8px; }
.st { display: grid; grid-template-columns: auto auto; gap: 4px 10px; align-items: center; justify-content: start; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); }
.st em { grid-column: 1 / -1; font-style: normal; font-size: 13px; color: var(--muted); }
.st.changed, .st.room { border-color: var(--amber-ln); background: var(--amber-bg); }
.st.changed .l-tag, .st.room .l-tag { color: var(--amber); background: rgba(245, 158, 11, .2); border-color: rgba(245, 158, 11, .3); }
.st.cancelled { border-color: var(--rose-ln); background: var(--rose-bg); }
.st.cancelled .l-tag { color: var(--rose); background: rgba(244, 63, 94, .2); border-color: rgba(244, 63, 94, .3); }
.steps { margin: 0 0 4px; padding-left: 22px; line-height: 1.5; }
.steps li { margin-bottom: 8px; padding-left: 4px; }
.steps li::marker { color: var(--primary-ink); font-weight: 700; }
.inl { word-break: break-all; }

@media (min-width: 640px) {
  .doc { max-width: 760px; }
  .doc .hero h1 { font-size: 36px; }
  .ideas { grid-template-columns: repeat(3, 1fr); }
  .urlbox { flex-direction: row; align-items: stretch; }
  .urlbox code { flex: 1; }
  .urlbox .btn { align-self: center; }
  .facts li { flex-direction: row; gap: 14px; }
  .facts li > span { width: 96px; flex: none; padding-top: 2px; }
  .st { grid-template-columns: 130px 110px 1fr; }
  .st em { grid-column: auto; }
}
.tbl td code { white-space: nowrap; }
.st > span { justify-self: start; }
#code, .plain { white-space: pre-wrap; word-break: break-word; }
.st > code { justify-self: start; }
