/* The user manuals (website/guides, made by php artisan manuals:build): a narrow side menu of the manuals and their
   chapters on the left (a click on a manual's name folds or opens its chapters), the chapter on the right, as wide as
   the screen allows so the pictures fill it (never bigger than their own size). On a phone the side menu folds into
   the Contents button. The colours and fonts are style.css's own. */

.guides .wrap.guides-layout{max-width:1380px;}
.guides-layout{
  display:grid;grid-template-columns:210px minmax(0,1fr);gap:36px;
  align-items:start;padding-top:28px;padding-bottom:72px;
}

/* ---- the side menu ---- */
.guides-side{position:sticky;top:96px;max-height:calc(100vh - 120px);overflow-y:auto;}
.guides-toggle{display:none;}
.guides-nav{font-size:.8rem;line-height:1.3;}
.guides-nav ul,.guides-nav ol{list-style:none;margin:0;padding:0;}
.guides-nav a{display:block;color:var(--ink-700);text-decoration:none;padding:4px 8px;border-radius:6px;}
.guides-nav a:hover{background:var(--paper-alt);color:var(--blue-600);}
.guides-nav a.is-current{background:var(--sky-100);color:var(--blue-600);font-weight:600;}
.guides-home{font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.12em;font-size:.68rem !important;font-weight:600;color:var(--blue-600) !important;margin-bottom:4px;}
.guides-manual > a{font-weight:600;color:var(--ink-900);position:relative;padding-right:20px;}
/* The fold arrow: right when folded, down when open */
.guides-manual > a::after{content:'';position:absolute;right:8px;top:50%;width:5px;height:5px;margin-top:-4px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.6;}
.guides-manual > a[aria-expanded="true"]::after{transform:rotate(45deg);margin-top:-5px;}
.guides-manual.is-open > a{color:var(--blue-600);}
.guides-manual ol{margin:1px 0 8px 8px;border-left:2px solid var(--line);padding-left:3px;}
.guides-manual ol[hidden]{display:none;}
.guides-manual ol a{padding:3px 8px;font-size:.76rem;}
.guide-num{color:var(--ink-500);font-variant-numeric:tabular-nums;}
.is-current .guide-num{color:inherit;}

/* ---- the chapter ---- */
.guides-main.doc-page{max-width:none;margin:0;padding:0;min-width:0;}
.guides-main h1{margin-top:0;}
.guides-main h3{color:var(--ink-900);font-size:1.08rem;margin:1.6em 0 .4em;}
.guides-main li{margin:.25em 0;}
.guides-main li > ul,.guides-main li > ol{margin:.25em 0 .25em;}
.guides-crumbs{font-size:.88rem;color:var(--ink-500);margin:0 0 .6em;}
.guides-crumbs a{text-decoration:none;}

.guide-table{overflow-x:auto;margin:.5em 0 1em;-webkit-overflow-scrolling:touch;}
.guide-table table{margin:0;min-width:0;}

/* A picture: as wide as the reading area, never wider than its own size (width / height set by the build); a phone's
   screen no wider than a phone. A click shows it full size (.guide-viewer). */
.guide-figure{margin:1.4em 0 1.6em;}
.guide-zoom{display:block;width:fit-content;max-width:100%;cursor:zoom-in;border-radius:10px;}
.guide-zoom:focus-visible{outline:3px solid var(--blue-600);outline-offset:3px;}
.guide-figure img{display:block;max-width:100%;height:auto;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-soft);background:#fff;}
.guide-figure-phone .guide-zoom,.guide-figure-phone img{max-width:min(100%,340px);}
.guide-figure figcaption{font-size:.88rem;color:var(--ink-500);margin-top:.55em;}

.guide-play{display:inline-block;vertical-align:middle;margin:.2em 0;}
.guide-play img{height:48px;width:auto;display:block;}

.guide-toc{list-style:none !important;padding:0 !important;margin:1.2em 0 0;border-top:1px solid var(--line);}
.guide-toc li{margin:0;border-bottom:1px solid var(--line);}
.guide-toc a{display:block;padding:10px 4px;text-decoration:none;}
.guide-toc a:hover{background:var(--paper-alt);}

