/* Code Portfolio page (O8, the workshop): the full-screen pixel room, its parchment scroll and the every-project table.
   Everything is built by js/codcript.js from data/code.json; js/workcript.js draws the room.
   Shared header, tokens and footer live in styles.css */

/* =========================================================
   TOKENS: every number this page uses, in one place.
   To change the look, change a value here; the rules below only read these.
   Colours come from styles.css roles, so both themes keep working
   ========================================================= */

.thecodepage {
  /* The workshop band. Its colours are the ROOM's (the picture's darkest stone), not the
     page's: the room is the same picture in both themes, like a photo */
  --workshop-band: #1E1915;            /* the room's darkest stone, so the canvas melts into the band */
  --workshop-ink: #D8CFC2;             /* text on the band: 11.3 on it */
  --workshop-muted: #A99F92;           /* the credit line: 6.7 on it */
  --workshop-ring: #FFFFFF;            /* the outline round an object you point at */
  --workshop-ring-shadow: #1E1915;     /* a dark line outside it, so it shows on light stone too */
  --spot-tag-bg: #1E1915;
  --spot-tag-ink: #FFFFFF;
  --spot-tag-size: var(--step--2);     /* the type scale's tiny-label step: never under 11.5px */
  --spot-tag-pad: var(--space-1) var(--space-2);

  /* Touch targets: 44px is the size a fingertip hits reliably (WCAG 2.5.5, Apple's guide).
     styles.css has no token for it, so it's named here once instead of typed in three rules */
  --target-touch: 2.75rem;             /* 44px */
  --target-small: 2.25rem;             /* 36px: the table's filter buttons, a mouse-sized target */

  /* Page layout */
  --code-section-gap: var(--space-7);

  /* The full-screen frame (O8 v2) */
  --frame-shade: rgb(0 0 0 / 0.6);     /* the shadow behind the header, so its light text reads */
  --room-dim: rgb(0 0 0 / 0.45);       /* the room behind an open scroll */

  /* The parchment scroll: the open shelf. Its colours are the PAPER's, the same in both themes */
  --parchment: #EADBB8;
  --parchment-edge: #C9B48A;           /* the aged edges (decoration) */
  --parchment-ink: #3A2A1C;            /* text: 10.0 on the parchment */
  --parchment-muted: #6A5034;          /* secondary text: 5.45 */
  --parchment-link: #2F4A42;           /* links, a deep pine: 7.0 */
  --parchment-line: #CDB98F;           /* the hairline between rows (decoration) */
  --scroll-rod: #6E4A30;               /* the wooden rods at the top and bottom */
  --scroll-rod-dark: #47301F;
  --scroll-knob: #B98B3E;              /* their brass ends */
  --scroll-rod-size: 0.875rem;         /* 14px */
  --scroll-width: 26rem;
  --scroll-time: var(--speed-slow);                /* how long it takes to unroll */

  /* Status dots (colours: --color-status-* in styles.css) */
  --status-dot: 0.8rem;
  --status-ring: 2px;
}

/* =========================================================
   NO MENU BAR: on this page all navigation is IN the workshop (owner, 2026-11-26, after
   Ash's room). The map on the wall lists every page; the printer, camera and coat of arms
   lead to CAD, Art and About. The site's skip link still comes first for keyboards
   ========================================================= */
.thecodepage .site-header {
  display: none;
}

.code-main {
  padding-top: 0;                      /* the room starts at the very top of the window */
}

.every,
.code-ask {
  margin-top: var(--code-section-gap);
}

/* =========================================================
   ONLY THE SHOP, AT FIRST (owner, 2026-11-26): the page is the workshop and nothing else,
   so there's nothing to scroll. Picking an object unfolds the part below the room and the
   footer (codcript.js puts .shows-below on <body>); they fold away again once the room is
   closed and fully back in view. .has-room is added only when the room really drew, so
   without JavaScript, or if drawing fails, the table and footer just stay open
   ========================================================= */
