/* Farmer onboarding — mockup shell (WeFarmSA forest green) */

:root {
  --fo-forest: #0B3D2E;
  --fo-forest-mid: #145C44;
  --fo-leaf: #1B7A4E;
  --fo-leaf-soft: #E8F5EC;
  --fo-leaf-mid: #BBF7D0;
  --fo-aside-fg: #E8F5EC;
  --fo-bg: #F4F6F5;
  --fo-card: #FFFFFF;
  --fo-text: #0F172A;
  --fo-muted: #64748B;
  --fo-border: #E2E8E4;
  --fo-border-strong: #C9D4CE;
  --fo-danger: #C62828;
  --fo-warning-soft: #FFF7ED;
  --fo-radius: 14px;
  --fo-radius-sm: 10px;
  --fo-aside-w: 260px;
  --fo-rail-w: 280px;
  --fo-footer-h: 72px;
  /* Sidebar watermark (category image, tinted by theme) */
  --fo-aside-watermark: url("https://images.unsplash.com/photo-1625246333195-78d9c38ad449?auto=format&fit=crop&w=800&q=70");
  --fo-aside-watermark-opacity: 0.4;
}

/* Category registration themes (override tokens on .fo-shell) */
.fo-shell.fo-theme-farmer {
  --fo-aside-watermark: url("https://images.unsplash.com/photo-1625246333195-78d9c38ad449?auto=format&fit=crop&w=800&q=70");
}

.fo-shell.fo-theme-funder {
  --fo-forest: #0C2D5A;
  --fo-forest-mid: #163E75;
  --fo-leaf: #2563EB;
  --fo-leaf-soft: #EFF6FF;
  --fo-leaf-mid: #BFDBFE;
  --fo-aside-fg: #DBEAFE;
  --fo-bg: #F4F6FA;
  --fo-border: #E2E8F0;
  --fo-border-strong: #CBD5E1;
  --fo-aside-watermark: url("https://images.unsplash.com/photo-1580060839134-75a5edca2e99?auto=format&fit=crop&w=800&q=70");
}

.fo-shell.fo-theme-govdept {
  --fo-forest: #1E293B;
  --fo-forest-mid: #334155;
  --fo-leaf: #475569;
  --fo-leaf-soft: #F1F5F9;
  --fo-leaf-mid: #CBD5E1;
  --fo-aside-fg: #E2E8F0;
  --fo-bg: #F8FAFC;
  --fo-border: #E2E8F0;
  --fo-border-strong: #CBD5E1;
  --fo-aside-watermark: url("https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&w=800&q=70");
}

.fo-shell.fo-theme-implementer {
  --fo-forest: #78350F;
  --fo-forest-mid: #92400E;
  --fo-leaf: #D97706;
  --fo-leaf-soft: #FFFBEB;
  --fo-leaf-mid: #FDE68A;
  --fo-aside-fg: #FEF3C7;
  --fo-bg: #FAF8F5;
  --fo-border: #EDE5D8;
  --fo-border-strong: #D6C7B0;
  --fo-aside-watermark: url("https://images.unsplash.com/photo-1605000797499-95a51c5269ae?auto=format&fit=crop&w=800&q=70");
}

.fo-shell.fo-theme-supplier {
  --fo-forest: #7C2D12;
  --fo-forest-mid: #9A3412;
  --fo-leaf: #EA580C;
  --fo-leaf-soft: #FFF7ED;
  --fo-leaf-mid: #FDBA74;
  --fo-aside-fg: #FFEDD5;
  --fo-bg: #FAF7F5;
  --fo-border: #EDE4DC;
  --fo-border-strong: #D6C4B4;
  --fo-aside-watermark: url("https://images.unsplash.com/photo-1553413077-190dd305871c?auto=format&fit=crop&w=800&q=70");
}

.fo-shell.fo-theme-market {
  --fo-forest: #164E63;
  --fo-forest-mid: #155E75;
  --fo-leaf: #0891B2;
  --fo-leaf-soft: #ECFEFF;
  --fo-leaf-mid: #A5F3FC;
  --fo-aside-fg: #CFFAFE;
  --fo-bg: #F4F9FA;
  --fo-border: #D9E8EC;
  --fo-border-strong: #B7D0D8;
  --fo-aside-watermark: url("https://images.unsplash.com/photo-1611080626919-7cf5a9dbab5b?auto=format&fit=crop&w=800&q=70");
}

.fo-shell.fo-theme-offtaker {
  --fo-forest: #064E3B;
  --fo-forest-mid: #065F46;
  --fo-leaf: #059669;
  --fo-leaf-soft: #ECFDF5;
  --fo-leaf-mid: #A7F3D0;
  --fo-aside-fg: #D1FAE5;
  --fo-bg: #F4F7F6;
  --fo-border: #DCE8E3;
  --fo-border-strong: #B8CDC3;
  --fo-aside-watermark: url("https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=800&q=70");
}

.fo-shell.fo-theme-govofftaker {
  --fo-forest: #0C4A6E;
  --fo-forest-mid: #075985;
  --fo-leaf: #0284C7;
  --fo-leaf-soft: #F0F9FF;
  --fo-leaf-mid: #7DD3FC;
  --fo-aside-fg: #E0F2FE;
  --fo-bg: #F4F8FB;
  --fo-border: #DCE6EF;
  --fo-border-strong: #B8C9D9;
  --fo-aside-watermark: url("https://images.unsplash.com/photo-1521791136064-7986c2920216?auto=format&fit=crop&w=800&q=70");
}

.fo-layout-root {
  height: 100vh;
  overflow: hidden;
  background: var(--fo-bg);
  font-family: "Inter", "Poppins", system-ui, sans-serif;
  color: var(--fo-text);
}

/* ── 3-column shell ── */
.fo-shell {
  display: grid;
  grid-template-columns: var(--fo-aside-w) minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  background: var(--fo-bg);
}

.fo-shell--loading,
.fo-shell--submitted {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.fo-submitted {
  width: 100%;
  max-width: 40rem;
}

/* ── Left aside ── */
.fo-aside {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.35rem 1.15rem 1.25rem;
  /* Base wash: darker at top, lighter toward bottom (all category themes) */
  background-color: var(--fo-forest);
  background-image: linear-gradient(
    180deg,
    color-mix(in srgb, var(--fo-forest) 88%, #000) 0%,
    var(--fo-forest) 42%,
    var(--fo-forest-mid) 100%
  );
  color: var(--fo-aside-fg);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 30;
  isolation: isolate;
}

/* Category watermark — soft photo behind nav, tinted by theme colour */
.fo-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--fo-aside-watermark);
  background-size: cover;
  background-position: center 45%;
  background-repeat: no-repeat;
  opacity: var(--fo-aside-watermark-opacity, 0.38);
  filter: saturate(0.9) contrast(1.06);
}

/* Dark veil over the photo: strongest at top, clears toward the bottom */
.fo-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.72) 0%,
    color-mix(in srgb, var(--fo-forest) 78%, transparent) 32%,
    color-mix(in srgb, var(--fo-forest) 28%, transparent) 68%,
    transparent 100%
  );
}

.fo-aside > * {
  position: relative;
  z-index: 1;
}

.fo-brand {
  display: block;
  padding: 0;
  background: transparent;
  text-decoration: none;
  line-height: 0;
}

.fo-brand-logo {
  display: block;
  height: 2.5rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  mix-blend-mode: normal;
}

.fo-brand-mark,
.fo-brand-text {
  display: none;
}

