/* Media-X user guides: one stylesheet for every plugin's guide. Content components (box, check, ui, path, steps, figure,
   table) come from the Price Compliance tester guide; the layout (fixed left column, search, phone drawer) from its
   handbook build. Change the look here once, for all guides. */
:root {
  --ink:#1d2327; --muted:#50575e; --line:#dcdcde; --accent:#1f4e79; --soft:#f3f6fa; --warn:#fff8e5; --warnline:#dba617;
  --ok:#edfaef; --okline:#1a7f37; --side:300px; --bar:52px; --mark:#ffe58a; --markon:#ffbf3f; --sidebg:#f6f7f7;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:#fff; color:var(--ink); font:16px/1.6 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

/* Content */
main { max-width:1080px; margin:0 0 0 var(--side); padding:40px 40px 64px; }
h1 { font-size:1.9em; line-height:1.25; margin:0 0 .2em; color:var(--accent); text-wrap:balance; }
.sub { color:var(--muted); margin:0 0 1.5em; }
h2 { font-size:1.4em; margin:2.4em 0 .6em; padding-top:.6em; border-top:2px solid var(--accent); color:var(--accent); }
h3 { font-size:1.12em; margin:1.8em 0 .4em; }
.label { font-size:.92em; font-weight:600; margin:1.1em 0 .2em; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
p, ul, ol { margin:.5em 0; }
li { margin:.25em 0; }
ol.steps > li { margin:.45em 0; }
code, kbd { font-family:Consolas, "SFMono-Regular", Menlo, monospace; font-size:.9em; background:var(--soft); padding:.05em .3em; border-radius:3px; overflow-wrap:anywhere; }
.ui { font-weight:600; background:#eef3f8; border:1px solid #cdd9e5; border-radius:3px; padding:0 .3em; white-space:normal; }
.path { font-weight:600; }
pre { font-family:Consolas, "SFMono-Regular", Menlo, monospace; font-size:.86em; background:var(--soft); padding:12px 14px; border-radius:4px; overflow-x:auto; white-space:pre-wrap; }
b, strong { font-weight:600; }
.nw { white-space:nowrap; }
.box { background:var(--soft); border-left:4px solid var(--accent); padding:12px 18px; margin:1em 0; }
.box.warn { background:var(--warn); border-color:var(--warnline); }
.check { background:var(--ok); border-left:4px solid var(--okline); padding:6px 16px 10px; margin:.9em 0 1.3em; }
.check .label { color:var(--okline); margin-top:.5em; }
figure { margin:1em 0 1.4em; }
figure img { display:block; max-width:100%; height:auto; border:1px solid var(--line); border-radius:4px; }
figure.small img { max-width:min(620px, 100%); }
figure a.zoom { display:block; cursor:zoom-in; }
figcaption { color:var(--muted); font-size:.88em; margin-top:.35em; }
details.img > summary { cursor:pointer; color:var(--accent); font-size:.92em; margin:.4em 0; }
details.more > summary { cursor:pointer; color:var(--accent); font-size:.92em; margin:.3em 0 .2em; }
details.more > ul { margin:.2em 0 .6em; }
table { display:block; overflow-x:auto; border-collapse:collapse; width:100%; margin:.6em 0; font-size:.93em; }
th, td { border:1px solid var(--line); padding:6px 9px; text-align:left; vertical-align:top; }
th { background:var(--soft); }
a { color:var(--accent); }
h2[id], h3[id], .alias { scroll-margin-top:16px; }
.alias { display:block; height:0; }
footer { margin-top:3em; padding-top:1em; border-top:1px solid var(--line); color:var(--muted); font-size:.9em; }

/* Keyboard */
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.skip { position:absolute; left:8px; top:-60px; z-index:100; background:#fff; color:var(--accent); padding:8px 12px; border:2px solid var(--accent); border-radius:4px; font-weight:600; }
.skip:focus { top:8px; }

/* Left column */
.side { position:fixed; top:0; left:0; bottom:0; width:var(--side); display:flex; flex-direction:column; background:var(--sidebg); border-right:1px solid var(--line); z-index:20; }
.side-head { padding:16px 16px 10px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:12px; margin:0 0 12px; }
.brand img { flex:none; width:56px; height:56px; display:block; }
.brand-name { margin:0; font-weight:700; color:var(--ink); line-height:1.25; font-size:1.02em; }
.brand-sub { margin:0; color:var(--muted); font-size:.84em; line-height:1.35; }
.side-ver { margin:0 0 .7em; color:var(--muted); font-size:.8em; }
.search { position:relative; }
.search input { width:100%; font:inherit; font-size:.92em; padding:7px 30px 7px 10px; border:1px solid #8c8f94; border-radius:4px; background:#fff; color:var(--ink); }
.search input:focus { outline:2px solid var(--accent); outline-offset:0; border-color:var(--accent); }
.search button { position:absolute; right:4px; top:50%; transform:translateY(-50%); border:0; background:none; color:var(--muted); font-size:1em; cursor:pointer; padding:4px 6px; }
.hits { margin:.5em 0 0; font-size:.8em; color:var(--muted); }
.side-body { flex:1; overflow-y:auto; padding:8px 0 16px; overscroll-behavior:contain; }
.toc, .toc ol { list-style:none; margin:0; padding:0; }
.toc > li > a { display:block; padding:5px 16px; color:var(--ink); text-decoration:none; font-weight:600; font-size:.9em; line-height:1.35; border-left:3px solid transparent; }
.js .toc ol { display:none; }
.js .toc li.open > ol { display:block; }
.toc ol a { display:block; padding:3px 16px 3px 30px; color:var(--muted); text-decoration:none; font-size:.84em; line-height:1.35; border-left:3px solid transparent; }
.toc a:hover { color:var(--accent); background:#eef3f8; }
.toc a.active { color:var(--accent); background:#e6eef6; border-left-color:var(--accent); }
.results { padding:0 8px; }
.results .group { margin:.6em 0 .2em; padding:0 8px; font-size:.8em; font-weight:700; color:var(--accent); }
.results a { display:block; padding:5px 8px; border-radius:4px; color:var(--ink); text-decoration:none; font-size:.84em; line-height:1.4; }
.results a:hover, .results a.on { background:#e6eef6; }
.results .none { padding:8px; color:var(--muted); font-size:.86em; }
.side-foot { padding:8px 16px; border-top:1px solid var(--line); font-size:.78em; color:var(--muted); }
.side-foot a { color:var(--muted); text-decoration:none; }
.side-foot a:hover { color:var(--accent); }
mark { background:var(--mark); color:inherit; padding:0; border-radius:2px; }
mark.on { background:var(--markon); box-shadow:0 0 0 2px var(--markon); }
.flash { animation:flash 1.6s ease-out; }
@keyframes flash { from { background:#fff3c4; } to { background:transparent; } }

/* Image viewer, back to top */
.lightbox { position:fixed; inset:0; background:rgba(0,0,0,.82); z-index:60; overflow:auto; display:flex; align-items:flex-start; justify-content:center; padding:24px; cursor:zoom-out; }
.lightbox[hidden] { display:none; }
.lightbox img { max-width:none; width:auto; height:auto; background:#fff; border-radius:4px; }
.totop { position:fixed; right:18px; bottom:18px; width:42px; height:42px; border-radius:50%; border:1px solid var(--line); background:#fff; color:var(--accent); font-size:1.2em; box-shadow:0 2px 6px rgba(0,0,0,.15); cursor:pointer; z-index:30; }
.totop[hidden] { display:none; }
.topbar, .scrim, .close { display:none; }
.no-js .search, .no-js .totop { display:none; }

/* Phone and narrow tablet: top bar and drawer */
@media (max-width:900px) {
  main { margin:0; padding:calc(var(--bar) + 20px) 16px 56px; }
  h2[id], h3[id], .alias { scroll-margin-top:calc(var(--bar) + 12px); }
  .topbar { display:flex; align-items:center; gap:10px; position:fixed; top:0; left:0; right:0; height:var(--bar); padding:0 12px; background:#fff; border-bottom:1px solid var(--line); z-index:40; }
  .topbar img { flex:none; width:28px; height:28px; display:block; }
  .menu { flex:none; font:inherit; font-size:.92em; font-weight:600; color:var(--accent); background:#eef3f8; border:1px solid #cdd9e5; border-radius:4px; padding:6px 10px; cursor:pointer; }
  .where { flex:1; min-width:0; font-size:.86em; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .side { width:min(85vw, 360px); transform:translateX(-100%); visibility:hidden; transition:transform .2s ease, visibility 0s .2s; z-index:50; box-shadow:2px 0 12px rgba(0,0,0,.2); }
  .side.open { transform:none; visibility:visible; transition:transform .2s ease; }
  .close { display:block; position:absolute; right:10px; top:10px; border:0; background:none; font-size:1.2em; color:var(--muted); cursor:pointer; padding:2px 6px; }
  .brand { padding-right:28px; }
  .scrim { display:block; position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:45; }
  .scrim[hidden] { display:none; }
  body.locked { overflow:hidden; }
  /* Without JavaScript the column is simply the top of the page. */
  .no-js .topbar { display:none; }
  .no-js .side { position:static; transform:none; visibility:visible; width:auto; box-shadow:none; border-right:0; border-bottom:1px solid var(--line); }
  .no-js main { padding-top:20px; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } .side { transition:none; } .flash { animation:none; } }
@media print { .side, .topbar, .totop, .scrim, .skip { display:none !important; } main { margin:0; } }