.has-room:not(.shows-below) .code-below,
.has-room:not(.shows-below) .site-footer {
  display: none;
}

.has-room:not(.shows-below) .code-main {
  padding-bottom: 0;                   /* the page's usual bottom space would be 64px to scroll */
}

/* Unfolding: the part below rises into place as it appears */
@media (prefers-reduced-motion: no-preference) {
  .shows-below .code-below {
    animation: below-in var(--speed-slow) var(--ease-smooth) both;
  }
}

@keyframes below-in {
  from {
    opacity: 0;
    translate: 0 var(--space-6);
  }
}

/* The hidden attribute works through the browser's own "display: none", the weakest rule
   there is: any class that sets display (.scroll is a grid) quietly overrides it and
   the element shows anyway. styles.css has no global [hidden] rule, so this puts it back for
   everything codcript.js hides on this page (the stage, the scroll, the table, the Pause button).
   Two selectors' worth of weight (0,2,0) beats a one-class rule like .scroll */
.code-main [hidden] {
  display: none;
}

/* Shown only if code.json fails to load (codcript.js fills it) */
.code-note:empty {
  display: none;
}

/* =========================================================
   THE WORKSHOP: the room fills the window (100dvh = the visible height on phones too).
   The canvas is 384 x 216 pixels; workcript.js scales it to COVER the window (keeping
   every object on screen), and image-rendering: pixelated keeps the pixels sharp
   ========================================================= */
.workshop {
  position: relative;                  /* the stage, the scroll and Pause sit against it */
  height: 100vh;                       /* older browsers */
  height: 100dvh;
  overflow: hidden;
  background-color: var(--workshop-band);   /* shows only in thin bands on odd window shapes */
  color: var(--workshop-ink);
  color-scheme: dark;
}

/* "Skip to every project": the site's .skip-link (styles.css) appears top-left when focused */
.workshop-skip {
  z-index: 6;
}

.workshop-skip:focus {
  outline: 2px solid var(--workshop-ring);
  outline-offset: 2px;
}

/* The stage is the whole window. The room sits in its middle; when it's bigger than the
   window (it covers it) the edges are simply cut off by overflow: hidden */
.workshop-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.workshop-room {
  position: absolute;                  /* the objects are placed against this box */
  left: 50%;
  top: 50%;
  translate: -50% -50%;                /* centred on its own size, even when wider than the window */
  transition: opacity var(--speed-slow) ease;
}

/* Until the art packs' pictures arrive (workcript.js), the room is hidden, then it fades in
   whole: never a half-drawn room. visibility also keeps its buttons out of the Tab order */
.is-loading .workshop-room {
  opacity: 0;
  visibility: hidden;
}

/* NO ROOM (codcript.js adds .no-room when the art or the drawing fails): the page is the
   project table. The section stays (the scroll lives in it) but shrinks to nothing, and the
   scroll opens fixed to the screen over the table */
.workshop.no-room {
  height: auto;
}

.no-room .workshop-list,
.no-room .workshop-pause,
.no-room .workshop-credit {
  display: none;
}

.no-room .scroll {
  position: fixed;
}

/* THE TOWER (O8m): on a phone-width window workcript.js adds .is-tower and draws the room as
   three floors stacked in a tower, as wide as the screen and as tall as it needs. So the frame
   stops being one window high: it grows to the tower's height and the PAGE scrolls down through
   the floors, never sideways. :has() lets the section react to a class on its child */
.workshop:has(.is-tower) {
  height: auto;
}

.workshop-stage.is-tower {
  position: relative;
}

.is-tower .workshop-room {
  position: relative;
  left: auto;
  top: auto;
  translate: none;
}

/* In the tower every object is on screen and big enough to tap, so the list of the same
   objects (made for the old sideways pan) would only repeat them: it goes. The smallest
   objects (the dice board) still get a 24 x 24 px target, WCAG 2.5.8's minimum */
.workshop:has(.is-tower) .workshop-list {
  display: none;
}

