
/* Carat Farm components. Every colour, space and radius comes from tokens.css. */
.cf, .cf * { box-sizing: border-box; }
.cf { font-family: var(--font-body); font-size: 15px; line-height: 1.6; color: var(--ink); -webkit-font-smoothing: antialiased; }
.cf h1, .cf h2, .cf h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }
.cf p { margin: 0; }
.cf-eyebrow { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Logo ---------- */
.cf-logo { display: inline-flex; align-items: center; gap: .35em; line-height: 1; }
.cf-logo .cf-mark { height: 2.3em; width: auto; }
.cf-logo__word { display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: .95; }
.cf-logo__word b { color: var(--ink); font-weight: 700; }
.cf-logo__word i { color: var(--leaf-deep); font-style: normal; }
.cf-logo--inline .cf-logo__word { flex-direction: row; gap: .28em; }
.cf-logo--inline .cf-mark { height: 1.6em; }
.cf-logo--reversed .cf-logo__word b { color: #FFF0D2; }
.cf-logo--reversed .cf-logo__word i { color: var(--leaf-lit); }

/* ---------- Button ---------- */
.cf-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-6);
  border-radius: var(--radius-md); border: 1.5px solid transparent; font: 600 14px/20px var(--font-body); cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.cf-btn .cf-mark { height: 18px; width: auto; }
.cf-btn:focus-visible { outline: 3px solid var(--flesh-deep); outline-offset: 2px; }
.cf-btn:active { transform: translateY(1px); }
.cf-btn--primary { background: var(--flesh); color: var(--night); }
.cf-btn--primary:hover { background: var(--flesh-lit); }
.cf-btn--primary:active { background: var(--girdle); color: #FFF0D2; }
.cf-btn--secondary { background: var(--ink); color: var(--paper); }
.cf-btn--secondary:hover { background: var(--leaf-deep); color: var(--surface); }
.cf-btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.cf-btn--ghost:hover { border-color: var(--ink); background: var(--furrow); }
.cf-btn--leaf { background: var(--leaf-deep); color: var(--surface); }
.cf-btn--sm { min-height: 36px; padding: 0 var(--space-4); font-size: 13px; }
.cf-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Carrot sprout (the popping carrot diamond) ---------- */
.cf-sprout { --cf-sprout-size: 36px; --cf-sprout-dur: 4s; --cf-sprout-delay: 0s;
  position: relative; display: inline-block; width: calc(var(--cf-sprout-size) * .9); height: calc(var(--cf-sprout-size) * 1.2);
  clip-path: inset(-120% -60% 0 -60%); pointer-events: none; }
.cf-sprout--placed { position: absolute; transform: translate(-50%, -100%); }
.cf-sprout__gem { position: absolute; left: 50%; bottom: 8%; transform-origin: 50% 100%;
  animation: cf-pop var(--cf-sprout-dur) cubic-bezier(.3,1.4,.5,1) var(--cf-sprout-delay) infinite both; }
.cf-sprout__gem .cf-mark { display: block; height: var(--cf-sprout-size); width: auto; filter: drop-shadow(0 2px 0 rgba(27,38,32,.12)); }
.cf-sprout__mound { position: absolute; left: 50%; bottom: 0; width: 100%; height: 22%; transform: translateX(-50%);
  border-radius: var(--radius-pill) var(--radius-pill) 0 0; background: var(--furrow); box-shadow: inset 0 2px 0 var(--line);
  animation: cf-mound var(--cf-sprout-dur) ease-out var(--cf-sprout-delay) infinite both; }
.cf-sprout--still .cf-sprout__gem { animation: none; transform: translate(-50%, 0); }
.cf-sprout--still .cf-sprout__mound { animation: none; }
@keyframes cf-pop {
  0%   { transform: translate(-50%, 115%) rotate(0); }
  14%  { transform: translate(-50%, -14%) rotate(-4deg); }
  22%  { transform: translate(-50%, 0) rotate(3deg); }
  30%  { transform: translate(-50%, 0) rotate(-2deg); }
  38%, 72% { transform: translate(-50%, 0) rotate(0); }
  86%, 100% { transform: translate(-50%, 115%) rotate(0); }
}
@keyframes cf-mound {
  0% { transform: translateX(-50%) scaleY(.4); } 12% { transform: translateX(-50%) scaleY(1.25); }
  24%, 80% { transform: translateX(-50%) scaleY(1); } 100% { transform: translateX(-50%) scaleY(.4); }
}
@media (prefers-reduced-motion: reduce) {
  .cf-sprout__gem { animation: none; transform: translate(-50%, 0); }
  .cf-sprout__mound { animation: none; }
}

/* ---------- The field (hero ground with crop rows) ---------- */
.cf-field { position: relative; overflow: hidden; background-color: var(--paper);
  background-image: repeating-linear-gradient(180deg, transparent 0 34px, var(--furrow) 34px 46px, transparent 46px 52px); }
.cf-field__sprouts { position: absolute; inset: 0; pointer-events: none; }

/* ---------- Stepper ---------- */
.cf-stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.cf-step { position: relative; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-6); min-height: 76px; cursor: default; }
.cf-step[tabindex] { cursor: pointer; }
.cf-step + .cf-step { border-left: 1px solid var(--line); }
.cf-step--active { background: var(--cream); }
.cf-step--active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--flesh); }
.cf-step__badge { flex: none; width: 40px; height: 40px; border-radius: var(--radius-pill); display: grid; place-items: center;
  font: 700 15px/1 var(--font-display); border: 1.5px solid var(--ink-soft); color: var(--ink-soft); }
