/*
 * system6.css - system6-1bit, a 1-bit Macintosh System 6 look for the web.
 *
 * Put class="s6" on <body> (or any container) to enable scoped styles such
 * as scrollbars and selection.  All components are prefixed "s6-".
 *
 * Fonts: Chicago is ChiKareGo2, a pixel recreation of Chicago 12 by Giles
 * Booth (CC BY, see fonts/CREDITS.txt).  It is drawn on a 16px grid, so
 * size-adjust maps the nominal 12px to 16px for one font pixel per CSS pixel.
 */

@font-face {
  font-family: "S6 Chicago";
  src: url("../fonts/ChiKareGo2.ttf") format("truetype");
  size-adjust: 133.333%;
  font-display: swap;
}

:root {
  --s6-black: #000;
  --s6-white: #fff;

  --s6-font-system: "S6 Chicago", "ChicagoFLF", "Chicago", "Charcoal", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --s6-font-app: "Geneva", "Verdana", "DejaVu Sans", sans-serif;
  --s6-font-mono: "Monaco", "Menlo", "Courier New", monospace;
  --s6-font-size: 12px;
  --s6-font-size-small: 10px;

  --s6-btn-radius: 5px;
  --s6-btn-ring-radius: 8px;
  --s6-shadow: 1px 1px 0 var(--s6-black);

  /* QuickDraw patterns: white, ltGray ($88 $22), gray ($AA $55), dkGray ($77 $DD) */
  --s6-pat-ltgray: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='2' shape-rendering='crispEdges'%3E%3Crect width='4' height='2' fill='%23fff'/%3E%3Crect width='1' height='1'/%3E%3Crect x='2' y='1' width='1' height='1'/%3E%3C/svg%3E");
  --s6-pat-gray: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2' shape-rendering='crispEdges'%3E%3Crect width='2' height='2' fill='%23fff'/%3E%3Crect width='1' height='1'/%3E%3Crect x='1' y='1' width='1' height='1'/%3E%3C/svg%3E");
  --s6-pat-dkgray: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='2' shape-rendering='crispEdges'%3E%3Crect width='4' height='2'/%3E%3Crect width='1' height='1' fill='%23fff'/%3E%3Crect x='2' y='1' width='1' height='1' fill='%23fff'/%3E%3C/svg%3E");
  /* white-on-transparent checker, laid over black text to "gray it out" the way QuickDraw did */
  --s6-pat-dim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2' shape-rendering='crispEdges'%3E%3Crect width='1' height='1' fill='%23fff'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23fff'/%3E%3C/svg%3E");
  --s6-pat-stripes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='2' shape-rendering='crispEdges'%3E%3Crect width='1' height='2' fill='%23fff'/%3E%3Crect width='1' height='1'/%3E%3C/svg%3E");

  /* sparse $80 $00 $00 $00 $08 $00 $00 $00: inverts to the near-black dark mode desktop */
  --s6-pat-sparse: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Crect width='8' height='8' fill='%23fff'/%3E%3Crect width='1' height='1'/%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3C/svg%3E");

  --s6-desktop: var(--s6-pat-gray);
}

/* ---------------------------------------------------------------- base */

/*
 * Inverted dark mode: the whole screen is inverted, as on a Mac with an
 * inverted display, since patterns and icons are drawn as black-on-white
 * images rather than coloured with variables.  Follows the system setting
 * unless the root has data-s6-theme="light" or "dark".  The desktop
 * switches to a sparse dot pattern, which inverts to near black.
 */
:root {
  color-scheme: light;
}

:root[data-s6-theme="dark"] {
  filter: invert(1);
  --s6-desktop: var(--s6-pat-sparse);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-s6-theme="light"]) {
    filter: invert(1);
    --s6-desktop: var(--s6-pat-sparse);
  }
}

.s6 {
  font-family: var(--s6-font-app);
  font-size: var(--s6-font-size);
  color: var(--s6-black);
  -webkit-font-smoothing: none;
  font-smooth: never;
}

.s6 [hidden] {
  display: none !important;
}

.s6 ::selection {
  background: var(--s6-black);
  color: var(--s6-white);
}

.s6 :focus-visible {
  outline: 1px dotted var(--s6-black);
  outline-offset: 2px;
}

.s6-system-font {
  font-family: var(--s6-font-system);
  font-size: var(--s6-font-size);
  font-weight: bold;
  font-synthesis: none;
}

/* Screen and desktop */

.s6-screen {
  position: relative;
  overflow: hidden;
  background: var(--s6-desktop) var(--s6-white);
  border-radius: 8px;
}

.s6-desktop {
  background: var(--s6-desktop) var(--s6-white);
}

.s6-pat-white  { background: var(--s6-white); }
.s6-pat-ltgray { background: var(--s6-pat-ltgray) var(--s6-white); }
.s6-pat-gray   { background: var(--s6-pat-gray) var(--s6-white); }
.s6-pat-dkgray { background: var(--s6-pat-dkgray) var(--s6-black); }
.s6-pat-black  { background: var(--s6-black); color: var(--s6-white); }

