/* OpenCommunicate docs: top bar, left page list, one column of text. Light and dark follow the system. */
:root {
  --bg: #fbfaf7; --surface: #f0eee8; --panel: #fff; --text: #16202b; --text-2: #5d6673; --line: #e2ded4;
  --accent: #0f9a63; --accent-ink: #fff; --code: #eceae3;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1017; --surface: #151f2b; --panel: #131c27; --text: #e9eef4; --text-2: #8b98a7; --line: #223041;
    --accent: #3ddc97; --accent-ink: #08130e; --code: #18232f; }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 4px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand small { color: var(--text-2); font-weight: 500; font-size: 15px; }
.top nav { display: flex; align-items: center; gap: 2px; }
.top .menu { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.side-extra { display: none; }
.top nav a { color: var(--text-2); font-weight: 600; font-size: 15px; padding: 7px 12px; border-radius: 9px; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); background: var(--surface); text-decoration: none; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink) !important; font-weight: 700;
  padding: 9px 18px; border-radius: 10px; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.top nav a.btn { padding: 7px 14px; margin-left: 6px; }

.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); padding-top: 36px; padding-bottom: 80px; }
.side { position: sticky; top: 84px; align-self: start; font-size: 15px; }
.side h4 { margin: 0 0 6px 12px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.side ol { list-style: none; margin: 0 0 18px; padding: 0; }
.side ol a { display: block; padding: 6px 12px; margin: 1px 0; border-radius: 8px; color: var(--text); }
.side ol a:hover { background: var(--surface); text-decoration: none; }
.side ol a[aria-current="page"] { background: var(--surface); color: var(--accent); font-weight: 600; }

.doc { max-width: 46em; min-width: 0; }
.doc h1 { font-size: clamp(32px, 4vw, 42px); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 14px; }
.doc .lede { font-size: 19px; color: var(--text-2); margin: 0 0 30px; }
.doc h2 { font-size: 25px; letter-spacing: -.02em; margin: 46px 0 12px; }
.doc h3 { font-size: 19px; margin: 30px 0 8px; }
.doc section > h2:first-child { margin-top: 46px; }
.doc ul, .doc ol { padding-left: 1.3em; } .doc li { margin: .35em 0; }
.doc time { display: block; color: var(--text-2); font-size: 14px; margin: -6px 0 8px; }
.doc pre { background: var(--code); border-radius: 12px; padding: 14px 18px; overflow-x: auto; line-height: 1.6; margin: 14px 0 22px; }
.doc pre code { font: 13.5px/1.6 ui-monospace, Menlo, monospace; }
.doc :not(pre) > code { font: .86em ui-monospace, Menlo, monospace; background: var(--code); padding: .12em .4em; border-radius: 5px; overflow-wrap: anywhere; }
.doc figure { margin: 26px 0; }
.doc figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0,0,0,.12); }
.doc figcaption { color: var(--text-2); font-size: 14px; margin-top: 10px; }
.doc .phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.doc .phones img { border-radius: 22px; }
.note { background: var(--surface); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 16px; margin: 20px 0; }
.note p { margin: 0; }
.cards { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 24px 0; }
.cards li { margin: 0 !important; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; transition: border-color .2s; }
.cards li:hover { border-color: var(--accent); }
.cards a { font-weight: 700; font-size: 17px; }
.cards p { margin: 4px 0 0; color: var(--text-2); font-size: 15px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 24px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
.doc td { overflow-wrap: anywhere; }
.doc th { color: var(--text-2); font-size: 13px; font-weight: 600; }
.toc { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; margin: -10px 0 10px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); }
.pager a { display: grid; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager a span { color: var(--text-2); font-size: 13px; } .pager a[rel="next"] { margin-left: auto; text-align: right; }

footer { border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 22px; padding-bottom: 28px; }
footer p { margin: 0; } footer nav { display: flex; gap: 16px; }

@media (max-width: 820px) {
  .wrap { padding: 0 16px; }
  .top nav a.opt, .brand small { display: none; }
  .brand { font-size: 15px; }
  .docs { grid-template-columns: 1fr; padding-top: 18px; gap: 18px; }
  /* the page list is a drawer from the left, opened by the menu button; the top bar keeps only what fits */
  .top .wrap { gap: 6px; }
  .top .menu { display: inline-flex; }
  .top nav a[aria-current] { display: none; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; align-self: stretch; /* start would shrink a fixed grid item to its content */ width: min(300px, 84vw); padding: 22px 14px 28px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .22s ease; visibility: hidden; }
  body.nav-open .side { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, .28); }
  body.nav-open { overflow: hidden; }
  .scrim { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .38); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .side-extra { display: block; border-top: 1px solid var(--line); padding-top: 16px; }
  .side ol a { padding: 9px 12px; }
  .doc .phones { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .doc .phones img { border-radius: 12px; }
}
@media (max-width: 480px) { .brand span { display: none; } .top nav a.btn { padding: 7px 11px; margin-left: 2px; } }

/* two languages in one page: html[lang] picks which one shows */
html[lang="en"] [lang="tr"], html[lang="tr"] [lang="en"] { display: none !important; }
.top nav button.lang { border: 1px solid var(--line); background: transparent; color: var(--text-2); font: 600 14px/1 inherit; padding: 8px 11px; border-radius: 9px; cursor: pointer; margin-left: 6px; white-space: nowrap; }
.top nav button.lang:hover { color: var(--text); border-color: var(--text-2); }

/* changelog: one collapsible block per release */
details.rel { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); margin: 12px 0; transition: border-color .2s; }
details.rel[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
details.rel summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 4px 14px; padding: 14px 18px; }
details.rel summary::-webkit-details-marker { display: none; }
details.rel summary::after { content: ""; grid-column: 3; grid-row: 1; justify-self: end; width: 8px; height: 8px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(-45deg); transition: transform .2s; margin-top: 6px; }
details.rel[open] summary::after { transform: rotate(45deg); }
details.rel summary .v { font-weight: 800; font-size: 20px; letter-spacing: -.01em; color: var(--accent); }
details.rel summary .h { font-weight: 600; }
details.rel summary time { grid-column: 2; margin: 0; font-size: 14px; color: var(--text-2); }
details.rel .body { padding: 0 18px 12px; border-top: 1px solid var(--line); }
details.rel .body > :first-child { margin-top: 12px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 1px 9px; margin-left: 6px; vertical-align: 2px; }
button.linkish { border: 0; background: none; color: var(--accent); font: inherit; padding: 0; cursor: pointer; }
button.linkish:hover { text-decoration: underline; }
.rel-link { margin: 10px 0 0; font-size: 14px; }
