/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), box-shadow var(--transition), opacity var(--transition), color var(--transition), border-color var(--transition);
  font-family: var(--font);
  white-space: nowrap;
  text-decoration: none;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary              { background: var(--brand); color: #fff; }
.btn-primary:hover        { background: var(--brand-light); }
.btn-secondary            { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover      { background: var(--bg); }
.btn-ghost                { background: transparent; color: var(--text-muted); border: 1px solid transparent; }
.btn-ghost:hover          { background: var(--bg); color: var(--text); }
.btn-danger               { background: var(--danger); color: #fff; }
.btn-danger:hover         { opacity: .85; }
.btn-outline              { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline:hover        { background: var(--brand); color: #fff; }

.btn-sm  { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg  { height: 46px; padding: 0 24px; font-size: 15px; border-radius: 9px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-pad    { padding: 20px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.card-body  { padding: 20px; }

/* ── Photo gallery / upload dropzone ───────────────────────────────────── */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--border-soft);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Numbered badge linking a thumbnail to its matching AI insight card below. */
.photo-index-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
}

.photo-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-upload {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.photo-upload:hover,
.photo-upload:focus-within {
  border-color: var(--brand);
  background: var(--accent-soft);
}

.photo-upload svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.photo-upload input {
  display: none;
}

.photo-progress-track {
  display: none;
  height: 4px;
  border-radius: 2px;
  background: var(--border-soft);
  margin-top: 6px;
  overflow: hidden;
}

.photo-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--brand);
  transition: width 120ms linear;
}

.photo-analyze {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-analysis-card {
  padding: 12px 14px;
}

.photo-analysis-kicker {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* ── Photo lightbox ─────────────────────────────────────────────────────
   Shared overlay injected by photo-lightbox.js; used identically on the
   plantings and beds detail pages — do not fork per-page styling here. */

.photo-lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .78);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.photo-lightbox-overlay.open {
  display: flex;
}

.photo-lightbox-box {
  position: relative;
  max-width: min(720px, 92vw);
  max-height: 90vh;
  background: var(--bg);
  border-radius: var(--radius, 8px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
}

.photo-lightbox-img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 6px;
  margin: 0 auto;
  display: block;
}

.photo-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.photo-lightbox-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.photo-lightbox-index {
  font-weight: 700;
  color: var(--text);
}

.photo-lightbox-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 10px 12px;
}

/* ── Stat cards ──────────────────────────────────────────────────────────── */

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-sub   { font-size: 12px; color: var(--text-xmuted); }

.stat-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.stat-icon svg { width: 20px; height: 20px; }

/* ── Badges ──────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
}

.badge-green  { background: var(--success-soft); color: var(--success); }
.badge-yellow { background: var(--harvest-soft); color: #9A6F1A; }
.badge-red    { background: var(--danger-soft);  color: var(--danger); }
.badge-gray   { background: var(--border-soft);  color: var(--text-muted); }
.badge-blue   { background: var(--sky-soft);     color: #2E5F8A; }
.badge-brown  { background: var(--soil-soft);    color: var(--soil); }

/* ── Filter chips / context switchers ───────────────────────────────────── */

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .12s, color .12s, background .12s;
  white-space: nowrap;
}

.filter-chip:hover,
.filter-chip:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
}

.filter-chip--active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

.filter-chip--active:hover,
.filter-chip--active:focus-visible {
  color: #fff;
  background: var(--brand-light);
  border-color: var(--brand-light);
}

.switcher-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.switcher-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.switcher-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.switcher-chip:hover,
.switcher-chip:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
}

.switcher-chip--active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.switcher-chip--active:hover,
.switcher-chip--active:focus-visible {
  background: var(--brand-light);
  border-color: var(--brand-light);
  color: #fff;
}

.switcher-chip-meta {
  opacity: .65;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td      { background: #fafafa; }

/* ── Forms ───────────────────────────────────────────────────────────────── */

.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13.5px;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47,93,58,.12);
}

textarea   { min-height: 90px; resize: vertical; line-height: 1.5; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── Timeline ────────────────────────────────────────────────────────────── */

.timeline { list-style: none; }

.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item:last-child::before { display: none; }

.timeline-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-dot svg    { width: 14px; height: 14px; color: var(--brand); }
.timeline-content    { flex: 1; padding-top: 4px; }
.timeline-type       { font-weight: 600; font-size: 13.5px; text-transform: capitalize; }
.timeline-date       { font-size: 12px; color: var(--text-muted); }
.timeline-notes      { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── Empty states ────────────────────────────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state svg         { width: 40px; height: 40px; opacity: .3; margin-bottom: 12px; }
.empty-state-title       { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.empty-state-sub         { font-size: 13px; }

/* ── List rows ───────────────────────────────────────────────────────────── */

.list-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color var(--transition), background var(--transition);
}

.list-row--alert {
  border-color: #fecaca;
  background: #fff5f5;
}

.list-row-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.list-row-dot {
  flex-shrink: 0;
  margin-top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-xmuted);
}

.list-row-dot--danger {
  background: #dc2626;
}

.list-row-body {
  min-width: 0;
  flex: 1;
}

.list-row-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.list-row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.list-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
/* Numbered pagination — secondary pattern, use only when jumping to a
   specific page number matters (e.g. browsing a large library). Plain
   .btn.btn-secondary.btn-sm "← Prev" / "Next →" is the default/primary
   pattern for everything else — see docs/UI_STYLE_GUIDE.md "Pagination". */

.plant-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 40px 0 16px; }
.plant-page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 14px; font-weight: 500; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: background 120ms, border-color 120ms; }
.plant-page-btn:hover { background: var(--bg); border-color: var(--brand); color: var(--brand); }
.plant-page-btn--active { background: var(--brand); color: #fff; border-color: var(--brand); pointer-events: none; }
.plant-page-btn--disabled { color: var(--text-muted); pointer-events: none; opacity: .4; }
.plant-page-btn--ellipsis { border-color: transparent; background: none; pointer-events: none; }

/* ── Grid helpers ────────────────────────────────────────────────────────── */

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stats-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

@media (max-width: 1100px) { .grid-4, .stats-grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  {
  .grid-4, .grid-3, .grid-2, .stats-grid-5 { grid-template-columns: 1fr; }
}

.action-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.action-chip {
  position: relative;
  cursor: pointer;
}

.action-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.action-chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
  text-align: center;
}

.action-chip input:checked + span {
  border-color: var(--brand);
  background: var(--accent-soft);
  color: var(--brand);
}

.quick-log-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr);
  gap: 20px;
  align-items: start;
}

