/* Tjeka app — "Fresh green". Shared tokens and parts for every artboard on this canvas.
   Deep money-green for trust, warm mango for the saving, pastel tiles for the fun.
   Type: Bricolage Grotesque (headlines, prices) + Onest (everything else). */

@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/BricolageGrotesque-Variable.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/fonts/Onest-Variable.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

.tj {
  --ground: #F4F6F5; --surface: #FFFFFF; --surface-2: #EEF2F0; --line: #E0E6E3;
  --ink: #0E2620; --ink-muted: #56665F; --ink-faint: #8A9792;
  --green: #0F5C4A; --green-strong: #0A4637; --on-green: #FFFFFF; --green-soft: #E2F0EA; --green-text: #0F5C4A;
  --mango: #FFC94D; --on-mango: #0E2620; --mango-soft: #FFF4D9;
  --caution: #94550A; --caution-soft: #FFEEDC;
  --promo: #C7343A; --promo-soft: #FDE8E7;
  --mint: #DDF3E8; --mint-ink: #1F6B4E;
  --peach: #FFE7D6; --peach-ink: #A04A17;
  --lilac: #ECE7FF; --lilac-ink: #5B45B0;
  --sky: #DEF0FB; --sky-ink: #1D5F8C;
  --butter: #FFF3C7; --butter-ink: #85620A;
  --rose: #FDE5EC; --rose-ink: #A3355A;
  --shadow-1: 0 1px 2px rgba(14, 38, 32, .06), 0 1px 1px rgba(14, 38, 32, .04);
  --shadow-2: 0 12px 28px -12px rgba(14, 38, 32, .28), 0 2px 6px rgba(14, 38, 32, .06);
  --focus: #0F5C4A;
  --font-display: "Bricolage Grotesque", "Onest", system-ui, sans-serif;
  --font-sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: var(--font-sans); color: var(--ink); background: var(--ground);
  -webkit-font-smoothing: antialiased; font-size: 16px; line-height: 24px; font-variant-numeric: tabular-nums;
}
.tj.dark {
  --ground: #0C1412; --surface: #151F1C; --surface-2: #1D2925; --line: #26332F;
  --ink: #EDF3F0; --ink-muted: #A2B1AB; --ink-faint: #6F7F79;
  --green: #4CC79B; --green-strong: #6BD6AE; --on-green: #062019; --green-soft: #15302A; --green-text: #6BD6AE;
  --mango-soft: #2E2612;
  --caution: #F0B566; --caution-soft: #2E2214;
  --promo: #FF7C78; --promo-soft: #361A1B;
  --mint: #153128; --mint-ink: #7FDDB5;
  --peach: #33231A; --peach-ink: #FFB485;
  --lilac: #231F3A; --lilac-ink: #BEB0FF;
  --sky: #152A38; --sky-ink: #8CCBF2;
  --butter: #2E2914; --butter-ink: #F0CF6E;
  --rose: #33202A; --rose-ink: #F7A3BE;
  --shadow-1: 0 0 0 1px rgba(255, 255, 255, .02);
  --shadow-2: 0 12px 28px -12px rgba(0, 0, 0, .7);
  --focus: #6BD6AE;
}
.tj * { box-sizing: border-box; }
.tj button, .tj input, .tj textarea { font: inherit; color: inherit; }
.tj :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Phone: 402 × 874 pt (iPhone 17 Pro). The top 54pt stays clear for the system status bar. */
.screen { width: 402px; height: 874px; position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--ground); }
.safe-top { height: 54px; flex: none; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 24px; height: 24px; }