/* Disabled / dimmed: lay a white checker over the element's black pixels */
.s6-dim,
.s6-btn:disabled,
.s6-menu-item:disabled,
.s6-menu-item.is-disabled,
.s6-check:has(input:disabled) {
  position: relative;
  pointer-events: none;
}

.s6-dim::after,
.s6-btn:disabled::after,
.s6-menu-item:disabled::after,
.s6-menu-item.is-disabled::after,
.s6-check:has(input:disabled)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--s6-pat-dim);
  pointer-events: none;
}

.s6-btn:disabled::after {
  inset: 1px;
  border-radius: calc(var(--s6-btn-radius) - 1px);
}

/* Gray dotted separator */
.s6-sep,
.s6 hr {
  height: 1px;
  border: 0;
  margin: 8px 0;
  background: var(--s6-pat-gray);
}

/* ------------------------------------------------------------- menubar */

.s6-menubar {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  height: 19px;
  margin: 0;
  padding: 0 0 0 10px;
  list-style: none;
  background: var(--s6-white);
  border-bottom: 1px solid var(--s6-black);
  font-family: var(--s6-font-system);
  font-size: var(--s6-font-size);
  font-weight: bold;
  font-synthesis: none;
  user-select: none;
}

.s6-menu {
  position: relative;
  outline: none;
}

.s6-menu-title {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 9px;
  cursor: default;
}

.s6-menu:focus-within > .s6-menu-title,
.s6-menu.is-open > .s6-menu-title {
  background: var(--s6-black);
  color: var(--s6-white);
}

/* Plain link in the menu bar, no pull-down */
.s6-menu-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 9px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: default;
}

.s6-menu-link:active {
  background: var(--s6-black);
  color: var(--s6-white);
}

.s6-menu-link.is-current {
  box-shadow: inset 0 -2px 0 var(--s6-black);
}

.s6-apple::before {
  content: "";
  display: block;
  width: 9px;
  height: 11px;
  /* measured from System 6.0.8: 9x11, top row 3 of the menu bar */
  margin-top: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='11' shape-rendering='crispEdges'%3E%3Cpath d='M5 0h2v1H5zM4 1h2v1H4zM4 2h1v1H4zM1 3h3v1H1zM5 3h3v1H5zM0 4h9v1H0zM0 5h7v2H0zM0 7h9v2H0zM1 9h7v1H1zM2 10h2v1H2zM5 10h2v1H5z'/%3E%3C/svg%3E") no-repeat;
}

.s6-menu:focus-within > .s6-apple::before,
.s6-menu.is-open > .s6-apple::before {
  filter: invert(1);
}

.s6-menu-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--s6-white);
  border: 1px solid var(--s6-black);
  box-shadow: var(--s6-shadow);
  white-space: nowrap;
}

.s6-menu:focus-within > .s6-menu-list,
.s6-menu.is-open > .s6-menu-list {
  display: block;
}

/* pull-down for a menu at the right end of the bar */
.s6-menu-list.is-right {
  left: auto;
  right: 0;
}

/* half-black circle for an appearance menu, same grid as the Apple glyph */
.s6-appearance::before {
  content: "";
  display: block;
  width: 11px;
  height: 11px;
  margin-top: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h5v1H3zM1 1h2v1H1zM5 1h5v1H5zM1 2h1v1H1zM5 2h5v1H5zM0 3h1v1H0zM5 3h6v1H5zM0 4h1v1H0zM5 4h6v1H5zM0 5h1v1H0zM5 5h6v1H5zM0 6h1v1H0zM5 6h6v1H5zM0 7h1v1H0zM5 7h6v1H5zM1 8h1v1H1zM5 8h5v1H5zM1 9h2v1H1zM5 9h5v1H5zM3 10h5v1H3z'/%3E%3C/svg%3E") no-repeat;
}

.s6-menu:focus-within > .s6-appearance::before,
.s6-menu.is-open > .s6-appearance::before {
  filter: invert(1);
}

.s6-menu-item {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
  height: 16px;
  padding: 0 10px 0 16px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: 16px;
  text-align: left;
  text-decoration: none;
  cursor: default;
  position: relative;
}

.s6-menu-item:hover,
.s6-menu-item:focus-visible {
  background: var(--s6-black);
  color: var(--s6-white);
  outline: none;
}

.s6-menu-item.is-checked::before {
  content: "\2713";
  position: absolute;
  margin-left: -12px;
}

.s6-shortcut::before {
  content: "\2318";
  margin-right: 1px;
}

.s6-menu-sep {
  height: 1px;
  margin: 3px 0 4px;
  background: var(--s6-pat-gray);
}

/* -------------------------------------------------------------- windows */

