/* FMC Ad Server — front-end units.
   Palette lifted from the main site so units read as native, not bolted on. */

.fmc-ad{
  --fmc-cta:#ff6a00;
  --fmc-cta-ink:#d65900;
  --fmc-blue:#072fb5;
  --fmc-ink:#1a1a1a;
  --fmc-muted:#5e5e5e;
  --fmc-line:#e4ded6;
  --fmc-cream:#fdf8f1;
  --fmc-proof:#0f7a4d;
  --fmc-chip-bg:#e8f2ec;
  --fmc-chip-ink:#1d6446;

  min-height:var(--fmc-h-m);
  margin:2rem 0;
  contain:layout style;
  font-size:16px; line-height:1.4;
}
@media (min-width:768px){ .fmc-ad{ min-height:var(--fmc-h-d); } }

/* Nothing renders until filled — but the box is already the right size. */
.fmc-ad:not(.is-filled){ visibility:hidden; }
.fmc-ad.is-empty{ display:none; }

.fmc-ad *{ box-sizing:border-box; }

/* ---------- shared chrome ---------- */
.fmc-ad__head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:.75rem; margin:0 0 .75rem; line-height:1.25;
}
.fmc-ad__title{
  font-weight:700;font-size:1.3rem;line-height:1.25;font-family:inherit; color:var(--fmc-ink);
  margin:0; letter-spacing:-.01em;
}
.fmc-ad__disc{
  flex:none; font-weight:600;font-size:.625rem;line-height:1;font-family:inherit; letter-spacing:.09em;
  text-transform:uppercase; color:var(--fmc-muted);
  border:1px solid var(--fmc-line); border-radius:3px;
  padding:.28rem .45rem; background:#fff;
}

/* ---------- CARD_RAIL ----------
   The unit is a FIXED height, not a minimum. The placeholder reserves exactly
   this, so filling it cannot shift the article by a single pixel. Card text is
   line-clamped rather than allowed to grow the box. */
.fmc-ad--card_rail{ height:var(--fmc-h-m); display:flex; flex-direction:column; }
@media (min-width:768px){ .fmc-ad--card_rail{ height:var(--fmc-h-d); } }

.fmc-ad--card_rail .fmc-rail{
  display:flex; gap:1rem; overflow-x:auto; overflow-y:hidden;
  padding:.25rem .25rem 1rem; flex:1; min-height:0;
  scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
}
.fmc-ad--card_rail .fmc-rail::-webkit-scrollbar{ height:6px; }
.fmc-ad--card_rail .fmc-rail::-webkit-scrollbar-thumb{
  background:#d7d0c6; border-radius:3px;
}

.fmc-card{
  scroll-snap-align:start; flex:0 0 clamp(258px,78vw,300px);
  background:#fff; border:1px solid var(--fmc-line); border-radius:14px;
  overflow:hidden; display:flex; flex-direction:column; height:100%;
  text-decoration:none; color:inherit;
  transition:box-shadow .18s ease, transform .18s ease;
}
@media (min-width:768px){ .fmc-card{ flex-basis:300px; } }
.fmc-card:hover{ box-shadow:0 8px 24px rgba(26,26,26,.1); transform:translateY(-2px); }
.fmc-card:focus-visible{ outline:2px solid var(--fmc-blue); outline-offset:2px; }

.fmc-card__media{
  position:relative; aspect-ratio:16/9; flex:none;
  background:#eee9e1;
  /* deliberately NOT overflow:hidden -- the logo overhangs into the body.
     The card itself clips, so the photo corners still round correctly. */
}
.fmc-card__media > img.fmc-card__photo{
  width:100%; height:100%; object-fit:cover; display:block; max-width:100%;
}
.fmc-card__grade{
  position:absolute; top:.55rem; right:.55rem;
  background:rgba(20,20,20,.86); color:#fff; border-radius:7px;
  font-weight:700;font-size:.74rem;line-height:1;font-family:inherit; padding:.36rem .5rem; letter-spacing:.01em;
  backdrop-filter:saturate(120%) blur(2px);
}
.fmc-card__logo{
  position:absolute; left:.7rem; bottom:-1.4rem;
  width:2.9rem; height:2.9rem; border-radius:50%;
  background:#fff; border:2px solid #fff; box-shadow:0 2px 10px rgba(0,0,0,.16);
  object-fit:contain; padding:.2rem;
}

