/* ============================================================
   Theros — Earthy Agricultural Theme
   Extends perseus/UIkit conventions
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  /* Theros green accent palette */
  --color-grass:         #4a7c3f;
  --color-grass-light:   #6aab5e;
  --color-harvest:       #c8891f;
  --color-harvest-light: #e8b84b;
  --color-sky:           #5b90b0;

  /* Neutral/earthy tones — light for white theme */
  --color-soil:          #eef3ec;
  --color-earth:         #d8e6d4;
  --color-clay:          #7a9076;

  /* Text — dark for white theme */
  --color-cream:         #172016;
  --color-mist:          #4d6647;

  /* Status / signal colours */
  --color-scarcity:  #c8891f;
  --color-glut:      #b04040;
  --color-stable:    #4a7c3f;
  --color-offline:   #c8891f;
  --color-syncing:   #5b90b0;

  /* Text aliases */
  --text-primary:    #172016;
  --text-secondary:  #4d6647;
  --text-light:      #ffffff;
  --text-muted:      #7a9076;

  /* Surfaces — white */
  --surface-page:    #f6f9f5;
  --surface-card:    #ffffff;
  --surface-raised:  #eef3ec;
  --surface-white:   #fff;

  /* Gradients */
  --grad-page:       #f6f9f5;
  --grad-cta:        linear-gradient(135deg, #4a7c3f 0%, #2d5c24 100%);
  --grad-accent:     linear-gradient(90deg, #c8891f 0%, #a06830 100%);
  --grad-card-hover: 0 0 0 1px rgba(74,124,63,0.22), 0 8px 24px rgba(74,124,63,0.1);

  /* Shadows — light for white bg */
  --shadow-card:     0 1px 3px rgba(23,32,22,0.07), 0 4px 16px rgba(23,32,22,0.05);
  --shadow-strong:   0 8px 32px rgba(23,32,22,0.12), 0 2px 8px rgba(23,32,22,0.06);
  --shadow-inset:    inset 0 1px 0 rgba(23,32,22,0.04);

  /* Spacing / sizing */
  --section-v:    clamp(48px, 7vw, 96px);
  --r-card:       16px;
  --r-pill:       999px;
  --r-input:      10px;

  /* Animation */
  --ease-out:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset / Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--surface-page);
  color: var(--color-cream);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

/* Monospaced for numeric data */
.mono, .price, .weight, .countdown, .score {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-variant-numeric: tabular-nums;
}

/* ── Typography ─────────────────────────────────────────────── */
.t-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-harvest);
  margin-bottom: 8px;
}

.t-headline {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-cream);
}

.t-subhead {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--color-mist);
  line-height: 1.6;
}

.t-section {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-cream);
}

.t-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-mist);
}