.is-tower .spot {
  min-width: var(--space-5);
  min-height: var(--space-5);
}

/* Under the tower, in the page's flow: the art credit, which leaves the sky clear for the roof */
.workshop:has(.is-tower) .workshop-credit {
  position: static;
  max-width: none;
  margin: var(--space-4) var(--gutter) var(--space-5);
}

/* The scroll opens over whichever floor you're looking at: fixed to the screen, not to the
   top of a tower that may be a long way up */
.workshop:has(.is-tower) .scroll {
  position: fixed;
}

.workshop-room canvas {
  display: block;
  image-rendering: pixelated;          /* scale up without blurring: square pixels */
}

/* A tall monitor (workcript.js adds .is-letterboxed): the room fits the width and sits in the
   middle; its ceiling and floor fade into the dark band instead of ending in a hard line.
   A mask only changes what shows, not where the objects are, so clicks still line up */
.is-letterboxed .workshop-room canvas {
  mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}

.workshop-spots {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* One object you can click: an invisible box over its picture, sized in % of the room */
.spot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* No box: workcript.js draws the outline on the canvas around the object's own shape
   (1 px of air, a light line, a dark line), for hover, keyboard focus and the open shelf */
.spot:focus-visible {
  outline: none;
}

/* The name tag, in the pixel font: above the object, or below it near the top edge */
.spot-tag {
  position: absolute;
  left: 50%;
  bottom: calc(100% + var(--space-2));
  translate: -50% 0;
  z-index: 2;
  padding: var(--spot-tag-pad);
  background: var(--spot-tag-bg);
  color: var(--spot-tag-ink);
  font: var(--spot-tag-size) / 1.2 var(--font-pixel);
  letter-spacing: var(--tracking-caps); /* the pixel font is all capitals: same spacing as the mono labels */
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--speed-fast) ease;
}

.tag-below .spot-tag {
  top: calc(100% + var(--space-2));
  bottom: auto;
}

.spot:hover .spot-tag,
.spot:focus-visible .spot-tag,
.spot[aria-pressed="true"] .spot-tag {
  opacity: 1;
}

/* A link out of the room says so: a dashed tag */
.spot.is-link .spot-tag {
  background: var(--spot-tag-ink);
  color: var(--spot-tag-bg);
  outline: 1px dashed var(--spot-tag-bg);
  outline-offset: -3px;
}

/* Pause sits in the frame's top-right corner, small, like a game's settings button.
   WCAG 2.2.2: anything that moves for more than 5 seconds needs a way to stop it */
.workshop-pause {
  position: absolute;
  z-index: 3;
  top: var(--space-4);
  right: var(--space-4);
  min-height: var(--space-6);          /* 32px: a comfortable target */
  padding: 0 var(--space-4);
  border: 1px solid var(--workshop-muted);
  border-radius: var(--radius-pill);
  background: var(--frame-shade);      /* a dark backing, so it reads on pale stone */
  color: var(--workshop-ink);
  font: var(--step--1) var(--font-mono);
  cursor: pointer;
}

.workshop-pause:hover,
.workshop-pause[aria-pressed="true"] {
  border-color: var(--workshop-ink);
}

.workshop-pause:focus-visible,
.workshop-list :focus-visible {
  outline: 2px solid var(--workshop-ring);
  outline-offset: 2px;
}

/* The same objects as a list: only where the room is wider than the screen (phones, small
   tablets), until the tower layout replaces the sideways pan (O8m) */
.workshop-list {
  display: none;
}

