/* Receipts on the phone (run F-X1): Snap a receipt, ADMIN's Receipts list
 * and card, the lines with their chips, and the ADMIN tab's count. On the
 * type scale (app.css's --t-* tokens), and its spacing: every margin
 * and padding is 0, 4, 8, 12, 16, 24 or 32 px. Nothing is cut off: every
 * line wraps. */

/* The ADMIN tab's count of receipts to file (SPEC §2.8's quiet badge): gold
 * like a selected tab, never red, which is only for a failure. */
.tab .rcount {
  position: absolute; top: 4px; left: calc(50% + 11px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; box-sizing: border-box;
  background: var(--gold); color: var(--ink); font-family: var(--body-face); font-weight: 700; font-size: var(--t-label); line-height: var(--lh-label); letter-spacing: var(--ls-label); font-style: normal;
  text-align: center;
}
.tab.waits .rcount { top: 12px; }

/* Choices that wrap onto a second row rather than squeeze. */
.settings .seg.wrap { flex-wrap: wrap; }
.settings .seg.wrap button { flex: 1 0 auto; white-space: normal; }

/* Snap a receipt: the two doors, each a file input's label. */
.settings .snapdoors { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 0; }
.settings .snapdoor {
  position: relative; display: block; padding: 12px 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255, 209, 102, .6); background: rgba(255, 209, 102, .08);
}
.settings .snapdoor:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.settings .snapname { display: block; font-family: var(--body-face); font-weight: 600; font-size: var(--t-title); line-height: var(--lh-title); letter-spacing: normal; color: var(--gold); }
.settings .snapnote { display: block; margin-top: 4px; font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small); color: rgb(var(--fg) / .8); }
.settings .snapdoor input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.settings .snapthumb { display: block; max-width: 100%; max-height: 240px; margin: 16px 0 0; border-radius: 4px; }

/* A receipt's lines: the words and the price, then the chips. */
.settings .rlines { list-style: none; margin: 8px 0 0; padding: 0; }
.settings .rlines > li { padding: 8px 0; border-top: 1px solid rgb(var(--fg) / .1); }
.settings .rlines .lrow { display: flex; gap: 8px; align-items: baseline; }
.settings .rlines .lt { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; line-height: var(--lh-body); }
.settings .rlines .lt small { color: rgb(var(--fg) / .8); font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small); }
.settings .rlines .lp { flex: none; font-family: var(--body-face); font-weight: 600; font-size: var(--t-body); line-height: var(--lh-body); letter-spacing: normal; color: var(--cream); }
.settings .rlines .seg { margin-top: 4px; }
.settings .chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.settings .chips.wide { margin-top: 8px; }
.settings .chips .chipnote { font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small); color: rgb(var(--fg) / .8); }
.settings button.chip {
  position: relative; min-height: 32px; padding: 4px 12px; border-radius: 16px; cursor: pointer;
  font-family: var(--body-face); font-weight: 600; font-size: var(--t-small); line-height: var(--lh-small); letter-spacing: normal;
  border: 1px solid rgb(var(--fg) / .3); background: none; color: var(--cream); overflow-wrap: anywhere;
}
/* A 44 px target around a 32 px chip. */
.settings button.chip::before { content: ''; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }
.settings button.chip.ask { border-color: rgba(255, 180, 84, .7); color: var(--amber); }
.settings button.chip.on { border-color: var(--gold); background: var(--gold); color: var(--ink); }
.settings button.chip:disabled { opacity: .55; cursor: default; }
.settings .lconfirm .confirm { margin-top: 8px; }