.s6-window {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 120px;
  background: var(--s6-white);
  border: 1px solid var(--s6-black);
  box-shadow: var(--s6-shadow);
}

.s6-window.is-floating {
  position: absolute;
}

.s6-titlebar {
  position: relative;
  display: flex;
  flex: none;
  justify-content: center;
  align-items: center;
  height: 17px;
  padding: 0 28px;
  border-bottom: 1px solid var(--s6-black);
  background: var(--s6-white);
  user-select: none;
  cursor: default;
}

.s6-titlebar::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 1px;
  right: 1px;
  height: 11px;
  background: var(--s6-pat-stripes);
}

.s6-title {
  position: relative;
  padding: 0 4px 0 7px;
  overflow: hidden;
  background: var(--s6-white);
  font-family: var(--s6-font-system);
  font-size: var(--s6-font-size);
  font-weight: bold;
  font-synthesis: none;
  line-height: 17px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.s6-close,
.s6-zoom {
  position: absolute;
  top: 3px;
  z-index: 1;
  box-sizing: border-box;
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1px solid var(--s6-black);
  background: var(--s6-white);
  box-shadow: 0 0 0 1px var(--s6-white);
  cursor: default;
}

.s6-close { left: 8px; }
.s6-zoom  { right: 8px; }

.s6-zoom::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  border-right: 1px solid var(--s6-black);
  border-bottom: 1px solid var(--s6-black);
}

/* pressed close box shows the little starburst */
.s6-close:active {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' shape-rendering='crispEdges'%3E%3Cpath d='M4 0h1v3H4zM4 6h1v3H4zM0 4h3v1H0zM6 4h3v1H6zM1 1h1v1H1zM2 2h1v1H2zM7 1h1v1H7zM6 2h1v1H6zM1 7h1v1H1zM2 6h1v1H2zM7 7h1v1H7zM6 6h1v1H6z'/%3E%3C/svg%3E") no-repeat center var(--s6-white);
}

.s6-zoom:active {
  background: var(--s6-black);
}

/* Inactive windows: no stripes, no boxes, empty scroll bars */
.s6-window.is-inactive .s6-titlebar::before,
.s6-window.is-inactive .s6-close,
.s6-window.is-inactive .s6-zoom {
  display: none;
}

/* Desk accessory window (rounded, black title bar) */
.s6-window.s6-da {
  border-radius: 7px;
  overflow: hidden;
}

.s6-da > .s6-titlebar {
  padding: 0 4px 0 24px;
  background: var(--s6-black);
  border-bottom-color: var(--s6-black);
}

.s6-da > .s6-titlebar::before { display: none; }

.s6-da .s6-title {
  background: var(--s6-black);
  color: var(--s6-white);
}

.s6-da .s6-close {
  box-shadow: none;
  border-color: var(--s6-white);
  background: var(--s6-black);
}

.s6-da.is-inactive > .s6-titlebar {
  background: var(--s6-white);
  border-bottom-color: var(--s6-black);
}

.s6-da.is-inactive .s6-title {
  background: var(--s6-white);
  color: var(--s6-black);
}

/* Finder-style info bar under the title */
.s6-infobar {
  display: flex;
  flex: none;
  justify-content: space-between;
  gap: 12px;
  height: 17px;
  padding: 0 10px;
  border-bottom: 3px double var(--s6-black);
  font-size: 11px;
  line-height: 17px;
  white-space: nowrap;
  overflow: hidden;
}

.s6-body {
  flex: 1;
  padding: 10px 12px;
  min-height: 0;
}

/* Scrolling content pane: always shows both bars, like a Finder window */
.s6-scroll {
  flex: 1;
  min-height: 0;
  overflow: scroll;
}

.s6-scroll-y {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
}

/* ----------------------------------------------------------- scrollbars */

/* Measured from System 6 screenshots: a bar is one black line plus 14px of
   interior, and the window frame serves as its outer edge.  Arrow cells,
   the thumb box and the grow box all share their edge lines with neighbours. */

.s6 ::-webkit-scrollbar {
  width: 15px;
  height: 15px;
  background: var(--s6-white);
}

.s6 ::-webkit-scrollbar-track:vertical {
  background:
    linear-gradient(var(--s6-black), var(--s6-black)) left / 1px 100% no-repeat,
    linear-gradient(var(--s6-black), var(--s6-black)) top / 100% 1px no-repeat,
    linear-gradient(var(--s6-black), var(--s6-black)) bottom / 100% 1px no-repeat,
    var(--s6-pat-gray) var(--s6-white);
}

.s6 ::-webkit-scrollbar-track:horizontal {
  background:
    linear-gradient(var(--s6-black), var(--s6-black)) top / 100% 1px no-repeat,
    linear-gradient(var(--s6-black), var(--s6-black)) left / 1px 100% no-repeat,
    linear-gradient(var(--s6-black), var(--s6-black)) right / 1px 100% no-repeat,
    var(--s6-pat-gray) var(--s6-white);
}

