/* Recap page styles. Extracted from prototypes/recap/index.html (the reference implementation). */
/* Tokens mirror app/src/theme.ts. Brand roles (--ink, --accent, --sheet) are
   overwritten by the palette resolver below; done/short semantics never change. */
:root {
  --desk: #EEF1EC;
  --sheet: #F8FAF6;
  --ink: #141A17;
  --accent: #1D5E45;
  --text: var(--ink);
  --graphite: color-mix(in srgb, var(--text) 66%, var(--sheet));
  --rule: color-mix(in srgb, var(--text) 16%, var(--sheet));
  --done: #1D5E45;
  --short-text: #80540E;

  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --voice: 'Newsreader', Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--desk); color: var(--text);
  font: 400 16px/24px var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }

.label { margin: 0; font: 600 12px/16px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); }
.fig { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- the sheet ---------- */
.sheet {
  max-width: 640px; margin: 0 auto; background: var(--sheet);
  padding: 32px var(--gutter) 24px;
}
@media (min-width: 680px) {
  :root { --gutter: 40px; }
  .sheet { margin: 48px auto; border: 1px solid var(--rule); padding-top: 40px; }
}
section { padding: 24px 0; border-top: 1px solid var(--rule); }

/* ---------- masthead ---------- */
.masthead { position: relative; padding-bottom: 24px; }
.logo { display: inline-flex; flex-direction: column; margin-bottom: 40px; color: var(--ink); }
.logo-img { max-height: 88px; max-width: 200px; object-fit: contain; object-position: left; }
.logo b { font: 600 15px/1 var(--sans); letter-spacing: .32em; }
.logo span { font: 400 10px/1 var(--mono); letter-spacing: .5em; margin-top: 6px; color: var(--graphite); }
.client { margin: 8px 0 0; font: 600 24px/30px var(--sans); letter-spacing: -.01em; color: var(--ink); }
.month { margin: 4px 0 0; font: 600 40px/44px var(--sans); letter-spacing: -.02em; color: var(--ink); }
.range { margin: 12px 0 0; font: 400 13px/16px var(--mono); color: var(--graphite); letter-spacing: .04em; }
.stamp {
  position: absolute; top: -4px; right: -4px; width: 112px; height: 112px;
  color: var(--accent); transform: rotate(-6deg); mix-blend-mode: multiply; opacity: .92;
  animation: stamp 320ms var(--ease) 400ms both;
}
@keyframes stamp { from { opacity: 0; transform: rotate(-14deg) scale(1.15); } }
@media (max-width: 400px) { .stamp { width: 88px; height: 88px; } }

/* ---------- client link: the lists of months and finished projects ---------- */
.index .ledger li:last-child .row { border-bottom: 0; }
.all-work { margin-top: 16px; padding-top: 24px; border-top: 3px solid var(--ink); }
.all-work .index:first-of-type { border-top: 0; }
.index .row { grid-template-columns: minmax(0, 1fr) auto 1ch; color: var(--ink); text-decoration: none; }
.index .row .sub { color: var(--graphite); }
.index .go { color: var(--graphite); }
.index .row.on { box-shadow: inset 3px 0 var(--accent); padding-left: 14px; font-weight: 600; }
.index .row.on .sub { font-weight: 400; }
.index .waits { font-weight: 600; color: var(--accent); }
.reviews { display: flex; flex-direction: column; gap: 8px; padding-bottom: 24px; }
.to-review { display: block; padding: 12px 16px; border: 1px solid var(--accent); border-radius: 4px;
  font-weight: 600; color: var(--accent); text-decoration: none; }

/* ---------- provider note: the only human voice on the page ---------- */
.note blockquote { margin: 0; font: italic 400 20px/28px var(--voice); }
.note cite { display: block; margin-top: 12px; font: 400 14px/20px var(--sans); font-style: normal; color: var(--graphite); }

/* ---------- ledger ---------- */
.ledger { list-style: none; margin: 12px 0 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 3ch minmax(0, 1fr) auto 5.5ch; align-items: center; column-gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--rule);
}
.row .n { font: 400 13px var(--mono); color: var(--graphite); }
.row .count { text-align: right; font-size: 16px; }
.row.is-short .count { color: var(--short-text); }
.row .sub { display: block; font-size: 13px; line-height: 18px; color: var(--short-text); }
.row .sub.prog { color: var(--graphite); }
.ticks { display: flex; gap: 3px; }
.ticks i { width: 5px; height: 16px; border: 1px solid var(--rule); }
.ticks i.on { background: var(--accent); border-color: var(--accent); }
.total {
  display: grid; grid-template-columns: 3ch minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline;
  padding: 12px 0 0; margin-top: 3px; border-top: 1px solid var(--rule);
}
.total b { font-weight: 600; }
.total .fig { font-size: 16px; }
.total small { grid-column: 2 / -1; font-size: 13px; color: var(--graphite); }