.fo-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0 0.5rem;
}

.fo-ring {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
}

.fo-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.fo-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 8;
}

.fo-ring-fill {
  fill: none;
  stroke: #34D399;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.fo-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.fo-ring-label strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.fo-ring-label span {
  font-size: 0.6875rem;
  color: rgba(232, 245, 236, 0.75);
  margin-top: 0.2rem;
}

.fo-ring-eta {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(232, 245, 236, 0.7);
}

.fo-aside-guide {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
}

.fo-aside-widget {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.fo-aside-widget:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.fo-aside-widget:focus-visible {
  outline: 2px solid #A7F3C4;
  outline-offset: 2px;
}

.fo-aside-widget.warn {
  border-color: rgba(252, 165, 165, 0.45);
  background: rgba(127, 29, 29, 0.22);
}

.fo-aside-widget.ok {
  border-color: rgba(110, 231, 183, 0.45);
  background: rgba(6, 78, 59, 0.35);
}

.fo-aside-widget-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.fo-aside-widget-text strong {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.fo-aside-widget-text em {
  font-style: normal;
  font-size: 0.72rem;
  color: rgba(232, 245, 236, 0.72);
}

.fo-aside-widget-badge {
  flex-shrink: 0;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 0.45rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  background: #f8fafc;
  color: #0f172a;
}

.fo-aside-widget-badge.warn {
  background: #fecaca;
  color: #7f1d1d;
}

.fo-aside-widget-badge.ok {
  background: #a7f3d0;
  color: #064e3b;
}

.fo-guide-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, 0.55);
  z-index: 1400;
}

.fo-guide-modal {
  position: fixed;
  z-index: 1410;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(26rem, 94vw);
  background: #111827;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.9rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.fo-guide-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.fo-guide-modal-kicker {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.fo-guide-modal-head h2 {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.fo-guide-modal-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
}

.fo-guide-modal-close:hover { color: #fff; }

.fo-guide-modal-body {
  padding: 0.95rem 1.1rem;
}

.fo-guide-modal-list {
  gap: 0.55rem;
}

.fo-guide-modal-list li {
  color: #cbd5e1;
  font-size: 0.9rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.fo-guide-modal-list li.done {
  color: #86efac;
  border-color: rgba(110, 231, 183, 0.35);
  background: rgba(6, 78, 59, 0.35);
}

.fo-guide-modal-list .fo-aside-tick {
  border-color: rgba(148, 163, 184, 0.45);
}

.fo-guide-modal-checklist .fo-check-status {
  width: 100%;
  border-radius: 0.55rem;
  justify-content: flex-start;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
}

.fo-guide-modal-foot {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: #0f172a;
}

.fo-aside-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
  backdrop-filter: blur(6px);
}

.fo-aside-card h3 {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(232, 245, 236, 0.92);
}

.fo-aside-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fo-aside-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 560;
  color: rgba(232, 245, 236, 0.78);
}

.fo-aside-list li.done {
  color: #A7F3C4;
}

.fo-aside-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.65rem;
  flex-shrink: 0;
}

.fo-aside-list li.done .fo-aside-tick {
  background: rgba(52, 211, 153, 0.25);
  border-color: #6ee7b7;
  color: #ecfdf5;
}

.fo-aside-checklist .fo-check-status {
  background: rgba(15, 23, 42, 0.25);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(248, 250, 252, 0.9);
}

.fo-aside-checklist .fo-check-status.ok {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(110, 231, 183, 0.55);
  color: #d1fae5;
}

.fo-aside-checklist .fo-check-status.missing {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(252, 165, 165, 0.45);
  color: #fecaca;
}

.fo-aside-steps {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.fo-aside-step {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(232, 245, 236, 0.78);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.fo-aside-step:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.fo-aside-step:focus-visible {
  outline: 2px solid #A7F3C4;
  outline-offset: 2px;
}

.fo-aside-step.active {
  background: #fff;
  color: var(--fo-forest);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.fo-aside-step.done {
  color: #A7F3C4;
}

.fo-aside-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.fo-aside-step.active .fo-aside-num {
  background: var(--fo-leaf-soft);
  color: var(--fo-leaf);
}

.fo-aside-step.done .fo-aside-num {
  background: rgba(52, 211, 153, 0.2);
  color: #A7F3C4;
}

.fo-aside-help {
  margin-top: auto;
  padding: 0.9rem 0.95rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.fo-aside-help strong {
  display: block;
  font-size: 0.8125rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.fo-aside-help p {
  margin: 0 0 0.55rem;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: rgba(232, 245, 236, 0.7);
}

.fo-aside-help a {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #A7F3C4;
  text-decoration: none;
  margin-top: 0.2rem;
}

.fo-aside-help a:hover {
  text-decoration: underline;
}

.fo-aside-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(167, 243, 196, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #A7F3C4;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fo-aside-track:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(167, 243, 196, 0.55);
  color: #fff;
}

.fo-aside-why {
  margin-top: auto;
  padding: 0.9rem 0.95rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.fo-aside-why-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: rgba(167, 243, 196, 0.18);
  color: #A7F3C4;
  margin-bottom: 0.45rem;
}

.fo-aside-why h3 {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.95);
}

.fo-aside-why p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(232, 245, 236, 0.78);
}

/* ── Main column ── */
.fo-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.fo-header-fixed {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--fo-card);
  border-bottom: 1px solid var(--fo-border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.fo-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.75rem 0.75rem;
  background: var(--fo-card);
  border-bottom: none;
}

.fo-top-text h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--fo-text);
}

.fo-top-text p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--fo-muted);
}

.fo-top-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.fo-saved {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fo-leaf);
}

.fo-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.55rem 0.3rem 0.3rem;
  border-radius: 9999px;
  border: 1px solid var(--fo-border);
  background: var(--fo-card);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fo-text);
}

.fo-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9999px;
  background: var(--fo-forest);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
}

.fo-user-name {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Horizontal stepper */
.fo-hsteps {
  display: flex;
  gap: 0.15rem;
  padding: 0.5rem 1.5rem 0;
  background: var(--fo-card);
  border-bottom: none;
  overflow-x: auto;
  scrollbar-width: thin;
}

.fo-hstep {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 5.5rem;
  padding: 0.45rem 0.5rem 0.7rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--fo-muted);
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.fo-hstep:hover {
  color: var(--fo-forest);
}

.fo-hstep:focus-visible {
  outline: 2px solid var(--fo-leaf);
  outline-offset: 2px;
}

.fo-hstep-ico {
  display: flex;
  color: inherit;
}

.fo-hstep.active {
  color: var(--fo-leaf);
  border-bottom-color: var(--fo-leaf);
}

.fo-hstep.done {
  color: var(--fo-forest);
}

.fo-hstep.locked,
.fo-hstep:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: var(--fo-muted);
}

.fo-hstep.locked:hover,
.fo-hstep:disabled:hover {
  color: var(--fo-muted);
}

/* Workspace: form + right rail — fills remaining space; scrolls independently */
.fo-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--fo-rail-w);
  gap: 1.25rem;
  padding: 1.25rem 1.75rem 1.5rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.fo-workspace--solo {
  grid-template-columns: minmax(0, 1fr);
}

.fo-workspace--details {
  --fo-rail-w: min(22rem, 34vw);
  grid-template-columns: minmax(0, 1fr) var(--fo-rail-w);
}