.fmc-card__body{ padding:1.95rem .9rem .9rem; display:flex; flex-direction:column; flex:1; }

.fmc-card__chip{
  align-self:flex-start; background:var(--fmc-chip-bg); color:var(--fmc-chip-ink);
  font-weight:600;font-size:.72rem;line-height:1;font-family:inherit; padding:.32rem .5rem; border-radius:4px;
  margin-bottom:.55rem;
}
.fmc-card__name{
  font-weight:700;font-size:1.02rem;line-height:1.3;font-family:inherit; color:var(--fmc-ink); margin:0 0 .2rem;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.fmc-card__loc{ font-weight:400;font-size:.82rem;line-height:1.35;font-family:inherit; color:var(--fmc-muted); margin:0 0 .6rem; }

.fmc-card__proof{ list-style:none; margin:0 0 .85rem; padding:0; }
.fmc-card__proof li{
  font-weight:600;font-size:.83rem;line-height:1.4;font-family:inherit; color:var(--fmc-proof);
  margin:0 0 .22rem; padding:0;
  display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden;
}
.fmc-card__proof li + li{ color:var(--fmc-ink); font-weight:500; }

.fmc-card__cta{
  margin-top:auto; display:inline-flex; align-items:center; gap:.4rem;
  color:var(--fmc-cta-ink); font-weight:700;font-size:.92rem;line-height:1;font-family:inherit;
}
.fmc-card__cta svg{ width:.95rem; height:.95rem; fill:currentColor; }

/* ---------- TEXT_LINK ---------- */
.fmc-ad--text_link .fmc-textlink{
  border-left:3px solid var(--fmc-cta); background:var(--fmc-cream);
  padding:.7rem .9rem; border-radius:0 7px 7px 0;
  font-weight:500;font-size:.95rem;line-height:1.5;font-family:inherit; color:var(--fmc-ink);
  display:flex; gap:.6rem; align-items:baseline; flex-wrap:wrap;
}
.fmc-ad--text_link a{ color:var(--fmc-blue); font-weight:700; text-decoration:underline; }
.fmc-ad--text_link .fmc-ad__disc{ margin-left:auto; }

/* ---------- LEAD_INLINE ---------- */
.fmc-ad--lead_inline .fmc-lead{
  background:var(--fmc-cream); border:1px solid var(--fmc-line);
  border-radius:14px; padding:1.1rem;
}
.fmc-lead__row{ display:flex; gap:.6rem; flex-wrap:wrap; margin-top:.75rem; }
.fmc-lead__row input{
  flex:1 1 170px; min-width:0; padding:.6rem .7rem;
  border:1px solid var(--fmc-line); border-radius:8px; font:inherit; font-size:.92rem;
  background:#fff;
}
.fmc-lead__row button{
  flex:0 0 auto; background:var(--fmc-cta); color:#fff; border:0;
  border-radius:8px; padding:.62rem 1.15rem; font-weight:700;font-size:.92rem;line-height:1;font-family:inherit; cursor:pointer;
}
.fmc-lead__row button:hover{ background:var(--fmc-cta-ink); }
.fmc-lead__note{ font-weight:400;font-size:.74rem;line-height:1.4;font-family:inherit; color:var(--fmc-muted); margin:.6rem 0 0; }
.fmc-lead__done{ font-weight:600;font-size:.95rem;line-height:1.5;font-family:inherit; color:var(--fmc-proof); margin:0; }

@media (prefers-reduced-motion:reduce){
  .fmc-card{ transition:none; }
  .fmc-card:hover{ transform:none; }
}
