/* Human/Machine switch and the Markdown view (static/machine.js). Same pattern as ollijunes.com,
   in the Offgrid66 palette: graphite panels, Patina for the active dot and the links. */
.mv-toggle {
  display: flex;
  width: fit-content;
  margin: -24px 0 32px max(var(--gutter), calc((100% - var(--wrap)) / 2));
  gap: 2px;
  padding: 4px;
  background: var(--panel2);
  border: var(--rule);
  border-radius: 999px;
  box-shadow: var(--mv-shadow);
}
/* Below the footer in the human view, where it covers nothing. Fixed only over the Markdown screen. */
html.mv-on .mv-toggle {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  margin: 0;
  transform: translateX(-50%);
  z-index: 1000;
}
.mv-toggle[hidden], .mv-screen[hidden] { display: none; }
.mv-toggle button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--transparent);
  color: var(--muted);
  font: 500 15px/1 var(--mono);
  letter-spacing: .02em;
  cursor: pointer;
}
.mv-toggle button:hover { color: var(--ink); }
.mv-toggle button[aria-pressed="true"] { background: var(--line); color: var(--ink); }
.mv-toggle button:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 2px; }
.mv-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mv-toggle button[aria-pressed="true"] .mv-dot { background: var(--accent); }

.mv-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  overflow-y: auto;
  background: var(--panel);
  color: var(--ink);
}
html.mv-on { overflow: hidden; }
.mv-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px calc(120px + env(safe-area-inset-bottom));
}
.mv-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: var(--rule);
  font-size: 14px;
  line-height: 1.5;
}
.mv-path { color: var(--muted); overflow-wrap: anywhere; }
.mv-links { display: flex; gap: 20px; flex-shrink: 0; }
.mv-screen a { color: var(--accent); text-underline-offset: 3px; }
.mv-screen a:hover { color: var(--accent-hover); }
.mv-md {
  margin: 28px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 16px/1.75 var(--mono);
  color: var(--ink2);
  background: none;
}
@media (max-width: 600px) {
  .mv-inner { padding-top: 28px; }
  .mv-bar { font-size: 12px; }
  .mv-host { display: none; }
  .mv-md { font-size: 14px; line-height: 1.65; }
  .mv-toggle button { padding: 0 16px; font-size: 14px; }
}
