/* xlli-site host frame 0.1-draft: ribbon 56, menu 240, centre, right 300. Host chrome only; the article is
   the renderer's. */
*{box-sizing:border-box}
html,body{margin:0}
body{max-width:none;padding:0;margin:0;font:14px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:var(--xw-bg,#fdfdfc);color:var(--xw-fg,#1c1c1c)}
#banner{position:sticky;top:0;z-index:5;padding:6px 12px;background:#3a2f12;color:#f6e7b8;font-size:12px;display:flex;gap:12px;flex-wrap:wrap}
#banner code{color:#fff}
#sections{position:sticky;top:30px;z-index:4;height:40px;display:flex;align-items:stretch;gap:2px;padding:0 10px;background:#1f2430;overflow-x:auto}
#sections a,#sections button{display:flex;align-items:center;padding:0 12px;border:0;background:transparent;color:#c9d1dc;font:inherit;font-size:13px;text-decoration:none;white-space:nowrap;cursor:pointer;border-bottom:2px solid transparent}
#sections a[aria-current="true"]{color:#fff;border-bottom-color:#3dd9c5}
#app{display:grid;grid-template-columns:56px 240px minmax(0,1fr) 300px;min-height:calc(100vh - 70px)}
#ribbon,#menu,#right{position:sticky;top:70px;height:calc(100vh - 70px);align-self:start}
#banner{height:30px;align-items:center}
#ribbon{background:var(--xw-bar-bg,#f1f0ec);border-right:1px solid var(--xw-border,#e3e2de);display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;overflow-y:auto}
#ribbon a{display:flex;flex-direction:column;align-items:center;gap:2px;width:48px;padding:5px 0;border-radius:8px;text-decoration:none;color:inherit;opacity:.75}
#ribbon a:hover{opacity:1}
#ribbon a img{display:block;width:28px;height:28px}
#ribbon a[aria-current="true"]{opacity:1;background:var(--xw-raised,#fff);box-shadow:0 0 0 1px var(--xw-border,#d5d3cd)}
#ribbon a span{font-size:8px;line-height:1.1;text-align:center;white-space:nowrap}
#menu{border-right:1px solid var(--xw-border,#e3e2de);padding:10px 8px;overflow:auto}
#menu h2{font-size:13px;margin:4px 6px 8px}
#menu a,#menu button{display:block;width:100%;text-align:left;padding:6px 8px;border-radius:5px;border:0;background:transparent;
  color:inherit;text-decoration:none;font:inherit;cursor:pointer}
#menu a[aria-current="true"]{background:var(--xw-bar-bg,#f1f0ec);font-weight:600}
button.greyed,button.greyed:hover{opacity:.42;cursor:not-allowed}
#centre{padding:18px 28px;min-width:0;overflow:auto}
#xlli-article{max-width:880px;font-size:16px;line-height:1.62}
/* the renderer's body rule (max-width 880, padding) is for its own full page; here the article column holds it */
#right{border-left:1px solid var(--xw-border,#e3e2de);padding:12px;font-size:12px;overflow:auto}
#right h3{font-size:12px;text-transform:uppercase;letter-spacing:.04em;margin:14px 0 6px;color:var(--xw-fg-dim,#8a8a86)}
#right a{display:block;padding:3px 6px;border-radius:4px;color:inherit;text-decoration:none}
#right a[aria-current="true"]{background:var(--xw-bar-bg,#f1f0ec);font-weight:600}
#right code{word-break:break-all}
.host-strip{display:flex;flex-wrap:wrap;gap:4px;padding:6px;margin:0 0 14px;border:1px solid var(--xw-border,#e3e2de);border-radius:6px}
.host-strip a{padding:3px 10px;border-radius:4px;color:inherit;text-decoration:none}
.host-strip a[aria-current="true"]{background:var(--xw-accent,#0d8b7e);color:#fff}
.host-note,.host-no-variant,.host-pending{font:12px/1.4 ui-monospace,Consolas,monospace;padding:6px 10px;border-radius:5px;margin:8px 0}
.host-note{background:#fdf3d8;color:#5c4400;border:1px solid #e9cf86}
.host-fail{background:#fde4e1;color:#7a1408;border:1px solid #eba79d;padding:10px 12px;border-radius:6px;font:13px/1.4 ui-monospace,Consolas,monospace}
.host-no-variant{background:#eef1f6;color:#3d4757;border:1px dashed #9aa6b8}
.host-pending{background:#eef6f4;color:#0b5e55;border:1px solid #9fd3cb}
.host-hidden{display:none!important}
#xlli-bytes{max-height:50vh;overflow:auto;white-space:pre-wrap;word-break:break-all;font:11px/1.35 ui-monospace,Consolas,monospace;
  background:var(--xw-code-bg,#fcfbf9);border:1px solid var(--xw-border,#e3e2de);padding:8px;border-radius:5px}
#right button{font:inherit;padding:4px 10px;border-radius:5px;border:1px solid var(--xw-border,#e3e2de);background:var(--xw-raised,#fff);color:inherit;cursor:pointer}
[data-section-id]{scroll-margin-top:80px}
/* JavaScript fallback: monochrome code. One text colour; dim is the same colour at lower strength, strong is weight. */
#xlli-article.xf .xf-code{border:1px solid var(--xw-border,#d5d3cd);background:var(--xw-code-bg,#fcfbf9);border-radius:8px;margin:14px 0;overflow:hidden}
#xlli-article.xf .xf-code .xw-codebar{background:var(--xw-bar-bg,#f1f0ec);color:var(--xw-fg-dim,#8a8a86)}
#xlli-article.xf .xf-code pre.xw-code{background:transparent;color:var(--xw-fg,#1c1c1c);margin:0}
#xlli-article.xf .xf-dim{opacity:.5}
#xlli-article.xf .xf-strong{font-weight:700}
#renderer-toggle{margin-left:auto;display:inline-flex;border:1px solid currentColor;border-radius:4px;overflow:hidden}
#renderer-toggle button{font:inherit;font-size:11px;padding:1px 8px;border:0;background:transparent;color:inherit;cursor:pointer;opacity:.7}
#renderer-toggle button[aria-pressed="true"]{background:#f6e7b8;color:#3a2f12;opacity:1;font-weight:700}
#renderer-toggle button:disabled{cursor:not-allowed;opacity:.35;text-decoration:line-through}
#xlli-article.xf[data-tones="2"] .xf-strong{font-weight:inherit}
/* Light code panels on the light page (the renderer paints them dark, inline). The dark theme keeps the renderer's own colours. */
html:not(:has(#theme-switch:checked)) #xlli-article .xw-codewrap{background:var(--xw-code-bg)!important;border-color:var(--xw-border)!important}
html:not(:has(#theme-switch:checked)) #xlli-article .xw-codebar{background:var(--xw-bar-bg)!important;color:var(--xw-fg-dim)}
html:not(:has(#theme-switch:checked)) #xlli-article pre.xw-code{background:var(--xw-code-bg)!important;color:var(--xw-fg)!important}
html:not(:has(#theme-switch:checked)) #xlli-article pre.xw-code span{color:var(--host-light)!important}
html:not(:has(#theme-switch:checked)) #xlli-article pre.xw-code span.host-code-plain{color:var(--xw-fg)!important}
#theme-button{font:inherit;font-size:11px;padding:1px 10px;border:1px solid currentColor;border-radius:4px;background:transparent;color:inherit;cursor:pointer;min-width:52px}
#theme-button:hover{background:#f6e7b8;color:#3a2f12}
/* The page's XLLI source, in the main column */
#xlli-source{max-width:none}
#xlli-source .xs-head{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:baseline;font-size:14px;margin-bottom:10px}
#xlli-source .xs-head strong{font-size:18px}
#xlli-source .xs-head code{font-size:12px;word-break:break-all;color:var(--xw-fg-dim,#8a8a86)}
#xlli-source .xs-bar{display:flex;gap:6px;margin-bottom:8px}
#xlli-source .xs-bar button{font:inherit;font-size:13px;padding:5px 12px;border-radius:5px;border:1px solid var(--xw-border,#e3e2de);background:var(--xw-raised,#fff);color:inherit;cursor:pointer}
#xlli-source .xs-bar button[aria-pressed="true"]{background:var(--xw-fg,#1c1c1c);color:var(--xw-bg,#fff);border-color:var(--xw-fg,#1c1c1c)}
#xlli-source #xlli-source-back{margin-left:auto}
#xlli-source .xs-note{font-size:13px;color:var(--xw-fg-dim,#8a8a86);margin:0 0 10px}
#xlli-bytes{font:14px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;tab-size:2;margin:0;padding:16px 18px;border:1px solid var(--xw-border,#e3e2de);border-radius:8px;background:var(--xw-code-bg,#fcfbf9);color:var(--xw-fg,#1c1c1c)}
#xlli-bytes[data-form="served"]{word-break:break-all}
.no-rail #app{grid-template-columns:240px minmax(0,1fr) 300px}
.no-rail #ribbon{display:none}
/* A long unbroken string (a 64-character digest) breaks inside its cell instead of running over the next one. */
#xlli-article td,#xlli-article th{overflow-wrap:anywhere}