/* Type */
.t-hero { font: 700 40px/42px var(--font-display); letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
.t-title { font: 700 30px/34px var(--font-display); letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
.t-section { font: 700 20px/26px var(--font-display); letter-spacing: -0.01em; margin: 0; }
.t-price { font: 700 28px/30px var(--font-display); letter-spacing: -0.02em; }
.t-heading { font: 600 17px/24px var(--font-sans); margin: 0; }
.t-body { font: 400 16px/24px var(--font-sans); }
.t-small { font: 400 14px/20px var(--font-sans); }
.t-micro { font: 500 12px/16px var(--font-sans); }
.t-eyebrow { font: 600 12px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }

/* Buttons: pills, 48pt (≥44pt targets) */
.btn { height: 48px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--surface); color: var(--ink); font: 600 16px/1 var(--font-sans); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-primary { background: var(--green); color: var(--on-green); box-shadow: none; }
.btn-mango { background: var(--mango); color: var(--on-mango); box-shadow: none; }
.btn-soft { background: var(--green-soft); color: var(--green-text); box-shadow: none; }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-sm { height: 44px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-lg { height: 56px; font-size: 17px; }
.btn[disabled] { opacity: .4; }
.iconbtn { width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink); text-decoration: none; flex: none; }
.iconbtn-soft { background: var(--surface); box-shadow: var(--shadow-1); }

/* Search */
.field { min-width: 0; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: var(--surface); border-radius: 16px; color: var(--ink-muted); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.field input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--ink); font-size: 16px; }
.field-on { box-shadow: inset 0 0 0 2px var(--green); color: var(--ink); }

/* Departments: pastel tiles */
.dept { width: 80px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.dept-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; }
.dept-ic .ic { width: 28px; height: 28px; stroke-width: 1.7; }
.dept-name { font: 500 12px/15px var(--font-sans); text-align: center; text-wrap: balance; }
.p-mint { background: var(--mint); color: var(--mint-ink); }
.p-peach { background: var(--peach); color: var(--peach-ink); }
.p-lilac { background: var(--lilac); color: var(--lilac-ink); }
.p-sky { background: var(--sky); color: var(--sky-ink); }
.p-butter { background: var(--butter); color: var(--butter-ink); }
.p-rose { background: var(--rose); color: var(--rose-ink); }

/* Chips */
.chip { height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font: 500 14px/1 var(--font-sans); display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--ink); white-space: nowrap; }
.chip-on { background: var(--ink); color: var(--ground); box-shadow: none; }
.chip-count { color: var(--ink-faint); font-weight: 400; }
.chip-on .chip-count { color: inherit; opacity: .65; }

/* Product imagery: photo as-is on white, or the pastel letter tile */
.pimg { background: #FFFFFF; border-radius: 14px; display: grid; place-items: center; overflow: hidden; flex: none; box-shadow: inset 0 0 0 1px var(--line); }
.pimg img { width: 88%; height: 88%; object-fit: contain; }
.ptile { border-radius: 14px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden; }
.ptile-letter { font: 700 34px/1 var(--font-display); letter-spacing: -0.02em; }
.ptile-brand { font: 600 9px/12px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; opacity: .8; max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Product card */
.pcard { width: 156px; flex: none; background: var(--surface); border-radius: 20px; padding: 8px 8px 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-1); position: relative; }
.pcard-body { padding: 0 6px; display: flex; flex-direction: column; gap: 6px; }
.pcard-name { font: 500 14px/19px var(--font-sans); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 57px; }
.price-from { display: flex; align-items: baseline; gap: 4px; }
.price-from .t-micro { color: var(--ink-muted); }
.price-from b { font: 700 19px/22px var(--font-display); letter-spacing: -0.01em; }
.where { font: 400 12px/16px var(--font-sans); color: var(--ink-muted); }
.pcard .fab { position: absolute; top: 96px; right: 14px; }

/* Rows */
.prow { display: flex; gap: 14px; align-items: center; padding: 12px 0; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prow-name { font: 500 15px/20px var(--font-sans); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prow-meta { font: 400 13px/18px var(--font-sans); color: var(--ink-muted); }
.prow-meta b { font: 700 16px/18px var(--font-display); color: var(--ink); }

/* Add and quantity */
.fab { width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--green); color: var(--on-green); display: grid; place-items: center; flex: none; box-shadow: 0 4px 10px -4px rgba(15, 92, 74, .55); }
.step { height: 44px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--green); color: var(--on-green); flex: none; padding: 0 2px; }
.step button { width: 40px; height: 44px; border: 0; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.step span { min-width: 18px; text-align: center; font: 700 16px/1 var(--font-sans); }
.step-light { background: var(--green-soft); color: var(--green-text); }

/* Badges: words first, colour second */
.badge { height: 26px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; font: 600 12px/1 var(--font-sans); white-space: nowrap; }
.badge .ic { width: 14px; height: 14px; stroke-width: 2.2; }
.b-cheapest { background: var(--mango); color: var(--on-mango); }
.b-all { background: var(--green-soft); color: var(--green-text); }
.b-cover { background: var(--surface-2); color: var(--ink); }
.b-sub, .b-old { background: var(--caution-soft); color: var(--caution); }
.b-trip { background: transparent; color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--line); }
.b-promo { background: var(--promo-soft); color: var(--promo); }
.b-leaflet { background: var(--lilac); color: var(--lilac-ink); }
.b-saved { background: var(--mango-soft); color: var(--ink); }

/* Store comparison */
.scard { background: var(--surface); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-1); }
.scard-best { box-shadow: inset 0 0 0 2px var(--green), var(--shadow-2); }
.scard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.scard-name { font: 700 20px/24px var(--font-display); letter-spacing: -0.01em; }
.scard-total { font: 700 26px/28px var(--font-display); letter-spacing: -0.02em; text-align: right; }
.scard-total.dim { color: var(--ink-faint); }
.scard-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.scard-lines { background: var(--surface-2); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.sline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; font: 400 14px/20px var(--font-sans); }
.sline-name { min-width: 0; }
.sline-note { display: block; font: 500 12px/16px var(--font-sans); color: var(--caution); }
.sline-promo { display: block; font: 500 12px/16px var(--font-sans); color: var(--promo); }
.sline-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 600; }
.missing { font: 400 13px/18px var(--font-sans); color: var(--ink-muted); }
.missing b { color: var(--ink); font-weight: 500; }
.more { align-self: flex-start; height: 32px; padding: 0; border: 0; background: transparent; color: var(--green-text); font: 600 14px/1 var(--font-sans); display: inline-flex; align-items: center; gap: 4px; }