.quick-log-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.quick-log-intro {
  background:
    radial-gradient(circle at top right, rgba(122, 156, 79, 0.14), transparent 36%),
    linear-gradient(180deg, #f8f7f1 0%, #f4f1e8 100%);
}

.quick-log-intro-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}

.quick-log-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}

.quick-log-title {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.05;
}

.quick-log-copy {
  margin: 0;
  max-width: 62ch;
  color: var(--text-muted);
}

.quick-log-context-badge {
  min-width: 180px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(49, 78, 52, 0.08);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.quick-log-context-label,
.quick-log-shortcut-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.quick-log-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.quick-log-shortcut-block {
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(49, 78, 52, 0.08);
  background: rgba(255, 255, 255, 0.62);
}

.quick-log-shortcut-title {
  margin-bottom: 10px;
}

.quick-log-side {
  min-width: 0;
}

.quick-log-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.quick-log-save {
  min-width: 180px;
  justify-content: center;
}

.recent-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12.5px;
  cursor: pointer;
}

.recent-chip-strong {
  background: #eef4e6;
  border-color: #d0dfbd;
  color: #2f5c30;
}

.quick-log-recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-log-recent-item {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.quick-log-recent-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

@media (max-width: 900px) {
  .quick-log-shell {
    grid-template-columns: 1fr;
  }

  .quick-log-intro-head,
  .quick-log-shortcuts {
    grid-template-columns: 1fr;
    display: grid;
  }

  .quick-log-title {
    font-size: 24px;
  }
}

@media (max-width: 700px) {
  .action-chip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-log-intro {
    padding: 18px;
  }

  .quick-log-shortcut-block {
    padding: 12px;
  }

  .quick-log-actions {
    align-items: stretch;
  }

  .quick-log-save {
    width: 100%;
  }
}

.planner-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr);
  gap: 20px;
  align-items: start;
}

.planner-main,
.planner-results,
.planner-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.planner-hero {
  background:
    radial-gradient(circle at top right, rgba(122, 156, 79, 0.18), transparent 34%),
    radial-gradient(circle at left center, rgba(213, 194, 156, 0.2), transparent 28%),
    linear-gradient(180deg, #faf8f1 0%, #f4efe2 100%);
}

.planner-hero-grid,
.planner-list-hero {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}

.planner-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}

.planner-title {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.02;
}

