/* DEERE // CYCLEBOOK on the web: the desk, the cover note and the scaled 1920x1080 card canvas.
   Tokens and rules come from DESIGN.md; the canvas itself is the report's exported SVG. */
:root {
  --ink: #0E0E0C;
  --paper: #F4F4F0;
  --s: 0.5;
  --gutter: 24px;
  --desk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Crect width='4' height='4' fill='%23F4F4F0'/%3E%3Crect width='2' height='2' fill='%230E0E0C'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%230E0E0C'/%3E%3C/svg%3E");
  color-scheme: light;
  scrollbar-color: var(--ink) var(--paper);
  background: var(--paper) var(--desk);
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--ink); color: var(--paper); }

body {
  margin: 0;
  padding-block: var(--gutter);
  padding-inline: var(--gutter);
  color: var(--ink);
  font: 400 15px/1.6 Verdana, Geneva, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.desk { width: calc(1920px * var(--s)); margin-inline: auto; }

/* The cover note: one paper card on the desk, built like a card header, lined up with the report card below. */
.note {
  width: calc(1500px * var(--s));
  margin: 0 0 12px calc(216px * var(--s));
  padding: 24px 32px 30px;
  background: var(--paper);
  border: 4px solid var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "why" "side";
  gap: 22px 48px;
}

.note-head {
  grid-area: head;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
  padding-bottom: 12px;
  border-bottom: 4px solid var(--ink);
}

h1 { flex: 0 1 auto; min-width: 0; margin: 0; line-height: 0; }
.masthead { display: block; width: 100%; max-width: 428px; height: auto; }

.note-asof { margin: 0; font-size: 15px; line-height: 1.55; }
.note-asof b { font-size: 16px; }

.note-why { grid-area: why; }
h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; line-height: 1.3; }
.note p { margin: 0; }
.note-why p { max-width: 66ch; text-wrap: pretty; }

.note-side { grid-area: side; display: grid; justify-items: start; align-content: start; gap: 14px; }
.small { font-size: 12px; line-height: 1.55; max-width: 46ch; }
.small code { font: 700 12px/1 Verdana, Geneva, sans-serif; }

/* The painted button from the cards: 12px radius, 3px outline, one 4px ink lift; hover underlines, press inverts. */
.painted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 4px 4px 0 0 var(--ink);
  font: 700 16px/1.2 Verdana, Geneva, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.painted:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.painted:active { color: var(--paper); background: var(--ink); }
.painted:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }

.phone-hint { display: none; margin: 0 0 12px; padding: 6px 10px; background: var(--paper); border: 3px solid var(--ink); max-width: none; }

/* The canvas: fixed 1920x1080 page coordinates, scaled as one piece, like Power BI's fit-to-page. */
.stage { position: relative; width: calc(1920px * var(--s)); height: calc(1080px * var(--s)); }
.canvas { position: absolute; top: 0; left: 0; width: 1920px; height: 1080px; transform: scale(var(--s)); transform-origin: 0 0; }
.card-layer { position: absolute; inset: 0; }
.v { position: absolute; margin: 0; }
img.v { object-fit: contain; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }

.text { font-family: Verdana, Geneva, sans-serif; line-height: 1.35; color: var(--ink); }
.text p { margin: 0; }

/* Native Power BI buttons, restyled from their exported states. */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--fg);
  background: var(--fill);
  border: var(--ol) solid var(--ink);
  border-radius: 0;
  box-shadow: var(--lift);
  font: 700 var(--fs)/1.2 Verdana, Geneva, sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  color: var(--fg-hover);
  background: var(--fill-hover);
  border-width: var(--ol-hover);
  text-decoration: var(--ul-hover);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.btn:active { color: var(--fg-press); background: var(--fill-press); }

/* Transparent slicer tiles over the painted keys and strips; the strip itself draws the selected state. */
.slicer { display: grid; }
.cell {
  position: relative;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .cell:hover::after { content: ""; position: absolute; inset: 4px; border: 2px solid var(--ink); }
}

.btn:focus-visible, .cell:focus-visible {
  z-index: 1;
  outline: 4px solid var(--ink);
  outline-offset: 4px;
  box-shadow: var(--lift, 0 0 0 0 transparent), 0 0 0 4px var(--paper);
}

.stage-message { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; }
.stage-message[hidden] { display: none; }
.stage-message p, .stage-note {
  margin: 0;
  max-width: 52ch;
  padding: 14px 18px;
  background: var(--paper);
  border: 3px solid var(--ink);
  font-size: 15px;
}

@media (min-width: 1280px) {
  .note { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head head" "why side"; }
  .note-asof { text-align: right; }
  .note-side { width: 350px; }
}

@media (hover: none) { .keys { display: none; } }

@media (max-width: 759px) {
  :root { --gutter: 16px; }
  .note { width: auto; margin-left: 0; padding: 18px 18px 22px; }
  .phone-hint { display: block; }
}