/* VEN Details accordion (right rail) */
.fo-rail-details {
  max-height: calc(100vh - 10rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.fo-details-panel {
  background: #fff;
  border: 1px solid #bbf7d0;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.fo-details-outer > summary {
  list-style: none;
}
.fo-details-outer > summary::-webkit-details-marker { display: none; }
.fo-details-summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  color: #065f46;
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
  border-bottom: 1px solid #d1fae5;
  user-select: none;
}
.fo-details-summary .lucide-icon { color: #10b981; flex-shrink: 0; }
.fo-details-summary em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #34d399;
}
.fo-details-body {
  padding: 0.65rem 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.fo-details-item {
  border: 1px solid #d1fae5;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
}
.fo-details-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.8rem;
  border: 0;
  background: #fff;
  color: #065f46;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  line-height: 1.3;
}
.fo-details-item-btn:hover { background: #ecfdf5; }
.fo-details-item-btn .lucide-icon {
  color: #10b981;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.fo-details-item.is-open .fo-details-item-btn .lucide-icon {
  transform: rotate(180deg);
}
.fo-details-item-panel {
  border-top: 1px solid #d1fae5;
  background: #ecfdf5;
}
.fo-details-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #a7f3d0;
}
.fo-details-stat {
  padding: 0.55rem 0.45rem;
  text-align: center;
  border-right: 1px solid #a7f3d0;
  border-bottom: 1px solid #a7f3d0;
}
.fo-details-stat:nth-child(2n) { border-right: 0; }
.fo-details-stat:nth-last-child(-n+2) { border-bottom: 0; }
.fo-details-stat strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #047857;
  line-height: 1.2;
}
.fo-details-stat span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #34d399;
}
.fo-details-copy {
  margin: 0;
  padding: 0.75rem 0.85rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #334155;
  white-space: pre-line;
}
.fo-details-capital {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.fo-details-tile {
  border-radius: 0.65rem;
  padding: 0.55rem 0.35rem;
  text-align: center;
  color: #fff;
}
.fo-details-tile strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.1;
}
.fo-details-tile span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.25;
  opacity: 0.9;
}
.fo-details-tile.we { background: #047857; }
.fo-details-tile.gov { background: #0284c7; }
.fo-details-tile.ta { background: #d97706; }

.fo-workspace-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  width: 100%;
  max-width: none;
}

.fo-step-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.fo-step-intro h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fo-step-intro p {
  margin: 0.3rem 0 0;
  font-size: 0.875rem;
  color: var(--fo-muted);
  line-height: 1.45;
  max-width: 36rem;
}

.fo-account-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--fo-leaf-soft);
  color: var(--fo-leaf);
  white-space: nowrap;
}

.fo-step-panel {
  animation: fo-step-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fo-step-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fo-step-panel,
  .fo-ring-fill,
  .fo-check-status .fo-status-ico {
    animation: none !important;
    transition: none !important;
  }
}

/* Right rail */
.fo-rail {
  position: sticky;
  top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
}

.fo-rail-card,
.fo-rail-why {
  background: var(--fo-card);
  border: 1px solid var(--fo-border);
  border-radius: var(--fo-radius);
  padding: 1rem 1.05rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.fo-rail-card h3,
.fo-rail-why h3 {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--fo-text);
}

.fo-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fo-rail-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fo-muted);
}

.fo-rail-list li.done {
  color: var(--fo-leaf);
  font-weight: 600;
}

.fo-rail-tick {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  border: 1.5px solid var(--fo-border-strong);
  font-size: 0.65rem;
  flex-shrink: 0;
  background: #fff;
}

.fo-rail-list li.done .fo-rail-tick {
  background: var(--fo-leaf);
  border-color: var(--fo-leaf);
  color: #fff;
}

.fo-rail-why {
  background: var(--fo-leaf-soft);
  border-color: var(--fo-leaf-mid);
}

.fo-rail-why-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: #fff;
  color: var(--fo-leaf);
  margin-bottom: 0.55rem;
}

.fo-rail-why p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--fo-forest-mid);
}

/* Sticky footer */
/* Sticky footer — stays at bottom of main column; does not scroll with form */
.fo-footer {
  position: relative;
  flex-shrink: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--fo-footer-h);
  padding: 0.75rem 1.75rem;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--fo-border);
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.05);
}

.fo-footer-left,
.fo-footer-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.fo-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0 1rem;
  border-radius: var(--fo-radius-sm);
  border: 1px solid var(--fo-border-strong);
  background: #fff;
  color: var(--fo-text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.fo-btn-ghost:hover:not(:disabled) {
  background: var(--fo-bg);
  border-color: var(--fo-forest);
  color: var(--fo-forest);
}

.fo-btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fo-btn-ghost:focus-visible,
.fo-btn-continue:focus-visible {
  outline: 2px solid var(--fo-leaf);
  outline-offset: 2px;
}

.fo-btn-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 1.35rem;
  border-radius: var(--fo-radius-sm);
  border: none;
  background: var(--fo-forest);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(11, 61, 46, 0.25);
  transition: background 0.12s ease, transform 0.12s ease;
}

.fo-btn-continue:hover:not(:disabled) {
  background: var(--fo-forest-mid);
}

.fo-btn-continue:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.fo-trust {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--fo-muted);
}

/* Required checklist (right rail) */
.fo-rail-checklist h3 {
  margin-bottom: 0.65rem;
}

.fo-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.fo-checklist--rail {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.4rem;
}

.fo-checklist--rail .fo-check-status {
  width: 100%;
  border-radius: 10px;
  justify-content: flex-start;
}

.fo-check-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.fo-check-status.ok {
  background: var(--fo-leaf-soft);
  color: var(--fo-leaf);
  border-color: var(--fo-leaf-mid);
}

.fo-check-status.missing {
  background: var(--fo-warning-soft);
  color: #92400E;
  border-color: #FDE68A;
}

.fo-check-status .fo-status-ico {
  display: inline-flex;
  animation: fo-pop 0.25s ease;
}

@keyframes fo-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ── Section cards ── */
.fo-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fo-card {
  background: var(--fo-card);
  border: 1px solid var(--fo-border);
  border-radius: var(--fo-radius);
  padding: 1.25rem 1.35rem 1.4rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.fo-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.fo-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--fo-leaf-soft);
  color: var(--fo-leaf);
  flex-shrink: 0;
}

.fo-card-head-text { flex: 1; min-width: 0; }

.fo-card-head-actions {
  flex-shrink: 0;
  margin-left: auto;
  align-self: center;
}