.extras .row { grid-template-columns: 3ch minmax(0, 1fr) auto; }
.extras .row:last-child { border-bottom: 0; padding-bottom: 0; }
.extras .n { color: var(--accent); font-weight: 500; }
.extras .date { font: 400 13px var(--mono); color: var(--graphite); }

/* ---------- the work ---------- */
.work { list-style: none; margin: 12px 0 0; padding: 0; }
.work li { display: grid; grid-template-columns: 7ch minmax(0, 1fr); column-gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.work li:last-child { border-bottom: 0; }
.work time { font: 500 13px/24px var(--mono); letter-spacing: .04em; }
.work .what { margin: 0; }
.work .meta { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--graphite); }
.work .meta a { white-space: nowrap; }
.work .tag-extra { color: var(--accent); font-weight: 500; }
/* Pictures of the work, each one a link labeled with its site, in a row under the item (folded behind
   "+N" when there are many). */
.work li.has-strip { grid-template-columns: 7ch minmax(0, 1fr); }
.work .pics { display: flex; flex-wrap: wrap; gap: 10px 8px; }
.work li.has-strip .pics { grid-column: 2; margin-top: 10px; }
.work .pic { display: flex; flex-direction: column; gap: 4px; width: 56px; padding: 0; border: 0; background: none;
  font: inherit; color: var(--graphite); text-align: left; text-decoration: none; cursor: pointer; }
.work .tile { position: relative; display: block; width: 56px; height: 70px; border-radius: 2px; overflow: hidden;
  background: var(--rule); }
.work .tile.dark { background: #141A17; }
.work .tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.work .lab { font-size: 11px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work .pics.folded .later { display: none; }
.work .more .tile { display: flex; align-items: center; justify-content: center; font: 500 15px/1 var(--mono);
  color: var(--text); background: color-mix(in srgb, var(--text) 8%, var(--sheet)); }
.work .tile .play { position: absolute; left: 50%; top: 50%; width: 0; height: 0; margin: -7px 0 0 -4px;
  border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #F8FAF6;
  filter: drop-shadow(0 0 2px rgba(20, 26, 23, .5)); }
.work .tile .stack { position: absolute; top: 4px; right: 4px; filter: drop-shadow(0 0 2px rgba(20, 26, 23, .6)); }
.work .tile .dur { position: absolute; left: 4px; bottom: 3px; font: 500 10px/12px var(--mono); color: #F8FAF6;
  text-shadow: 0 0 3px rgba(20, 26, 23, .8); }

.desc { margin: 8px 0 0; color: var(--graphite); }

/* A project's work this month: its own section, apart from the retainer ledger. */
.project-name { margin: 8px 0 0; font: 600 22px/28px var(--sans); color: var(--ink); }
.project-meta { margin: 4px 0 0; font-size: 14px; color: var(--graphite); }
.project-meta .fig { color: var(--ink); }

/* ---------- footer ---------- */
.foot { padding: 24px 0 0; border-top: 1px solid var(--rule); font-size: 14px; line-height: 20px; color: var(--graphite); }
.foot p { margin: 0; }
.powered { margin-top: 32px !important; text-align: center; font-size: 12px; letter-spacing: .04em; }
.powered a { text-decoration: none; }


@media print {
  body { background: #fff; }
  .sheet { margin: 0; border: 0; max-width: none; }
  .stamp { animation: none; mix-blend-mode: normal; }
}
@media (prefers-reduced-motion: reduce) { .stamp { animation: none; } }
  

/* Shared by the recap and the review page (static/core/viewer.js). */
/* The viewer: one file at a time, as large as the screen allows. */
.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: color-mix(in srgb, var(--ink) 30%, #000 70%);
}
.viewer::backdrop { background: color-mix(in srgb, var(--ink) 30%, #000 70%); }
.viewer { overflow: hidden; }
.viewer .stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
/* Sized from the viewport (less room for the buttons), so nothing ever spills past the screen. */
.viewer .stage img, .viewer .stage video { max-width: calc(100vw - 112px); max-height: calc(100dvh - 96px); object-fit: contain; }
.viewer .stage iframe {
  width: min(calc(100vw - 112px), calc((100dvh - 96px) * 9 / 16)); aspect-ratio: 9 / 16; border: 0;
}
@media (max-width: 600px) {
  .viewer .stage img, .viewer .stage video { max-width: 100vw; }
  .viewer .stage iframe { width: min(100vw, calc((100dvh - 96px) * 9 / 16)); }
}
.viewer button {
  position: absolute; width: 44px; height: 44px; border: 0; border-radius: 4px; cursor: pointer;
  background: color-mix(in srgb, #fff 14%, transparent); color: #fff; font: 400 28px/44px var(--sans);
}
.viewer .close { top: 8px; right: 8px; }
.viewer .prev { left: 8px; top: 50%; translate: 0 -50%; }
.viewer .next { right: 8px; top: 50%; translate: 0 -50%; }
.viewer.is-single .nav { display: none; }