.t-gradient {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container      { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.container-sm   { max-width: 720px;  margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

.section-pad { padding: var(--section-v) 0; }

/* ── Public Site / Perseus-Inspired Shell ───────────────────── */
body.public-page {
  padding-top: 52px;
  background:
    radial-gradient(circle at 8% -4%, rgba(74,124,63,0.14), transparent 28%),
    radial-gradient(circle at 88% 6%, rgba(200,137,31,0.12), transparent 24%),
    #f4f7fb;
  color: #182015;
}

.public-menu-open { overflow: hidden; }

.public-nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: 52px;
  background: rgba(255,255,255,0.72);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.public-nav {
  max-width: 1180px;
  margin: 0 auto;
  height: 100%;
}

.public-nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(24px, 4vw, 48px);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-width: 124px;
}

.public-brand img {
  width: 134px;
  max-width: 38vw;
  height: auto;
  display: block;
  filter: none;
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.public-nav-link,
.public-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 8px;
  padding: 0 8px;
  color: #000;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  transition: background .18s, color .18s, box-shadow .18s, transform .18s;
}

.public-nav-link:hover,
.public-nav-link.active {
  background: transparent;
  color: var(--color-grass);
  font-weight: 500;
}

.public-nav-cta {
  margin-left: 8px;
  min-height: 32px;
  border-radius: 12px;
  padding: 0 14px;
  background: var(--color-grass);
  color: #fff;
  font-weight: 500;
  box-shadow: none;
}

.public-nav-cta:hover,
.public-nav-cta.active {
  background: var(--color-grass);
  color: #fff;
  transform: translateY(-1px);
}

.public-menu-toggle,
.public-mobile-close {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.public-menu-toggle {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: transparent;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.public-menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #1f2d1b;
}

.public-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 700;
  padding: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}

.public-mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.public-mobile-inner {
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 18px 20px 36px;
  transform: translateY(10px);
  transition: transform .22s var(--ease-out);
}

.public-mobile-menu.open .public-mobile-inner { transform: translateY(0); }

.public-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-mobile-logo img {
  width: 150px;
  height: auto;
  display: block;
}

.public-mobile-close {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  padding: 0;
  background: rgba(0,0,0,0.06);
  color: #1f2d1b;
  font-size: 0;
  position: relative;
}

.public-mobile-close::before,
.public-mobile-close::after {
  content: '';
  position: absolute;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: #111827;
}

.public-mobile-close::before { transform: rotate(45deg); }
.public-mobile-close::after { transform: rotate(-45deg); }

.public-mobile-list {
  display: grid;
  gap: 10px;
  padding-top: 42px;
}

.public-mobile-link {
  display: flex;
  align-items: center;
  min-height: auto;
  border-bottom: 0;
  border-radius: 16px;
  padding: 12px 14px;
  color: #111827;
  font-size: clamp(24px, 8vw, 34px);
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.public-mobile-link.active { color: var(--color-grass); }
.public-mobile-cta { color: var(--color-clay); }

.public-container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.public-hero {
  min-height: calc(100dvh - 82px);
  display: grid;
  align-items: center;
  padding: clamp(54px, 7vw, 92px) 0 clamp(72px, 8vw, 112px);
  background:
    linear-gradient(100deg, rgba(22,29,19,0.92), rgba(39,54,31,0.72) 52%, rgba(39,54,31,0.48)),
    url('../img/hero-farm.svg');
  background-size: cover;
  background-position: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.public-detail-hero {
  padding: clamp(76px, 10vw, 132px) 0 clamp(50px, 7vw, 82px);
  background:
    linear-gradient(135deg, rgba(20,44,18,0.96), rgba(74,124,63,0.90) 58%, rgba(200,137,31,0.70)),
    radial-gradient(circle at 18% 18%, rgba(106,171,94,0.28), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(232,184,75,0.20), transparent 28%),
    #1f2d1b;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.public-detail-hero::before {
  content: '';
  position: absolute;
  inset: auto -8% 0;
  height: 150px;
  background:
    repeating-linear-gradient(112deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 26px),
    linear-gradient(180deg, transparent, rgba(255,255,255,0.08));
  opacity: .85;
  pointer-events: none;
}

.public-detail-hero .public-container {
  position: relative;
  z-index: 1;
}

.public-detail-hero .public-lead {
  color: rgba(255,255,255,0.78);
}

.public-detail-hero .public-kicker {
  color: var(--color-harvest-light);
}

.con-hero {
  padding: clamp(76px, 10vw, 132px) 0 clamp(50px, 7vw, 82px);
  background:
    linear-gradient(135deg, rgba(20,44,18,0.96), rgba(74,124,63,0.90) 58%, rgba(200,137,31,0.70)),
    radial-gradient(circle at 18% 18%, rgba(106,171,94,0.28), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(232,184,75,0.20), transparent 28%),
    #1f2d1b;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.con-hero::before {
  content: '';
  position: absolute;
  inset: auto -8% 0;
  height: 150px;
  background:
    repeating-linear-gradient(112deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 26px),
    linear-gradient(180deg, transparent, rgba(255,255,255,0.08));
  opacity: .85;
  pointer-events: none;
}

.con-hero .public-container,
.con-hero .public-hero-content {
  position: relative;
  z-index: 1;
}

.con-hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7ec87e;
  margin: 0 0 20px;
  position: relative;
}

.con-hero-title {
  font-size: clamp(32px, 5.5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 auto 20px;
  max-width: 760px;
  background: linear-gradient(160deg, #ffffff 40%, #b8e8b0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.con-hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
  color: rgba(255,255,255,0.72);
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

.public-detail-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(26px, 5vw, 64px);
  align-items: start;
}

.public-info-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-info-list li {
  border-top: 1px solid rgba(23,32,22,0.10);
  padding-top: 14px;
  color: rgba(23,32,22,0.68);
}

.public-info-list strong {
  display: block;
  color: #172016;
  margin-bottom: 3px;
}

.public-field-band {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(244,247,251,0.92)),
    repeating-linear-gradient(90deg, rgba(74,124,63,0.08) 0 1px, transparent 1px 22px);
  border-top: 1px solid rgba(23,32,22,0.08);
  border-bottom: 1px solid rgba(23,32,22,0.08);
  color: #172016;
  padding: clamp(64px, 8vw, 104px) 0;
}

.public-crop-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.public-crop-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(74,124,63,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  color: #274321;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(31,39,28,0.06);
}

.public-process-list {
  display: grid;
  gap: 0;
  border: 1px solid rgba(23,32,22,0.10);
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
}

.public-process-item {
  display: grid;
  grid-template-columns: 42px 118px 1fr;
  gap: 24px;
  padding: 24px;
  border-bottom: 1px solid rgba(23,32,22,0.08);
}

.public-process-item:last-child { border-bottom: 0; }

.public-process-label {
  color: var(--color-grass);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.public-process-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(74,124,63,0.10);
  color: var(--color-grass);
}

.public-process-item h3 {
  margin: 0 0 6px;
  color: #172016;
  font-size: 19px;
  font-weight: 840;
}

.public-process-item p {
  margin: 0;
  color: rgba(23,32,22,0.66);
  font-size: 14px;
  line-height: 1.62;
}

.public-ag-panel {
  border: 1px solid rgba(23,32,22,0.10);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(74,124,63,0.10), rgba(200,137,31,0.08)),
    #fff;
  padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 18px 48px rgba(31,39,28,0.08);
}

.public-ag-panel h3 {
  margin: 0 0 10px;
  color: #172016;
  font-size: 24px;
  font-weight: 840;
  letter-spacing: 0;
}

.public-ag-panel p {
  margin: 0 0 18px;
  color: rgba(23,32,22,0.68);
}

.public-check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-check-list li {
  display: flex;
  gap: 10px;
  color: rgba(23,32,22,0.70);
  font-size: 14px;
  line-height: 1.55;
}

.public-check-list li::before {
  content: '';
  width: 8px;
  height: 14px;
  margin-top: 3px;
  flex: 0 0 8px;
  border-right: 2px solid var(--color-grass);
  border-bottom: 2px solid var(--color-grass);
  transform: rotate(45deg);
}

.public-contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(26px, 5vw, 64px);
  align-items: start;
}

.public-contact-card {
  border: 1px solid rgba(23,32,22,0.10);
  border-radius: 24px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 18px 48px rgba(31,39,28,0.07);
}

.public-contact-card + .public-contact-card {
  margin-top: 14px;
}

.public-contact-card h3 {
  margin: 0 0 6px;
  color: #172016;
  font-size: 18px;
  font-weight: 840;
}

.public-contact-card p {
  margin: 0;
  color: rgba(23,32,22,0.66);
  font-size: 14px;
}

.public-contact-form {
  border: 1px solid rgba(23,32,22,0.10);
  border-radius: 28px;
  background: rgba(255,255,255,0.88);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 24px 70px rgba(31,39,28,0.12);
}

.public-contact-form .form-label {
  color: rgba(23,32,22,0.68);
  font-weight: 700;
}

.public-contact-form .form-control {
  background: #fff;
  border-color: rgba(23,32,22,0.14);
  color: #172016;
}

.public-contact-form .form-control::placeholder {
  color: rgba(23,32,22,0.36);
}

.public-contact-form select.form-control option {
  background: #fff;
  color: #172016;
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }

.public-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(transparent, rgba(244,247,251,0.96));
  pointer-events: none;
}

.public-hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.public-hero-logo {
  width: min(360px, 82vw);
  height: auto;
  display: block;
  margin: 0 auto 20px;
}

.public-kicker {
  margin: 0 0 12px;
  color: var(--color-harvest-light);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.public-display {
  margin: 0;
  color: inherit;
  font-size: clamp(32px, 5.5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.public-lead {
  max-width: 640px;
  margin: 18px auto 0;
  color: rgba(255,255,255,0.80);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
}

.public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  justify-content: center;
}

.public-hero-stats {
  background: #ffffff;
  padding: 0 0 8px;
}

.public-hero-stats-inner {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(23,32,22,0.10);
  border-radius: 24px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 24px 70px rgba(31,39,28,0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.public-hero-stat {
  padding: 26px clamp(18px, 3vw, 34px);
  text-align: center;
  border-right: 1px solid rgba(23,32,22,0.08);
}

.public-hero-stat:last-child { border-right: 0; }

.public-hero-stat strong {
  display: block;
  color: var(--color-grass);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 840;
  line-height: 1;
}

.public-hero-stat span {
  display: block;
  margin-top: 8px;
  color: rgba(23,32,22,0.56);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.public-section-white,
.public-section-gray,
.public-section-dark {
  padding: clamp(70px, 8vw, 118px) 0;
}

.public-section-white { background: #fff; color: #172016; }
.public-section-gray { background: #f4f7fb; color: #172016; }
.public-section-dark { background: #172016; color: #fff; }

.public-section-head {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.public-section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.public-section-title {
  margin: 0;
  color: inherit;
  font-size: clamp(30px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.04;
}

.public-section-copy {
  margin: 14px 0 0;
  color: rgba(23,32,22,0.70);
  font-size: 17px;
  line-height: 1.65;
}

.public-section-dark .public-section-copy { color: rgba(255,255,255,0.72); }

.public-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.public-card {
  min-height: 220px;
  border: 1px solid rgba(23,32,22,0.10);
  border-radius: 18px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 18px 48px rgba(31,39,28,0.07);
}

.public-section-gray .public-card { background: rgba(255,255,255,0.78); }
.public-section-dark .public-card {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  box-shadow: none;
}

.public-card-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(74,124,63,0.12);
  color: var(--color-grass);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 22px;
}

.public-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.public-card-mark .public-icon,
.public-step-mark .public-icon {
  width: 24px;
  height: 24px;
}

.public-mini-stat .public-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 9px;
  color: var(--color-harvest-light);
}

.public-hero-stat .public-icon {
  width: 26px;
  height: 26px;
  margin: 0 auto 12px;
  color: var(--color-grass);
}

.public-crop-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-grass);
  box-shadow: 0 0 0 4px rgba(74,124,63,0.11);
  margin-right: 9px;
  flex: 0 0 auto;
}

.public-card h3 {
  margin: 0;
  color: inherit;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.public-card p {
  margin: 10px 0 0;
  color: rgba(23,32,22,0.68);
  font-size: 14px;
  line-height: 1.62;
}

.public-section-dark .public-card p { color: rgba(255,255,255,0.68); }

.public-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(23,32,22,0.10);
  border-radius: 22px;
  background: rgba(23,32,22,0.10);
}

.public-stat {
  background: #fff;
  padding: clamp(28px, 4vw, 46px);
  text-align: center;
}

.public-stat strong {
  display: block;
  color: #172016;
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 840;
  line-height: 1;
}

.public-stat span {
  display: block;
  margin-top: 10px;
  color: rgba(23,32,22,0.58);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.public-feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.public-feature-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-feature-list li {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 14px;
  color: rgba(255,255,255,0.72);
}

.public-feature-list strong {
  display: block;
  color: #fff;
  font-size: 16px;
  margin-bottom: 4px;
}

.public-glance-card {
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 28px;
  background: rgba(255,255,255,0.07);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.public-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.public-mini-stat {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  padding: 18px 14px;
  text-align: center;
}

.public-mini-stat strong {
  display: block;
  color: var(--color-harvest-light);
  font-size: 25px;
  font-weight: 840;
  line-height: 1;
}

.public-mini-stat span {
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,0.56);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.public-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.public-step {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  border: 1px solid rgba(23,32,22,0.10);
  border-radius: 22px;
  background: #fff;
  padding: 30px 24px;
  box-shadow: 0 18px 48px rgba(31,39,28,0.06);
}

.public-step::before {
  content: attr(data-n);
  position: absolute;
  top: -12px;
  right: 16px;
  color: rgba(74,124,63,0.08);
  font-size: 86px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.public-step-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(74,124,63,0.18);
  border-radius: 16px;
  background: rgba(74,124,63,0.10);
  color: var(--color-grass);
  font-weight: 900;
  margin-bottom: 20px;
}

.public-step h3 {
  position: relative;
  margin: 0 0 10px;
  color: #172016;
  font-size: 18px;
  font-weight: 840;
  letter-spacing: 0;
}

.public-step p {
  position: relative;
  margin: 0;
  color: rgba(23,32,22,0.66);
  font-size: 14px;
  line-height: 1.62;
}

.public-footer {
  background: #fff;
  color: rgba(23,32,22,0.62);
  border-top: 1px solid rgba(23,32,22,0.10);
}

.public-footer-inner {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0;
}

.public-footer-main {
  display: grid;
  grid-template-columns: 1.65fr 3fr;
  gap: clamp(34px, 6vw, 82px);
  align-items: start;
  padding: clamp(46px, 7vw, 76px) 0 clamp(38px, 6vw, 60px);
}

.public-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
}

.public-footer-brand img {
  width: 140px;
  height: auto;
  display: block;
}

.public-footer-brand p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  max-width: 240px;
  color: rgba(23,32,22,0.58);
}

.public-footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--color-grass);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.public-footer-cta:hover {
  background: #315f29;
  color: #fff;
}

.public-footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 58px);
}

.public-footer-col h2 {
  margin: 0 0 17px;
  color: #172016;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.public-footer-col ul,
.public-footer-acc-panel ul {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-footer-col a,
.public-footer-acc-panel a,
.public-footer-bottom a {
  color: rgba(23,32,22,0.58);
  text-decoration: none;
  font-size: 13px;
  transition: color .18s;
}

.public-footer-col a:hover,
.public-footer-acc-panel a:hover,
.public-footer-bottom a:hover {
  color: var(--color-grass);
}

.public-footer-accordion {
  display: none;
}

.public-footer-acc-item {
  border-top: 1px solid rgba(23,32,22,0.10);
}

.public-footer-acc-btn {
  width: 100%;
  min-height: 50px;
  border: 0;
  background: transparent;
  color: #172016;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.public-footer-acc-icon {
  width: 14px;
  height: 14px;
  position: relative;
  flex: 0 0 14px;
}

.public-footer-acc-icon::before,
.public-footer-acc-icon::after {
  content: '';
  position: absolute;
  background: rgba(23,32,22,0.58);
  border-radius: 999px;
}

.public-footer-acc-icon::before {
  left: 0;
  right: 0;
  top: 6px;
  height: 2px;
}

.public-footer-acc-icon::after {
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  transition: transform .2s;
}

.public-footer-acc-btn[aria-expanded="true"] .public-footer-acc-icon::after {
  transform: rotate(90deg);
}

.public-footer-acc-panel {
  display: none;
  padding: 0 0 18px;
}

.public-footer-acc-item.open .public-footer-acc-panel {
  display: block;
}

.public-footer-bottom {
  border-top: 1px solid rgba(23,32,22,0.10);
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 0;
}

.public-footer-bottom p {
  margin: 0;
  color: rgba(23,32,22,0.50);
  font-size: 12px;
}

.public-footer-bottom div {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.public-footer-bottom a {
  font-size: 12px;
}

/* ── App Shell Layout (Rheos-pattern: flex + fixed sidebar) ───── */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* main-content — new rheos-pattern (uses topbar + page-body for padding) */
.main-content {
  margin-left: 240px;
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Legacy app-content — padded layout for older pages */
.app-content {
  margin-left: 240px;
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  padding: clamp(20px, 3vw, 36px);
  overflow-x: hidden;
}

/* ── Sidebar Navigation ─────────────────────────────────────── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid #ddebd9;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 175;
  transition: transform 0.3s var(--ease-out);
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid #ddebd9;
}

.sidebar-logo img { display: block; }
.sidebar-logo-img {
  width: min(164px, 100%);
  height: auto;
}

.sidebar-logo-wordmark {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav { padding: 16px 0; flex: 1; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-clay);
  padding: 8px 20px 4px;
  margin-top: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #4d6647;
  text-decoration: none;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.sidebar-link:hover {
  background: rgba(74, 124, 63, 0.08);
  color: #172016;
}

.sidebar-link.active {
  background: rgba(74, 124, 63, 0.12);
  color: var(--color-grass);
  font-weight: 600;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--color-grass);
  border-radius: 0 3px 3px 0;
}

.sidebar-link .badge {
  margin-left: auto;
  background: var(--color-harvest);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #ddebd9;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--grad-cta);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user-info .name { font-weight: 600; color: #172016; }
.sidebar-user-info .role { font-size: 11px; color: #7a9076; text-transform: capitalize; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: #ffffff;
  border: 1px solid #ddebd9;
  border-radius: var(--r-card);
  padding: clamp(18px, 3vw, 28px);
  transition: box-shadow 0.2s var(--ease-out), border-color 0.2s;
  box-shadow: var(--shadow-card);
}

.card:hover {
  box-shadow: var(--grad-card-hover);
  border-color: rgba(74, 124, 63, 0.3);
}

.card-dark {
  background: #f3f7f1;
  border-color: #d4e6cf;
}

.card-highlight {
  background: rgba(74, 124, 63, 0.05);
  border-color: rgba(74, 124, 63, 0.22);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #172016;
}

/* Crop card */
.crop-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}

.crop-card-name {
  font-size: 18px;
  font-weight: 700;
  color: #172016;
}

.crop-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Progress Bars ──────────────────────────────────────────── */
.progress-track {
  height: 6px;
  background: #ddebd9;
  border-radius: var(--r-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--grad-cta);
  border-radius: var(--r-pill);
  transition: width 1.2s var(--ease-out);
}

.progress-fill.harvest { background: linear-gradient(90deg, var(--color-harvest), var(--color-harvest-light)); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.12s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--grad-cta);
  color: #fff;
  box-shadow: 0 2px 12px rgba(74,124,63,0.35);
}
.btn-primary:hover { opacity: 0.88; box-shadow: 0 4px 18px rgba(74,124,63,0.45); }

.btn-accent {
  background: linear-gradient(135deg, #c8891f, #a06610);
  color: #fff;
}
.btn-accent:hover { opacity: 0.88; }

.btn-ghost {
  background: #ffffff;
  color: #4d6647;
  border: 1px solid #ddebd9;
}
.btn-ghost:hover { background: #f6f9f5; color: #172016; border-color: #c8dcc4; }

.btn-ghost-green {
  background: rgba(74,124,63,0.12);
  color: var(--color-grass-light);
  border: 1px solid rgba(74,124,63,0.3);
}
.btn-ghost-green:hover { background: rgba(74,124,63,0.22); }

.btn-danger {
  background: rgba(180,60,60,0.15);
  color: #e88;
  border: 1px solid rgba(180,60,60,0.3);
}
.btn-danger:hover { background: rgba(180,60,60,0.25); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-block { width: 100%; }

/* ── Badges / Pills ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
}

.badge-scarcity { background: rgba(200,137,31,0.2);  color: var(--color-harvest); border: 1px solid rgba(200,137,31,0.35); }
.badge-glut     { background: rgba(176,64,64,0.1);   color: #963030;              border: 1px solid rgba(176,64,64,0.25); }
.badge-stable   { background: rgba(74,124,63,0.1);   color: #3a6030;              border: 1px solid rgba(74,124,63,0.28); }
.badge-pending  { background: rgba(91,144,176,0.12); color: #3a6880;              border: 1px solid rgba(91,144,176,0.28); }
.badge-approved { background: rgba(74,124,63,0.1);   color: #3a6030;              border: 1px solid rgba(74,124,63,0.28); }
.badge-rejected { background: rgba(176,64,64,0.1);   color: #963030;              border: 1px solid rgba(176,64,64,0.25); }
.badge-on-hold  { background: rgba(200,137,31,0.1);  color: #8a5810;              border: 1px solid rgba(200,137,31,0.28); }
.badge-fulfilled{ background: rgba(74,124,63,0.1);   color: #2a6040;              border: 1px solid rgba(74,124,63,0.28); }
.badge-disputed { background: rgba(176,64,64,0.1);   color: #963030;              border: 1px solid rgba(176,64,64,0.25); }
.badge-growing  { background: rgba(74,124,63,0.1);   color: #3a6030; }
.badge-offline  { background: rgba(200,137,31,0.1);  color: #8a5810; }
.badge-synced   { background: rgba(74,124,63,0.1);   color: #3a6030; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

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

.form-control {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  background: #ffffff;
  border: 1px solid #ccddc9;
  border-radius: var(--r-input);
  color: #172016;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.form-control::placeholder { color: #9aaa98; }

.form-control:focus {
  border-color: var(--color-grass);
  box-shadow: 0 0 0 3px rgba(74,124,63,0.12);
}

.form-control:invalid { border-color: rgba(176,64,64,0.4); }

select.form-control { cursor: pointer; }
select.form-control option { background: #ffffff; }

textarea.form-control { resize: vertical; min-height: 100px; }

.form-hint {
  font-size: 12px;
  color: var(--color-clay);
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: #f88;
  margin-top: 4px;
}

/* GPS detect button inside input */
.input-with-action {
  position: relative;
}
.input-with-action .input-action-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(74,124,63,0.1);
  border: 1px solid rgba(74,124,63,0.2);
  border-radius: 6px;
  color: var(--color-grass);
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
}

/* ── Offline Banner ─────────────────────────────────────────── */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-harvest);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(-100%);
  transition: transform 0.3s var(--ease-out);
}

.offline-banner.visible { transform: translateY(0); }

.offline-banner .sync-icon { animation: spin 1.5s linear infinite; }

.offline-banner.online {
  background: var(--color-grass);
}

/* ── Market Signal Cards ─────────────────────────────────────── */
.signal-card {
  border-left: 3px solid;
  padding: 14px 16px;
  border-radius: 0 var(--r-card) var(--r-card) 0;
  background: #f6f9f5;
}
.signal-card.scarcity { border-left-color: var(--color-harvest); }
.signal-card.glut     { border-left-color: #d05050; }
.signal-card.stable   { border-left-color: var(--color-grass); }

.signal-severity {
  display: flex;
  gap: 3px;
}
.severity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddebd9;
}
.severity-dot.active.scarcity { background: var(--color-harvest); }
.severity-dot.active.glut     { background: #d05050; }
.severity-dot.active.stable   { background: var(--color-grass); }

/* ── Stat Blocks ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat-block {
  background: #ffffff;
  border: 1px solid #ddebd9;
  border-radius: var(--r-card);
  padding: 18px;
  text-align: center;
}

.stat-value {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-grass);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 12px;
  color: var(--color-mist);
  margin-top: 4px;
}

/* ── Tables ──────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a9076;
  padding: 10px 12px;
  border-bottom: 1px solid #ddebd9;
}

.data-table td {
  padding: 12px 12px;
  font-size: 14px;
  color: #172016;
  border-bottom: 1px solid #eef3ec;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f6f9f5; }

/* ── Recommendation Strip ────────────────────────────────────── */
.rec-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.rec-card {
  background: rgba(74,124,63,0.08);
  border: 1px solid rgba(74,124,63,0.2);
  border-radius: var(--r-card);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.rec-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-cta);
}

.rec-crop { font-size: 16px; font-weight: 700; color: var(--color-cream); margin-bottom: 6px; }
.rec-reason { font-size: 13px; color: var(--color-mist); line-height: 1.5; }

/* ── Map ─────────────────────────────────────────────────────── */
#crop-map {
  height: clamp(340px, 50vh, 600px);
  border-radius: var(--r-card);
  overflow: hidden;
  filter: saturate(0.7) sepia(0.15);
}

/* ── iMessage-style Chat ─────────────────────────────────────── */
.messages-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 120px);
  gap: 0;
  background: #ffffff;
  border-radius: var(--r-card);
  border: 1px solid #ddebd9;
  overflow: hidden;
}

.conversations-list {
  border-right: 1px solid #ddebd9;
  overflow-y: auto;
  background: #f6f9f5;
}

.conv-item {
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid #eef3ec;
  transition: background 0.12s;
}
.conv-item:hover, .conv-item.active { background: rgba(74,124,63,0.08); }

.conv-item-name { font-size: 14px; font-weight: 600; color: var(--color-cream); }
.conv-item-preview { font-size: 12px; color: var(--color-mist); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item-time { font-size: 11px; color: var(--color-clay); }
.conv-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-grass); }

.chat-area {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid #ddebd9;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg-bubble {
  max-width: 68%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.msg-bubble.sent {
  background: var(--grad-cta);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}

.msg-bubble.received {
  background: #eef3ec;
  color: #172016;
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  border: 1px solid #ddebd9;
}

.msg-time {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  margin-top: 3px;
  text-align: right;
}

.msg-bubble.received .msg-time { color: var(--color-clay); text-align: left; }

.chat-input-bar {
  padding: 14px 16px;
  border-top: 1px solid #ddebd9;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: #ffffff;
}

.chat-input {
  flex: 1;
  background: #f6f9f5;
  border: 1px solid #ccddc9;
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--color-cream);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
  max-height: 120px;
  transition: border-color 0.15s;
}

.chat-input:focus { border-color: var(--color-grass); }
.chat-input::placeholder { color: var(--color-clay); }

.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad-cta);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.12s;
}
.chat-send-btn:hover { opacity: 0.85; transform: scale(1.05); }