/* Chrome sizes the thumb proportionally; System 6 used a fixed 16px box, so
   the thumb is drawn as more track with the box centered in it */
.s6 ::-webkit-scrollbar-thumb:vertical {
  min-height: 16px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M15 .5H.5v15H15' fill='%23fff' stroke='%23000'/%3E%3C/svg%3E") center / 15px 16px no-repeat,
    linear-gradient(var(--s6-black), var(--s6-black)) left / 1px 100% no-repeat,
    var(--s6-pat-gray) var(--s6-white);
}

.s6 ::-webkit-scrollbar-thumb:horizontal {
  min-width: 16px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='15' shape-rendering='crispEdges'%3E%3Cpath d='M.5 15V.5h15V15' fill='%23fff' stroke='%23000'/%3E%3C/svg%3E") center / 16px 15px no-repeat,
    linear-gradient(var(--s6-black), var(--s6-black)) top / 100% 1px no-repeat,
    var(--s6-pat-gray) var(--s6-white);
}

.s6 ::-webkit-scrollbar-button {
  display: block;
  width: 15px;
  height: 15px;
  background-repeat: no-repeat;
}

/* arrow cells leave their divider to the track, so a thumb box parked at
   either end shares that line as on the real thing */
.s6 ::-webkit-scrollbar-button:vertical   { height: 14px; }
.s6 ::-webkit-scrollbar-button:horizontal { width: 14px; }

.s6 ::-webkit-scrollbar-button:vertical:start:increment,
.s6 ::-webkit-scrollbar-button:vertical:end:decrement,
.s6 ::-webkit-scrollbar-button:horizontal:start:increment,
.s6 ::-webkit-scrollbar-button:horizontal:end:decrement {
  display: none;
}

.s6 ::-webkit-scrollbar-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='14' shape-rendering='crispEdges'%3E%3Cpath d='M.5 0V14' stroke='%23000' fill='none'/%3E%3Cpath d='M7.5 1.5L13.5 7.5H10.5V11.5H4.5V7.5H1.5Z' fill='%23fff' stroke='%23000'/%3E%3C/svg%3E");
}
.s6 ::-webkit-scrollbar-button:vertical:decrement:active {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='14' shape-rendering='crispEdges'%3E%3Cpath d='M.5 0V14' stroke='%23000' fill='none'/%3E%3Cpath d='M7.5 1.5L13.5 7.5H10.5V11.5H4.5V7.5H1.5Z' fill='%23000' stroke='%23000'/%3E%3C/svg%3E");
}

.s6 ::-webkit-scrollbar-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='14' shape-rendering='crispEdges'%3E%3Cpath d='M.5 0V14' stroke='%23000' fill='none'/%3E%3Cpath d='M7.5 12.5L13.5 6.5H10.5V2.5H4.5V6.5H1.5Z' fill='%23fff' stroke='%23000'/%3E%3C/svg%3E");
}
.s6 ::-webkit-scrollbar-button:vertical:increment:active {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='14' shape-rendering='crispEdges'%3E%3Cpath d='M.5 0V14' stroke='%23000' fill='none'/%3E%3Cpath d='M7.5 12.5L13.5 6.5H10.5V2.5H4.5V6.5H1.5Z' fill='%23000' stroke='%23000'/%3E%3C/svg%3E");
}

.s6 ::-webkit-scrollbar-button:horizontal:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='15' shape-rendering='crispEdges'%3E%3Cpath d='M0 .5H14' stroke='%23000' fill='none'/%3E%3Cpath d='M.5 7.5L6.5 1.5V4.5H10.5V10.5H6.5V13.5Z' fill='%23fff' stroke='%23000'/%3E%3C/svg%3E");
}
.s6 ::-webkit-scrollbar-button:horizontal:decrement:active {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='15' shape-rendering='crispEdges'%3E%3Cpath d='M0 .5H14' stroke='%23000' fill='none'/%3E%3Cpath d='M.5 7.5L6.5 1.5V4.5H10.5V10.5H6.5V13.5Z' fill='%23000' stroke='%23000'/%3E%3C/svg%3E");
}

.s6 ::-webkit-scrollbar-button:horizontal:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='15' shape-rendering='crispEdges'%3E%3Cpath d='M0 .5H14' stroke='%23000' fill='none'/%3E%3Cpath d='M13.5 7.5L7.5 1.5V4.5H3.5V10.5H7.5V13.5Z' fill='%23fff' stroke='%23000'/%3E%3C/svg%3E");
}
.s6 ::-webkit-scrollbar-button:horizontal:increment:active {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='15' shape-rendering='crispEdges'%3E%3Cpath d='M0 .5H14' stroke='%23000' fill='none'/%3E%3Cpath d='M13.5 7.5L7.5 1.5V4.5H3.5V10.5H7.5V13.5Z' fill='%23000' stroke='%23000'/%3E%3C/svg%3E");
}