/* The four hats, and Split. */
.settings .hats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.settings button.hat {
  flex: 1 0 auto; min-height: 44px; padding: 4px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255, 209, 102, .6); background: none; color: var(--gold);
  font-family: var(--body-face); font-weight: 600; font-size: var(--t-body); line-height: var(--lh-body); letter-spacing: normal;
}
.settings button.hat[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.settings button.hat:disabled { opacity: .55; cursor: default; }
.settings .note.estimate { margin-top: 12px; }

/* ---- F-X2: the groceries pages, products, deductions and the tax years ----
 * design/groceries/hearth-groceries.html's phones: the strip, the sparkline
 * and the basket table, on the Settings scale. Every figure is the
 * backend's; nothing here is cut off. */

/* A screen's own number and line, at the top of its page. */
.settings .gbig { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 12px; }
.settings .gbig .big { font-family: var(--body-face); font-weight: 700; font-size: var(--t-figure); line-height: 32px; letter-spacing: var(--ls-figure); color: var(--cream); overflow-wrap: anywhere; }
.settings .gbig .sub { font-family: var(--body-face); font-size: var(--t-body); line-height: var(--lh-body); color: rgb(var(--fg) / .8); overflow-wrap: anywhere; }
.settings .lede.estimate { color: rgb(var(--fg) / .8); }

/* The groups strip: one hue, each group a step fainter (the list is its legend). */
.settings .strip { display: flex; gap: 2px; height: 12px; margin: 8px 0 12px; border-radius: 4px; overflow: hidden; background: rgb(var(--fg) / .12); }
.settings .strip i { display: block; height: 100%; min-width: 2px; background: var(--gold); }
.settings .glist .k .sw, .settings .kv .k .sw {
  display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 2px; background: var(--gold); vertical-align: -1px;
}

/* The staples: a sparkline, then the name, the unit price and the move. */
.settings .sparks { list-style: none; margin: 8px 0 0; padding: 0; }
.settings .sparks > li { border-top: 1px solid rgb(var(--fg) / .08); padding: 12px 0; }
.settings .sparks > li:first-child { border-top: 0; }
.settings .sparkrow { display: flex; align-items: center; gap: 12px; }
.settings .sparkrow .spark { flex: none; }
.settings .sparkrow .sw-words { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 8px; }
.settings .move.up { color: var(--cream); }
.settings .move.down { color: var(--peach); }
.settings .move.flat { color: rgb(var(--fg) / .8); }
.settings .sparkbig { margin: 8px 0 4px; }
.settings .sparkbig .spark { display: block; width: 100%; height: auto; max-width: 480px; }

/* Which shop: the basket table. Fixed columns that wrap, so it fits at 277. */
.settings table.basket { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.settings table.basket th, .settings table.basket td {
  padding: 8px 4px; text-align: right; overflow-wrap: anywhere; border-top: 1px solid rgb(var(--fg) / .1);
  font-family: var(--body-face); font-size: var(--t-small); line-height: var(--lh-small);
}
.settings table.basket th:first-child, .settings table.basket td:first-child { text-align: left; padding-left: 0; width: 34%; }
.settings table.basket th:last-child, .settings table.basket td:last-child { padding-right: 0; }
.settings table.basket thead th { border-top: 0; color: var(--peach); font-family: var(--body-face); font-weight: 700; font-size: var(--t-label); line-height: var(--lh-label); letter-spacing: var(--ls-label); text-transform: uppercase; }
.settings table.basket td.thin { color: rgb(var(--fg) / .8); }
.settings table.basket tr.best td { color: var(--cream); font-weight: 700; }

/* A line's product, on its sheet. */
.settings .pchoose .group.sub { font-family: var(--body-face); font-weight: 700; font-size: var(--t-label); line-height: var(--lh-label); letter-spacing: var(--ls-label); text-transform: uppercase; margin-top: 12px; }
.settings .pchoose > button.primary { margin: 12px 0 var(--btn-after); }

/* A subscription's proposed answer, on its receipt. */
.settings .rsub { margin: 12px 0 0; }
.settings .rsub button.hat { margin-top: 8px; width: 100%; }

/* Deductions: a row's "Pick its life" sits under its sentence. */
.settings .kv.assets li > button.plain { margin-top: 4px; }
.settings .glinks { margin-top: 24px; }
