/* ══════════════════════════════════════════════════════════════
   §0.6 — SEGMENTED CONTROL (v3.29)
   Track: --bg-subtle. Thumb: --bg-card + --shadow-sm. Active: terra-text.
   .seg.sm = compact rows. .seg.full = mobile (each button flex:1).
══════════════════════════════════════════════════════════════ */
.seg {
  display: inline-flex;
  background: var(--bg-subtle);
  border-radius: 6px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 0.35rem 0.8rem;
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.seg button.active {
  background: var(--bg-card);
  color: var(--terra-text);
  box-shadow: var(--shadow-sm);
}
.seg button:not(.active):hover { color: var(--text-secondary); }
.seg.sm button { padding: 0.2rem 0.55rem; font-size: 0.7rem; }
.seg.full { width: 100%; }
.seg.full button { flex: 1; text-align: center; }
:root.dark .seg { background: var(--bg-subtle); }
:root.dark .seg button.active { background: var(--bg-card); color: var(--terra-text); }

/* ══════════════════════════════════════════════════════════════
   §0.6 — TOGGLE (v3.29)
   34×19px. Green track when on. White knob.
══════════════════════════════════════════════════════════════ */
.rl-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: var(--s2);
  user-select: none;
}
.rl-toggle input[type=checkbox] { display: none; }
.rl-toggle-track {
  width: 34px;
  height: 19px;
  border-radius: 9999px;
  background: var(--border-mid);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.rl-toggle input:checked + .rl-toggle-track { background: var(--green); }
.rl-toggle-track::after {
  content: '';
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left 0.2s;
}
.rl-toggle input:checked + .rl-toggle-track::after { left: calc(100% - 16.5px); }
:root.dark .rl-toggle input:checked + .rl-toggle-track { background: var(--green); }

/* ══════════════════════════════════════════════════════════════
   §0.6 — FILTER CHIPS (v3.29)
   Resting: --bg-card + tan border. Active: --bg-olive + white text.
   Count suffix in --f-mono.
══════════════════════════════════════════════════════════════ */
.chipf {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-tan);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  user-select: none;
}
.chipf:hover { background: var(--bg-subtle); border-color: var(--tan); }
.chipf.active { background: var(--bg-olive); color: #FAF7F2; border-color: var(--bg-olive); }
.chipf-count { font-family: var(--f-mono); font-size: 10px; opacity: 0.75; }
:root.dark .chipf { background: var(--bg-card); border-color: var(--border-mid); color: var(--text-secondary); }
:root.dark .chipf:hover { background: var(--bg-subtle); }
:root.dark .chipf.active { background: var(--bg-olive); color: #FAF7F2; border-color: var(--bg-olive); }

/* ══════════════════════════════════════════════════════════════
   §0.2 — TYPE ROLES (v3.28 scaffolding — not yet applied to markup)
   Apply per-surface as sections ship (§1 → §7).
══════════════════════════════════════════════════════════════ */
.t-display-xl { font-family:var(--f-display); font-weight:800; font-size:clamp(24px,3vw,28px); letter-spacing:-.025em; line-height:1.1; }
.t-display-l  { font-family:var(--f-display); font-weight:800; font-size:clamp(20px,2.5vw,22px); letter-spacing:-.02em; line-height:1.15; }
.t-display-m  { font-family:var(--f-display); font-weight:700; font-size:clamp(16px,2vw,18px); letter-spacing:-.01em; line-height:1.2; }
.t-body-l     { font-family:var(--f-body); font-weight:400; font-size:15px; line-height:1.55; }
.t-body-m     { font-family:var(--f-body); font-weight:400; font-size:13px; line-height:1.55; }
.t-body-s     { font-family:var(--f-body); font-weight:400; font-size:12px; color:var(--text-muted); line-height:1.5; }
.t-micro      { font-family:var(--f-body); font-weight:700; font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--text-muted); }
.t-accent     { font-family:var(--f-accent); font-style:italic; font-size:13px; color:var(--text-secondary); }
.t-mono       { font-family:var(--f-mono); font-size:12px; font-variant-numeric:tabular-nums; }

/* ══════════════════════════════════════════════════════════════
   §0.3 — ACTION / STATUS PILLS — Role B (v3.28 scaffolding)
   Base: .p-action applied alongside variant class.
   Variant classes set background + color only.
   No emoji. UPPERCASE 10px. 4px radius.
   Not yet applied to markup — apply per-surface as §1–§7 ship.
══════════════════════════════════════════════════════════════ */
.p-action {
  display:inline-flex; align-items:center;
  padding:2px 7px; border-radius:4px;
  font-family:var(--f-body); font-size:10px; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase; white-space:nowrap;
}
.p-sow,
.p-tp       { background:var(--green-tint);  color:var(--green-text);  }
.p-harvest  { background:var(--amber-tint);  color:var(--amber-text);  }
.p-cover    { background:var(--green-tint);  color:var(--green-text);  }
.p-rowcover { background:var(--tan-tint);    color:var(--text-secondary); }
.p-maintain { background:var(--bg-subtle);   color:var(--text-secondary); }
.st-active  { background:var(--green-tint);  color:var(--green-text);  }
.st-sched   { background:var(--tan-tint);    color:var(--text-secondary); }
.st-empty   { background:var(--bg-subtle);   color:var(--text-muted);  }
.st-fallow  { background:var(--amber-tint);  color:var(--amber-text);  }
.st-peren   { background:var(--g-perennial-bg); color:var(--g-perennial-fg); }

/* Bed reference pill — location tag, not an alert. Not uppercase. */
.p-bed {
  display:inline-flex; align-items:center;
  padding:2px 7px; border-radius:4px;
  font-family:var(--f-body); font-size:11px; font-weight:500;
  background:var(--tan-tint); color:var(--text-secondary); white-space:nowrap;
}

