/* What every page of nemanli.com shares: the pixel cursors of Paint and
   the toolbox's buttons. Each page's own styles come after this file. */

* { box-sizing: border-box; }

/* the pixel pencil, while a tool is down (the home page always draws) */
.drawing, .drawing button, .blank, .blank button {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath d='M9 19 L22 6 L26 10 L13 23 Z' fill='white' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M22 6 L24.5 3.5 L28.5 7.5 L26 10 Z' fill='black'/%3E%3Cpath d='M9 19 L13 23 L3 29 Z' fill='white' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M3 29 L5.5 24.5 L7.5 26.5 Z' fill='black'/%3E%3C/svg%3E") 3 29, crosshair;
}

/* over a link the pencil turns into a pixel hand; its fingertip is the
   hotspot, and it dips while the link is pressed */
a { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath d='M10 3 L11 2 H12 L13 3 V11 H17 V12 H21 V13 H24 L25 14 V22 L23 25 V29 H12 V26 L9 23 L6 20 V18 L7 17 H8 L10 19 Z' fill='white' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M13 11 V15 M17 12 V15.5 M21 13 V16' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") 11 2, pointer; }
a:active { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath d='M10 5 L11 4 H12 L13 5 V11 H17 V12 H21 V13 H24 L25 14 V22 L23 25 V29 H12 V26 L9 23 L6 20 V18 L7 17 H8 L10 19 Z' fill='white' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M13 11 V15 M17 12 V15.5 M21 13 V16' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") 11 4, pointer; }

/* the eraser: a hollow square, centred on the pointer */
.erasing, .erasing a, .erasing button {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' shape-rendering='crispEdges'%3E%3Crect x='2.5' y='2.5' width='15' height='15' fill='white' stroke='black'/%3E%3C/svg%3E") 10 10, cell;
}

/* over a tool, the pointer shows that tool: pencil, eraser, the eye */
.tool[data-tool="pencil"] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath d='M9 19 L22 6 L26 10 L13 23 Z' fill='white' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M22 6 L24.5 3.5 L28.5 7.5 L26 10 Z' fill='black'/%3E%3Cpath d='M9 19 L13 23 L3 29 Z' fill='white' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M3 29 L5.5 24.5 L7.5 26.5 Z' fill='black'/%3E%3C/svg%3E") 3 29, crosshair; }
.tool[data-tool="eraser"] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath d='M4 21 L15 10 L22 17 L11 28 Z' fill='white' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M15 10 L20 5 L27 12 L22 17 Z' fill='black' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 5 22, pointer; }
.tool.stage-toggle { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath d='M3 16 Q16 4 29 16 Q16 28 3 16 Z' fill='white' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='16' cy='16' r='4.5' fill='black'/%3E%3Crect x='16' y='13' width='2' height='2' fill='white'/%3E%3C/svg%3E") 16 16, pointer; }

/* the doodle: hard square pixels, never smoothed */
.paint { position: absolute; pointer-events: none; image-rendering: pixelated; image-rendering: crisp-edges; }

/* the toolbox's buttons */
.tool {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 7px;
  border: 0;
  background: none;
  color: var(--ink);
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.tools .tool[aria-pressed="true"] { background-color: rgba(0, 0, 0, 0.09); }

/* a box without a tag (the toolbox) is outlined, with no name chip */
.box:not([data-tag])::before { display: none; }