.guide-manuals{list-style:none !important;padding:0 !important;display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px;margin-top:1.2em;}
.guide-manuals a{display:flex;flex-direction:column;gap:4px;padding:18px 20px;border:1px solid var(--line);border-radius:var(--radius-md);background:#fff;text-decoration:none;box-shadow:var(--shadow-soft);}
.guide-manuals a:hover{border-color:var(--blue-600);}
.guide-manuals span{color:var(--ink-500);font-size:.88rem;}

/* Previous / Next: small text links in the link colour */
.guides-pager{display:flex;justify-content:space-between;gap:16px;margin-top:2.5em;padding-top:1em;border-top:1px solid var(--line);font-size:.88rem;}
.guides-pager a{color:var(--blue-600);text-decoration:none;}
.guides-pager a:hover,.guides-pager a:focus-visible{text-decoration:underline;}
.guides-pager .guides-next{margin-left:auto;text-align:right;}

/* ---- the picture viewer: the picture full size over a dark page ---- */
.guide-viewer-open,.guide-viewer-open body{overflow:hidden;}
.guide-viewer{
  position:fixed;inset:0;z-index:1000;background:rgba(8,10,24,.88);
  display:flex;align-items:center;justify-content:center;padding:56px 16px 16px;cursor:zoom-out;
}
.guide-viewer figure{margin:0;max-width:100%;max-height:100%;display:flex;flex-direction:column;align-items:center;}
.guide-viewer img{display:block;max-width:100%;max-height:calc(100vh - 110px);width:auto;height:auto;border-radius:6px;background:#fff;cursor:default;}
.guide-viewer figcaption{color:#e8eaf3;font-size:.88rem;margin-top:.6em;text-align:center;}
.guide-viewer-close{
  position:absolute;top:10px;right:12px;width:40px;height:40px;border:0;border-radius:50%;
  background:rgba(255,255,255,.14);color:#fff;font-size:28px;line-height:40px;cursor:pointer;padding:0;
}
.guide-viewer-close:hover{background:rgba(255,255,255,.28);}
.guide-viewer-close:focus-visible{outline:3px solid #fff;outline-offset:2px;}

/* ---- phone and narrow screens: the Contents button ---- */
@media (max-width:860px){
  .guides-layout{grid-template-columns:minmax(0,1fr);gap:20px;padding-top:16px;}
  .guides-side{position:static;max-height:none;overflow:visible;}
  .guides-toggle{
    display:flex;align-items:center;justify-content:space-between;width:100%;
    padding:12px 16px;border:1px solid var(--line);border-radius:10px;background:#fff;
    font:600 .95rem var(--font-body);color:var(--ink-900);cursor:pointer;
  }
  .guides-toggle::after{content:'';width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-top:-4px;}
  .guides-toggle[aria-expanded="true"]::after{transform:rotate(-135deg);margin-top:4px;}
  .js .guides-nav{display:none;}
  .js .guides-nav.open{display:block;margin-top:8px;padding:8px;border:1px solid var(--line);border-radius:10px;background:#fff;}
  /* The phone's menu keeps its size: easy to tap */
  .guides-nav{font-size:.93rem;line-height:1.35;}
  .guides-nav a{padding:7px 12px;border-radius:8px;}
  .guides-home{font-size:.74rem !important;margin-bottom:6px;}
  .guides-manual > a{padding-right:28px;}
  .guides-manual > a::after{right:12px;width:7px;height:7px;}
  .guides-manual ol a{font-size:.89rem;padding:5px 10px;}
  .guides-main h1{font-size:1.6rem;}
  /* "‹ Previous" / "Next ›" only */
  .guides-pager-title{display:none;}
  .guide-viewer{padding:52px 8px 8px;}
}

/* A manual's "Download PDF" (its first page): a small outlined link, about one line of body text high, with a PDF
   icon (23 Nov 2026). Its own class, not style.css .btn: that is the home page's large call-to-action button (padding
   .9em 1.7em), which made this link a big pill. The admin reader's link looks the same (react manualPage.scss). */
.guides-pdf{margin:0 0 1.2em;}
.doc-page a.guides-pdf-link{
  display:inline-flex;align-items:center;gap:.4em;
  padding:.15em .6em;border:1px solid var(--line);border-radius:6px;
  font-size:.9rem;line-height:1.5;font-weight:500;
  color:var(--blue-600);background:var(--white);text-decoration:none;
}
.doc-page a.guides-pdf-link:hover{border-color:var(--blue-600);text-decoration:none;}
.guides-pdf-icon{flex:none;width:16px;height:16px;}
