/* All accounts on one page (F-AC1, accounts.js). Linked after app.css.
 *
 * The phone's relaxed rules (design/ai-first/SPEC.md §1): the headline's
 * figure is the one thing in the pixel face; the rows, the groups and the
 * eyebrow are the body face, and they wrap rather than cut off. The page
 * scrolls; a row opens in place. Stale ages are amber, never red. */

/* The page in a chapter's screen: it scrolls on its own, under the chapter's
 * header, and still lets a sideways swipe through to the pager. */
.screen.sectionscreen { overflow: hidden; }
.screen .section-scroll {
  position: absolute; inset: var(--text-top) 0 0; overflow-x: hidden; overflow-y: auto;
  padding: 0 16px 28px;
  touch-action: pan-x pan-y; overscroll-behavior-y: contain;
  scrollbar-width: none;
}
.screen .section-scroll::-webkit-scrollbar { display: none; }

.acc { font-family: var(--prose); font-size: var(--t-body); line-height: var(--lh-body); color: var(--cream); min-width: 0; }
.acc-h { padding: 4px 4px 2px; }
.acc-lab {
  margin: 0; font-family: var(--prose); font-weight: 600; font-size: var(--t-label); line-height: var(--lh-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--mortar);
}
/* The headline figure: Jersey 25, on its pixel grid (5 font pixels). */
.acc-big { font-family: var(--body-face); font-weight: 700; font-size: var(--t-figure); line-height: var(--lh-figure); letter-spacing: var(--ls-figure); color: var(--gold); margin-top: 6px; }
.acc-sub { font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small); color: rgb(var(--fg) / .8); margin-top: 2px; }
.acc-note { margin: 10px 4px 0; font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small); color: rgb(var(--fg) / .8); }

.acc-grp {
  margin: 0; padding: 18px 4px 6px;
  font-family: var(--prose); font-weight: 600; font-size: var(--t-label); line-height: var(--lh-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: rgb(var(--fg) / .8);
}
.acc-list { background: var(--wall); border: 1px solid #4A3832; border-radius: 12px; overflow: hidden; }

.acc-row + .acc-row { border-top: 1px solid var(--dark); }
.acc-row.open { background: #43302B; }
/* The name first; the figures take at most half the row, their change line
 * wrapping under them on a narrow phone rather than squeezing the name. */
.acc-head {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 10px 12px; margin: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.acc-head:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.acc-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
/* The emoji never sits on a line of its own: it keeps the first word's company. */
.acc-nm .w1 { white-space: nowrap; }
.acc-nm { display: block; font-family: var(--body-face); font-size: var(--t-body); line-height: var(--lh-body); } /* F-EM4: 14 (15 until then) */
.acc .emo svg { width: 16px; height: 16px; vertical-align: -2px; }
.acc .emo { margin-right: 6px; }
.acc-age { display: block; font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small); color: rgb(var(--fg) / .8); }
.acc-age.stale { color: var(--amber); }
.acc-v { flex: 0 1 auto; max-width: 50%; text-align: right; min-width: 0; }
.acc-amt { display: block; font-family: var(--body-face); font-weight: 600; font-size: var(--t-body); line-height: var(--lh-body); font-variant-numeric: tabular-nums; }
.acc-ch { display: block; font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small); color: rgb(var(--fg) / .8); }
.acc-amt { overflow-wrap: anywhere; }
.acc-ch .d { font-weight: 600; }

/* A row, opened: its picture, then its last transactions. */
.acc-more { padding: 0 12px 12px; border-top: 1px dashed #5A463F; }
.acc-pic {
  position: relative; height: 108px; margin: 10px -12px 6px; overflow: hidden; background: var(--chunky-wall, #342522);
}
.acc-pic canvas { position: absolute; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.acc-pic canvas.f1, .acc-pic canvas.f2 { animation-duration: .8s; }
.stage.stale .acc-pic canvas { animation-play-state: paused !important; }
.acc-tx { list-style: none; margin: 0; padding: 0; font-family: var(--body-face); font-size: var(--t-body); line-height: var(--lh-body); }
.acc-tx li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; min-width: 0; }
.acc-tx li + li { border-top: 1px solid rgb(var(--fg) / .07); }
.acc-tx .l { min-width: 0; overflow-wrap: anywhere; }
.acc-tx .when { display: block; font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small); color: rgb(var(--fg) / .8); }
.acc-tx .amt { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.acc-tx .amt.in { color: var(--cream); }
.acc-tx li.note { color: rgb(var(--fg) / .8); }
.acc-go {
  margin-top: 8px; padding: 8px 0; border: 0; background: none; cursor: pointer;
  font-family: var(--prose); font-weight: 600; font-size: var(--t-small); line-height: var(--lh-small); color: var(--amber);
}