.fo-card-search {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 11rem;
  max-width: 16rem;
  width: min(16rem, 42vw);
  padding: 0.35rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #fff;
  color: #64748b;
}
@media (max-width: 640px) {
  .fo-card-head {
    flex-wrap: wrap;
  }
  .fo-card-head-actions {
    width: 100%;
    margin-left: 0;
  }
  .fo-card-search {
    width: 100%;
    max-width: none;
  }
  .fo-produce-head .fo-card-search {
    margin-left: 0;
    width: 100%;
    max-width: none;
  }
}
.fo-card-search:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18);
}
.fo-card-search-ico {
  display: inline-flex;
  flex-shrink: 0;
  color: #94a3b8;
}
.fo-card-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.78rem;
  color: #0f172a;
}
.fo-card-search input::placeholder { color: #94a3b8; }

/* Keep search pill intact when nested under .fo-field (label/input form rules) */
.fo-field label.fo-card-search {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.fo-field .fo-card-search input,
.fo-field .fo-card-search input:focus {
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  font-size: 0.78rem;
}

.fo-empty-hint {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

.fo-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.fo-card-desc {
  font-size: 0.8125rem;
  color: var(--fo-muted);
  margin: 0.2rem 0 0;
  line-height: 1.45;
}

.fo-card-body { min-width: 0; }

/* Grids */
.fo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .fo-grid-2 { grid-template-columns: 1fr 1fr; }
  .fo-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .fo-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Fields */
.fo-field { min-width: 0; }

.fo-field label,
.fo-field .fo-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fo-text);
  margin-bottom: 0.4rem;
}

.fo-field label.required::after,
.fo-field .fo-label.required::after {
  content: " *";
  color: var(--fo-danger);
}

.fo-help {
  display: block;
  font-size: 0.75rem;
  color: var(--fo-muted);
  margin: 0.35rem 0 0;
  line-height: 1.4;
}

.fo-field input,
.fo-field select,
.fo-field textarea {
  width: 100%;
  height: 42px;
  padding: 0 0.85rem;
  border: 1px solid var(--fo-border-strong);
  border-radius: var(--fo-radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--fo-text);
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fo-field textarea {
  height: auto;
  min-height: 96px;
  padding: 0.7rem 0.85rem;
  resize: vertical;
}

.fo-field input:focus,
.fo-field select:focus,
.fo-field textarea:focus {
  outline: none;
  border-color: var(--fo-leaf);
  box-shadow: 0 0 0 3px var(--fo-leaf-soft);
}

.fo-field input:disabled,
.fo-field select:disabled {
  background: var(--fo-bg);
  color: var(--fo-muted);
  cursor: not-allowed;
}

.fo-field.is-invalid input,
.fo-field.is-invalid select {
  border-color: var(--fo-danger);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.08);
}

.fo-field-error {
  font-size: 0.75rem;
  color: var(--fo-danger);
  margin: 0.35rem 0 0;
  font-weight: 500;
}

.fo-input-lock {
  position: relative;
}

.fo-input-lock input {
  padding-right: 2.25rem;
}

.fo-lock-ico {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fo-muted);
  display: flex;
  pointer-events: none;
}

.fo-verified-ico {
  color: var(--fo-leaf, #059669);
}

/* Email / WhatsApp field with trailing OTP controls */
.fo-contact-verify {
  border: 1px solid var(--fo-border-strong);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.fo-field.is-invalid .fo-contact-verify {
  border-color: var(--fo-danger);
}

.fo-field.is-invalid .fo-contact-verify-input {
  border: none !important;
  box-shadow: none !important;
}

.fo-contact-verify.is-verified {
  border-color: var(--fo-leaf-mid, #a7f3d0);
  background: #f0fdf4;
}

.fo-contact-verify-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  min-height: 2.75rem;
}

.fo-contact-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--fo-border, #e2e8f0);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.fo-contact-row input {
  flex: 1 1 auto;
  min-width: 0;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.fo-contact-row .fo-contact-send {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  border-left: 1px solid var(--fo-border, #e2e8f0);
  background: #f8fafc;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #047857;
  cursor: pointer;
  white-space: nowrap;
}

.fo-contact-row .fo-contact-send:hover:not(:disabled) {
  background: #ecfdf5;
}

.fo-contact-send-ico {
  color: #059669;
}

.fo-field-label-ico {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
}

.fo-field-label-icon {
  color: #64748b;
}

.fo-field-label-icon--wa {
  color: #25d366;
}

.fo-shell--gate .fo-workspace {
  max-width: min(72rem, 100%);
}

.fo-shell--gate .fo-workspace--solo {
  grid-template-columns: minmax(0, 1fr);
}

.fo-shell--gate .reg-contact-gate,
.fo-shell--gate .reg-contact-gate .fo-card {
  width: 100%;
}

.reg-contact-gate .reg-otp-label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.reg-contact-gate .reg-otp-input {
  display: block;
  width: 100%;
  max-width: 16rem;
  min-height: 2.75rem;
  padding: 0.7rem 0.9rem !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.5rem !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 1rem !important;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #0f172a;
  text-align: left;
}

.reg-contact-gate .reg-otp-input::placeholder {
  letter-spacing: normal;
  font-weight: 500;
  color: #94a3b8;
}

.reg-contact-gate .reg-otp-input:focus {
  outline: none;
  border-color: #059669 !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15) !important;
}

/* Promote trail/msg into the row so input + Verify stay side by side */
.fo-contact-otp {
  display: contents;
}

.fo-contact-verify-input {
  flex: 1 1 0;
  width: auto !important;
  min-width: 0;
  height: auto !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0.65rem 0.75rem !important;
}

.fo-contact-verify-input:disabled {
  color: var(--fo-text);
  opacity: 1;
  cursor: default;
}

.fo-contact-trail {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
  padding: 0.3rem 0.4rem;
  border-left: 1px solid var(--fo-border);
  background: #f8fafc;
}

.fo-contact-trail--ok {
  border-left: 1px solid transparent;
  background: transparent;
  padding: 0 0.75rem;
  color: var(--fo-leaf, #059669);
  align-self: center;
}

.fo-contact-code {
  width: 4.25rem !important;
  height: auto !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0.35rem 0.25rem !important;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  outline: none;
}

.fo-contact-send {
  border: none;
  border-radius: 8px;
  background: var(--fo-leaf, #059669);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}

.fo-contact-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fo-contact-resend {
  border: none;
  background: transparent;
  color: var(--fo-muted);
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.25rem 0.3rem;
  cursor: pointer;
}

.fo-contact-resend:hover {
  color: var(--fo-leaf, #059669);
}

.fo-contact-msg {
  padding: 0.35rem 0.75rem 0.5rem;
  border-top: 1px solid var(--fo-border);
  background: #fff;
}

/* Messages render via display:contents parent — pin under the row */
.fo-contact-verify-row .fo-contact-msg {
  order: 3;
  flex: 1 0 100%;
  width: 100%;
}

.fo-otp-info {
  margin: 0;
  font-size: 0.72rem;
  color: #047857;
}

.fo-identity-check-btn {
  border: none;
  border-radius: 8px;
  background: var(--fo-forest, #14532d);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.fo-identity-check-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fo-identity-banner {
  margin-top: 0.75rem;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--fo-border);
  background: #f8fafc;
}

.fo-identity-banner strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.fo-identity-banner p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--fo-muted);
}

.fo-identity-banner--ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.fo-identity-banner--ok strong { color: #047857; }

.fo-identity-banner--warn {
  background: #fffbeb;
  border-color: #fde68a;
}

.fo-identity-banner--warn strong { color: #92400e; }

.fo-identity-banner--block {
  background: #fef2f2;
  border-color: #fecaca;
}

.fo-identity-banner--block strong { color: #b91c1c; }

/* Segmented */
.fo-segment {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.45rem;
}

.fo-segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--fo-border-strong);
  background: #fff;
  color: var(--fo-text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fo-segment-btn:hover {
  border-color: var(--fo-leaf);
  background: var(--fo-leaf-soft);
  color: var(--fo-leaf);
}

.fo-segment-btn:focus-visible {
  outline: 2px solid var(--fo-leaf);
  outline-offset: 2px;
}

.fo-segment-btn.selected {
  background: var(--fo-leaf-soft);
  border-color: var(--fo-leaf);
  color: var(--fo-leaf);
  box-shadow: 0 0 0 1px var(--fo-leaf);
}

/* Radios */
.fo-radio-group,
.fo-radio-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fo-radio-row {
  flex-direction: row;
  flex-wrap: wrap;
}

.fo-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--fo-border);
  border-radius: var(--fo-radius-sm);
  cursor: pointer;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.fo-radio:hover { background: var(--fo-bg); }

.fo-radio:has(input:checked) {
  border-color: var(--fo-leaf);
  background: var(--fo-leaf-soft);
}

.fo-radio input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--fo-leaf);
  margin: 0;
}

/* Org cards */
.fo-org-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

@media (min-width: 640px) {
  .fo-org-grid,
  .fo-org-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .fo-org-grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .fo-org-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.fo-org-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--fo-border-strong);
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  min-height: 0;
}

.fo-org-card:hover {
  border-color: var(--fo-leaf);
  background: var(--fo-leaf-soft);
}

.fo-org-card:focus-visible {
  outline: 2px solid var(--fo-leaf);
  outline-offset: 2px;
}

.fo-org-card.selected {
  border-color: var(--fo-leaf);
  background: var(--fo-leaf-soft);
  box-shadow: 0 0 0 1px var(--fo-leaf);
}

.fo-org-card-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 7px;
  background: var(--fo-bg);
  color: var(--fo-forest);
  flex-shrink: 0;
}

.fo-org-card.selected .fo-org-card-ico {
  background: #fff;
  color: var(--fo-leaf);
}

.fo-org-card strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.05rem;
  line-height: 1.2;
}

.fo-org-card p {
  margin: 0;
  font-size: 0.68rem;
  color: var(--fo-muted);
  line-height: 1.25;
}

/* Checks */
.fo-check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .fo-check-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

.fo-check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--fo-border);
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.fo-check:hover { background: var(--fo-bg); }

.fo-check:has(input:checked) {
  border-color: var(--fo-leaf-mid);
  background: var(--fo-leaf-soft);
}

.fo-check input {
  margin-top: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--fo-leaf);
  flex-shrink: 0;
}