.planner-copy,
.planner-mini-copy,
.planner-summary,
.planner-plan-block p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.planner-hero-badge {
  min-width: 230px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(49, 78, 52, 0.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.planner-badge-label,
.planner-outcome-label,
.planner-mini-title,
.planner-next-step-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.planner-badge-label,
.planner-outcome-label,
.planner-next-step-label {
  color: var(--brand);
}

.planner-mini-title {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.planner-form,
.planner-outcome-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.planner-form-collapsed {
  display: none;
}

.planner-results-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.planner-results-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.planner-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.planner-section-head-tight {
  margin-top: 8px;
}

.planner-section-title {
  margin: 0;
  font-size: 22px;
}

.planner-alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
}

.planner-alert-danger {
  background: var(--danger-soft);
  border: 1px solid rgba(188, 70, 45, 0.15);
  color: #8d4028;
}

.planner-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.planner-context-status {
  margin-top: 8px;
  min-height: 20px;
}

.planner-context-status-busy {
  color: var(--brand);
}

.planner-form .btn.is-loading,
.planner-form .btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.planner-custom-reminder-row {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.planner-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .8fr);
  gap: 16px;
}

.planner-side-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.planner-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.planner-suggestion-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.planner-suggestion-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.planner-suggestion-button {
  width: 100%;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 140ms ease, box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

.planner-suggestion-button:hover,
.planner-suggestion-button:focus-visible {
  transform: translateY(-1px);
  border-color: #bfd0af;
  background: #f6faef;
  box-shadow: 0 10px 22px rgba(47, 93, 58, 0.08);
}

.planner-outcome-top,
.planner-bed-card-top,
.planner-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.planner-outcome-bed {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.08;
  margin-top: 4px;
}

.planner-readiness-ring {
  min-width: 92px;
  min-height: 92px;
  border-radius: 50%;
  background: linear-gradient(180deg, #eef4e6 0%, #dbe7cf 100%);
  border: 6px solid rgba(47, 93, 58, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.planner-readiness-ring strong {
  font-size: 28px;
  line-height: 1;
}

.planner-readiness-ring span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.planner-plan-block {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f7f3e8;
  border: 1px solid #eadfcb;
}

.planner-plan-block-alt {
  background: #f2f6ed;
  border-color: #d6e2cc;
}

.planner-plan-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.planner-next-step {
  padding: 14px 16px;
  border-radius: 14px;
  background: #2f5d42;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.planner-next-step-label {
  color: rgba(255, 255, 255, 0.72);
}

.planner-checklist,
.planner-risk-list,
.planner-fact-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.planner-checklist li::marker,
.planner-risk-list li::marker,
.planner-fact-list li::marker {
  color: var(--brand);
}

.planner-bed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.planner-bed-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.planner-bed-card-active {
  border-color: #bfd0af;
  background: #f2f7ec;
}

.planner-side-note {
  background: linear-gradient(180deg, #f7f5ec 0%, #f2eee3 100%);
}

/* Standard entity/location card pattern.
   Use for hierarchy objects such as properties, spaces/gardens, and beds. */
.entity-card {
  background: var(--surface);
  border: 1px solid #bfd0af;
  border-radius: var(--radius);
  box-shadow: none;
  color: inherit;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.entity-card:hover,
.entity-card:focus-visible {
  background: #f6fbf7;
  border-color: var(--brand);
  box-shadow: none;
  outline: none;
}

.entity-card--active {
  border-color: #9fbe8d;
}

.entity-card--inactive {
  border-color: var(--border);
  opacity: .82;
}

@media (max-width: 1080px) {
  .planner-shell,
  .planner-result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .planner-hero-grid,
  .planner-list-hero,
  .planner-section-head,
  .planner-results-topbar,
  .planner-results-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .planner-title {
    font-size: 28px;
  }

  .planner-outcome-bed {
    font-size: 20px;
  }

  .planner-form-actions .btn {
    width: 100%;
    justify-content: center;
  }

}

/* ── Utility ─────────────────────────────────────────────────────────────── */

.divider        { height: 1px; background: var(--border); margin: 20px 0; }
.text-muted     { color: var(--text-muted); }
.text-sm        { font-size: 12.5px; }
.fw-600         { font-weight: 600; }
.mt-4           { margin-top: 4px; }
.mt-8           { margin-top: 8px; }
.mt-16          { margin-top: 16px; }
.mt-24          { margin-top: 24px; }
.flex           { display: flex; }
.items-center   { align-items: center; }
.justify-between{ justify-content: space-between; }

/* ── Help tip ─────────────────────────────────────────────────────────────── */
/*
  Usage (inline): <span class="help-tip" data-help="Explanation here">i</span>
  Usage (card corner): add help-tip--corner, place as direct child of position:relative parent.
  Tooltip appears above by default. data-help-pos="below" flips it down.
  IMPORTANT: never nest inside an element with opacity — tooltip inherits opacity.
  Use per-child dimming instead (see .ob-node--locked pattern below).
*/

.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f4f7f1;
  border: 1px solid #bfd0af;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 700;
  font-style: normal;
  font-family: var(--font);
  cursor: help;
  position: relative;
  flex-shrink: 0;
  user-select: none;
  vertical-align: middle;
  line-height: 1;
  margin-left: 4px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  z-index: 10;
}

.help-tip:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.help-tip:focus-visible {
  outline: none;
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(47, 93, 58, 0.16);
}

/* Corner variant — position as absolute in top-right of a relative parent */
.help-tip--corner {
  position: absolute;
  top: 7px;
  right: 7px;
  margin-left: 0;
}

/* Tooltip bubble */
.help-tip::after {
  content: attr(data-help);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-75%);   /* pull left so it doesn't clip on right edge */
  width: 210px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  font-family: var(--font);
  line-height: 1.5;
  color: var(--text);
  white-space: normal;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 500;
}

/* Arrow */
.help-tip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 501;
}

.help-tip:hover::after,
.help-tip:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Flip below */
.help-tip[data-help-pos="below"]::after {
  bottom: auto;
  top: calc(100% + 10px);
}
.help-tip[data-help-pos="below"]::before {
  bottom: auto;
  top: calc(100% + 5px);
  border-top-color: transparent;
  border-bottom-color: var(--border);
}