/* ── AI Chat Panel ───────────────────────────────────────────── */
.ai-panel {
  background: #ffffff;
  border: 1px solid #ddebd9;
  border-radius: var(--r-card);
  display: flex;
  flex-direction: column;
  height: clamp(400px, 60vh, 700px);
}

.ai-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid #ddebd9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--grad-cta);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.ai-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.ai-msg { display: flex; gap: 10px; align-items: flex-start; }
.ai-msg.user { flex-direction: row-reverse; }

.ai-msg-bubble {
  background: #eef3ec;
  border: 1px solid #ddebd9;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-cream);
  max-width: 85%;
}

.ai-msg.user .ai-msg-bubble {
  background: rgba(74,124,63,0.25);
  border-color: rgba(74,124,63,0.35);
  border-radius: 14px;
  border-bottom-right-radius: 4px;
}

.ai-input-bar {
  padding: 12px 16px;
  border-top: 1px solid #ddebd9;
  display: flex;
  gap: 8px;
}

/* ── Onboarding Wizard ───────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.wizard-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #eef3ec;
  color: var(--color-mist);
  flex-shrink: 0;
  transition: background 0.2s;
}

.wizard-step.active .wizard-step-num {
  background: var(--grad-cta);
  color: #fff;
}

.wizard-step.done .wizard-step-num {
  background: var(--color-grass);
  color: #fff;
}

.wizard-step-label { font-size: 12px; color: var(--color-mist); }
.wizard-step.active .wizard-step-label { color: var(--color-cream); font-weight: 600; }

.wizard-connector {
  flex: 1;
  height: 1px;
  background: #ddebd9;
  margin: 0 8px;
}

/* ── Notifications ───────────────────────────────────────────── */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid #ddebd9;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-strong);
  z-index: 200;
  overflow: hidden;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid #eef3ec;
  cursor: pointer;
  transition: background 0.12s;
}
.notif-item:hover { background: #f6f9f5; }
.notif-item.unread { border-left: 3px solid var(--color-grass); }
.notif-item:last-child { border-bottom: none; }

.notif-title { font-size: 13px; font-weight: 600; color: var(--color-cream); }
.notif-body  { font-size: 12px; color: var(--color-mist); margin-top: 2px; }
.notif-time  { font-size: 11px; color: var(--color-clay); margin-top: 4px; }

/* ── Top Bar ─────────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  background: #f6f9f5;
  border: 1px solid #ddebd9;
  color: #4d6647;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  position: relative;
  text-decoration: none;
}
.icon-btn:hover { background: #eef3ec; color: #172016; }
.icon-btn .notif-count {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 16px; height: 16px;
  background: var(--color-harvest);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ── Empty States ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 18px; font-weight: 600; color: var(--color-cream); margin-bottom: 8px; }
.empty-state-body  { font-size: 14px; color: var(--color-mist); max-width: 300px; margin: 0 auto 20px; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-grass);
  animation: pulse 2s ease-in-out infinite;
}

/* ── Dividers ────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid #ddebd9;
  margin: 20px 0;
}

/* ── Alert / Flash ───────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success { background: rgba(74,124,63,0.08);  color: #2d6030; border: 1px solid rgba(74,124,63,0.25); }
.alert-warning { background: rgba(200,137,31,0.08); color: #7a5010; border: 1px solid rgba(200,137,31,0.25); }
.alert-error   { background: rgba(180,60,60,0.08);  color: #903030; border: 1px solid rgba(180,60,60,0.25); }
.alert-info    { background: rgba(91,144,176,0.08);  color: #2d5878; border: 1px solid rgba(91,144,176,0.25); }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,10,5,0.75);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: #ffffff;
  border: 1px solid #ddebd9;
  border-radius: 20px;
  padding: clamp(24px, 4vw, 40px);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-strong);
  transform: translateY(16px);
  transition: transform 0.25s var(--ease-spring);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title { font-size: 18px; font-weight: 700; color: var(--color-cream); }

.modal-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #f6f9f5;
  border: none;
  color: #7a9076;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.modal-close:hover { background: #eef3ec; color: #172016; }

/* ── Auth Screens ───────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(ellipse 900px 520px at 12% -12%, rgba(106,171,94,0.18), transparent 62%),
    radial-gradient(ellipse 760px 480px at 92% 110%, rgba(200,137,31,0.14), transparent 60%),
    var(--grad-page);
}

body.public-page .auth-page {
  min-height: calc(100vh - 88px);
  padding-top: 34px;
  background:
    linear-gradient(180deg, rgba(244,247,251,0.50), rgba(255,255,255,0.96) 42%, #fff),
    radial-gradient(circle at 12% 6%, rgba(74,124,63,0.12), transparent 26%),
    radial-gradient(circle at 92% 10%, rgba(200,137,31,0.10), transparent 24%),
    #fff;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(23,32,22,0.10);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: var(--shadow-strong);
  color: #172016;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.public-page .auth-card {
  background: rgba(255,255,255,0.86);
  border-color: rgba(23,32,22,0.10);
  color: #172016;
  box-shadow: 0 24px 80px rgba(31,39,28,0.13);
  backdrop-filter: blur(18px);
}

body.public-page .auth-card .form-label {
  color: rgba(23,32,22,0.68);
  font-weight: 700;
}

body.public-page .auth-card .form-control {
  background: #fff;
  border-color: rgba(23,32,22,0.14);
  color: #172016;
  box-shadow: inset 0 1px 0 rgba(23,32,22,0.03);
}

body.public-page .auth-card .form-control::placeholder {
  color: rgba(23,32,22,0.36);
}

body.public-page .auth-card .form-control:focus {
  border-color: var(--color-grass);
  box-shadow: 0 0 0 4px rgba(74,124,63,0.13);
}

body.public-page .auth-card select.form-control option {
  background: #fff;
  color: #172016;
}

.auth-card.auth-card-wide { max-width: 520px; }

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-logo-img {
  width: min(230px, 76vw);
  height: auto;
  display: block;
}

.auth-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--grad-cta);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(74,124,63,0.28);
}

.auth-word {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-sub {
  font-size: 13px;
  color: var(--color-mist);
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
}

body.public-page .auth-sub,
body.public-page .auth-kicker,
body.public-page .auth-help {
  color: rgba(23,32,22,0.62);
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-cream);
  text-align: center;
  margin: 0 0 6px;
}

body.public-page .auth-title,
body.public-page .auth-role-title {
  color: #172016;
}

.auth-kicker {
  font-size: 13px;
  color: var(--color-mist);
  text-align: center;
  margin: 0 0 24px;
}

.auth-tabs {
  display: flex;
  background: #f1f4f0;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 24px;
}

body.public-page .auth-tabs {
  background: #f1f4f0;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  color: var(--color-mist);
  border: none;
  background: transparent;
  text-decoration: none;
}

body.public-page .auth-tab {
  color: rgba(23,32,22,0.62);
}

.auth-tab.active {
  background: #ffffff;
  color: #172016;
  box-shadow: 0 2px 8px rgba(23,32,22,0.10);
}

body.public-page .auth-tab.active {
  background: #fff;
  color: #172016;
  box-shadow: 0 8px 22px rgba(31,39,28,0.08);
}

.auth-footer {
  padding-top: 22px;
  text-align: center;
  font-size: 12px;
  color: rgba(23,32,22,0.46);
}

body.public-page .auth-footer {
  color: rgba(23,32,22,0.46);
}

.auth-help {
  font-size: 12px;
  color: var(--color-mist);
  text-align: center;
  margin-top: 18px;
}

.auth-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-role-option { cursor: pointer; }
.auth-role-option input { display: none; }

.auth-role-card {
  border: 1px solid rgba(23,32,22,0.10);
  border-radius: 12px;
  padding: 14px;
  background: #f7f9f5;
  transition: background .15s, border-color .15s, transform .15s;
}

body.public-page .auth-role-card {
  background: #f7f9f5;
  border-color: rgba(23,32,22,0.10);
}

.auth-role-card:hover { transform: translateY(-1px); border-color: rgba(106,171,94,0.35); }
.auth-role-option input:checked + .auth-role-card {
  background: rgba(74,124,63,0.14);
  border-color: rgba(106,171,94,0.48);
}

.auth-role-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-cream);
}

.auth-role-desc {
  font-size: 12px;
  color: var(--color-mist);
  margin-top: 3px;
}

body.public-page .auth-role-desc {
  color: rgba(23,32,22,0.58);
}

/* ── Escrow Meter ────────────────────────────────────────────── */
.escrow-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(200,137,31,0.08);
  border: 1px solid rgba(200,137,31,0.25);
  border-radius: 12px;
  padding: 16px;
}