.cf-step__badge svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cf-step--active .cf-step__badge { border-color: var(--flesh); background: var(--surface); }
.cf-step--active .cf-step__badge .cf-mark { width: auto; height: 28px; fill: initial; stroke: none; }
.cf-step--done .cf-step__badge { background: var(--leaf-deep); border-color: var(--leaf-deep); color: var(--surface); }
.cf-step__text { display: flex; flex-direction: column; min-width: 0; }
.cf-step__k { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.cf-step__label { font: 700 16px/22px var(--font-display); color: var(--ink); }
.cf-step__detail { font-size: 13px; line-height: 18px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-step--done .cf-step__detail { color: var(--leaf-shade); font-weight: 500; }
.cf-step__icon { margin-left: auto; color: var(--ink-soft); }
.cf-step__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }

/* ---------- Shape picker ---------- */
.cf-shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: var(--space-2); }
.cf-shape { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); padding: var(--space-3) var(--space-1) var(--space-2);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-md); color: var(--ink);
  font: 500 12px/16px var(--font-body); cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.cf-shape:hover { border-color: var(--ink-soft); background: var(--furrow); }
.cf-shape:focus-visible { outline: 3px solid var(--flesh-deep); outline-offset: 2px; }
.cf-shape[aria-pressed="true"] { border-color: var(--leaf-deep); background: var(--cream); box-shadow: var(--shadow-glow); color: var(--ink); font-weight: 600; }
.cf-shape-icon { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.cf-shape[aria-pressed="true"] .cf-shape-icon { stroke: var(--girdle); }

/* ---------- Range + grade ---------- */
.cf-range__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); margin-bottom: var(--space-2); }
.cf-range__label { font: 600 14px/20px var(--font-display); color: var(--ink); }
.cf-range__val { font-size: 13px; font-weight: 600; color: var(--leaf-shade); font-variant-numeric: tabular-nums; }
.cf-range__track { position: relative; height: 28px; }
.cf-range__track::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: var(--radius-pill); background: var(--line); }
.cf-range__fill { position: absolute; top: 12px; height: 4px; border-radius: var(--radius-pill); background: var(--leaf); }
.cf-range__in { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.cf-range__in::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface); border: 2.5px solid var(--leaf-deep); cursor: grab; box-shadow: 0 1px 3px rgba(27,38,32,.25); }
.cf-range__in::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--leaf-deep); cursor: grab; }
.cf-range__in:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--flesh-deep); outline-offset: 2px; }
.cf-range__ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); }
.cf-grade__row { display: flex; gap: 3px; }
.cf-grade__chip { flex: 1; min-width: 0; height: 34px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-soft);
  font: 600 12px/1 var(--font-body); cursor: pointer; border-radius: 0; padding: 0 2px; }
.cf-grade__chip:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.cf-grade__chip:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.cf-grade__chip[aria-pressed="true"] { background: var(--cream); border-color: var(--leaf-deep); color: var(--ink); }
.cf-grade__chip.is-end { background: var(--leaf-deep); color: var(--surface); border-color: var(--leaf-deep); }
.cf-grade__chip:focus-visible { outline: 3px solid var(--flesh-deep); outline-offset: 1px; position: relative; z-index: 1; }

