/* The handle stays on screen as readers open and close the project list. */
:root {
  --handle-height: 44px;
  --dock-height: calc(var(--handle-height) + env(safe-area-inset-bottom, 0px) + 84px);
  scroll-padding-bottom: calc(var(--dock-height) + 10px);
}
body { padding-bottom: var(--dock-height); }
.brand-tools { display:flex; align-items:center; gap:clamp(8px,1.2vw,20px); white-space:nowrap; }
.brand-tools .view-switch { display:inline-flex; align-items:center; gap:4px; border:1px solid #8ea6a4; border-radius:4px; padding:4px 9px; color:#c8e4de; min-height:32px; font:600 13px/1.2 "Segoe UI",sans-serif; }
.utility-nav { border-left: 1px solid #64556c; padding-left: clamp(12px, 1.5vw, 27px); }
.mast nav.utility-nav a { color: #c8dbd6; }
.mast nav.utility-nav a:hover, .mast nav.utility-nav a[aria-current] { color: var(--moon); }
.utility-nav a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }
.project-dock {
  position: fixed; z-index: 7; inset: auto 0 0; background: #242031;
  padding-bottom: env(safe-area-inset-bottom, 0px); border-top: 1px solid #78667b;
  box-shadow: 0 -2px 0 #201c2d;
}
.chapter-drawer { position: relative; padding-bottom: var(--handle-height); }
.drawer-handle {
  position: absolute; inset: auto 0 0; height: var(--handle-height);
  display: flex; align-items: center; gap: clamp(10px,2vw,28px); cursor: pointer; list-style: none;
  padding: 0 var(--frame-inset); color: var(--ink);
}
.drawer-handle::-webkit-details-marker { display:none; }
.chapter-drawer[open] .drawer-handle { border-top:1px solid #78667b; }
.drawer-handle:hover { background:#322a3f; }
.drawer-handle:focus-visible, .station-board a:focus-visible { outline:2px solid var(--moon); outline-offset:-3px; }
.drawer-title { font:600 clamp(18px,1.6vw,24px)/1 var(--pixel); letter-spacing:-.04em; }
.drawer-title i { font:18px var(--mono); color:var(--aqua); margin-right:5px; }
.drawer-current, .drawer-credit, .drawer-action { font:12px var(--mono); color:#d4c6d3; }
.drawer-current b { color:var(--moon); }
.drawer-credit { margin-left:auto; font-size:10px; }
.drawer-action { color:var(--aqua); }
.drawer-action::before { content:"Open ▴"; }
.chapter-drawer[open] .drawer-action::before { content:"Close ▾"; }
.station-board {
  display:grid; grid-template-columns:minmax(128px,1fr) minmax(0,5fr);
  gap:clamp(16px,2.5vw,44px); padding:9px var(--frame-inset) 10px; background:#30293c;
  max-height:calc(100dvh - var(--mast-height) - var(--handle-height) - 32px); overflow:auto;
}
.station-group { min-width:0; }
.chapter-drawer:not([open]) .station-board { display:none; }
.station-group h3 { margin:0 0 5px; display:flex; align-items:center; justify-content:space-between; gap:6px; color:var(--aqua); font:650 13px/1.15 "Segoe UI",sans-serif; }
.station-group h3 small { font:11px var(--mono); }
.station-group[data-group="cleaning"] h3 { color:#e7b6c4; }
.station-group ul { list-style:none; padding:0; margin:0; display:grid; gap:5px; }
.station-group[data-group="dashboards"] ul { grid-template-columns:repeat(5,minmax(0,1fr)); }
.station-group li { min-width:0; }
.station-board a { display:flex; align-items:center; height:100%; min-height:44px; padding:5px 9px; border:1px solid #65566e; background:#242031; }
.station-board a:hover { border-color:var(--ink); background:#383144; }
.station-board a[aria-current] { color:var(--moon); border-color:var(--moon); background:#473946; box-shadow:inset 3px 0 var(--moon); }
.station-copy { display:grid; gap:2px; }
.station-copy strong { font:600 clamp(16px,1.4vw,21px)/1 var(--pixel); }
.station-copy small { color:#d2c4cd; font:12px/1.15 "Segoe UI",sans-serif; }
@media (max-width:850px) {
  .station-board { grid-template-columns:minmax(110px,1fr) minmax(0,5fr); gap:10px; }
  .station-board a { padding:5px; }
  .station-copy small { font-size:11px; }
}
@media (max-width:1100px) {
  :root { --mast-height:82px; }
  .mast-in { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:42px 40px; gap:0 8px; }
  .nav-bundle { display:contents; }
  .mast-in .rail { display:none; }
  .nav-bundle > nav.utility-nav { grid-area:1/2; gap:clamp(7px,1.8vw,15px); border:0; padding:0; }
  .nav-bundle > nav[aria-label="Main"] { grid-area:2/1/3/-1; justify-content:space-between; border-top:1px solid #4d4157; }
  .nav-bundle > nav > a { min-height:38px; font-size:13px; }
  .brand-tools .view-switch { min-height:28px; font-size:12px; }
}
@media (max-width:600px) {
  .brand-tools { grid-column:1/-1; }
  .mast-in .nav-bundle { display:flex; grid-area:2/1/3/-1; justify-content:space-between; gap:5px; border-top:1px solid #4d4157; }
  .nav-bundle > nav[aria-label="Main"] { border:0; gap:clamp(4px,1.3vw,12px); }
  .nav-bundle > nav.utility-nav { gap:clamp(4px,1.3vw,12px); padding-left:6px; border-left:1px solid #64556c; }
  .mast .nav-bundle nav a { font-size:clamp(11px,2.7vw,13px); }
  .utility-nav a span[aria-hidden] { display:none; }
}
@media (max-width:760px) {
  .drawer-credit { display:none; }
  .drawer-action { margin-left:auto; }
}
@media (max-width:640px) {
  .station-board { grid-template-columns:1fr; gap:10px; }
  .station-group[data-group="cleaning"] { display:grid; grid-template-columns:1fr 1.5fr; align-items:center; gap:12px; }
  .station-group[data-group="cleaning"] .station-copy { display:flex; align-items:baseline; gap:6px; flex-wrap:wrap; }
  .station-group[data-group="dashboards"] ul { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .drawer-current, .drawer-action { font-size:11px; }
}
@media (max-width:390px) {
  .mast nav[aria-label="Main"] { gap:3px; }
  .brand-tools .view-switch { font-size:12px; padding-inline:7px; }
  .mast .brand { font-size:17px; gap:4px; }
  .mast .brand-period { margin-left:-4px; }
  .mast nav.utility-nav { gap:7px; }
  .mast nav.utility-nav a { font-size:11px; }
  .drawer-handle { gap:6px; }
  .drawer-title { font-size:16px; }
  .drawer-title i { margin:0; font-size:13px; }
  .drawer-current, .drawer-action { font-size:10px; }
}
@media (scripting:none) {
  :root:not(:has(.chapter-drawer[open])) { --dock-height:calc(var(--handle-height) + 1px + env(safe-area-inset-bottom,0px)); }
  @media (max-width:640px) { :root:has(.chapter-drawer[open]) { --dock-height:245px; } }
}