@media (max-width: 50rem) {
  .workshop-list {
    position: absolute;                /* along the bottom of the frame, over the floor */
    inset: auto 0 0;
    z-index: 2;
    background: linear-gradient(transparent, var(--frame-shade));
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    margin: var(--space-3) 0 0;
    padding: 0 var(--gutter) var(--space-2);
    list-style: none;
    scroll-snap-type: x proximity;
  }

  .workshop-list li {
    scroll-snap-align: start;
  }

  .shelf-button,
  .shelf-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--target-touch);
    padding: 0 var(--space-3);
    border: 1px solid var(--workshop-muted);
    background: none;
    color: var(--workshop-ink);
    font: var(--step--1) var(--font-mono);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
  }

  .shelf-link {
    border-style: dashed;
  }

  .shelf-button[aria-pressed="true"] {
    background: var(--workshop-ink);
    color: var(--workshop-band);
  }
}

/* The art credit, in the room's bottom-left corner: small, but always on screen (the
   CLAUDE.md image rule: pack art and code-drawn art carry a visible credit) */
.workshop-credit {
  position: absolute;
  z-index: 2;
  left: var(--space-4);
  bottom: var(--space-3);
  max-width: min(36rem, calc(100% - 2 * var(--space-4)));
  margin: 0;
  padding: var(--space-1) var(--space-2);
  background: var(--frame-shade);      /* a dark backing, so it reads on pale stone */
  color: var(--workshop-muted);
  font-size: var(--step--2);
  line-height: 1.4;
}

.workshop-credit a {
  color: var(--workshop-ink);
}

.workshop-credit a:focus-visible {
  outline: 2px solid var(--workshop-ring);
  outline-offset: 2px;
}

/* On phones the object list runs along the bottom, so the credit moves to the top-left,
   clear of Pause in the top-right */
@media (max-width: 50rem) {
  .workshop-credit {
    top: var(--space-3);
    bottom: auto;
    max-width: calc(100% - 9rem);
  }
}

/* =========================================================
   THE SCROLL (O8 v2, owner's pick): the open shelf, unrolled over the room.
   Two wooden rods with brass ends, parchment between them. It unrolls by animating the
   sheet's grid row from 0fr to 1fr: a grid row CAN animate to "its content's height",
   which height: auto can't. color-scheme: light makes the roles inside (chips, status
   colours) take their day values, because parchment is light in both themes
   ========================================================= */
.scroll {
  position: absolute;
  z-index: 4;
  top: calc(var(--space-4) + var(--space-6) + var(--space-3));   /* just under Pause */
  right: var(--gutter);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(var(--scroll-width), calc(100% - 2 * var(--gutter)));
  max-height: calc(100% - 7rem);
  color-scheme: light;
  color: var(--parchment-ink);
  filter: drop-shadow(0 0.75rem 1.5rem var(--frame-shade));
}

/* A rod: a wooden dowel a little wider than the paper, with a brass knob at each end */
.scroll-rod {
  position: relative;
  height: var(--scroll-rod-size);
  margin-inline: calc(var(--space-2) * -1);
  border-radius: var(--radius-pill);
  background: linear-gradient(var(--scroll-rod), var(--scroll-rod-dark));
}

.scroll-rod::before,
.scroll-rod::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(var(--scroll-rod-size) + 4px);
  height: calc(var(--scroll-rod-size) + 4px);
  translate: 0 -50%;
  border-radius: 50%;
  background: var(--scroll-knob);
}

.scroll-rod::before { left: calc(var(--space-2) * -1); }
.scroll-rod::after { right: calc(var(--space-2) * -1); }

.scroll-sheet {
  display: grid;
  grid-template-rows: 0fr;             /* rolled up */
  min-height: 0;
  margin-inline: var(--space-1);
  background-color: var(--parchment);
  /* aged edges: darker toward the left and right, like paper that's been handled */
  box-shadow:
    inset var(--space-2) 0 var(--space-3) calc(var(--space-2) * -1) var(--parchment-edge),
    inset calc(var(--space-2) * -1) 0 var(--space-3) calc(var(--space-2) * -1) var(--parchment-edge);
  transition: grid-template-rows var(--scroll-time) ease;
}

.scroll.is-open .scroll-sheet {
  grid-template-rows: 1fr;             /* unrolled */
}