/* grow box */
.s6 ::-webkit-scrollbar-corner {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' shape-rendering='crispEdges'%3E%3Cpath d='M.5 0V15M0 .5H15' stroke='%23000' fill='none'/%3E%3Crect x='5.5' y='5.5' width='8' height='8' fill='%23fff' stroke='%23000'/%3E%3Crect x='3.5' y='3.5' width='6' height='6' fill='%23fff' stroke='%23000'/%3E%3C/svg%3E") no-repeat var(--s6-white);
}

/* Inactive windows: bars become empty outlined strips */
.s6 .is-inactive ::-webkit-scrollbar-track:vertical,
.s6 .is-inactive ::-webkit-scrollbar-button:vertical {
  background: linear-gradient(var(--s6-black), var(--s6-black)) left / 1px 100% no-repeat var(--s6-white);
}

.s6 .is-inactive ::-webkit-scrollbar-track:horizontal,
.s6 .is-inactive ::-webkit-scrollbar-button:horizontal {
  background: linear-gradient(var(--s6-black), var(--s6-black)) top / 100% 1px no-repeat var(--s6-white);
}

.s6 .is-inactive ::-webkit-scrollbar-thumb {
  background: transparent;
}

.s6 .is-inactive ::-webkit-scrollbar-corner {
  background:
    linear-gradient(var(--s6-black), var(--s6-black)) left / 1px 100% no-repeat,
    linear-gradient(var(--s6-black), var(--s6-black)) top / 100% 1px no-repeat,
    var(--s6-white);
}

/* Browsers without ::-webkit-scrollbar (Firefox) get the closest standard fit */
@supports not selector(::-webkit-scrollbar) {
  .s6 * {
    scrollbar-color: var(--s6-black) var(--s6-white);
  }
}

/* -------------------------------------------------------------- dialogs */

/* Modal dialog (dBoxProc): 1px black, 1px white, 2px black frame */
.s6-dialog {
  position: relative;
  padding: 14px 16px;
  background: var(--s6-white);
  border: 1px solid var(--s6-black);
  box-shadow: inset 0 0 0 1px var(--s6-white), inset 0 0 0 3px var(--s6-black);
}

.s6-dialog.is-centered {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 900;
}

/* Plain box (plainDBox), used for simple notices */
.s6-plainbox {
  padding: 12px 14px;
  background: var(--s6-white);
  border: 1px solid var(--s6-black);
}

/* Shadowed box (altDBoxProc) */
.s6-shadowbox {
  padding: 12px 14px;
  background: var(--s6-white);
  border: 1px solid var(--s6-black);
  box-shadow: 2px 2px 0 var(--s6-black);
}

.s6-alert {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px 16px;
  align-items: start;
}

.s6-alert-text {
  font-family: var(--s6-font-system);
  font-weight: bold;
  font-synthesis: none;
  line-height: 16px;
  margin: 0;
}

.s6-alert-text a {
  color: inherit;
}

.s6-alert-text a:hover {
  background: var(--s6-black);
  color: var(--s6-white);
  text-decoration: none;
}

.s6-buttons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  grid-column: 1 / -1;
  margin-top: 8px;
}

.s6-icon-stop,
.s6-icon-note,
.s6-icon-caution {
  display: block;
  width: 32px;
  height: 32px;
  background-repeat: no-repeat;
}

.s6-icon-stop {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Cpath d='M10.5 1.5h11l9 9v11l-9 9h-11l-9-9v-11z' fill='%23fff' stroke='%23000'/%3E%3Cpath d='M12 4h8l8 8v8l-8 8h-8l-8-8v-8z'/%3E%3Cpath d='M11 9h2v8h1V7h2v10h1V8h2v9h1v-6h2v9l-2 4h-7l-3-5-2-3 1-1 2 2h1z' fill='%23fff'/%3E%3C/svg%3E");
}

.s6-icon-note {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Cpath d='M11.5 8.5c-5 0-8 4-8 9 0 4 2 7 4 8v4h9v-3c3 0 4-1 4-4l2-1-2-3c0-6-4-10-9-10z' fill='%23fff' stroke='%23000'/%3E%3Crect x='14' y='15' width='2' height='2'/%3E%3Cpath d='M20.5 1.5h9v7h-5l-3 3v-3h-1z' fill='%23fff' stroke='%23000'/%3E%3Cpath d='M22 4h6M22 6h4' stroke='%23000'/%3E%3C/svg%3E");
}

.s6-icon-caution {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Cpath d='M16 2L30.5 29.5h-29z' fill='%23fff' stroke='%23000' stroke-linejoin='miter'/%3E%3Cpath d='M16 6l12 22H4z' fill='%23fff' stroke='%23000'/%3E%3Crect x='15' y='12' width='3' height='9'/%3E%3Crect x='15' y='23' width='3' height='3'/%3E%3C/svg%3E");
}