.fo-check strong {
  display: block;
  font-size: 0.875rem;
}

.fo-check-desc {
  font-size: 0.75rem;
  color: var(--fo-muted);
  margin: 0.2rem 0 0;
  line-height: 1.4;
}

.fo-check-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fo-forest);
  text-decoration: none;
}

.fo-check-link:hover { text-decoration: underline; }

.fo-consent-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.fo-inset {
  background: var(--fo-leaf-soft);
  border: 1px solid var(--fo-leaf-mid);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.fo-inset-title {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--fo-forest);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.85rem;
}

/* Chips / buttons for multi-select */
.fo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.fo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border-radius: var(--fo-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--fo-border-strong);
  background: #fff;
  color: var(--fo-text);
  cursor: pointer;
  font-family: inherit;
  min-height: 2.25rem;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.fo-chip:hover {
  border-color: var(--fo-leaf);
  color: var(--fo-leaf);
  background: var(--fo-leaf-soft);
}

.fo-chip:focus-visible {
  outline: 2px solid var(--fo-leaf);
  outline-offset: 2px;
}

.fo-chip.selected {
  background: var(--fo-leaf);
  color: #fff;
  border-color: var(--fo-leaf);
}

.fo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--fo-radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--fo-border-strong);
  background: #fff;
  cursor: pointer;
  color: var(--fo-text);
  font-family: inherit;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.fo-btn:hover {
  border-color: var(--fo-leaf);
  color: var(--fo-leaf);
  background: var(--fo-leaf-soft);
}

.fo-line {
  border: 1px solid var(--fo-border);
  border-radius: 12px;
  padding: 0.85rem;
  margin-bottom: 0.55rem;
  background: #fff;
}

.fo-line strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.fo-muted-note {
  font-size: 0.8125rem;
  color: var(--fo-muted);
  margin: 0 0 0.75rem;
}

/* Viability */
.fo-metric {
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
}

.fo-metric.indigo {
  background: #EEF3FB;
  border: 1px solid #D9E4F7;
}

.fo-metric.emerald {
  background: var(--fo-leaf-soft);
  border: 1px solid var(--fo-leaf-mid);
}

.fo-metric.slate {
  background: var(--fo-bg);
  border: 1px solid var(--fo-border);
  text-align: center;
}

.fo-metric-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.fo-metric.indigo .fo-metric-label { color: #17479E; }
.fo-metric.emerald .fo-metric-label { color: var(--fo-leaf); }
.fo-metric.slate .fo-metric-label { color: var(--fo-muted); }

.fo-metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.35rem 0 0;
  letter-spacing: -0.02em;
}

.fo-metric.indigo .fo-metric-value { color: #1e3a6e; }
.fo-metric.emerald .fo-metric-value { color: #064e3b; }
.fo-metric.slate .fo-metric-value { font-size: 1.25rem; color: var(--fo-text); }

.fo-score {
  background: var(--fo-forest);
  border-radius: var(--fo-radius);
  padding: 1.25rem 1.35rem;
  color: #fff;
  margin: 1rem 0;
}

.fo-score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.fo-score-kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #6EE7B7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.fo-score-sub {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0.25rem 0 0;
}

.fo-score-num {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.03em;
}

.fo-score-num span { font-size: 1rem; opacity: 0.6; }

.fo-score-bar {
  height: 0.45rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  margin-top: 0.85rem;
  overflow: hidden;
}

.fo-score-fill {
  height: 100%;
  background: #34D399;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.fo-score-confidence {
  font-size: 0.75rem;
  margin: 0.55rem 0 0;
  opacity: 0.85;
}

/* Legacy / VEN path compatibility */
.fo-dash-body,
.fo-dash-panel,
.fo-content { width: 100%; min-width: 0; }

.fo-wizard-bar,
.fo-nav,
.fo-banner {
  /* kept for VEN long-form path */
}

.fo-banner {
  border-radius: 12px;
  padding: 0.9rem 1rem;
  border: 1px solid transparent;
}

.fo-banner.warn {
  border-color: #FDE68A;
  background: var(--fo-warning-soft);
  color: #92400E;
}

.fo-banner.ok {
  border-color: var(--fo-leaf-mid);
  background: var(--fo-leaf-soft);
  color: #166534;
}

.fo-banner ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.75rem;
}

.fo-banner li.done {
  text-decoration: line-through;
  color: var(--fo-leaf);
}

.ven-longform { display: flex; flex-direction: column; gap: 0.75rem; }

.ven-section {
  border: 1px solid var(--fo-border);
  border-radius: var(--fo-radius);
  background: var(--fo-card);
  padding: 0.5rem 1rem 0.75rem;
}

.ven-section summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0.5rem 0;
  font-size: 0.95rem;
}

.ven-section summary::-webkit-details-marker { display: none; }