/* Cart bar: the saving, front and centre */
.cartbar { margin: 0 12px 10px; background: var(--ink); color: #FFFFFF; border-radius: 22px; padding: 12px 12px 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; box-shadow: var(--shadow-2); }
.tj:not(.dark) .cartbar { background: #0F5C4A; }
.tj.dark .cartbar { background: #1F3A32; box-shadow: inset 0 0 0 1px #2E5248, var(--shadow-2); }
.cartbar-label { font: 500 13px/16px var(--font-sans); opacity: .78; }
.cartbar-price { font: 700 26px/28px var(--font-display); letter-spacing: -0.02em; }
.cartbar-save { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: #FFC94D; color: #0E2620; font: 700 14px/1 var(--font-sans); white-space: nowrap; }

/* Tab bar */
.tabs { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); padding: 8px 6px 30px; box-shadow: 0 -1px 0 var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-faint); font: 500 11px/14px var(--font-sans); text-decoration: none; position: relative; }
.tab-ic { width: 56px; height: 30px; border-radius: 999px; display: grid; place-items: center; }
.tab-on { color: var(--green-text); font-weight: 600; }
.tab-on .tab-ic { background: var(--green-soft); }
.tab-count { position: absolute; top: -2px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--mango); color: #0E2620; font: 700 11px/18px var(--font-sans); text-align: center; }

/* Panels, banners, states */
.panel { background: var(--surface); border-radius: 22px; padding: 18px; box-shadow: var(--shadow-1); }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; font: 400 14px/20px var(--font-sans); }
.banner-tip { background: var(--mango-soft); }
.banner-warn { background: var(--caution-soft); }
.banner-warn > .ic { color: var(--caution); }
.skel { background: var(--surface-2); border-radius: 8px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.link { color: var(--green-text); font: 600 14px/20px var(--font-sans); text-decoration: none; }
.switch { width: 52px; height: 32px; border-radius: 999px; background: var(--green); position: relative; flex: none; border: 0; }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch-off { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.switch-off::after { right: auto; left: 3px; }
.hscroll { display: flex; gap: 10px; overflow: hidden; flex-shrink: 0; }