.scroll-inner {
  min-height: 0;
  overflow-y: auto;                    /* a long shelf scrolls inside the parchment */
  padding: var(--space-3) var(--space-5) var(--space-4);
}

.scroll-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 0 var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--parchment-line);
}

.scroll-crumb {
  grid-column: 1;
  margin: 0;
  color: var(--parchment-muted);
  font: var(--step--2) var(--font-pixel);
  letter-spacing: var(--tracking-caps);
}

.scroll-shelf {
  grid-column: 1;
  margin: 0;
  color: var(--parchment-ink);
  font-size: var(--step-1);
}

.scroll-shelf:focus {
  outline: none;                       /* focused by script so a screen reader reads it; not a control */
}

.scroll-close {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: var(--space-6);
  height: var(--space-6);
  padding: 0;
  border: 1px solid var(--parchment-muted);
  background: none;
  color: var(--parchment-ink);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.scroll-close:hover {
  background-color: var(--parchment-ink);
  color: var(--parchment);
}

.scroll :focus-visible {
  outline: 2px solid var(--parchment-ink);
  outline-offset: 2px;
}

.scroll-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.scroll-list > li {
  border-bottom: 1px solid var(--parchment-line);
}

.scroll-row-head {
  margin: 0;
  font-size: var(--step-0);
}

/* One project's row: lamp, name, year. The whole row is the button */
.scroll-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) 0;
  border: 0;
  background: none;
  color: var(--parchment-ink);
  font: 600 var(--step-0) var(--font-body);
  text-align: left;
  cursor: pointer;
}

.scroll-row:hover .scroll-row-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.scroll-row-year {
  color: var(--parchment-muted);
  font: var(--step--1) var(--font-mono);
}

/* In a row only the bulb shows: the word is in hidden text before it ("Status: Live") */
.scroll-row .ic-lamp {
  font-size: 0;
}

.scroll-detail {
  padding: 0 0 var(--space-4) calc(var(--status-dot) + var(--space-3));
}

.scroll-number {
  margin: 0 0 var(--space-2);
  color: var(--parchment-muted);
  font: var(--step--2) var(--font-mono);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.scroll-desc {
  max-width: 60ch;
  margin: 0;
}

.scroll .ic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
  font: var(--step--2) var(--font-mono);
}

.scroll .ic-chips li {
  padding: 1px var(--space-2);
  border: 1px solid var(--parchment-edge);
  color: var(--parchment-muted);
}

.scroll-links {
  margin: var(--space-3) 0 0;
  font: var(--step--1) var(--font-mono);
}

.scroll-links a {
  color: var(--parchment-link);
  text-underline-offset: 3px;
}

.scroll .ic-private {
  color: var(--parchment-muted);
}

/* The map's places: one link per page, the name over a short note */
.scroll-place {
  display: grid;
  gap: 2px;
  padding: var(--space-3) 0;
  color: var(--parchment-ink);
  text-decoration: none;
}

.scroll-place-name {
  font-weight: 600;
}

.scroll-place-note {
  color: var(--parchment-muted);
  font-size: var(--step--1);
}

