/* ==========================================================================
   REACHIFY — Design System
   Attaining The World Market
   Tokens and components derived from the approved REACHIFY visual reference
   (see REACHIFY_Pitch_Demo). Do not introduce arbitrary hex values in
   templates — extend this file instead.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --reachify-navy:        #052e6f;
  --reachify-deep-navy:   #031f4b;
  --reachify-blue:        #087cf5;
  --reachify-cyan:        #19c6ff;
  --reachify-sky:         #eaf6ff;
  --reachify-white:       #ffffff;
  --reachify-surface:     #ffffff;
  --reachify-border:      #d8e9f8;
  --reachify-text:        #0a326d;
  --reachify-muted:       #6d84a3;

  /* Status */
  --reachify-success:     #10a87a;
  --reachify-success-bg:  #dff9f1;
  --reachify-success-ink: #087d68;
  --reachify-warning:     #f5a400;
  --reachify-warning-bg:  #fff4dc;
  --reachify-warning-ink: #8a5d00;
  --reachify-danger:      #ef3e4a;
  --reachify-danger-bg:   #ffe8ea;
  --reachify-danger-ink:  #b0121d;
  --reachify-info-bg:     #e8f5ff;
  --reachify-info-ink:    #2971a5;

  /* Surfaces */
  --reachify-app-bg:      #f8fbff;
  --reachify-page-bg:     #eef7ff;
  --reachify-tint:        #eaf5ff;
  --reachify-hairline:    #edf4fa;

  /* Gradients */
  --reachify-grad-header: linear-gradient(125deg, #03265d 0%, #0756b5 72%, #08a7ec 100%);
  --reachify-grad-hero:   linear-gradient(120deg, #04295f 0%, #0758b7 58%, #0b8fe8 100%);
  --reachify-grad-cta:    linear-gradient(100deg, #06aaf4, #087cf5);
  --reachify-grad-icon:   linear-gradient(145deg, #14b7ff, #075bd4);
  --reachify-grad-fab:    linear-gradient(145deg, #19b8ff, #075de0);

  /* Elevation */
  --reachify-shadow:      0 10px 30px rgba(2, 47, 105, .12);
  --reachify-shadow-sm:   0 5px 18px rgba(0, 74, 143, .05);
  --reachify-shadow-card: 0 7px 22px rgba(0, 27, 63, .15);

  /* Radii */
  --reachify-radius-sm:   12px;
  --reachify-radius:      17px;
  --reachify-radius-lg:   24px;
  --reachify-radius-pill: 999px;

  /* Layout */
  --reachify-shell-max:   1180px;
  --reachify-bottomnav-h: 76px;
  --reachify-tap:         44px;   /* minimum touch target */

  /* Height of the top bar, excluding the safe-area inset above it. Anything
     that sticks below the header offsets by this, so it must live beside the
     header's own rules rather than in the legacy bridge — pages on the app
     shell never load that file, and were resolving `var(--nav-h)` to nothing. */
  --nav-h: 80px;

  /* Type */
  --reachify-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
                   "Segoe UI", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   2. RESET / BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--reachify-font);
  background: var(--reachify-page-bg);
  color: var(--reachify-text);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* Accessible focus — never remove without replacement */
:focus-visible {
  outline: 3px solid var(--reachify-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

.rf-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.rf-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--reachify-navy); color: #fff;
  padding: 12px 18px; border-radius: 0 0 var(--reachify-radius-sm) 0;
  font-weight: 800;
}
.rf-skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   3. APP SHELL
   -------------------------------------------------------------------------- */
.rf-app {
  min-height: 100vh;
  background: var(--reachify-app-bg);
  max-width: var(--reachify-shell-max);
  margin: auto;
}

.rf-main {
  padding: 16px 16px calc(var(--reachify-bottomnav-h) + 28px);
}

/* ---- Header ---- */
/* Full-bleed bar, shell-width contents. The bar itself must never look
   centred in a container — it is chrome, not content. */
/* The bar is the same object on every page — one definition, used by both
   layout shells through base_shell.html. Its height is `--nav-h`, and anything
   that sticks below it offsets by that, so the padding here and that token have
   to be changed together. */
.rf-top {
  position: sticky; top: 0; z-index: 200;
  background: var(--reachify-grad-header);
  color: #fff;
  padding: calc(12px + env(safe-area-inset-top)) 20px 12px;
}
.rf-top-inner {
  max-width: var(--reachify-shell-max);
  margin: 0 auto;
}

.rf-brandrow {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px;              /* --nav-h minus the 12px above and below */
}

.rf-brandlink { display: inline-flex; align-items: center; flex-shrink: 0; }

.rf-brand {
  height: 56px; max-width: 300px;
  object-fit: contain; object-position: left center;
  filter: drop-shadow(0 2px 4px rgba(0, 27, 63, .33));
}

.rf-topicons { margin-left: auto; display: flex; gap: 12px; align-items: center; }

/* Which business you are acting as. Reads as a label on the bar, not a form
   control, until you reach for it. Hidden on phones, where the bar is only
   brand and account — the scope is shown on the dashboard itself instead. */
.rf-scope { display: none; margin: 0; }
.rf-scope-select {
  appearance: none; -webkit-appearance: none;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff; font-family: inherit;
  font-size: 13px; font-weight: 700;
  padding: 0 30px 0 12px;
  height: 36px; max-width: 220px;
  border-radius: var(--reachify-radius-pill);
  cursor: pointer; text-overflow: ellipsis;
  /* The chevron, drawn rather than fetched. */
  background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.7) 50%),
                    linear-gradient(135deg, rgba(255,255,255,.7) 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.rf-scope-select:hover { background-color: rgba(255, 255, 255, .2); }
.rf-scope-select:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rf-scope-select option { background: var(--reachify-deep-navy); color: #fff; }

/* Signed-out actions. The pair reads as one decision: a quiet way back in,
   and the invitation next to it. */
.rf-signin {
  color: rgba(255, 255, 255, .92); font-weight: 700; font-size: 15px;
  padding: 10px 14px; border-radius: var(--reachify-radius-pill);
  min-height: var(--reachify-tap); display: inline-flex; align-items: center;
}
.rf-signin:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.rf-topcta {
  background: var(--reachify-grad-cta); color: #fff; border: 0;
  box-shadow: 0 6px 16px rgba(0, 111, 214, .3);
  white-space: nowrap;
}

.rf-iconbtn {
  width: var(--reachify-tap); height: var(--reachify-tap);
  border: 1px solid rgba(255, 255, 255, .44);
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .07);
  color: #fff; position: relative;
  text-decoration: none; font-size: 18px;
}
.rf-iconbtn:hover { background: rgba(255, 255, 255, .18); }

.rf-badge {
  position: absolute; right: -2px; top: -5px;
  background: var(--reachify-danger); color: #fff;
  border-radius: var(--reachify-radius-pill);
  min-width: 19px; height: 19px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  padding: 0 4px;
}
/* Sitting inside a line of text rather than pinned to an icon. */
.rf-badge--inline {
  position: static; display: inline-grid;
  margin-left: 6px; vertical-align: middle;
}

.rf-avatar {
  width: var(--reachify-tap); height: var(--reachify-tap); border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(255, 255, 255, .6);
  background: var(--reachify-grad-icon);
  display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: 15px;
}

.rf-greet { margin-top: 12px; }
.rf-greet h1 { font-size: 29px; margin: 0; line-height: 1.15; }
.rf-greet p { margin: 2px 0 12px; color: #dcecff; }

/* ---- Search bar ---- */
.rf-search {
  display: flex; align-items: center;
  background: #fff; border-radius: var(--reachify-radius-pill);
  padding: 4px 7px 4px 17px;
  box-shadow: var(--reachify-shadow-card);
}
.rf-search .rf-search-icon { font-size: 23px; color: var(--reachify-muted); }
.rf-search input {
  border: 0; outline: 0; flex: 1;
  padding: 13px; color: #234d80; min-width: 0;
  background: transparent;
}
.rf-search-filter {
  border: 0; background: var(--reachify-sky); color: var(--reachify-blue);
  width: var(--reachify-tap); height: var(--reachify-tap);
  border-radius: 50%; font-weight: 900;
}

/* --------------------------------------------------------------------------
   4. SECTIONS & HEADINGS
   -------------------------------------------------------------------------- */
.rf-section { margin-top: 22px; }

.rf-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.rf-section-head h2 { font-size: 23px; margin: 0; }

.rf-link {
  border: 0; background: transparent;
  color: var(--reachify-blue); font-weight: 800;
  padding: 0 4px; display: inline-flex; align-items: center;
  min-height: var(--reachify-tap);
}

/* --------------------------------------------------------------------------
   5. HERO / BANNER
   -------------------------------------------------------------------------- */
.rf-hero {
  min-height: 225px;
  border-radius: var(--reachify-radius-lg);
  overflow: hidden; position: relative;
  color: #fff; padding: 28px;
  background:
    radial-gradient(circle at 82% 30%, rgba(30, 201, 255, .33) 0 4%, transparent 5%),
    radial-gradient(circle at 75% 40%, rgba(11, 166, 255, .33) 0 12%, transparent 13%),
    var(--reachify-grad-hero);
  box-shadow: var(--reachify-shadow);
}
.rf-hero::after {
  content: ""; position: absolute;
  width: 340px; height: 340px;
  border: 1px solid rgba(93, 214, 255, .4);
  border-radius: 50%; right: -95px; top: -120px;
  box-shadow: 0 0 0 35px rgba(14, 185, 255, .055),
              0 0 0 70px rgba(14, 185, 255, .04);
  pointer-events: none;
}
.rf-hero > * { position: relative; z-index: 1; }

.rf-eyebrow {
  display: inline-block; background: #0b84ff;
  padding: 7px 12px; border-radius: var(--reachify-radius-pill);
  font-weight: 800; font-size: 13px;
}
.rf-hero h2 { font-size: 32px; max-width: 540px; line-height: 1.04; margin: 14px 0 9px; }
.rf-hero p { max-width: 520px; line-height: 1.45; color: #e5f2ff; margin: 0 0 16px; }

/* Carousel */
.rf-carousel { position: relative; }
.rf-carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; scrollbar-width: none; }
.rf-carousel-track::-webkit-scrollbar { display: none; }
.rf-carousel-track > * { flex: 0 0 100%; scroll-snap-align: center; }
.rf-carousel-dots { display: flex; gap: 26px; justify-content: center; margin-top: 18px; height: var(--reachify-tap); align-items: center; }
.rf-carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; border: 0;
  background: var(--reachify-border); padding: 0;
  position: relative;
}
/* Small dot, full-size touch target. */
.rf-carousel-dot::after {
  content: ""; position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: var(--reachify-tap); height: var(--reachify-tap);
}
.rf-carousel-dot[aria-current="true"] { background: var(--reachify-blue); width: 22px; border-radius: 99px; }

/* --------------------------------------------------------------------------
   6. BUTTONS
   -------------------------------------------------------------------------- */
.rf-cta {
  border: 0; border-radius: var(--reachify-radius-pill);
  background: var(--reachify-grad-cta); color: #fff;
  padding: 12px 19px; font-weight: 800;
  box-shadow: 0 7px 20px rgba(0, 111, 214, .27);
  display: inline-block; text-align: center;
  min-height: var(--reachify-tap);
}
.rf-cta:hover { filter: brightness(1.06); }
.rf-cta:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.rf-btn {
  border: 1px solid var(--reachify-border);
  background: #fff; color: var(--reachify-text);
  border-radius: var(--reachify-radius-pill);
  padding: 11px 18px; font-weight: 800;
  display: inline-block; min-height: var(--reachify-tap);
}
.rf-btn:hover { background: var(--reachify-sky); }

.rf-btn-solid {
  border: 0; background: var(--reachify-blue); color: #fff;
  border-radius: var(--reachify-radius-pill);
  padding: 10px 13px; font-weight: 800;
  min-height: var(--reachify-tap);
}
.rf-btn-danger { border: 0; background: var(--reachify-danger); color: #fff; }
.rf-btn-block { display: block; width: 100%; }

/* --------------------------------------------------------------------------
   7. QUICK ACCESS TILES  (Explore REACHIFY)
   -------------------------------------------------------------------------- */
.rf-quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }

.rf-quick-card {
  background: #fff; border: 1px solid var(--reachify-border);
  border-radius: var(--reachify-radius);
  padding: 14px 9px; text-align: center;
  box-shadow: var(--reachify-shadow-sm);
  display: block; color: inherit;
}
.rf-quick-card:hover { border-color: var(--reachify-blue); }
.rf-quick-icon {
  width: 54px; height: 54px; border-radius: 14px;
  margin: auto; display: grid; place-items: center;
  background: var(--reachify-grad-icon); color: #fff; font-size: 26px;
}
.rf-quick-card b { display: block; margin-top: 9px; }
.rf-quick-card small { color: var(--reachify-muted); }

/* --------------------------------------------------------------------------
   8. CHIPS
   -------------------------------------------------------------------------- */
.rf-chips {
  display: flex; gap: 8px; overflow: auto;
  padding-bottom: 4px; scrollbar-width: none;
}
.rf-chips::-webkit-scrollbar { display: none; }

.rf-chip {
  white-space: nowrap; border: 0;
  border-radius: var(--reachify-radius-pill);
  background: var(--reachify-tint); color: #27527f;
  padding: 0 16px; font-weight: 700;
  display: inline-flex; align-items: center;
  min-height: var(--reachify-tap);
}
.rf-chip.is-active, .rf-chip[aria-current="true"] { background: var(--reachify-blue); color: #fff; }
.rf-chip.is-done { background: var(--reachify-success-bg); color: var(--reachify-success-ink); }

/* --------------------------------------------------------------------------
   9. BUSINESS CARD
   -------------------------------------------------------------------------- */
.rf-businesses { display: grid; gap: 10px; }

.rf-business {
  background: #fff; border: 1px solid var(--reachify-border);
  border-radius: var(--reachify-radius); padding: 11px;
  display: grid; grid-template-columns: 150px 1fr auto;
  gap: 14px; align-items: center;
  box-shadow: var(--reachify-shadow-sm);
  color: inherit;
}
.rf-business:hover { border-color: var(--reachify-blue); }
.rf-business.rf-business--plain { grid-template-columns: 1fr auto; }

.rf-business-img {
  height: 95px; border-radius: var(--reachify-radius-sm);
  background: linear-gradient(145deg, #a8ddff, #075cbf);
  position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.rf-business-img img { width: 100%; height: 100%; object-fit: cover; }
.rf-business h3 { margin: 5px 0; font-size: 18px; }

.rf-meta { color: var(--reachify-muted); font-size: 13px; line-height: 1.65; }
.rf-rating { color: var(--reachify-warning); font-weight: 800; }
.rf-arrow { font-size: 28px; color: var(--reachify-blue); }

/* Verified badge */
.rf-verify {
  display: inline-flex; gap: 4px; align-items: center;
  color: var(--reachify-success-ink); background: var(--reachify-success-bg);
  padding: 4px 8px; border-radius: var(--reachify-radius-pill);
  font-size: 11px; font-weight: 800;
}
.rf-verify--pending { color: var(--reachify-warning-ink); background: var(--reachify-warning-bg); }
.rf-verify--none    { color: var(--reachify-muted);       background: #eef2f7; }
.rf-verify--danger  { color: var(--reachify-danger-ink);  background: var(--reachify-danger-bg); }

/* --------------------------------------------------------------------------
   10. MARKETPLACE
   -------------------------------------------------------------------------- */
.rf-market-hero {
  border-radius: 20px;
  background: linear-gradient(120deg, #04295f, #087cf5);
  padding: 22px; color: #fff;
}
.rf-market-hero h1 { margin: 0; font-size: 31px; }
.rf-market-hero p { margin: 6px 0 0; color: #e5f2ff; }

.rf-tabs {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: #eaf4fc; border: 1px solid var(--reachify-border);
  border-radius: var(--reachify-radius-pill);
  overflow: hidden; margin: 14px 0;
}
.rf-tab {
  border: 0; background: transparent; padding: 12px;
  font-weight: 800; color: #31557d; text-align: center;
  min-height: var(--reachify-tap);
}
.rf-tab.is-active, .rf-tab[aria-current="page"] {
  background: var(--reachify-blue); color: #fff;
  border-radius: var(--reachify-radius-pill);
}

/* Product grid */
.rf-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.rf-product {
  background: #fff; border: 1px solid var(--reachify-border);
  border-radius: var(--reachify-radius); padding: 11px;
  box-shadow: var(--reachify-shadow-sm);
  display: flex; flex-direction: column;
}
.rf-product:hover { border-color: var(--reachify-blue); }

.rf-pimg {
  height: 155px; border-radius: 13px;
  display: grid; place-items: center; font-size: 66px;
  background: linear-gradient(145deg, #d9f2ff, #9bd8ff);
  overflow: hidden;
}
.rf-pimg img { width: 100%; height: 100%; object-fit: cover; }

.rf-phead {
  display: flex; justify-content: space-between;
  gap: 8px; align-items: start; margin-top: 10px;
}
.rf-product h3 { margin: 0; font-size: 17px; }
.rf-product h3 a:hover { color: var(--reachify-blue); }
.rf-desc { font-size: 13px; color: var(--reachify-muted); min-height: 38px; }

.rf-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.rf-tag {
  font-size: 11px; background: var(--reachify-info-bg);
  color: var(--reachify-info-ink);
  border-radius: var(--reachify-radius-pill); padding: 5px 8px;
}

.rf-pfoot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--reachify-hairline);
}
.rf-min { font-size: 12px; color: #557493; }
.rf-price { font-weight: 900; font-size: 16px; color: var(--reachify-navy); }
.rf-price small { font-weight: 600; color: var(--reachify-muted); font-size: 11px; }
.rf-price--quote { color: var(--reachify-blue); font-size: 13px; font-weight: 800; }

/* --------------------------------------------------------------------------
   11. PANELS / STATS
   -------------------------------------------------------------------------- */
.rf-panel {
  background: #fff; border: 1px solid var(--reachify-border);
  border-radius: 18px; padding: 18px;
  box-shadow: var(--reachify-shadow);
}

.rf-statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rf-stat {
  background: #fff; border: 1px solid var(--reachify-border);
  border-radius: var(--reachify-radius); padding: 16px;
}
.rf-stat strong { display: block; font-size: 27px; margin-top: 7px; }
.rf-stat span { color: var(--reachify-muted); font-size: 13px; }
.rf-stat a { color: inherit; }

/* --------------------------------------------------------------------------
   12. MESSAGING
   -------------------------------------------------------------------------- */
.rf-message-layout { display: grid; grid-template-columns: 260px 1fr; gap: 12px; }

.rf-chatlist, .rf-chat {
  background: #fff; border: 1px solid var(--reachify-border);
  border-radius: 18px; overflow: hidden;
}
.rf-chatitem { padding: 14px; border-bottom: 1px solid var(--reachify-border); display: block; color: inherit; }
.rf-chatitem.is-active { background: var(--reachify-tint); }
.rf-chathead { padding: 15px; border-bottom: 1px solid var(--reachify-border); font-weight: 900; }

.rf-thread { max-height: 60vh; overflow-y: auto; padding: 4px 0; }
.rf-bubble {
  max-width: 75%; padding: 11px 14px; margin: 12px;
  border-radius: 15px; background: #edf5ff;
  word-wrap: break-word;
}
.rf-bubble.is-mine { margin-left: auto; background: var(--reachify-blue); color: #fff; }
.rf-bubble time { display: block; font-size: 11px; opacity: .7; margin-top: 4px; }

.rf-composer {
  display: flex; gap: 7px; padding: 11px;
  border-top: 1px solid var(--reachify-border);
}
.rf-composer input {
  flex: 1; border: 1px solid var(--reachify-border);
  border-radius: var(--reachify-radius-pill);
  padding: 12px 15px; outline: none;
}

/* --------------------------------------------------------------------------
   13. PROFILE
   -------------------------------------------------------------------------- */
.rf-profile-card { display: flex; align-items: center; gap: 16px; }
.rf-avatar-big {
  width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(145deg, #16b8ff, #074bb4);
  color: #fff; font-size: 26px; font-weight: 900;
  object-fit: cover; overflow: hidden;
}
.rf-profile-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.rf-action {
  background: #fff; border: 1px solid var(--reachify-border);
  border-radius: 14px; padding: 16px; text-align: left;
  color: var(--reachify-text); font-weight: 800; display: block;
}
.rf-action:hover { border-color: var(--reachify-blue); }

/* --------------------------------------------------------------------------
   14. BOTTOM NAVIGATION + FAB
   -------------------------------------------------------------------------- */
.rf-bottom {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; z-index: 40;
  width: min(var(--reachify-shell-max), 100%);
  height: var(--reachify-bottomnav-h);
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--reachify-border);
  display: grid; grid-template-columns: repeat(5, 1fr);
  align-items: center;
  box-shadow: 0 -8px 25px rgba(0, 62, 119, .08);
}
.rf-navbtn {
  border: 0; background: transparent; color: var(--reachify-muted);
  font-size: 12px; font-weight: 700;
  display: grid; place-items: center; gap: 3px;
  height: 100%; min-height: var(--reachify-tap);
}
.rf-navbtn .rf-ni { font-size: 22px; line-height: 1; }
.rf-navbtn.is-active, .rf-navbtn[aria-current="page"] { color: var(--reachify-blue); }

.rf-fab {
  width: 61px; height: 61px; border-radius: 50%;
  border: 5px solid var(--reachify-sky);
  background: var(--reachify-grad-fab); color: #fff;
  font-size: 34px; line-height: 1;
  box-shadow: 0 5px 18px rgba(0, 103, 201, .3);
  margin-top: -27px;
  display: grid; place-items: center;
}

/* --------------------------------------------------------------------------
   15. SHEET / TOAST / DIALOG
   -------------------------------------------------------------------------- */
.rf-sheet {
  position: fixed; inset: 0;
  background: rgba(0, 29, 64, .33); z-index: 60;
  display: none; align-items: flex-end; justify-content: center;
}
.rf-sheet.is-open { display: flex; }
.rf-sheetbox {
  width: min(600px, 100%); background: #fff;
  border-radius: var(--reachify-radius-lg) var(--reachify-radius-lg) 0 0;
  padding: 20px 20px calc(25px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 50px rgba(0, 27, 63, .2);
}
.rf-sheetgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rf-sheetbtn {
  border: 1px solid var(--reachify-border); background: var(--reachify-app-bg);
  border-radius: 15px; padding: 17px;
  color: var(--reachify-text); font-weight: 800;
  text-align: left; display: block; min-height: var(--reachify-tap);
}
.rf-sheetbtn:hover { border-color: var(--reachify-blue); }

.rf-toast {
  position: fixed; z-index: 80; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--reachify-bottomnav-h) + 19px);
  background: var(--reachify-navy); color: #fff;
  border-radius: var(--reachify-radius-pill);
  padding: 11px 17px; display: none;
  box-shadow: var(--reachify-shadow);
  max-width: calc(100% - 32px);
}
.rf-toast.is-visible { display: block; }

/* Django messages framework */
.rf-messages { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.rf-messages li {
  border-radius: var(--reachify-radius-sm); padding: 12px 15px;
  font-weight: 700; border: 1px solid transparent;
}
.rf-messages li.rf-msg-success { background: var(--reachify-success-bg); color: var(--reachify-success-ink); }
.rf-messages li.rf-msg-error   { background: var(--reachify-danger-bg);  color: var(--reachify-danger-ink); }
.rf-messages li.rf-msg-warning { background: var(--reachify-warning-bg); color: var(--reachify-warning-ink); }
.rf-messages li.rf-msg-info    { background: var(--reachify-info-bg);    color: var(--reachify-info-ink); }

/* --------------------------------------------------------------------------
   16. FORMS
   One system for every form in the app. Rendered through
   templates/django/forms/, so `{{ form }}` produces this markup everywhere
   without each template hand-rolling a field loop.
   -------------------------------------------------------------------------- */

.rf-form { max-width: 720px; }
.rf-form--wide { max-width: 100%; }

/* ---- Field ---- */
.rf-field { margin-bottom: 18px; }
.rf-field:last-of-type { margin-bottom: 0; }

.rf-field > label,
.rf-field > fieldset > legend {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--reachify-text);
  margin-bottom: 7px;
  padding: 0;
}

/* Required marker: a cue, not a shout. */
.rf-field.is-required > label::after,
.rf-field.is-required > fieldset > legend::after {
  content: " *";
  color: var(--reachify-danger);
  font-weight: 800;
}

.rf-field .helptext {
  display: block;
  color: var(--reachify-muted);
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 6px;
}

/* ---- Controls ---- */
.rf-field input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.rf-field select,
.rf-field textarea,
.rf-input {
  width: 100%;
  border: 1px solid var(--reachify-border);
  border-radius: var(--reachify-radius-sm);
  padding: 12px 14px;
  background: #fff;
  color: var(--reachify-text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  min-height: var(--reachify-tap);
  transition: border-color .12s ease, box-shadow .12s ease;
}

.rf-field input::placeholder,
.rf-field textarea::placeholder { color: #9fb3ca; }

.rf-field input:hover:not(:disabled),
.rf-field select:hover:not(:disabled),
.rf-field textarea:hover:not(:disabled) { border-color: #b9d4ec; }

.rf-field input:focus,
.rf-field select:focus,
.rf-field textarea:focus,
.rf-input:focus {
  border-color: var(--reachify-blue);
  box-shadow: 0 0 0 3px rgba(8, 124, 245, .15);
}

.rf-field input:disabled,
.rf-field select:disabled,
.rf-field textarea:disabled {
  background: var(--reachify-app-bg);
  color: var(--reachify-muted);
  cursor: not-allowed;
}

.rf-field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

/* Native select arrow is inconsistent across Android browsers. */
.rf-field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%236d84a3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.rf-field select[multiple] {
  background-image: none; padding-right: 14px; min-height: 140px;
}

/* File inputs: the default control is ugly and unreadable on small screens. */
.rf-field input[type="file"] {
  padding: 9px 12px;
  font-size: 14px;
  background: var(--reachify-app-bg);
  cursor: pointer;
}
.rf-field input[type="file"]::file-selector-button {
  border: 0; border-radius: var(--reachify-radius-pill);
  background: var(--reachify-blue); color: #fff;
  font-weight: 700; font-family: inherit; font-size: 13px;
  padding: 8px 15px; margin-right: 12px; cursor: pointer;
}
.rf-field input[type="file"]::file-selector-button:hover { filter: brightness(1.07); }

.rf-field input[type="color"] {
  width: 64px; min-width: 64px; height: var(--reachify-tap);
  padding: 4px; cursor: pointer;
}

/* ---- Checkboxes and radios ---- */
.rf-field--check { display: flex; align-items: flex-start; gap: 11px; }
.rf-field--check > label {
  margin-bottom: 0; font-weight: 600; line-height: 1.45; cursor: pointer;
}
.rf-field--check input[type="checkbox"],
.rf-field--check input[type="radio"] { margin-top: 2px; }

.rf-field input[type="checkbox"],
.rf-field input[type="radio"] {
  width: 20px; height: 20px;
  accent-color: var(--reachify-blue);
  flex-shrink: 0; cursor: pointer;
}

/* Multi-choice groups (checkbox/radio lists) become a readable stack. */
.rf-field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rf-field fieldset > div,
.rf-field ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.rf-field fieldset label:not(legend),
.rf-field ul label {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 14.5px; margin: 0;
  min-height: 32px; cursor: pointer;
}

/* ---- Errors ---- */
.rf-field.has-error input:not([type="checkbox"]):not([type="radio"]),
.rf-field.has-error select,
.rf-field.has-error textarea {
  border-color: var(--reachify-danger);
  background: #fffafa;
}
.rf-field.has-error > label { color: var(--reachify-danger-ink); }

.rf-errorlist,
.rf-field ul.errorlist {
  list-style: none; padding: 0;
  margin: 7px 0 0;
  color: var(--reachify-danger-ink);
  font-size: 13px; font-weight: 700;
  display: grid; gap: 3px;
}
.rf-errorlist li::before { content: "\26A0  "; }

/* Errors that belong to the form, not a field. */
.rf-form-errors {
  background: var(--reachify-danger-bg);
  border-left: 4px solid var(--reachify-danger);
  border-radius: var(--reachify-radius-sm);
  padding: 13px 16px;
  margin-bottom: 20px;
  color: var(--reachify-danger-ink);
  font-weight: 700;
}
.rf-form-errors ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }

/* ---- Grouping ---- */
.rf-form-section {
  border-top: 1px solid var(--reachify-hairline);
  margin-top: 26px;
  padding-top: 22px;
}
.rf-form-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.rf-form-section > h2,
.rf-form-section > h3 {
  font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--reachify-muted);
  margin: 0 0 16px;
}

/* Side-by-side fields where the content is naturally short. */
.rf-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0 18px;
}

/* ---- Action row ---- */
/* Actions are always separated from the last field so a form never ends in a
   button jammed against an input. */
.rf-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--reachify-hairline);
}
.rf-form-actions--end { justify-content: flex-end; }
.rf-form-actions--split > .rf-form-actions-spacer { margin-left: auto; }
.rf-form-actions .rf-hint {
  color: var(--reachify-muted); font-size: 13px;
  flex-basis: 100%; margin: 0;
}

/* Inline forms (search bars, filter rows) opt out of the stacked rhythm. */
.rf-form-inline {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
}
.rf-form-inline .rf-field { margin-bottom: 0; flex: 1 1 190px; }
.rf-form-inline .rf-form-actions {
  margin: 0; padding: 0; border: 0; flex: 0 0 auto;
}

@media (max-width: 560px) {
  /* On a phone the primary action should be easy to hit and unmistakable. */
  .rf-form-actions { flex-direction: column-reverse; align-items: stretch; }
  .rf-form-actions > .rf-cta,
  .rf-form-actions > .btn,
  .rf-form-actions > button,
  .rf-form-actions > a { width: 100%; text-align: center; justify-content: center; }
  .rf-form-grid { grid-template-columns: 1fr; }
  .rf-form-inline { flex-direction: column; align-items: stretch; }
}

/* --------------------------------------------------------------------------
   17. EMPTY / SKELETON / OFFLINE STATES
   -------------------------------------------------------------------------- */
.rf-empty {
  text-align: center; padding: 48px 20px;
  border: 1px dashed var(--reachify-border);
  border-radius: 18px; background: #fff;
}
.rf-empty-icon {
  width: 68px; height: 68px; margin: 0 auto 14px;
  border-radius: 20px; display: grid; place-items: center;
  background: var(--reachify-sky); font-size: 30px;
}
.rf-empty h3 { margin: 0 0 6px; }
.rf-empty p { color: var(--reachify-muted); margin: 0 0 16px; }

.rf-skeleton {
  background: linear-gradient(90deg, #eef4fb 25%, #e2ecf7 37%, #eef4fb 63%);
  background-size: 400% 100%;
  animation: rf-shimmer 1.3s ease infinite;
  border-radius: var(--reachify-radius-sm);
}
@keyframes rf-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.rf-offline-bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 90;
  background: var(--reachify-warning-ink); color: #fff;
  text-align: center; padding: 8px 14px;
  font-weight: 800; font-size: 13px;
  transform: translateY(-100%); transition: transform .25s ease;
}
.rf-offline-bar.is-visible { transform: translateY(0); }

/* --------------------------------------------------------------------------
   18. UTILITIES
   -------------------------------------------------------------------------- */
.rf-grid   { display: grid; gap: 12px; }
.rf-flex   { display: flex; gap: 10px; align-items: center; }
.rf-wrap   { flex-wrap: wrap; }
.rf-between{ justify-content: space-between; }
.rf-mt-0   { margin-top: 0; }
.rf-mb-0   { margin-bottom: 0; }
.rf-muted  { color: var(--reachify-muted); }
.rf-center { text-align: center; }
.rf-desktop-only { display: none; }

/* --------------------------------------------------------------------------
   19. RESPONSIVE — Android first, expand upward
   -------------------------------------------------------------------------- */
@media (min-width: 721px) {
  .rf-desktop-only { display: revert; }
  .rf-mobile-only  { display: none !important; }
}

@media (max-width: 720px) {
  body { background: #fff; }
  .rf-app { box-shadow: none; }
  .rf-brand { height: 45px; max-width: 235px; }
  .rf-greet h1 { font-size: 24px; }
  .rf-main { padding: 12px 12px calc(var(--reachify-bottomnav-h) + 24px); }
  .rf-hero { min-height: 215px; padding: 22px; }
  .rf-hero h2 { font-size: 28px; }
  .rf-quick { grid-template-columns: repeat(5, 145px); overflow: auto; padding-bottom: 5px; }
  .rf-business { grid-template-columns: 115px 1fr auto; }
  .rf-business-img { height: 82px; }
  .rf-products { grid-template-columns: 1fr 1fr; }
  .rf-pimg { height: 125px; font-size: 52px; }
  .rf-statgrid { grid-template-columns: repeat(2, 1fr); }
  .rf-message-layout { grid-template-columns: 1fr; }
  .rf-chatlist.rf-chatlist--collapsible { display: none; }
  .rf-profile-actions { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .rf-products { grid-template-columns: 1fr; }
  .rf-pimg { height: 170px; }
  .rf-business { grid-template-columns: 95px 1fr auto; }
  .rf-business-img { height: 78px; }
  .rf-product .rf-desc { min-height: auto; }
  .rf-sheetgrid { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print */
@media print {
  .rf-top, .rf-bottom, .rf-sheet, .rf-toast, .rf-offline-bar { display: none !important; }
  .rf-app { box-shadow: none; max-width: none; }
  .rf-main { padding: 0; }
}

/* --------------------------------------------------------------------------
   20. LARGE-SCREEN LAYOUT
   Phones get the Android-first shell above. From 1024px up the app switches
   to a desktop layout: a persistent navigation rail replaces the bottom bar,
   the header carries inline sections, and content grids widen. Same
   information architecture — a different arrangement of it.
   -------------------------------------------------------------------------- */

/* Shared container: single column on phones. */
.rf-shell { display: block; }

/* Rail, inline header nav and the companion column are desktop-only. */
.rf-rail { display: none; }
.rf-topnav { display: none; }
.rf-aside { display: none; }

@media (min-width: 1024px) {
  :root { --reachify-shell-max: 1440px; }

  /* ---- Header ----
     Horizontal padding widens; the vertical padding does not, because
     `--nav-h` is a single number and the sticky sub-navs on profile pages
     offset by it at every width. */
  .rf-top { padding: 12px 28px; }
  .rf-rail { top: 0; }
  .rf-brandrow { gap: 20px; }

  .rf-topnav {
    display: flex; gap: 2px; align-items: center;
    /* Seven sections at a narrow desktop width would otherwise push the
       account controls off the bar. Scroll the sections, never the icons. */
    min-width: 0; overflow-x: auto; scrollbar-width: none;
  }
  .rf-topnav::-webkit-scrollbar { display: none; }
  .rf-topnav a {
    color: rgba(255, 255, 255, .86);
    font-weight: 700; font-size: 15px; white-space: nowrap;
    padding: 10px 14px; border-radius: var(--reachify-radius-pill);
    min-height: var(--reachify-tap); display: inline-flex; align-items: center;
  }
  .rf-topnav a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
  .rf-topnav a[aria-current="page"] { background: rgba(255, 255, 255, .22); color: #fff; }

  .rf-scope { display: block; }

  /* Greeting and search sit side by side instead of stacking. */
  .rf-greet {
    margin-top: 18px;
    display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  }
  .rf-greet h1 { font-size: 31px; }
  .rf-greet p { margin: 0; }
  .rf-search { max-width: 620px; }

  /* ---- Rail + content + aside ---- */
  /* The grid only applies when a rail is actually rendered. Signed-out pages
     have no rail, and without this guard their <main> would drop into the
     rail's 232px column and render as a narrow strip. */
  .rf-shell:has(> .rf-rail) {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    align-items: start;
    gap: 0;
  }
  .rf-shell:has(> .rf-rail):has(> .rf-aside) {
    grid-template-columns: 232px minmax(0, 1fr) 320px;
  }

  .rf-rail {
    display: flex; flex-direction: column; gap: 18px;
    position: sticky; top: 104px;
    align-self: start;
    padding: 22px 14px 28px;
    border-right: 1px solid var(--reachify-border);
    background: #fff;
    min-height: calc(100vh - 104px);
  }
  .rf-rail-nav { display: flex; flex-direction: column; gap: 2px; }
  .rf-rail-item {
    display: flex; align-items: center; gap: 12px;
    padding: 0 14px; min-height: var(--reachify-tap);
    border-radius: var(--reachify-radius-sm);
    color: #35597f; font-weight: 700; font-size: 14.5px;
    position: relative;
  }
  .rf-rail-item:hover { background: var(--reachify-tint); color: var(--reachify-blue); }
  .rf-rail-item.is-active,
  .rf-rail-item[aria-current="page"] {
    background: var(--reachify-tint); color: var(--reachify-blue);
    box-shadow: inset 3px 0 0 var(--reachify-blue);
  }
  .rf-rail-icon { font-size: 18px; width: 22px; text-align: center; }
  .rf-rail-count {
    margin-left: auto; background: var(--reachify-danger); color: #fff;
    border-radius: var(--reachify-radius-pill);
    font-size: 11px; font-weight: 800; padding: 2px 7px; min-width: 20px; text-align: center;
  }
  .rf-rail-label {
    margin: 14px 0 4px; padding: 0 14px;
    font-size: 11px; font-weight: 800; letter-spacing: .09em;
    text-transform: uppercase; color: var(--reachify-muted);
  }
  .rf-rail-create { margin: 0 6px; }

  /* Bottom bar is a phone pattern — the rail replaces it. */
  .rf-bottom { display: none; }

  .rf-main { padding: 26px 30px 44px; }

  /* Optional right-hand column. */
  .rf-aside {
    display: flex;
    position: sticky; top: 104px;
    align-self: start;
    padding: 26px 26px 44px 8px;
    display: flex; flex-direction: column; gap: 16px;
  }

  /* ---- Wider content grids ---- */
  .rf-products    { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .rf-businesses  { grid-template-columns: repeat(2, 1fr); }
  .rf-business    { grid-template-columns: 160px minmax(0, 1fr) auto; }
  .rf-quick       { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .rf-profile-actions { grid-template-columns: repeat(3, 1fr); }
  .rf-sheetgrid   { grid-template-columns: repeat(3, 1fr); }

  .rf-hero { min-height: 260px; padding: 36px 40px; }
  .rf-hero h2 { font-size: 38px; max-width: 620px; }

  .rf-section-head h2 { font-size: 25px; }
}

/* Very wide screens: another product column and a roomier hero. */
@media (min-width: 1500px) {
  :root { --reachify-shell-max: 1660px; }
  .rf-products { grid-template-columns: repeat(4, 1fr); }
  .rf-hero { min-height: 290px; }
  .rf-hero h2 { font-size: 42px; }
  .rf-main { padding: 30px 40px 52px; }
}

/* Tablets: rail is still too wide, but two product columns work well. */
@media (min-width: 721px) and (max-width: 1023px) {
  .rf-products   { grid-template-columns: repeat(2, 1fr); }
  .rf-businesses { grid-template-columns: repeat(2, 1fr); }
  .rf-main       { padding: 20px 22px calc(var(--reachify-bottomnav-h) + 28px); }
  .rf-hero       { padding: 30px 32px; }
}

/* --------------------------------------------------------------------------
   21. MARKETPLACE — large-screen filter column
   Phones keep the collapsible filter panel above the results. From 1024px the
   filters become a persistent column beside them, so changing a filter never
   scrolls the results out of view.
   -------------------------------------------------------------------------- */
.rf-market-layout { display: block; }

@media (min-width: 1024px) {
  .rf-market-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-top: 6px;
  }

  .rf-filters {
    position: sticky; top: 118px;
    margin-top: 0;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
  }
  /* Always expanded on desktop — app.js sets `open`, this hides the toggle. */
  .rf-filters > summary { display: none; }
  .rf-filters .rf-grid { grid-template-columns: 1fr !important; }

  .rf-market-results > .rf-section-head:first-child { margin-top: 0; }

  /* The filter column takes 290px, so the results grid needs one fewer column. */
  .rf-market-results .rf-products { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1500px) {
  .rf-market-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; }
  .rf-market-results .rf-products { grid-template-columns: repeat(3, 1fr); }
}

/* Filter panel toggle: a control on phones, hidden on desktop where the
   panel is permanently expanded. Styled by class, not inline, so the
   desktop rule can actually win. */
.rf-filters-toggle {
  font-weight: 800; cursor: pointer;
  min-height: var(--reachify-tap);
  display: flex; align-items: center;
}
@media (min-width: 1024px) {
  .rf-filters > .rf-filters-toggle { display: none; }
}
