@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* OfferAd design language, shared by every page (stage, onboarding, ...).
   Light theme only: light background, dark text, calm accents, readable on a
   projector at 1280x720. Pages link this file first, then their own CSS, and
   use the variables below instead of hard-coded colors.

   Roles:  --deal (green) · --loss (red) · --warn (amber, caught moves)
           --signal (ink: the SPONSORED / ad label is an ink-outlined tag)
           --accent (brand, primary actions); --buyer/--seller are neutral
   Each role has a -soft tint for fills and tag backgrounds. */

:root {
  color-scheme: light;

  /* Pastel Concierge, ink black accent (t-0006 colors/theme-values-ink.css),
     picked by the user 26 Sep. The brand leans on type. No purple anywhere:
     SPONSORED / the ad is a neutral ink-outlined tag, and color is only for
     outcomes (green deal, red walked or caught, amber warning).
     --buyer and --seller are deliberately neutral: role color no longer marks
     agents; color is for outcomes (deal, loss), referee tags and the ad. */

  /* surfaces */
  --bg: #F6F6F3;
  --surface: #FFFFFF;
  --surface-2: #EFEFEB;
  --border: #E3E3DE;
  --border-strong: #C9C9C2;

  /* text */
  --text: #141414;
  --text-2: #3E3E3A;
  --muted: #6B6B65;

  /* roles */
  --accent: #141414;      --accent-soft: #EBEBE6;
  --buyer: #3E3E3A;       --buyer-soft: #EFEFEB;
  --seller: #3E3E3A;      --seller-soft: #FFFFFF;
  --deal: #13985C;        --deal-soft: #E3F6EC;
  --loss: #D93A4E;        --loss-soft: #FDE8EB;
  --warn: #B86E00;        --warn-soft: #FFF1D9;
  --signal: #141414;      --signal-soft: #F4F4F1;
  --warn-text: #B86E00;   /* readable amber text on warn-soft */
  --on-accent: #FFFFFF;   /* text and marks on filled accent, signal, ink */

  /* derived: rings and glows follow the role colors, so a new palette needs
     only the values above */
  --accent-glow: color-mix(in srgb, var(--accent) 28%, transparent);
  --deal-ring: color-mix(in srgb, var(--deal) 35%, var(--surface));
  --loss-ring: color-mix(in srgb, var(--loss) 32%, var(--surface));
  --warn-ring: color-mix(in srgb, var(--warn) 35%, var(--surface));

  /* the market backdrop: grey agents, color only for outcomes */
  --net-bg: #EFEFEB;
  --net-buyer: #C6C6BF;
  --net-label: #6B6B65;
  --net-seller: #3E3E3A;
  --net-seller-idle: #C9C9C2;
  --net-link: #A8A8A0;

  /* category colors for the admin Market view (seller dots and chips only).
     Muted, and kept clear of the outcome colors: no green, red, amber, ink
     or purple. Order follows CATEGORIES in lib/economy.js. */
  --cat-1: #8B5E3C;  /* coffee: roast brown */
  --cat-2: #3F8F8A;  /* grocery: teal */
  --cat-3: #3B6EA8;  /* electronics: blue */
  --cat-4: #C2766B;  /* fashion: terracotta */
  --cat-5: #B39B6B;  /* home: sand */
  --cat-6: #D08C9A;  /* beauty: dusty rose */
  --cat-7: #5B7A99;  /* services: slate */
  --cat-8: #4AA3C7;  /* digital: sky */
  --dot-seller: #C9C9C2;
  --dot-buyer: #DCDCD6;

  /* type */
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-xs: 11px;
  --fs-sm: 12.5px;
  --fs-md: 14px;
  --fs-lg: 17px;
  --fs-xl: 22px;
  --fw-regular: 500;
  --fw-medium: 600;
  --fw-bold: 800;

  /* spacing, radius, elevation */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 8px 24px rgba(20, 20, 20, 0.06);
  --shadow-lg: 0 2px 4px rgba(20, 20, 20, 0.04), 0 24px 56px rgba(20, 20, 20, 0.12);
}

/* ---- base ---------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: var(--fw-regular) var(--fs-md)/1.45 var(--font); -webkit-font-smoothing: antialiased; }
.num { font-variant-numeric: tabular-nums; }

/* ---- shared components (use these names on any page) --------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.label { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--muted); }

button, .btn, select, input {
  font: var(--fw-medium) var(--fs-sm) var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 11px;
}
button, .btn { cursor: pointer; }
button:hover, .btn:hover { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.signal, .btn.signal { background: var(--signal); border-color: var(--signal); color: var(--on-accent); }

/* status badge: LIVE / REPLAY */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .04em; padding: 6px 12px; border-radius: 999px; border: 0; color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.live { color: var(--deal); background: var(--deal-soft); }
.badge.mock { color: var(--warn-text); background: var(--warn-soft); }
.badge.replay { color: var(--accent); background: var(--accent-soft); }

/* tags: small uppercase labels. Referee tags: .caught .expired .sponsored */
.tag { display: inline-flex; align-items: center; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.tag.caught, .tag.warn { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-ring); }
.tag.expired, .tag.redacted { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tag.sponsored, .tag.signal { background: var(--surface); color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.tag.sponsored::before, .tag.signal::before { content: 'Ad'; margin-right: 5px; padding: 0 3px; border-radius: 3px; background: var(--signal); color: var(--on-accent); font-size: 9px; letter-spacing: .02em; text-transform: none; }
.tag.deal { background: var(--deal-soft); color: var(--deal); }
.tag.loss { background: var(--loss-soft); color: var(--loss); }

/* private limit (floor, ceiling, cost): shown locked, never revealed */
.lock { display: inline-block; font-size: var(--fs-xs); padding: 1px 8px; border-radius: 999px; border: 1px dashed var(--border-strong); color: var(--muted); white-space: nowrap; }
.lock::before { content: '🔒 '; }