/* ---------- Diamond card ---------- */
.cf-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; }
.cf-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.cf-card.is-selected { border-color: var(--leaf-deep); box-shadow: var(--shadow-glow); }
.cf-card__well { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--girdle);
  background: radial-gradient(circle at 50% 45%, var(--surface) 0 28%, var(--cream) 70%); }
.cf-card__well .cf-shape-icon { stroke-width: 1; }
.cf-badge { position: absolute; top: var(--space-3); left: var(--space-3); display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 3px var(--space-2) 3px 6px; border-radius: var(--radius-pill); background: var(--gold); color: #12100E; font: 600 11px/16px var(--font-body); }
.cf-badge .cf-mark { height: 14px; width: auto; }
.cf-card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); flex: 1; }
.cf-card__title { font: 600 16px/22px var(--font-display); color: var(--ink); }
.cf-card__specs { font-size: 13px; line-height: 18px; color: var(--ink-soft); }
.cf-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: auto; padding-top: var(--space-3); }
.cf-card__price { font: 700 19px/24px var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Ring preview, metals, setting card, chips ---------- */
.cf-ringview { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.cf-ring { display: block; max-width: 100%; height: auto; }
.cf-ringview__cap { font-size: 13px; line-height: 18px; color: var(--ink-soft); text-align: center; }
.cf-card__well--ring { aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 40%, var(--surface) 0 30%, var(--cream) 75%); }
.cf-metals { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cf-metal { display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-3) 6px 6px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 500 13px/18px var(--font-body); cursor: pointer; }
.cf-metal:hover { border-color: var(--ink-soft); }
.cf-metal[aria-checked="true"] { border-color: var(--leaf-deep); background: var(--cream); box-shadow: var(--shadow-glow); font-weight: 600; }
.cf-metal:focus-visible { outline: 3px solid var(--flesh-deep); outline-offset: 2px; }
.cf-metal__dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(27,38,32,.18); flex: none; }
.cf-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cf-chip { min-height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-pill); border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: 500 13px/18px var(--font-body); cursor: pointer; }
.cf-chip:hover { border-color: var(--ink-soft); background: var(--furrow); }
.cf-chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 600; }
.cf-chip:focus-visible { outline: 3px solid var(--flesh-deep); outline-offset: 2px; }

/* ---------- Site header ---------- */
.cf-site__strip { background: var(--night); color: #FFF0D2; font-size: 13px; line-height: 18px; text-align: center; padding: 9px var(--space-4); }
.cf-site__strip b { color: var(--leaf-lit); font-weight: 600; }
.cf-site__head { display: flex; align-items: center; gap: var(--space-8); padding: var(--space-4) var(--space-16); background: var(--paper); border-bottom: 1px solid var(--line); }
.cf-site__nav { display: flex; gap: var(--space-6); margin-left: var(--space-4); }
.cf-site__nav a { color: var(--ink); text-decoration: none; font: 500 14px/20px var(--font-body); padding: 6px 0; border-bottom: 2px solid transparent; }
.cf-site__nav a[aria-current] { border-color: var(--flesh); font-weight: 600; }
.cf-site__nav a:hover { color: var(--leaf-shade); }
.cf-site__tools { margin-left: auto; display: flex; gap: var(--space-4); align-items: center; }
.cf-site__tools button { position: relative; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; border-radius: var(--radius-sm); display: grid; place-items: center; }
.cf-site__tools svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cf-site__count { position: absolute; top: -2px; right: -6px; font: 600 11px/1 var(--font-body); background: var(--flesh); color: var(--night); border-radius: var(--radius-pill); padding: 3px 6px; }

/* ---------- Ring bar ---------- */
.cf-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: var(--space-6); padding: var(--space-4) var(--space-16); background: var(--night); color: #FFF0D2; }
.cf-bar__part { display: flex; flex-direction: column; min-width: 0; }
.cf-bar__k { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #B9B3A6; font-weight: 600; }
.cf-bar__v { font: 600 15px/22px var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.cf-bar__v.is-empty { color: #B9B3A6; font-weight: 500; }
.cf-bar__plus { color: #7FD09B; font: 700 20px/1 var(--font-display); }
.cf-bar__total { margin-left: auto; text-align: right; }
.cf-bar__total .cf-bar__v { font-size: 22px; line-height: 28px; }
.cf-card__img { width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: multiply; }
.cf-card__more { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--leaf-shade); font: 600 13px/18px var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