.scroll-place:hover .scroll-place-name {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* The scroll's last line: the way down to the full table below the room */
.scroll-foot {
  display: flex;
  align-items: center;
  min-height: var(--target-touch);
  margin-top: var(--space-2);
  border-top: 1px solid var(--parchment-line);
  color: var(--parchment-link);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-underline-offset: 4px;
}

.scroll-foot::after {
  content: "\2193";                    /* a down arrow: the table is below */
  content: "\2193" / "";               /* the same, with empty alt text: screen readers skip it */
  margin-left: var(--space-2);
}

/* Phones: the scroll spans the frame's width and sits low, like a sheet pulled up */
@media (max-width: 40rem) {
  .scroll {
    top: auto;
    bottom: var(--space-4);
    left: var(--gutter);
    width: auto;
    max-height: 75dvh;
  }
}

/* The status word next to a lamp (in the table) */
.ic-lamp {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

/* =========================================================
   STATUS DOTS. Colour alone would fail WCAG 1.4.1, so each status also has its own
   SHAPE: filled = live, half = in progress, ring = archived. The word is always shown
   ========================================================= */
.ic-status {
  display: inline-block;
  flex: none;
  width: var(--status-dot);
  height: var(--status-dot);
  border: var(--status-ring) solid currentColor;
  border-radius: 50%;
}

.ic-status.is-live {
  color: var(--color-status-live);
  background: currentColor;
}

.ic-status.is-wip {
  color: var(--color-status-wip);
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.ic-status.is-archived {
  color: var(--color-status-archived);
  background: transparent;
}

/* On the scroll the live dot is a LIT lamp: a pale hot spot and a soft glow */
.scroll .ic-status.is-live {
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, currentColor, white 55%), currentColor 60%);
  box-shadow: 0 0 6px currentColor;
}

/* =========================================================
   EVERY PROJECT: one table, sorted by the column buttons, filtered by status
   ========================================================= */
.every-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.every-head h2 {
  margin: 0;
}

.every-count {
  color: var(--color-muted);
  font-weight: 400;
}

.every-filters {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--color-line);
}

.every-filters button {
  min-height: var(--target-small);
  padding: 0 var(--space-3);
  border: 0;
  background: none;
  color: var(--color-ink);
  font: var(--step--1) var(--font-mono);
  cursor: pointer;
}

.every-filters button + button {
  border-left: 1px solid var(--color-line);
}

.every-filters button[aria-pressed="true"] {
  background: var(--color-ink);
  color: var(--color-bg);
}

.every-scroll {
  overflow-x: auto;                    /* only the table scrolls on a narrow screen */
}

.every-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

.every-table th,
.every-table td {
  padding: var(--space-3) var(--space-3) var(--space-3) 0;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: baseline;
}

.every-table thead th {
  color: var(--color-muted);
  font: 400 var(--step--2) var(--font-mono);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.every-table thead button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

/* The sorted column: darker, with an arrow that says which way */
.every-table th[aria-sort] button {
  color: var(--color-ink);
}

/* CSS text counts as part of the button's name, so a screen reader would say "Year up arrow".
   The part after the slash is the ALTERNATIVE text: empty, because aria-sort already says
   "sorted ascending". Browsers without the slash syntax skip the line: no arrow, no harm */
.every-table th[aria-sort="ascending"] button::after { content: " ↑" / ""; }
.every-table th[aria-sort="descending"] button::after { content: " ↓" / ""; }

.every-project-cell {
  font-weight: 400;
}

.every-name {
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-ink);
  font: 600 var(--step-0) var(--font-body);
  text-align: left;
  cursor: pointer;
}

.every-name:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.every-blurb {
  display: block;
  color: var(--color-muted);
}

.every-shelf,
.every-tools {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: var(--step--2);
}

/* The year column (heading and cells) lines up on the right edge. "table" in the selector
   gives it the weight to beat the .every-table th, td padding and alignment above */
.every-table .every-year {
  padding-right: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.every-table tr.is-current > * {
  background-color: var(--color-surface);
}

.every-empty {
  color: var(--color-muted);
}

/* On a phone: drop Shelf and Built with, and the blurbs, so the rest fits 320px */
@media (max-width: 40rem) {
  .every-shelf,
  .every-tools,
  .every-blurb {
    display: none;
  }
}

/* =========================================================
   ASK STRIP: most repos are private, so say how to see one
   ========================================================= */
.code-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-line);
}

.code-ask p {
  max-width: 52ch;
  margin: 0;
}

.code-ask-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-touch);
  padding: 0 var(--space-5);
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-decoration: none;
}

.code-ask-link:hover {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

/* Reduced motion: the tags appear without a fade (the room itself is paused by workcript.js) */
@media (prefers-reduced-motion: reduce) {
  .spot-tag,
  .scroll-sheet,
  .workshop-room {
    transition: none;
  }
}
