/* Ridge Sill — propagation tunnel nav (nursery / seeds)
   NOT Synapse console, Potting Bench, Pearl String, Nectar Pad, Rib Arch. */

:root {
  --rs-ink: #14241a;
  --rs-mute: #3f5244;
  --rs-peat: #f0ebe3;
  --rs-cell: #e4dfd6;
  --rs-canopy: #156b45;
  --rs-canopy-lit: #e8f7ee;
  --rs-clay: #a65a2e;
  --rs-clay-lit: #fff4ec;
  --rs-saffron: #ffb800;
  --rs-saffron-ink: #3a2a00;
  --rs-sky: #1e90ff;
  --rs-cedar: #6d4f38;
  --rs-chrome: 4.85rem;
}

.rs-ridge {
  position: relative;
  z-index: 55;
  isolation: isolate;
  margin: 0.2rem 0 0.35rem;
  color: var(--rs-ink);
  font-family: "Atkinson Hyperlegible", "Source Sans 3", system-ui, sans-serif;
}

.rs-cap {
  height: 7px;
  margin: 0 auto;
  width: min(100% - 1.5rem, 1080px);
  border-radius: 6px 6px 0 0;
  background:
    repeating-linear-gradient(
      90deg,
      var(--rs-cedar) 0 14px,
      #8b6548 14px 16px,
      var(--rs-canopy) 16px 22px,
      #1a7a50 22px 24px
    );
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.35) inset;
  opacity: 0.9;
}

.rs-bed {
  padding: 0 0 0.1rem;
}

.rs-deck {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10.5rem) minmax(0, 1fr) minmax(10.5rem, 15.5rem);
  grid-template-areas: "tag sprout hatch";
  align-items: stretch;
  gap: 0.55rem 0.85rem;
  min-height: var(--rs-chrome);
  padding: 0.42rem 0.55rem 0.48rem;
  border: 2px solid var(--rs-ink);
  border-radius: 0 0 16px 16px;
  background:
    linear-gradient(178deg, #fff 0%, var(--rs-peat) 38%, #edf5ef 100%);
  box-shadow:
    0 3px 0 var(--rs-canopy),
    0 14px 32px rgba(20, 36, 26, 0.09);
  clip-path: polygon(0.5% 0, 99.5% 0, 100% 100%, 0 100%);
}

.rs-ridge a {
  color: inherit;
  text-decoration: none;
}

.rs-ridge a:hover {
  color: inherit;
}

