/* ═══════════════════════════════════════════════════════════════════════════════
   Lane D — receipts and rising costs (V1.1). Every class and id here starts with rc-
   (contract §8). Shared app classes (.btn, .fld, .inp, .chip, .err, .decline) are reused
   as they are and only adjusted under an rc- parent. Tokens only (shell.css); no new
   colour, no shadow, radius var(--radius). Data marks are the --data ramp; red is only
   ever a bad-news figure or the part of a bar that is bad news.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── "What we read" (inside Add data's receipt step) ─────────────────────────── */
.rc-read { display: grid; gap: 14px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--rule-soft); }
.rc-read-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rc-h { font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.2; margin: 0; color: var(--ink); }
.rc-thumb { display: block; width: 40px; height: 52px; object-fit: cover; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-3); }

/* The visual: one bar the receipt's total wide, filled by its lines. */
.rc-fill { position: relative; }
.rc-fill-track { display: flex; height: 14px; background: var(--paper-3); border-radius: 1px; overflow: hidden; gap: 2px; }
.rc-seg { display: block; height: 100%; background: var(--data); min-width: 2px; transform-origin: left center; }
.rc-seg-alt { background: var(--data-lite); }
.rc-gap { display: block; height: 100%; }
.rc-fill-cap { display: flex; justify-content: flex-end; margin-top: 6px; font-size: 12.5px; line-height: 1.2; color: var(--ink-mid); }
.rc-fill-cap b { font-weight: 500; color: var(--ink); margin-left: 4px; }
.rc-mark { position: absolute; top: -3px; height: 20px; width: 2px; margin-left: -1px; background: var(--ink); }

.rc-lines { list-style: none; margin: 0; padding: 0; }
.rc-line + .rc-line { border-top: 1px solid var(--rule-soft); }
.rc-line-view { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; width: 100%; min-height: 48px; padding: 8px 0; border: 0; background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.rc-line-view[disabled] { cursor: default; color: var(--ink); }
.rc-line-view:not([disabled]):hover .rc-line-item { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.rc-line-item { font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.rc-line-total { grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; font-size: 14.5px; font-weight: 500; }
.rc-line-qty { font-size: 12.5px; line-height: 1.3; color: var(--ink-mid); }
.rc-off .rc-line-qty { color: var(--ink); }
.rc-line-edit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 4px 0 14px; }
.rc-line-edit[hidden] { display: none; }
.rc-line-edit .rc-f-item { grid-column: 1 / -1; }
.rc-line-edit .inp { font-size: 16px; }                     /* iOS zooms below 16px */
.rc-line-edit .rc-f-num .inp { text-align: right; }
.rc-line-remove { grid-column: 1 / -1; justify-self: start; min-height: 44px; }

.rc-adds { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); }
.rc-tick { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--data-4); }
.rc-red, .rc-bar-amt.rc-red, .rc-w-res.rc-red { color: var(--red); }
.rc-red.rc-line-total, b.rc-red { font-weight: 600; }

.rc-due { display: grid; gap: 4px; padding: 12px 14px; background: var(--paper-2); border: 1px solid var(--rule-soft); border-radius: var(--radius); }
.rc-due-q { margin: 0; font-size: 14.5px; line-height: 1.4; font-weight: 500; color: var(--ink); }
.rc-due .chips { margin: 8px 0 0; }
.rc-due .chip { min-height: 44px; }
.rc-due .chip[aria-checked="true"] { border-color: var(--ink); background: var(--paper-3); font-weight: 600; }

.rc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rc-actions .btn { min-height: 44px; }
.rc-done { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; line-height: 1.45; }
.rc-err:empty { display: none; }
.rc-read .err { margin: 0; }

@media (max-width: 1023px) {
  .rc-actions .rc-save { flex: 1 1 100%; }                     /* the primary action, full width under the thumb */
  .rc-actions .rc-total-only { flex: 1 1 100%; }
}

/* ── "It noticed" (the card Lane F puts on Home) ─────────────────────────────── */
.rc-noticed { background: var(--paper-2); border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 18px 18px 16px; max-width: 560px; box-sizing: border-box; }
.rc-n-h { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.25; letter-spacing: -.005em; margin: 0 0 16px; color: var(--ink); }

/* Bars: when · track · figure. The cost bars lead; the latest is the strongest mark. */
.rc-costs, .rc-margins { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rc-bar { display: grid; grid-template-columns: 52px minmax(0, 1fr) 72px; gap: 12px; align-items: center; }
.rc-bar-when { font-size: 13px; line-height: 1.2; color: var(--ink-mid); }
.rc-bar-track { display: block; height: 12px; background: var(--paper-3); border-radius: 1px; overflow: hidden; }
.rc-bar-fill { display: block; height: 100%; background: var(--data-lite); transform-origin: left center; }
.rc-now .rc-bar-fill { background: var(--data); }
.rc-bar-amt { text-align: right; font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--ink); }
.rc-now .rc-bar-when, .rc-now .rc-bar-amt { color: var(--ink); font-weight: 600; }

.rc-margins { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule-soft); gap: 8px; }
.rc-margins .rc-bar { grid-template-columns: 124px minmax(0, 200px) 72px; justify-content: start; }
.rc-margins .rc-bar-track { height: 8px; }
.rc-m .rc-bar-fill { background: var(--data); }
.rc-m.rc-fell .rc-bar-fill { background: var(--red); }
.rc-m .rc-bar-fill.rc-neg { min-width: 3px; }

.rc-move { margin-top: 16px; display: grid; gap: 12px; }
.rc-price { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.rc-price-s { display: block; font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1.3; margin-bottom: 2px; }
.rc-hedge-only { margin: 14px 0 0; font-size: 14px; line-height: 1.5; }
.rc-move .btn { min-height: 44px; justify-self: start; }
.rc-noted { margin: 0; font-size: 14px; line-height: 1.45; }
.rc-move .err { margin: 0; }

.rc-noticed .decline { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule-soft); }
.rc-noticed .decline-unlock { min-height: 44px; }
.rc-instead { margin: 8px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink); }

.rc-working { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule-soft); }
.rc-working > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--ink-mid); }
.rc-working > summary::-webkit-details-marker { display: none; }
.rc-working > summary::before { content: '▶'; display: inline-block; width: 1.3em; font-size: 9px; }
.rc-working[open] > summary::before { transform: rotate(90deg); }
.rc-working dl { margin: 4px 0 0; display: grid; gap: 6px; font-family: var(--mono); font-size: 12.5px; line-height: 1.4; }
.rc-w-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
.rc-w-row dt { color: var(--ink-mid); }
.rc-w-calc { grid-column: 1; grid-row: 2; margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.rc-w-res { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0; text-align: right; color: var(--ink); font-weight: 500; }

@media (max-width: 1023px) {
  .rc-noticed { padding: 16px 14px 14px; max-width: none; }
  .rc-bar { grid-template-columns: 44px minmax(0, 1fr) 64px; gap: 10px; }
  .rc-margins .rc-bar { grid-template-columns: 116px minmax(0, 1fr) 60px; }
  .rc-move .btn { justify-self: stretch; }
}

/* Bars grow in once when shown; reduced motion and light motion show them finished. */
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-light) .rc-bar-fill, html:not(.motion-light) .rc-seg { animation: rc-grow 420ms cubic-bezier(.2, 0, 0, 1) both; }
  html:not(.motion-light) .rc-now .rc-bar-fill { animation-delay: 120ms; }
}
.rc-settled .rc-bar-fill, .rc-settled .rc-seg { animation: none !important; }
@keyframes rc-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