/* -------------------------------------------------------------- buttons */

.s6-btn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 59px;
  height: 20px;
  padding: 0 12px;
  border: 1px solid var(--s6-black);
  border-radius: var(--s6-btn-radius);
  background: var(--s6-white);
  color: var(--s6-black);
  font-family: var(--s6-font-system);
  font-size: var(--s6-font-size);
  font-weight: bold;
  font-synthesis: none;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}

.s6-btn:active,
.s6-btn.is-pressed {
  background: var(--s6-black);
  color: var(--s6-white);
}

/* Default button: per Inside Macintosh, a 3px ring inset -4 from the button
   (leaving a 1px white gap) with a 16px corner oval */
.s6-btn.is-default {
  margin: 4px;
}

.s6-btn.is-default::before {
  content: "";
  position: absolute;
  inset: -5px;
  border: 3px solid var(--s6-black);
  border-radius: var(--s6-btn-ring-radius);
  pointer-events: none;
}

.s6-btn:focus-visible {
  outline-offset: 6px;
}

/* ------------------------------------------------- checkboxes & radios */

.s6-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--s6-font-system);
  font-weight: bold;
  font-synthesis: none;
  cursor: default;
  user-select: none;
}

.s6-check input,
.s6 input[type="checkbox"],
.s6 input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 12px;
  height: 12px;
  margin: 0;
  border: 1px solid var(--s6-black);
  background: var(--s6-white) no-repeat center;
}

.s6 input[type="radio"],
.s6-check input[type="radio"] {
  border-radius: 50%;
}

.s6 input[type="checkbox"]:checked,
.s6-check input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' shape-rendering='crispEdges'%3E%3Cpath d='M0 0l10 10M10 0L0 10' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E");
}

.s6 input[type="radio"]:checked,
.s6-check input[type="radio"]:checked {
  background-image: radial-gradient(circle, var(--s6-black) 0 3px, transparent 3.5px);
}

/* pressed: frame thickens */
.s6 input[type="checkbox"]:active,
.s6 input[type="radio"]:active,
.s6-check:active input {
  box-shadow: inset 0 0 0 1px var(--s6-black);
}

/* ----------------------------------------------------------- text input */

.s6-input,
.s6-textarea,
.s6 input[type="text"],
.s6 input[type="password"],
.s6 input[type="search"],
.s6 input[type="number"],
.s6 textarea {
  padding: 2px 3px;
  border: 1px solid var(--s6-black);
  border-radius: 0;
  background: var(--s6-white);
  color: var(--s6-black);
  font-family: var(--s6-font-app);
  font-size: var(--s6-font-size);
  outline: none;
  box-shadow: none;
}

.s6-input:focus,
.s6 input:focus,
.s6 textarea:focus {
  outline: none;
}

.s6 textarea,
.s6-textarea {
  resize: none;
}

/* Edit text in dialogs sits inside a 3px white margin + frame */
.s6-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.s6-label {
  font-family: var(--s6-font-system);
  font-weight: bold;
  font-synthesis: none;
}

/* ------------------------------------------------------------ popup menu */

.s6-select,
.s6 select {
  appearance: none;
  -webkit-appearance: none;
  height: 20px;
  padding: 0 22px 0 8px;
  border: 1px solid var(--s6-black);
  border-radius: 0;
  box-shadow: var(--s6-shadow);
  background: var(--s6-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='6' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h11L5.5 6z'/%3E%3C/svg%3E") no-repeat right 6px center;
  color: var(--s6-black);
  font-family: var(--s6-font-system);
  font-size: var(--s6-font-size);
  font-weight: bold;
  font-synthesis: none;
  cursor: default;
}

/* ----------------------------------------------------- group / list box */

.s6-group {
  margin: 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--s6-black);
}

.s6-group > legend {
  padding: 0 4px;
  font-family: var(--s6-font-system);
  font-weight: bold;
  font-synthesis: none;
}

.s6-listbox {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--s6-black);
  background: var(--s6-white);
  overflow-y: scroll;
}

.s6-listbox > li {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 16px;
  padding: 0 4px;
  line-height: 16px;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}

.s6-listbox > li.is-selected,
.s6-listbox > li[aria-selected="true"] {
  background: var(--s6-black);
  color: var(--s6-white);
}

.s6-listbox > li.is-selected img,
.s6-listbox > li.is-selected svg {
  filter: invert(1);
}

/* ---------------------------------------------------------- progress bar */

.s6-progress,
.s6 progress {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 12px;
  border: 1px solid var(--s6-black);
  background: var(--s6-white);
}

.s6 progress::-webkit-progress-bar { background: var(--s6-white); }
.s6 progress::-webkit-progress-value {
  background: var(--s6-pat-ltgray) var(--s6-white);
  border-right: 1px solid var(--s6-black);
}
.s6 progress::-moz-progress-bar {
  background: var(--s6-pat-ltgray) var(--s6-white);
  border-right: 1px solid var(--s6-black);
}