.ven-section-body {
  padding: 0.5rem 0 0.25rem;
  border-top: 1px solid var(--fo-border);
  margin-top: 0.25rem;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .fo-workspace {
    grid-template-columns: 1fr;
  }

  .fo-workspace--details {
    grid-template-columns: 1fr;
  }

  .fo-rail {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }

  .fo-rail-details {
    max-height: none;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .fo-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .fo-layout-root {
    height: auto;
    overflow: visible;
  }

  .fo-aside {
    position: relative;
    height: auto;
    max-height: none;
  }

  .fo-aside-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .fo-main {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .fo-header-fixed {
    position: sticky;
    top: 0;
  }

  .fo-workspace {
    overflow: visible;
  }

  .fo-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
  }

  .fo-footer-left,
  .fo-footer-right {
    width: 100%;
    justify-content: stretch;
  }

  .fo-footer-left .fo-btn-ghost,
  .fo-footer-right .fo-btn-continue {
    flex: 1;
  }

  .fo-trust {
    width: 100%;
    justify-content: center;
    order: -1;
  }

  .fo-top {
    flex-direction: column;
    padding: 1rem 1.15rem 0.75rem;
  }

  .fo-workspace {
    padding: 1rem 1.15rem 1.25rem;
  }

  .fo-rail {
    grid-template-columns: 1fr;
  }

  .fo-hstep-label {
    display: none;
  }

  .fo-hstep {
    min-width: 2.75rem;
  }
}

@media (max-width: 640px) {
  .fo-grid-2,
  .fo-grid-3,
  .fo-grid-4 {
    grid-template-columns: 1fr;
  }

  .fo-segment {
    grid-template-columns: 1fr 1fr;
  }

  .fo-radio-row {
    flex-direction: column;
  }

  .fo-user-name {
    display: none;
  }

  .fo-aside-steps {
    grid-template-columns: 1fr;
  }
}

/* ── Farm & Produce (VEN parity) ── */
.fo-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 640px) {
  .fo-status-grid { grid-template-columns: 1fr; }
}
.fo-status-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  padding: 1rem;
  border-radius: 0.85rem;
  border: 2px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fo-status-card:hover { border-color: #86efac; }
.fo-status-card.selected {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
  background: #f0fdf4;
}
.fo-status-text {
  flex: 1;
  min-width: 0;
}
.fo-status-card strong {
  display: block;
  margin: 0 0 0.2rem;
  color: #0f172a;
  line-height: 1.3;
}
.fo-status-card p {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}
.fo-status-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  background: #ecfdf5;
  color: #047857;
}