.escrow-icon { font-size: 24px; }
.escrow-amount { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.escrow-label { font-size: 12px; color: var(--color-mist); }

/* ── Reliability Score ───────────────────────────────────────── */
.reliability-stars {
  display: flex;
  gap: 2px;
}
.star { font-size: 14px; color: #ddebd9; }
.star.filled { color: var(--color-harvest); }

/* ── Topbar (sticky portal header) ──────────────────────────── */
.topbar {
  height: 58px;
  background: #ffffff;
  border-bottom: 1px solid #ddebd9;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: #172016;
  letter-spacing: -0.02em;
}
.topbar-spacer { flex: 1; }

/* ── Page Body ───────────────────────────────────────────────── */
.page-body {
  flex: 1;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  max-width: 100%;
}

/* ── Stats Row (stat-card pattern) ──────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #ddebd9;
  border-radius: var(--r-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.stat-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a9076;
  margin-bottom: 8px;
}

.stat-card-value {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--color-grass);
  font-family: 'JetBrains Mono', monospace;
}

.stat-card-sub {
  font-size: 12px;
  color: #7a9076;
  margin-top: 4px;
}

/* ── Portal Grids ────────────────────────────────────────────── */
.portal-grid {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.portal-grid > * { min-width: 0; }
.portal-grid-2   { grid-template-columns: repeat(2, minmax(0,1fr)); }
.portal-grid-3   { grid-template-columns: repeat(3, minmax(0,1fr)); }
.portal-grid-4   { grid-template-columns: repeat(4, minmax(0,1fr)); }
.portal-grid-1-2 { grid-template-columns: minmax(0,1fr) minmax(0,2fr); }
.portal-grid-2-1 { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }

/* ── Nav-item (rheos-compatible sidebar links) ───────────────── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: #4d6647;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  position: relative;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}
.nav-item:hover {
  background: rgba(74,124,63,0.08);
  color: #172016;
}
.nav-item:hover svg { opacity: 1; }
.nav-item.active {
  background: rgba(74,124,63,0.12);
  color: var(--color-grass);
  font-weight: 600;
}
.nav-item.active svg { opacity: 1; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--color-grass);
  border-radius: 0 3px 3px 0;
}

.nav-section-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9aaa98;
  padding: 10px 10px 4px;
  margin-top: 4px;
}

.nav-badge {
  margin-left: auto;
  background: var(--color-harvest);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  line-height: 16px;
  white-space: nowrap;
}

/* ── Mobile topbar for portal pages ─────────────────────────── */
.theros-mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 52px;
  background: #ffffff;
  border-bottom: 1px solid #ddebd9;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.theros-topbar-toggle {
  appearance: none;
  border: none;
  background: transparent;
  color: #172016;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.theros-topbar-toggle:hover { background: #f6f9f5; }

#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .theros-mobile-topbar { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s var(--ease-out);
    z-index: 175;
  }
  .sidebar.open { transform: translateX(0); }

  .main-content {
    margin-left: 0;
  }
  .main-content .topbar {
    top: 52px; /* below mobile topbar */
  }
  .app-content {
    margin-left: 0;
    padding-top: 68px;
  }

  .stats-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .portal-grid-1-2,
  .portal-grid-2-1,
  .portal-grid-3,
  .portal-grid-4 { grid-template-columns: 1fr; }
  .page-body { padding: 16px; gap: 16px; }
  .topbar { padding: 0 16px; }

  .messages-container { grid-template-columns: 1fr; }
  .conversations-list { display: none; }
  .conversations-list.show { display: block; position: fixed; inset: 0; z-index: 200; }
}

@media (max-width: 959px) {
  .public-nav-inner { padding: 0 20px; }
  .public-nav-links { display: none; }
  .public-menu-toggle { display: inline-flex; }
  .public-brand img { width: 128px; }
  .public-card-grid,
  .public-stat-grid,
  .public-feature-row,
  .public-detail-grid,
  .public-contact-grid,
  .public-process-item,
  .public-hero-stats-inner,
  .public-steps {
    grid-template-columns: 1fr;
  }
  .public-hero-stat {
    border-right: 0;
    border-bottom: 1px solid rgba(23,32,22,0.08);
  }
  .public-hero-stat:last-child { border-bottom: 0; }
  .public-stat-grid { border-radius: 18px; }
  .public-footer-inner {
    align-items: flex-start;
  }
  .public-footer-main {
    display: block;
    padding: 38px 0 0;
  }
  .public-footer-brand {
    border-bottom: 1px solid rgba(23,32,22,0.10);
    padding-bottom: 24px;
  }
  .public-footer-cols { display: none; }
  .public-footer-accordion { display: block; }
  .public-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 18px 0;
  }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .rec-strip  { grid-template-columns: 1fr; }
  .auth-page { padding: 26px 12px; }
  body.public-page .auth-page { padding-top: 22px; }
  .auth-card { padding: 26px 18px; border-radius: 18px; }
  .auth-tabs { gap: 2px; }
  .auth-tab { font-size: 12px; padding: 7px; }
  .auth-role-grid { grid-template-columns: 1fr; }
  .public-container,
  .public-footer-inner {
    width: min(100% - 28px, 1160px);
  }
  .public-hero {
    min-height: auto;
    padding: 58px 0 84px;
  }
  .public-hero-stats { padding: 0; }
  .public-hero-stats-inner { width: min(100% - 28px, 1040px); border-radius: 18px; }
  .public-actions .btn {
    width: 100%;
  }
  .public-section-white,
  .public-section-gray,
  .public-section-dark {
    padding: 58px 0;
  }
  .public-card { min-height: auto; }
  .public-mini-stats { grid-template-columns: 1fr; }
  .public-step { min-height: auto; }
}