/* Plant tag brand */
.rs-tag {
  grid-area: tag;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  gap: 0.45rem;
  align-items: center;
  padding: 0.38rem 0.55rem 0.42rem 0.65rem;
  border: 2px solid var(--rs-ink);
  border-radius: 4px 14px 14px 4px;
  background: linear-gradient(145deg, #fff9f0, #f2e6d4);
  box-shadow: 3px 3px 0 rgba(109, 79, 56, 0.55);
  transform: rotate(-1.2deg);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rs-tag:hover {
  transform: rotate(0deg) translateY(-1px);
  box-shadow: 4px 4px 0 var(--rs-canopy);
}

.rs-tag-hole {
  width: 9px;
  height: 9px;
  border: 2px solid var(--rs-ink);
  border-radius: 50%;
  background: var(--rs-peat);
  justify-self: end;
  margin-right: 0.15rem;
}

.rs-tag-wire {
  position: absolute;
  top: 5px;
  right: 18px;
  width: 28px;
  height: 14px;
  border: 2px solid var(--rs-ink);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  opacity: 0.35;
  pointer-events: none;
}

.rs-tag-copy {
  line-height: 1.04;
  min-width: 0;
}

.rs-tag-copy small {
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rs-canopy);
}

.rs-tag-copy strong {
  display: block;
  font-family: "Bricolage Grotesque", "Epilogue", sans-serif;
  font-size: clamp(0.9rem, 1.4vw, 1.06rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Center — sprout ring + dibber */
.rs-midfield {
  grid-area: sprout;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.1rem 0.25rem 0;
}

.rs-sprout-ring {
  position: relative;
  width: 100%;
  padding: 0.35rem 0.15rem 0.55rem;
}

.rs-horizon {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 0.45rem;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #8b7355 12%, #6d5437 50%, #8b7355 88%, transparent);
  opacity: 0.55;
}

.rs-horizon::after {
  content: "";
  position: absolute;
  inset: -6px 8% auto;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 100%, rgba(21, 107, 69, 0.18), transparent 70%);
}

.rs-sprouts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-evenly;
  gap: 0.25rem 0.35rem;
  position: relative;
  z-index: 1;
}

.rs-sprout-slot:nth-child(1),
.rs-sprout-slot:nth-child(5) {
  transform: translateY(6px);
}

.rs-sprout-slot:nth-child(2),
.rs-sprout-slot:nth-child(4) {
  transform: translateY(2px);
}

.rs-sprout {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.12rem;
  min-width: 3.6rem;
  max-width: 5.25rem;
  padding: 0.55rem 0.4rem 0.42rem;
  text-align: center;
  border: 2px solid var(--rs-ink);
  border-radius: 50% 50% 12px 12px / 58% 58% 16px 16px;
  background: linear-gradient(180deg, #fff, #f5f0e8);
  box-shadow: 2px 3px 0 rgba(20, 36, 26, 0.55);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.rs-sprout:hover {
  transform: translateY(-3px);
  box-shadow: 3px 5px 0 rgba(20, 36, 26, 0.6);
}

.rs-sprout-stem {
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 2px;
  height: 8px;
  margin-left: -1px;
  background: var(--rs-canopy);
  border-radius: 2px;
}

.rs-sprout-glyph {
  font-size: 0.72rem;
  line-height: 1;
  color: var(--rs-canopy);
  font-weight: 700;
}

.rs-sprout-short {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rs-sprout-label {
  font-size: 0.58rem;
  line-height: 1.15;
  color: var(--rs-mute);
  font-weight: 600;
}

.rs-sprout.is-active {
  background: linear-gradient(165deg, var(--rs-canopy), #1f8456);
  border-color: var(--rs-ink);
  box-shadow: 2px 3px 0 var(--rs-saffron);
}

.rs-sprout.is-active .rs-sprout-short,
.rs-sprout.is-active .rs-sprout-label,
.rs-sprout.is-active .rs-sprout-glyph {
  color: var(--rs-canopy-lit);
}

/* Dibber search */
.rs-dibber {
  display: flex;
  align-items: stretch;
  width: min(100%, 22rem);
  border: 2px solid var(--rs-ink);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 2px 2px 0 rgba(109, 79, 56, 0.45);
}

.rs-dibber-tip {
  flex: 0 0 auto;
  width: 14px;
  margin-left: 0.5rem;
  align-self: center;
  height: 14px;
  border-radius: 50% 50% 40% 40% / 60% 60% 35% 35%;
  background: radial-gradient(circle at 35% 30%, var(--rs-saffron), var(--rs-clay));
  border: 1.5px solid var(--rs-ink);
}

.rs-dibber input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0.38rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--rs-ink);
  background: transparent;
}

.rs-dibber button {
  border: 0;
  border-left: 2px solid var(--rs-ink);
  padding: 0.38rem 0.7rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--rs-saffron);
  color: var(--rs-saffron-ink);
}

/* Cedar hatch — contact / login / cart */
.rs-hatch {
  grid-area: hatch;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.35rem;
  align-content: center;
  padding: 0.35rem 0.4rem;
  border: 2px solid var(--rs-cedar);
  border-radius: 14px 14px 10px 10px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(109, 79, 56, 0.07) 0 6px,
      rgba(255, 255, 255, 0.45) 6px 12px
    ),
    linear-gradient(160deg, #faf5ed, #e9dfcf);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    3px 4px 0 rgba(20, 36, 26, 0.35);
}

.rs-hatch-leaf {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.48rem;
  border: 2px solid var(--rs-ink);
  border-radius: 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.rs-hatch-leaf:hover {
  transform: translateY(-2px);
}

.rs-hatch-leaf--desk {
  grid-column: 1 / -1;
  background: linear-gradient(120deg, var(--rs-clay-lit), #fde4d4);
  box-shadow: 2px 2px 0 #8b4d29;
}

.rs-hatch-leaf--gate {
  background: linear-gradient(145deg, var(--rs-canopy-lit), #d4eddd);
  box-shadow: 2px 2px 0 var(--rs-canopy);
}

.rs-hatch-leaf--sack {
  background: linear-gradient(145deg, #fff8df, #ffe9a8);
  box-shadow: 2px 2px 0 #c89a00;
  padding-right: 0.65rem;
}

.rs-hatch-leaf.is-active {
  outline: 2px solid var(--rs-saffron);
  outline-offset: 2px;
}

.rs-hatch-icon {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.rs-hatch-icon--desk {
  border-radius: 3px 3px 8px 8px;
  background: linear-gradient(180deg, #fff, rgba(166, 90, 46, 0.25));
  color: var(--rs-clay);
}

.rs-hatch-icon--gate {
  border-radius: 50% 50% 6px 6px;
  background: radial-gradient(circle at 40% 35%, #fff, rgba(21, 107, 69, 0.35));
  color: var(--rs-canopy);
}

.rs-hatch-icon--sack {
  border-style: dashed;
  border-radius: 6px;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 184, 0, 0.25) 0 4px,
    transparent 4px 8px
  );
  color: var(--rs-saffron-ink);
}

.rs-hatch-copy {
  display: grid;
  gap: 0.02rem;
  line-height: 1.05;
  min-width: 0;
}

.rs-hatch-copy em {
  font-style: normal;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rs-mute);
}

.rs-hatch-copy b {
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rs-hatch-leaf--desk .rs-hatch-copy b {
  color: var(--rs-clay);
}

.rs-hatch-leaf--gate .rs-hatch-copy b {
  color: var(--rs-canopy);
}

.rs-cart-count {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.22rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
  background: var(--rs-canopy);
  color: var(--rs-canopy-lit);
  border: 2px solid var(--rs-ink);
}

.rs-flat-toggle {
  display: none;
  grid-area: hatch;
  align-self: center;
  justify-self: end;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  border: 2px solid var(--rs-ink);
  border-radius: 999px;
  background: var(--rs-canopy);
  color: var(--rs-canopy-lit);
  font-weight: 800;
  font-size: 0.72rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--rs-ink);
}

.rs-flat-seeds {
  display: flex;
  gap: 3px;
}

.rs-flat-seeds i {
  display: block;
  width: 5px;
  height: 7px;
  border-radius: 50% 50% 40% 40%;
  background: var(--rs-saffron);
  border: 1px solid var(--rs-ink);
}

/* Mobile seed-flat drawer */
.rs-flat-panel {
  border-top: 2px dashed rgba(21, 107, 69, 0.3);
  background: linear-gradient(180deg, var(--rs-peat), #fff);
}

.rs-flat-panel[hidden] {
  display: none !important;
}

.rs-flat-inner {
  padding: 0.85rem 0 1.1rem;
}

.rs-flat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.rs-flat-kicker {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rs-mute);
}

.rs-flat-close {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--rs-ink);
  border-radius: 8px;
  background: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.rs-flat-hatch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rs-flat-pill {
  display: grid;
  gap: 0.1rem;
  padding: 0.65rem 0.7rem;
  border: 2px solid var(--rs-ink);
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 2px 2px 0 rgba(20, 36, 26, 0.45);
}

.rs-flat-pill span:not(.rs-flat-pill-icon) {
  font-weight: 800;
  font-size: 0.82rem;
}

.rs-flat-pill small {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rs-mute);
}

.rs-flat-pill-icon {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--rs-clay);
  border-radius: 4px;
  margin-bottom: 0.15rem;
}

.rs-flat-pill-icon--gate {
  border-radius: 50%;
  border-color: var(--rs-canopy);
}

.rs-flat-pill--desk {
  background: var(--rs-clay-lit);
}

.rs-flat-pill--gate {
  background: var(--rs-canopy-lit);
}

.rs-flat-pill.is-active {
  outline: 2px solid var(--rs-saffron);
  outline-offset: 2px;
}

.rs-flat-routes {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.rs-flat-link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.45rem;
  row-gap: 0.05rem;
  padding: 0.55rem 0.6rem;
  border: 2px solid var(--rs-ink);
  border-radius: 12px;
  background: #fff;
  box-shadow: 2px 2px 0 rgba(20, 36, 26, 0.4);
}

.rs-flat-glyph {
  grid-row: 1 / 3;
  align-self: center;
  font-size: 0.9rem;
  color: var(--rs-canopy);
}

.rs-flat-short {
  font-weight: 800;
  font-size: 0.76rem;
}

.rs-flat-link small {
  grid-column: 2;
  font-size: 0.62rem;
  color: var(--rs-mute);
}

.rs-flat-link.is-active {
  background: var(--rs-canopy);
  color: var(--rs-canopy-lit);
}

.rs-flat-link.is-active small,
.rs-flat-link.is-active .rs-flat-glyph {
  color: var(--rs-canopy-lit);
}

.rs-flat-search {
  display: flex;
  border: 2px solid var(--rs-ink);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.rs-flat-search input {
  flex: 1;
  border: 0;
  padding: 0.55rem 0.65rem;
  font-size: 0.85rem;
}

.rs-flat-search button {
  border: 0;
  border-left: 2px solid var(--rs-ink);
  padding: 0 0.85rem;
  font-weight: 800;
  font-size: 0.65rem;
  text-transform: uppercase;
  background: var(--rs-saffron);
  cursor: pointer;
}

.rs-scrim {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: rgba(20, 36, 26, 0.42);
  backdrop-filter: blur(3px);
}

.rs-scrim[hidden] {
  display: none !important;
}

body.rs-flat-open {
  overflow: hidden;
}

.rs-tag:focus-visible,
.rs-sprout:focus-visible,
.rs-dibber:focus-within,
.rs-hatch-leaf:focus-visible,
.rs-flat-toggle:focus-visible,
.rs-flat-link:focus-visible,
.rs-flat-pill:focus-visible {
  outline: 2px solid var(--rs-sky);
  outline-offset: 2px;
}

@media (max-width: 1040px) {
  .rs-sprout-label {
    display: none;
  }

  .rs-sprout {
    min-width: 3.1rem;
    padding-inline: 0.3rem;
  }

  .rs-hatch-copy em {
    display: none;
  }

  .rs-hatch-copy b {
    font-size: 0.62rem;
  }
}

@media (max-width: 880px) {
  .rs-deck {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "tag flat"
      "sprout sprout";
    gap: 0.45rem;
  }

  .rs-hatch {
    display: none;
  }

  .rs-flat-toggle {
    display: inline-flex;
  }

  .rs-tag {
    transform: none;
  }

  .rs-sprout-slot:nth-child(n) {
    transform: none;
  }

  .rs-dibber {
    width: min(100%, 26rem);
  }
}

@media (max-width: 620px) {
  .rs-sprout-ring {
    display: none;
  }

  .rs-midfield {
    padding-top: 0;
  }

  .rs-dibber {
    width: 100%;
  }

  .rs-deck {
    padding: 0.35rem 0.45rem 0.42rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rs-tag,
  .rs-sprout,
  .rs-hatch-leaf {
    transition: none;
  }
}