.s6-progress > .s6-progress-fill {
  height: 100%;
  background: var(--s6-pat-ltgray) var(--s6-white);
  border-right: 1px solid var(--s6-black);
}

.s6-progress.is-dark > .s6-progress-fill { background: var(--s6-pat-dkgray) var(--s6-black); }
.s6-progress.is-solid > .s6-progress-fill { background: var(--s6-black); }

/* --------------------------------------------------------- Finder icons */

.s6-icons {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 14px 6px;
  padding: 10px 6px;
}

.s6-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 72px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--s6-black);
  font-family: var(--s6-font-app);
  font-size: var(--s6-font-size-small);
  text-align: center;
  text-decoration: none;
  cursor: default;
  user-select: none;
}

.s6-icon > img,
.s6-icon > svg {
  display: block;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.s6-icon > span {
  padding: 0 2px;
  background: var(--s6-white);
  line-height: 13px;
  white-space: nowrap;
}

.s6-icon.is-selected > img,
.s6-icon.is-selected > svg {
  filter: invert(1);
}

.s6-icon.is-selected > span {
  background: var(--s6-black);
  color: var(--s6-white);
}

/* Desktop icons are absolutely placed; give them a white label plate */
.s6-desktop-icon {
  position: absolute;
}

/* ------------------------------------------------------------ text bits */

.s6-h {
  margin: 0 0 6px;
  font-family: var(--s6-font-system);
  font-size: var(--s6-font-size);
  font-weight: bold;
  font-synthesis: none;
}

.s6-mono {
  font-family: var(--s6-font-mono);
  font-size: 11px;
}

.s6-kbd {
  display: inline-block;
  min-width: 14px;
  padding: 0 3px;
  border: 1px solid var(--s6-black);
  border-radius: 3px;
  box-shadow: var(--s6-shadow);
  font-family: var(--s6-font-system);
  font-size: var(--s6-font-size-small);
  line-height: 14px;
  text-align: center;
}

.s6-inverse {
  background: var(--s6-black);
  color: var(--s6-white);
}

/* drag outline used by system6.js while moving windows */
.s6-drag-outline {
  position: absolute;
  z-index: 2000;
  pointer-events: none;
  padding: 1px;
  background: var(--s6-pat-gray);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/*
 * blog.css - blog layout on top of system6-1bit.
 *
 * Posts are static windows on the desktop pattern; the sidebar holds a
 * few Finder-style windows.  Chicago is set at whole multiples of 12px
 * (one pixel of the font grid is 16px at 12px) so it stays crisp.
 */

html, body {
  margin: 0;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
}

.s6-menubar {
  position: sticky;
  top: 0;
}

.menu-spacer {
  flex: 1;
}

.menu-narrow {
  display: none;
}

@media (max-width: 600px) {
  .menu-wide  { display: none; }
  .menu-narrow { display: block; }
}

/* ---------------------------------------------------------------- layout */

.site {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 24px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.masthead,
.site-foot {
  grid-column: 1 / -1;
}

@media (max-width: 780px) {
  .site {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-top: 16px;
  }
}

.masthead {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}

.masthead svg {
  flex: none;
  width: 64px;
  height: 64px;
}

.site-name {
  margin: 0;
  font-family: var(--s6-font-system);
  font-size: 36px;
  font-weight: bold;
  font-synthesis: none;
  line-height: 48px;
}

.site-name a {
  text-decoration: none;
}

.tagline {
  margin: 2px 0 0;
}

.posts,
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ----------------------------------------------------------- post list */

.listing-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  padding: 6px 12px;
}

.listing-head h2 {
  margin: 0;
}

.listing-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.entry-body {
  padding: 14px 18px 16px;
}

.entry-title {
  margin: 0 0 10px;
  font-family: var(--s6-font-system);
  font-size: 24px;
  font-weight: bold;
  font-synthesis: none;
  line-height: 32px;
}

.entry-title a {
  text-decoration: none;
}

.entry-title a:hover {
  background: var(--s6-black);
  color: var(--s6-white);
}

.entry-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

a.s6-title {
  color: inherit;
  text-decoration: none;
}

a.s6-title:hover {
  background: var(--s6-black);
  color: var(--s6-white);
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.folder-view {
  padding: 14px 10px;
}

.empty {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ----------------------------------------------------------------- prose */

.prose {
  font-size: 14px;
  line-height: 1.6;
  /* long-form text reads better smoothed; chrome stays 1-bit */
  -webkit-font-smoothing: auto;
}

.prose > :first-child { margin-top: 0; }
.prose > :last-child  { margin-bottom: 0; }

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 14px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li {
  margin-bottom: 4px;
}

.prose h2,
.prose h3 {
  font-family: var(--s6-font-system);
  font-weight: bold;
  font-synthesis: none;
  -webkit-font-smoothing: none;
}

.prose h2 {
  margin: 26px 0 10px;
  font-size: 24px;
  line-height: 32px;
}

.prose h3 {
  margin: 22px 0 6px;
  font-size: 12px;
  line-height: 16px;
}

.prose a:hover {
  background: var(--s6-black);
  color: var(--s6-white);
  text-decoration: none;
}

.prose code {
  font-family: var(--s6-font-mono);
  font-size: 12px;
}

.prose pre {
  margin: 0 0 14px;
  padding: 8px 10px;
  border: 1px solid var(--s6-black);
  box-shadow: var(--s6-shadow);
  overflow-x: auto;
  line-height: 1.45;
}

.prose blockquote {
  margin: 0 0 14px;
  padding: 2px 0 2px 14px;
  border-left: 3px double var(--s6-black);
}

.prose figure {
  margin: 18px 0;
}

.prose img {
  max-width: 100%;
  height: auto;
}

/* photos in posts are flipped back so they aren't shown as negatives;
   1-bit product screenshots stay inverted with the rest of the screen */
:root[data-s6-theme="dark"] .prose img {
  filter: invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-s6-theme="light"]) .prose img {
    filter: invert(1);
  }
}

.prose figure img {
  display: block;
  border: 1px solid var(--s6-black);
  box-shadow: var(--s6-shadow);
}

/* Hugo's syntax highlighter writes inline colours; keep code 1-bit */
.prose .highlight pre,
.prose .highlight code {
  color: var(--s6-black) !important;
  background: var(--s6-white) !important;
}

.prose .highlight span {
  color: inherit !important;
  background: none !important;
}

.prose figcaption p {
  margin: 0;
}

.prose figcaption {
  margin-top: 6px;
  font-size: var(--s6-font-size-small);
  line-height: 1.4;
  text-align: center;
}

.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0 0 14px;
}

.notice > span {
  flex: none;
}

.notice .s6-alert-text {
  -webkit-font-smoothing: none;
}

/* single post page */

.post-title {
  margin: 0 0 4px;
  font-family: var(--s6-font-system);
  font-size: 24px;
  font-weight: bold;
  font-synthesis: none;
  line-height: 32px;
}

.post-body {
  padding: 18px 22px 22px;
}

/* ---------------------------------------------------------------- sidebar */

.side-body {
  padding: 10px 12px 12px;
  line-height: 1.45;
}

.side-body p {
  margin: 0 0 8px;
}

.side-body p:last-child {
  margin-bottom: 0;
}

.about-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.about-head svg {
  flex: none;
  width: 32px;
  height: 32px;
}

/* Finder "by Name" list */
.catlist {
  margin: 0;
  padding: 4px 0;
  list-style: none;
}

.catlist a {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  padding: 0 10px;
  text-decoration: none;
  white-space: nowrap;
  cursor: default;
}

.catlist svg {
  flex: none;
  width: 16px;
  height: 16px;
}

.catlist .count {
  margin-left: auto;
  font-size: var(--s6-font-size-small);
}

.catlist a:hover {
  background: var(--s6-pat-ltgray) var(--s6-white);
}

.catlist a:hover > span {
  background: var(--s6-white);
}

.catlist a.is-current {
  background: var(--s6-black);
  color: var(--s6-white);
}

.catlist a.is-current svg {
  filter: invert(1);
}

.catlist a.is-current > span {
  background: none;
}

/* ----------------------------------------------------------------- footer */

.site-foot {
  font-size: var(--s6-font-size-small);
  line-height: 1.5;
  text-align: center;
}

/* --------------------------------------------------------------- products */

.apps-window .s6-icons {
  padding: 12px 8px;
}

.product-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.product-icon {
  flex: none;
  display: block;
  width: 64px;
  height: 64px;
}

.product-icon img,
.product-icon svg {
  display: block;
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.product-head .entry-title,
.product-head .post-title {
  margin: 0;
}

.product-sub {
  margin: 2px 0 0;
  font-family: var(--s6-font-system);
  font-weight: bold;
  font-synthesis: none;
}

.spec {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 14px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--s6-black);
}

.spec dt {
  font-family: var(--s6-font-system);
  font-weight: bold;
  font-synthesis: none;
}

.spec dd {
  margin: 0;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
}

.shots-head {
  margin: 26px 0 12px;
  font-family: var(--s6-font-system);
  font-size: 24px;
  font-weight: bold;
  font-synthesis: none;
  line-height: 32px;
}

.shots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.shot {
  margin: 0;
  max-width: 100%;
}

/* screenshots are 1-bit captures: show them at whole-pixel scale */
.shot img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--s6-black);
  box-shadow: 2px 2px 0 var(--s6-black);
  image-rendering: pixelated;
}

.shot figcaption {
  margin-top: 8px;
  font-size: var(--s6-font-size-small);
  line-height: 1.4;
  text-align: center;
}

.shot figcaption p {
  margin: 0;
}
