/* Visual language borrowed from tryromi.com (warm cream + forest green,
   soft colored shadows, pill shapes) - a deliberate exception to the dark
   house style used by the other lpcote.ca apps, per lp's explicit request. */

:root { color-scheme: light; }
* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: #f6f3ec;
  color: #1c2b20;
}

body {
  min-height: 100vh;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(100px + env(safe-area-inset-bottom));
}

h1 {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
  color: #1c4d31;
}
.subtitle-script {
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  color: #3f8f2e;
  margin: 0 0 18px;
}

a { color: #1c4d31; }

/* ── Floating pill tab bar ────────────────────────────────────────────────── */
.tabbar {
  position: fixed;
  left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  background: #ffffff;
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(28,69,48,0.18);
  z-index: 10;
}
.tabbar a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  text-decoration: none;
  color: #7c8178;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 8px 2px;
  border-radius: 999px;
}
.tabbar a .icon { font-size: 1.1rem; line-height: 1; }
.tabbar a.active { color: #ffffff; background: #1c4d31; }

/* ── Shared surfaces ──────────────────────────────────────────────────────── */
.card {
  background: #fffdf9;
  border: 1px solid #eee6d8;
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(28,69,48,0.07);
}
.card-title { font-size: 1rem; font-weight: 800; margin-bottom: 4px; color: #1c4d31; }
.card-sub { font-size: 0.8rem; color: #7c8178; margin-bottom: 10px; }

/* ── Tiles (stat summaries) ───────────────────────────────────────────────── */
.tiles { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.tile {
  flex: 1; min-width: 120px;
  background: #eef4e4;
  border-radius: 18px;
  padding: 14px 16px;
}
.tile .label { font-size: 0.7rem; color: #4f6b4a; margin-bottom: 2px; font-weight: 600; }
.tile .value { font-size: 1.25rem; font-weight: 800; color: #1c4d31; }

/* ── Form elements ────────────────────────────────────────────────────────── */
label { display: block; font-size: 0.78rem; color: #4f6b4a; margin-bottom: 4px; font-weight: 600; }
input, select {
  width: 100%;
  background: #fffdf9;
  color: #1c2b20;
  border: 1px solid #e4ddc9;
  border-radius: 14px;
  padding: 12px;
  font-size: 0.95rem;
  margin-bottom: 14px;
  font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: #3f8f2e; }

button {
  font-family: inherit;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.btn-primary {
  width: 100%;
  background: #1c4d31;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(26,69,48,0.32);
}
.btn-primary:disabled { background: #d8d3c3; color: #9a9686; box-shadow: none; }
.btn-secondary {
  background: #eef4e4;
  color: #1c4d31;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 16px;
}

/* ── Chips (categories, quick picks) ──────────────────────────────────────── */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  background: #eef4e4; border: none; color: #1c4d31;
  border-radius: 999px; padding: 6px 12px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.chip.selected, .chip:active { background: #1c4d31; color: #fff; }
.chip.sale { background: #dbe9cd; color: #2f5d1f; }

/* ── Empty states ─────────────────────────────────────────────────────────── */
.empty { color: #7c8178; font-size: 0.85rem; text-align: center; padding: 30px 0; }

/* ── Charts (shared axis/label/line tokens) ───────────────────────────────── */
svg { width: 100%; height: auto; overflow: visible; display: block; }
.axis-label { font-size: 9px; fill: #7c8178; }
.bar-label { font-size: 9px; fill: #4f6b4a; text-anchor: middle; }
