  /* GameLayer Developer Resources — quiet docs style.
     Flat surfaces, thin borders, no shadows or gradients. System fonts, black top bar as on gamelayer.io.
     Colour is kept for links, permission badges and warnings only. */
  :root{
    --bg:#ffffff;
    --surface:#f9f9fa;
    --surface-2:#f2f2f4;
    --ink:#121116;
    --muted:#5f5d68;
    --faint:#76747e;
    --border:rgba(18,17,22,0.10);
    --border-strong:rgba(18,17,22,0.20);
    --link:#b93a0a;
    --read:#1f7a4d;
    --write:#8a4b00;
    --del:#a3123a;
    --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    --topbar:57px;
    --r:10px;
  }
  *{box-sizing:border-box;}
  html{scroll-padding-top:calc(var(--topbar) + 20px);}
  body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-font-smoothing:antialiased;font-size:15px;line-height:1.65;}
  a{color:inherit;}
  svg{display:block;}
  .i{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;color:var(--muted);}

  /* Top bar */
  .topbar{position:sticky;top:0;z-index:50;height:var(--topbar);background:var(--ink);border-bottom:1px solid #000;}
  .topbar-in{height:100%;display:flex;align-items:center;gap:14px;padding:0 24px;max-width:1440px;margin:0 auto;}
  .brand{display:flex;align-items:center;gap:10px;text-decoration:none;}
  .brand img{height:22px;width:auto;}
  .brand-tag{white-space:nowrap;font-size:13px;font-weight:500;color:rgba(255,255,255,0.6);}
  .top-links{margin-left:auto;display:flex;align-items:center;gap:22px;font-size:13.5px;font-weight:500;color:rgba(255,255,255,0.72);}
  .top-links a{text-decoration:none;white-space:nowrap;}
  .top-links a:hover{color:#fff;}
  .btn{display:inline-block;font-size:13.5px;font-weight:500;padding:7px 14px;border-radius:8px;border:1px solid var(--border-strong);background:#fff;color:var(--ink);text-decoration:none !important;white-space:nowrap;}
  .btn:hover{background:var(--surface);}
  .btn-primary{background:var(--ink);border-color:var(--ink);color:#fff !important;}
  .btn-primary:hover{background:#2a2930;}
  .menu-btn{display:none;background:none;border:1px solid rgba(255,255,255,0.3);border-radius:8px;padding:6px;cursor:pointer;}
  .menu-btn svg{width:18px;height:18px;stroke:#fff;fill:none;stroke-width:2;}

  /* Layout */
  .layout{max-width:1440px;margin:0 auto;display:grid;grid-template-columns:260px minmax(0,1fr);}
  .sidebar{position:sticky;top:var(--topbar);height:calc(100vh - var(--topbar));overflow-y:auto;border-right:1px solid var(--border);padding:24px 14px 40px 22px;}
  .side-group{margin-bottom:22px;}
  .side-group h4{margin:0 0 6px;padding:0 10px;font-size:12px;font-weight:600;color:var(--ink);}
  .side-group a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 10px;border-radius:6px;font-size:13.5px;color:var(--muted);text-decoration:none;}
  .side-group a:hover{color:var(--ink);background:var(--surface);}
  .side-group a.sub{margin-left:10px;padding-left:12px;border-radius:0 6px 6px 0;border-left:1px solid var(--border);font-size:13px;}
  .side-group a.sub.active{color:var(--ink);font-weight:500;border-left-color:var(--ink);}
  .side-group a[aria-current="page"]{color:var(--ink);font-weight:600;background:var(--surface-2);}
  .new{font-size:10.5px;font-weight:500;color:var(--faint);border:1px solid var(--border);border-radius:5px;padding:0 5px;line-height:1.5;}

  .content{padding:40px 56px 96px;min-width:0;}
  .article{max-width:760px;}

  /* Article typography */
  .crumbs{font-size:13px;color:var(--faint);margin-bottom:12px;}
  h1,h2,h3{font-family:inherit;letter-spacing:-0.015em;line-height:1.25;color:var(--ink);}
  h1{font-size:32px;font-weight:700;margin:0 0 12px;}
  .lede{font-size:16.5px;color:var(--muted);margin:0 0 28px;line-height:1.6;}
  h2{font-size:22px;font-weight:600;margin:56px 0 12px;}
  h3{font-size:16px;font-weight:600;margin:30px 0 8px;}
  h2 .anchor,h3 .anchor{opacity:0;margin-left:8px;color:var(--faint);text-decoration:none;font-weight:500;}
  h2:hover .anchor,h3:hover .anchor{opacity:1;}
  p{margin:0 0 14px;}
  .article a:not(.btn):not(.anchor):not(.card){color:var(--ink);font-weight:600;text-decoration:none;}
  .article a:not(.btn):not(.anchor):not(.card):hover{opacity:.7;}
  ul,ol{margin:0 0 16px;padding-left:22px;}
  li{margin-bottom:6px;}
  strong{font-weight:600;}
  code{font-family:var(--mono);font-size:0.85em;background:var(--surface-2);border-radius:4px;padding:1px 5px;}
  .ui{font-weight:600;color:var(--ink);}
  .ui-path{font-weight:600;white-space:nowrap;}
  .ui-path .sep{color:var(--faint);font-weight:400;margin:0 4px;}
  .optional{font-size:15px;font-weight:400;color:var(--faint);margin-left:6px;letter-spacing:0;}

  /* Cards: one style for every card on every page */
  .cards{display:grid;gap:12px;margin:16px 0 24px;}
  .cards.c2{grid-template-columns:repeat(2,1fr);}
  .cards.c3{grid-template-columns:repeat(3,1fr);}
  .cards.c4{grid-template-columns:repeat(4,1fr);}
  ol.cards{list-style:none;padding:0;}
  ol.cards > li{margin:0;display:flex;}
  .card{flex:1;display:flex;flex-direction:column;background:#fff;border:1px solid var(--border);border-radius:var(--r);padding:16px;color:var(--ink);text-decoration:none;font-size:14px;transition:border-color .15s ease,background .15s ease;}
  a.card:hover{border-color:var(--border-strong);background:var(--surface);}
  .card.dashed{border-style:dashed;}
  .card-head{display:flex;align-items:center;gap:10px;margin-bottom:4px;}
  .card .num{font-size:12px;color:var(--faint);margin-bottom:10px;}
  .card b{font-size:14px;font-weight:600;line-height:1.35;}
  .card p{margin:0;font-size:13px;line-height:1.55;color:var(--muted);flex:1;}
  .card .meta{margin-top:12px;font-size:12px;color:var(--faint);}
  .card .sub-label{font-size:12px;color:var(--faint);margin:0 0 8px 28px;}
  .card ul{margin:0 0 0 28px;padding-left:16px;font-size:13.5px;color:var(--muted);}
  .card li{margin-bottom:4px;}
  .card.row{flex-direction:row;gap:10px;align-items:flex-start;}
  .card.row .i{margin-top:1px;}
  .card.row b{display:block;margin-bottom:2px;}

  /* Plain overview list and two-column text */
  ol.overview{padding-left:22px;margin:0 0 12px;}
  ol.overview li{margin-bottom:8px;}
  .cols{display:grid;grid-template-columns:1fr 1fr;gap:32px;margin:12px 0 20px;}
  .cols h4{font-size:15px;font-weight:600;margin:0;}
  .cols .role-note{font-size:13px;color:var(--faint);margin:0 0 8px;}
  .cols ul{padding-left:18px;font-size:14.5px;}
  @media (max-width:820px){ .cols{grid-template-columns:1fr;gap:16px;} }

  /* Key figures */
  .figures{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:16px 0 22px;}
  .figure{border-left:2px solid var(--border-strong);padding:2px 0 2px 14px;}
  .figure b{display:block;font-size:22px;font-weight:600;letter-spacing:-0.015em;line-height:1.3;}
  .figure span{font-size:13px;color:var(--muted);line-height:1.45;}

  /* Server URL */
  .server{display:flex;align-items:center;gap:14px;flex-wrap:wrap;border:1px solid var(--border);border-radius:var(--r);padding:12px 14px;margin:0 0 24px;}
  .server-label{font-size:12px;color:var(--faint);}
  .server-url{font-family:var(--mono);font-size:14.5px;}
  .server .copy{margin-left:auto;}

  /* Callouts */
  .callout{display:flex;gap:10px;border-radius:var(--r);padding:12px 14px;margin:16px 0;font-size:14px;border:1px solid var(--border);background:var(--surface);}
  .callout svg{display:none;width:17px;height:17px;flex-shrink:0;margin-top:3px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:var(--muted);}
  .callout p:last-child{margin:0;}
  .callout.warn svg{color:#b45309;}
  .callout.security svg{color:var(--del);}

  /* Steps */
  .steps{list-style:none;padding:0;margin:0 0 18px;counter-reset:step;}
  .steps > li{position:relative;padding:0 0 16px 38px;margin:0;counter-increment:step;}
  .steps > li::before{content:counter(step);position:absolute;left:0;top:1px;width:24px;height:24px;border-radius:50%;border:1px solid var(--border-strong);background:#fff;color:var(--ink);font-family:var(--mono);font-size:12px;display:flex;align-items:center;justify-content:center;}
  .steps > li::after{content:"";position:absolute;left:11.5px;top:29px;bottom:3px;width:1px;background:var(--border);}
  .steps > li:last-child::after{display:none;}
  .steps > li > p:first-child{padding-top:1px;}
  .steps ul{margin-top:8px;}

  /* Tabs */
  .tabs{margin:18px 0 22px;}
  .tab-list{display:flex;gap:18px;border-bottom:1px solid var(--border);}
  .tab-list button{font:inherit;font-size:14px;font-weight:500;color:var(--muted);background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1px;padding:8px 0;cursor:pointer;display:flex;align-items:center;gap:8px;}
  .tab-list button:hover{color:var(--ink);}
  .tab-list button[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--ink);}
  .tab-panel{padding:20px 0 4px;}
  .tab-panel[hidden]{display:none;}
  .rec{font-size:13px;font-weight:400;color:var(--faint);}

  /* Code */
  .code{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);margin:12px 0 18px;overflow:hidden;}
  .code-head{display:flex;align-items:center;justify-content:space-between;padding:6px 8px 6px 14px;font-size:12px;color:var(--faint);border-bottom:1px solid var(--border);}
  .code pre{margin:0;padding:12px 14px;overflow-x:auto;font-family:var(--mono);font-size:13px;line-height:1.65;color:var(--ink);}
  .code pre .p{color:var(--faint);user-select:none;}
  .code pre .f{color:#8a4b00;}
  .code pre .s{color:#1f6f4a;}
  .copy{font:inherit;font-size:12px;font-weight:500;display:inline-flex;align-items:center;gap:6px;border-radius:6px;padding:4px 9px;cursor:pointer;border:1px solid var(--border);background:#fff;color:var(--muted);}
  .copy:hover{color:var(--ink);border-color:var(--border-strong);}
  .copy svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;}
  .copy.done{color:var(--read);}

  /* Tables */
  .table-wrap{overflow-x:auto;margin:14px 0 20px;}
  table{width:100%;border-collapse:collapse;font-size:14px;}
  th{text-align:left;font-size:12.5px;font-weight:600;color:var(--ink);padding:9px 14px;border-bottom:1px solid var(--border-strong);}
  th:first-child,td:first-child{padding-left:0;}
  td{padding:10px 14px;border-bottom:1px solid var(--border);vertical-align:top;}
  tr:last-child td{border-bottom:none;}
  td code{white-space:nowrap;}
  .scope{display:inline-block;font-size:12px;font-weight:500;border:1px solid currentColor;border-radius:5px;padding:0 6px;white-space:nowrap;line-height:1.6;}
  .scope.r{color:var(--read);}
  .scope.w{color:var(--write);}
  .scope.d{color:var(--del);}
  .filter{display:inline-flex;border:1px solid var(--border);border-radius:8px;padding:2px;margin:8px 0 0;flex-wrap:wrap;}
  .filter button{font:inherit;font-size:13px;font-weight:500;border:none;background:none;border-radius:6px;padding:4px 11px;cursor:pointer;color:var(--muted);}
  .filter button:hover{color:var(--ink);}
  .filter button[aria-pressed="true"]{background:var(--surface-2);color:var(--ink);}
  tr.hide{display:none;}
  .msg{font-family:var(--mono);font-size:12.5px;background:var(--surface-2);border-radius:4px;padding:1px 5px;line-height:1.75;}


  /* Prompt */
  .prompt{border:1px solid var(--border);border-radius:var(--r);background:var(--surface);padding:14px 16px;margin:14px 0 20px;position:relative;}
  .prompt p{margin:0;font-size:15px;line-height:1.6;padding-right:80px;}
  .prompt .copy{position:absolute;top:12px;right:12px;}

  /* Pager */
  .pager{display:flex;justify-content:space-between;gap:14px;margin-top:60px;padding-top:24px;border-top:1px solid var(--border);}
  .pager a{flex:1;border:1px solid var(--border);border-radius:var(--r);padding:12px 16px;text-decoration:none !important;color:var(--ink) !important;font-weight:500;}
  .pager a:hover{border-color:var(--border-strong);background:var(--surface);}
  .pager small{display:block;font-size:12px;color:var(--faint);font-weight:400;}
  .pager .next{text-align:right;}

  .shot{margin:16px 0 20px;}
  .shot img{display:block;width:100%;max-width:440px;height:auto;}
  .shot.wide img{max-width:100%;}
  .shot figcaption{font-size:12.5px;color:var(--faint);margin-top:8px;}

  /* Collapsible menu items */
  .side-row{display:flex;align-items:center;gap:2px;}
  .side-row a{flex:1;min-width:0;}
  .side-toggle{flex-shrink:0;width:26px;height:26px;display:flex;align-items:center;justify-content:center;border:none;background:none;border-radius:6px;cursor:pointer;color:var(--faint);padding:0;}
  .side-toggle:hover{background:var(--surface);color:var(--ink);}
  .side-toggle svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s ease;}
  .side-toggle[aria-expanded="true"] svg{transform:rotate(90deg);}
  .side-sub{margin:2px 0 6px;}
  .side-sub[hidden]{display:none;}

  @media (max-width:1180px){
    .layout{grid-template-columns:240px minmax(0,1fr);}
    .content{padding:36px 40px 80px;}
    .cards.c4{grid-template-columns:repeat(2,1fr);}
  }
  @media (max-width:820px){
    .layout{grid-template-columns:1fr;}
    .sidebar{display:none;position:fixed;inset:var(--topbar) 0 0 0;height:auto;background:#fff;z-index:40;}
    body.nav-open .sidebar{display:block;}
    .menu-btn{display:block;}
    .top-links{gap:16px;}
    .content{padding:28px 20px 64px;}
    h1{font-size:27px;}
    .cards.c2,.cards.c3,.cards.c4,.figures{grid-template-columns:1fr;}
  }

  /* API reference (generated from api-spec.yaml) */
  .article.wide{max-width:880px;}
  .ref-links{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 8px;}
  .ref-op{scroll-margin-top:calc(var(--topbar) + 20px);border-top:1px solid var(--border);padding:24px 0 8px;margin:24px 0 0;}
  .ref-op h3{margin:0 0 4px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:15px;}
  .ref-op .path{font-size:14px;font-weight:500;background:none;padding:0;word-break:break-all;}
  .ref-op h4{font-size:13px;font-weight:600;margin:20px 0 8px;}
  .ref-summary{margin:0 0 6px;color:var(--muted);font-size:14px;}
  .ref-desc{font-size:14.5px;}
  .ref-desc h4,.ref-desc h5,.ref-desc h6{font-size:14px;font-weight:600;margin:16px 0 6px;}
  .method{font-family:var(--mono);font-size:11.5px;font-weight:500;border:1px solid currentColor;border-radius:5px;padding:0 6px;line-height:1.7;}
  .method-get{color:var(--read);}
  .method-post{color:#1d4ed8;}
  .method-put,.method-patch{color:var(--write);}
  .method-delete{color:var(--del);}
  .article pre{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:12px 14px;overflow:auto;font-family:var(--mono);font-size:12.5px;line-height:1.6;margin:0 0 16px;}
  .article pre code{background:none;padding:0;font-size:inherit;}
  .ref-table-wrap{overflow-x:auto;margin:0 0 12px;}
  .ref-table{font-size:13.5px;line-height:1.5;}
  .ref-table td:first-child{white-space:nowrap;}
  .ref-table .req{font-size:11px;font-weight:500;color:var(--del);}
  .ref-table .where{font-size:12px;color:var(--faint);}
  .ref-responses{font-size:14px;}
  .ref-op details{margin-top:10px;}
  .ref-op summary{cursor:pointer;font-size:13.5px;font-weight:500;color:var(--ink);margin-bottom:10px;}

  /* Try the API: the RapiDoc explorer fills the content column */
  .content.explorer{padding:0;display:flex;flex-direction:column;height:calc(100vh - var(--topbar));position:sticky;top:var(--topbar);}
  .explorer-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:24px 32px 16px;border-bottom:1px solid var(--border);}
  .explorer-head h1{font-size:24px;margin:0 0 4px;}
  .explorer-head p{margin:0;font-size:14px;color:var(--muted);max-width:620px;}
  .explorer-head .ref-links{margin:0;}
  .content.explorer rapi-doc{flex:1;min-height:0;width:100%;display:block;}
  @media (max-width:820px){ .content.explorer{height:auto;position:static;} .content.explorer rapi-doc{height:80vh;} .explorer-head{padding:20px;} }

  /* Talk To Us: the one brand-coloured button, same as the main site's nav */
  .btn-cta{background:#fff;border:1px solid #fff;color:var(--ink) !important;border-radius:8px;padding:7px 16px;font-weight:600;}
  .btn-cta:hover{background:#e9e8ec;}
  @media (max-width:480px){
    .topbar-in{gap:10px;padding:0 14px;}
    .brand-tag{display:none;}
    .btn-cta{padding:7px 14px;font-size:13px;}
  }
  .brand-logo{display:flex;}
  .brand-tag{text-decoration:none;}
  .brand-tag:hover{color:#fff;}

  /* Two APIs: table on wide screens, one block per API on phones */
  .api-stack{display:none;}
  .api-stack h4{font-size:17px;font-weight:600;margin:24px 0 4px;}
  .api-stack dl{margin:0;font-size:14px;}
  .api-stack dt{font-size:13px;color:var(--faint);margin-top:10px;}
  .api-stack dd{margin:2px 0 0;color:var(--ink);}
  @media (max-width:820px){ .api-compare{display:none;} .api-stack{display:block;} }

  /* Code blocks: one box, no inner border; tabs already name the language */
  .article .code pre{border:none;border-radius:0;margin:0;background:none;}
  .code-tabs .code-head{position:absolute;top:8px;right:8px;padding:0;border:none;}
  .code-tabs .code pre{padding-right:84px;}
  .code-tabs .code-head > span{display:none;}
  @media (max-width:820px){
    .code-tabs .code-head{position:static;padding:6px 8px;border-bottom:1px solid var(--border);justify-content:flex-end;}
    .code-tabs .code pre{padding-right:14px;}
  }

  /* Tables with three or more columns: one block per row on phones */
  @media (max-width:820px){
    .table-wrap.stack thead{display:none;}
    .table-wrap.stack table,.table-wrap.stack tbody,.table-wrap.stack tr,.table-wrap.stack td{display:block;width:auto;}
    .table-wrap.stack tr{padding:12px 0;border-bottom:1px solid var(--border);}
    .table-wrap.stack tr:last-child{border-bottom:none;}
    .table-wrap.stack td{padding:2px 0;border:none;}
    .table-wrap.stack td:first-child{font-weight:600;}
    .table-wrap.stack td:nth-child(n+3)::before{content:attr(data-label);display:block;font-size:12px;font-weight:400;color:var(--faint);margin-top:6px;}
    .table-wrap.stack td:empty{display:none;}
    .table-wrap.stack tr.hide{display:none;}
    .table-wrap.stack.label-all td:nth-child(2)::before{content:attr(data-label);display:block;font-size:12px;font-weight:400;color:var(--faint);margin-top:6px;}
  }

  /* Spec downloads: plain links beside the Try button */
  .ref-links{align-items:center;}
  .ref-dl{font-size:14px;color:var(--muted);margin-left:8px;}
  /* API explorer: section titles in normal case (RapiDoc sets them in capitals) */
  rapi-doc::part(section-tag-title){text-transform:none;}
  .explorer-head .ref-dl a{color:var(--ink);font-weight:600;text-decoration:none;}
  .explorer-head .ref-dl a:hover{opacity:.7;}