.fo-cat-grid {
  display: grid;
  grid-template-columns: repeat(var(--fo-cols, 6), minmax(0, 1fr));
  gap: 0.75rem;
}
.fo-cat {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  padding: 0;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fo-cat.sel {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}
.fo-cat img {
  width: 100%;
  height: 4.5rem;
  object-fit: cover;
  display: block;
}
.fo-cat-name {
  display: block;
  margin: 0;
  padding: 0.5rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: #059669;
  background: #fff;
}
.fo-cat.sel .fo-cat-name {
  background: #ecfdf5;
  color: #047857;
}

.fo-produce-panel {
  margin-top: 1rem;
  background: #fff;
  border: 1px solid #fef3c7;
  border-radius: 1rem;
  padding: 1rem;
}
.fo-produce-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.fo-produce-head-text { flex: 1; min-width: 12rem; }
.fo-produce-head h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.fo-produce-head p { margin: 0; font-size: 0.78rem; color: #64748b; }
.fo-produce-head .fo-card-search { margin-left: auto; }
.fo-pill-warn {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: #ef4444;
  color: #fff;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.fo-type-grid {
  display: grid;
  grid-template-columns: repeat(var(--fo-cols, 5), minmax(0, 1fr));
  gap: 0.75rem;
}
.fo-type-card {
  width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
}
.fo-type-card.is-added { border-color: #34d399; }
.fo-type-card img { width: 100%; height: 4.5rem; object-fit: cover; display: block; }
.fo-type-body { padding: 0.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.fo-type-name {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #059669;
}

.fo-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.fo-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  color: #334155;
  cursor: pointer;
}
.fo-pager-btn:hover:not(:disabled) {
  border-color: #10b981;
  color: #047857;
  background: #ecfdf5;
}
.fo-pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.fo-pager-dots {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.fo-pager-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
}
.fo-pager-dot.active {
  width: 1.15rem;
  background: #059669;
}
.fo-pager-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  min-width: 2.5rem;
  text-align: center;
}
.fo-type-body label { font-size: 0.62rem; color: #64748b; font-weight: 600; }
.fo-type-body input,
.fo-type-body textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.4rem;
  padding: 0.3rem 0.4rem;
  font-size: 0.72rem;
}

/* +/- number stepper (quantity capture) */
.fo-num-stepper {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.fo-num-btn {
  flex: 0 0 2rem;
  border: 0;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.fo-num-btn:hover:not(:disabled) { background: #e2e8f0; }
.fo-num-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.fo-num-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0 !important;
  border-left: 1px solid #e2e8f0 !important;
  border-right: 1px solid #e2e8f0 !important;
  border-radius: 0 !important;
  text-align: center;
  font-size: 0.8rem !important;
  font-weight: 600;
  color: #0f172a;
  background: #fff !important;
  padding: 0.35rem 0.25rem !important;
  box-shadow: none !important;
}
.fo-num-input:focus {
  outline: none;
  background: #f8fafc !important;
}
.fo-type-body .fo-num-stepper {
  min-height: 1.75rem;
}
.fo-type-body .fo-num-btn {
  flex-basis: 1.65rem;
  font-size: 0.9rem;
}
.fo-type-body .fo-num-input {
  font-size: 0.72rem !important;
  padding: 0.25rem 0.15rem !important;
}
.fo-ven-table .fo-num-stepper {
  min-width: 7.5rem;
}
.fo-btn-map {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.3rem;
  cursor: pointer;
  color: #334155;
}
.fo-btn-map.is-mapped {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}
.fo-compliance-item.is-gap {
  border-color: #fecaca;
  background: #fef2f2;
}

.fo-gap-summary {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #bbf7d0;
  background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
}
.fo-gap-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  text-align: center;
  margin-bottom: 0.75rem;
}
.fo-gap-metrics strong {
  display: block;
  font-size: 1.15rem;
  color: #0f172a;
}
.fo-gap-metrics strong.ok { color: #047857; }
.fo-gap-metrics strong.warn { color: #dc2626; }
.fo-gap-metrics span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.fo-gap-bar {
  height: 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.fo-gap-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #34d399);
}
.fo-match-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.fo-match-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.fo-match-rank {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #334155;
  flex-shrink: 0;
}
.fo-match-body {
  min-width: 0;
  flex: 1;
}
.fo-match-body strong {
  display: block;
  font-size: 0.9rem;
  color: #0f172a;
}
.fo-funding-market > .fo-section {
  margin: 0;
}
@media (max-width: 640px) {
  .fo-gap-metrics { grid-template-columns: 1fr; }
}

.fo-agro-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0.85rem;
  border-radius: 0.75rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}
.fo-agro-group .fo-inset-title {
  margin-bottom: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0369a1;
}
@media (max-width: 720px) {
  .fo-agro-groups { grid-template-columns: 1fr; }
}

.fo-boundary-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.fo-boundary-cta .fo-btn-map {
  font-size: 0.8rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.5rem;
}

.fo-boundary-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, 0.62);
  z-index: 1300;
}
.fo-boundary-modal {
  position: fixed;
  z-index: 1310;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(56rem, 96vw);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: #111827;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.9rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.fo-boundary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.15rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  flex-shrink: 0;
}
.fo-boundary-kicker {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}
.fo-boundary-head h2 {
  margin: 0.2rem 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
}
.fo-boundary-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}
.fo-boundary-close:hover { color: #fff; }
.fo-boundary-body {
  padding: 0.85rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.fo-boundary-hint {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}
.fo-infra-bar {
  margin: 0.15rem 0 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.fo-infra-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.fo-infra-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-right: 0.15rem;
}
.fo-infra-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  cursor: pointer;
}
.fo-infra-chip:hover:not(:disabled) { border-color: #94a3b8; }
.fo-infra-chip.is-active { color: #fff; }
.fo-infra-chip:disabled { opacity: 0.55; cursor: not-allowed; }
.fo-infra-detect {
  margin-left: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #86efac;
  background: #ecfdf5;
  color: #047857;
  cursor: pointer;
}
.fo-infra-detect:hover:not(:disabled) { background: #d1fae5; }
.fo-infra-detect:disabled { opacity: 0.55; cursor: not-allowed; }
.fo-infra-hint {
  font-size: 0.7rem;
  font-style: italic;
  color: #64748b;
}
.fo-infra-placed {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}
.fo-infra-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.15rem 0.25rem 0.15rem 0.5rem;
}
.fo-infra-src {
  font-style: normal;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 0.25rem;
  padding: 0.05rem 0.25rem;
}
.fo-infra-pill-x {
  border: 0;
  background: transparent;
  color: #f87171;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.2rem;
}
.fo-infra-pill-x:hover { color: #dc2626; }
.infra-marker { background: transparent !important; border: 0 !important; }
.fo-resource-estimates {
  margin-top: 0.35rem;
  padding: 0.75rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.fo-resource-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.fo-resource-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
}
.fo-resource-title .lucide-icon { color: #3b82f6; }
.fo-resource-title .lucide-icon:last-of-type { color: #f59e0b; }
.fo-resource-meta {
  margin-left: auto;
  font-size: 0.62rem;
  color: #94a3b8;
}
.fo-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
.fo-resource-card {
  border-radius: 0.55rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid;
}
.fo-resource-card.water {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.fo-resource-card.energy {
  background: #fffbeb;
  border-color: #fde68a;
}
.fo-resource-card-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}
.fo-resource-card.water .fo-resource-card-head { color: #1e40af; }
.fo-resource-card.energy .fo-resource-card-head { color: #92400e; }
.fo-resource-value {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
}
.fo-resource-card.water .fo-resource-value { color: #1d4ed8; }
.fo-resource-card.energy .fo-resource-value { color: #b45309; }
.fo-resource-sub {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
}
.fo-resource-card.water .fo-resource-sub { color: #3b82f6; }
.fo-resource-card.energy .fo-resource-sub { color: #d97706; }
.fo-resource-line {
  margin: 0.25rem 0 0;
  font-size: 0.62rem;
  color: #64748b;
}
.fo-resource-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}
.fo-resource-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 0.3rem;
}
.fo-resource-badge.well { background: #cffafe; color: #0e7490; }
.fo-resource-badge.river { background: #ccfbf1; color: #0f766e; }
.fo-resource-badge.pipe { background: #e0e7ff; color: #4338ca; }
.fo-resource-badge.water-sys { background: #dbeafe; color: #1d4ed8; }
.fo-resource-badge.energy-on { background: #fef3c7; color: #b45309; }
.fo-resource-badge.muted { background: #f1f5f9; color: #64748b; }
.fo-resource-note {
  margin: 0.45rem 0 0;
  font-size: 0.62rem;
  font-style: italic;
  color: #94a3b8;
  line-height: 1.35;
}
@media (max-width: 640px) {
  .fo-resource-grid { grid-template-columns: 1fr; }
  .fo-resource-meta { display: none; }
}
.fo-boundary-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}
.fo-boundary-search {
  display: flex;
  flex: 1 1 16rem;
  gap: 0.4rem;
  min-width: 0;
}
.fo-boundary-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0f172a;
  color: #f8fafc;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
}
.fo-boundary-search input::placeholder { color: #64748b; }
.fo-boundary-import {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.fo-boundary-import:hover { background: #334155; }
.fo-boundary-import input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.fo-boundary-status {
  margin: 0;
  font-size: 0.8rem;
  color: #86efac;
}
.fo-boundary-map-stage {
  position: relative;
  height: min(36vh, 20rem);
  min-height: 200px;
  flex: 0 0 auto;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #0b1220;
}
.fo-boundary-map-stage .fm-map-canvas {
  height: 100% !important;
  min-height: 200px;
}
.fo-boundary-area {
  margin: 0;
  font-size: 0.85rem;
  color: #cbd5e1;
}
.fo-boundary-area strong { color: #86efac; }
.fo-boundary-error {
  margin: 0;
  font-size: 0.8rem;
  color: #fca5a5;
}
.fo-boundary-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: #0f172a;
  flex-shrink: 0;
}
.fo-resource-estimates,
.fo-infra-bar,
.fo-boundary-area,
.fo-boundary-status,
.fo-boundary-error {
  flex-shrink: 0;
}
.fo-boundary-btn {
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #1e293b;
  color: #e2e8f0;
}
.fo-boundary-btn.ghost:hover { background: #334155; }
.fo-boundary-btn.primary {
  background: #059669;
  border-color: #059669;
  color: #fff;
}
.fo-boundary-btn.primary:hover:not(:disabled) { background: #047857; }
.fo-boundary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (max-width: 640px) {
  .fo-boundary-modal {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    top: 0;
    left: 0;
    transform: none;
  }
  .fo-boundary-map-stage {
    height: min(32vh, 16rem);
    min-height: 180px;
  }
}
.fo-btn-add {
  width: 100%;
  background: #f59e0b;
  color: #fff;
  border: none;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.45rem;
  border-radius: 0.5rem;
  cursor: pointer;
  margin-top: 0.25rem;
}
.fo-btn-add:hover { background: #d97706; }
.fo-btn-remove {
  width: 100%;
  background: transparent;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.3rem;
  border-radius: 0.4rem;
  cursor: pointer;
}
.fo-added {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: #059669;
}
.fo-produce-summary {
  margin-top: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
}
.fo-produce-summary strong { display: block; margin-bottom: 0.5rem; font-size: 0.85rem; }
.fo-produce-summary-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr auto;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.78rem;
  padding: 0.35rem 0;
  border-top: 1px solid #e2e8f0;
}
.fo-muted { color: #64748b; }
.fo-btn-ghost-sm {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.fo-price-ticker {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #99f6e4;
}
.fo-price-ticker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(90deg, #0f766e, #0d9488);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
}
.fo-price-source {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}
.fo-price-source.is-live { background: #34d399; color: #064e3b; }
.fo-price-source.is-bench { background: rgba(251, 191, 36, 0.28); color: #fef3c7; }
.fo-price-mine-count {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  color: #a7f3d0;
}
.fo-price-warn {
  margin: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.68rem;
  color: #92400e;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
}
.fo-price-ticker-rail {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.65rem;
  background: #f0fdfa;
}
.fo-price-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #fff;
  border: 1px solid #ccfbf1;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  white-space: nowrap;
}
.fo-price-chip.muted { color: #64748b; font-style: italic; }
.fo-price-chip.is-mine {
  border-color: #34d399;
  background: #ecfdf5;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2);
}
.fo-price-tag {
  font-style: normal !important;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #047857 !important;
  background: #a7f3d0;
  border-radius: 0.25rem;
  padding: 0.05rem 0.3rem;
  margin: 0 !important;
}
.fo-price-chip em { font-style: normal; margin-left: 0.2rem; font-weight: 700; }
.fo-price-chip em.up { color: #059669; }
.fo-price-chip em.down { color: #dc2626; }
.fo-price-chip em.flat { color: #64748b; }


.fo-commitment {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  color: #14532d;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border: 1px solid #a7f3d0;
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
}
.fo-commitment p { margin: 0; font-size: 0.9rem; line-height: 1.5; }
.fo-commitment ul {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.86rem;
  line-height: 1.45;
}
.fo-commitment .fo-muted-note { color: #475569; }

/* Selection check — shows on every required option card / chip when chosen */
.fo-status-card,
.fo-org-card,
.fo-cat {
  position: relative;
}

.fo-status-card.selected::after,
.fo-org-card.selected::after,
.fo-cat.sel::after {
  content: "✓";
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 9999px;
  background: #059669;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.35);
  z-index: 2;
  pointer-events: none;
}

.fo-org-card.selected::after {
  top: 0.3rem;
  right: 0.3rem;
  width: 1rem;
  height: 1rem;
  font-size: 0.58rem;
}

.fo-segment-btn.selected::before,
.fo-chip.selected::before {
  content: "✓";
  display: inline-block;
  margin-right: 0.3rem;
  font-weight: 700;
  line-height: 1;
}

/* VEN parity helpers */
.fo-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.fo-water-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fo-water-list .fo-check-row {
  padding: 0.55rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #f8fafc;
  font-size: 0.9rem;
}

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

.fo-ven-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.fo-ven-table th,
.fo-ven-table td {
  border: 1px solid #e2e8f0;
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: middle;
}

.fo-ven-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #334155;
}

.fo-ven-table input,
.fo-ven-table select {
  width: 100%;
  min-width: 5rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.4rem;
  padding: 0.35rem 0.45rem;
  font: inherit;
}

.fo-compliance-cat {
  margin-bottom: 1.25rem;
}

.fo-compliance-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.fo-compliance-item-text {
  flex: 1 1 14rem;
  font-size: 0.88rem;
  color: #334155;
}

.fo-compliance-item-text strong {
  font-weight: 600;
  color: #0f172a;
}

.fo-signature-pad {
  display: flex;
    flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px dashed #94a3b8;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.fo-signature-mode {
  max-width: 22rem;
  margin-bottom: 0.85rem;
}

.fo-signature-pad input {
  font-family: "Segoe Script", "Comic Sans MS", cursive;
  font-size: 1.15rem;
  padding: 0.65rem 0.85rem;
}

.fo-signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fo-signature-canvas {
  display: block;
    width: 100%;
  height: 10rem;
  max-width: 36rem;
  border-radius: 0.65rem;
  border: 1px solid #cbd5e1;
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(
      -45deg,
      #f8fafc,
      #f8fafc 8px,
      #f1f5f9 8px,
      #f1f5f9 16px
    );
  cursor: crosshair;
  touch-action: none;
}

.fo-signature-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.fo-signature-img {
  display: block;
  max-width: min(100%, 20rem);
  max-height: 5rem;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.45rem;
  padding: 0.25rem 0.5rem;
}

.fo-radio-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
@media (max-width: 640px) {
  .fo-radio-stack {
    grid-template-columns: 1fr;
  }
}

.fo-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 1rem;
}

.fo-modal {
  background: #fff;
  border-radius: 0.9rem;
  padding: 1.25rem 1.4rem;
  max-width: 28rem;
  width: 100%;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}

.fo-modal h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.fo-lease-parties {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}

/* Dedicated Farm & Produce workspace */
.fo-produce-workspace {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2.5rem;
}
.fo-produce-workspace-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.fo-produce-workspace-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.fo-produce-workspace-bar h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.fo-produce-workspace-bar-text > p:last-child {
  margin: 0;
  max-width: 36rem;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.45;
}
.fo-produce-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.fo-produce-workspace-main {
  min-width: 0;
}
.fo-produce-workspace-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}
.fo-card-head-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.fo-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.fo-icon-btn:hover {
  border-color: #10b981;
  color: #059669;
  background: #ecfdf5;
}
.fo-farm-produce--workspace .fo-cat-grid {
  gap: 0.9rem;
}
.fo-farm-produce--workspace .fo-type-grid {
  gap: 1rem;
}
.fo-farm-produce--workspace .fo-type-card {
  padding: 0.85rem;
}
.fo-farm-produce--workspace .fo-produce-panel {
  margin-top: 1.25rem;
}
@media (max-width: 640px) {
  .fo-produce-workspace {
    padding: 1rem 0.85rem 2rem;
  }
  .fo-card-head-tools {
    width: 100%;
  }
  .fo-card-head-tools .fo-card-search {
    flex: 1;
    min-width: 0;
  }
}

.fo-shell.fo-produce-workspace {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  height: auto;
  min-height: 100vh;
  overflow: auto;
}
.fo-layout-root:has(.fo-produce-workspace) {
  height: auto;
  min-height: 100vh;
  overflow: auto;
}

.fo-num-stepper.is-disabled {
  opacity: 0.72;
  background: #f8fafc;
}

.fo-num-stepper.is-disabled .fo-num-input {
  color: #475569;
  cursor: not-allowed;
}

.fo-edit-otp-modal {
  max-width: 32rem;
}

.fo-edit-otp-copy {
  margin: 0 0 1rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.5;
}

.fo-edit-otp-channels {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fo-edit-otp-channel {
  padding: 0.85rem 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.fo-edit-otp-channel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-bottom: 0.55rem;
  color: #0f172a;
  font-size: 0.85rem;
}

.fo-edit-otp-channel-head span {
  color: #64748b;
  font-weight: 500;
}

.fo-top-meta .fo-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}


/* In-app notification bell */
.fo-inbox { position: relative; display: inline-flex; }
.fo-inbox-trigger { position: relative; }
.fo-inbox-badge {
    position: absolute;
    top: -0.15rem;
    right: -0.15rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.3rem;
    border-radius: 9999px;
    background: #0F6B3C;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
}
.fo-inbox-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    background: transparent;
    z-index: 40;
}
.fo-inbox-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    width: min(22rem, calc(100vw - 1.5rem));
    max-height: 24rem;
    overflow: auto;
    background: #fff;
    border: 1px solid #e2e8e4;
    border-radius: 0.85rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    z-index: 50;
}
.fo-inbox-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #e2e8e4;
}
.fo-inbox-head-actions { display: flex; gap: 0.65rem; }
.fo-inbox-link {
    border: 0;
    background: none;
    color: #0F6B3C;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 650;
    cursor: pointer;
    text-decoration: none;
}
.fo-inbox-empty {
    margin: 0;
    padding: 1.25rem 0.9rem;
    color: #64748b;
    font-size: 0.9rem;
}
.fo-inbox-list { list-style: none; margin: 0; padding: 0; }
.fo-inbox-item {
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
    padding: 0.75rem 0.9rem;
    display: grid;
    gap: 0.2rem;
    cursor: pointer;
    font: inherit;
}
.fo-inbox-list li.unread .fo-inbox-item { background: #f0fdf4; }
.fo-inbox-item strong { color: #0f172a; font-size: 0.88rem; }
.fo-inbox-item span { color: #64748b; font-size: 0.8rem; line-height: 1.35; }
.fo-inbox-item time { color: #94a3b8; font-size: 0.72rem; }
.fo-inbox-page-list { list-style: none; margin: 0; padding: 0; }
.fo-inbox-page-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #e2e8e4;
    background: transparent;
    padding: 1rem 0.25rem;
    cursor: pointer;
    font: inherit;
}
.fo-inbox-page-list li.unread .fo-inbox-page-item { background: #f0fdf4; }
.fo-inbox-page-item strong { display: block; margin-bottom: 0.25rem; }
.fo-inbox-page-item p { margin: 0; color: #64748b; font-size: 0.9rem; }
.fo-inbox-page-item time { color: #94a3b8; font-size: 0.78rem; white-space: nowrap; }
