/* ========================================================================
   Events calendar (/<lang>/resources/events/), written by
   components/events/build.mjs.

   Loads after retailers.css (breadcrumb, hero, buttons, .rg-sr) on top of
   subpage.css and tokens.css. Fern carries the highlight (key events, month
   names), Foxglove only the demo button, forest silk the demo card, as on
   the retail news.
   ======================================================================== */

.ev [hidden] { display: none !important; }

.ev h2 {
  font: 700 clamp(22px, 2.6vw, 28px)/1.2 Poppins, sans-serif;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0 0 14px;
}

/* ----------------------------------------------------------- fair finder */
.ev-match {
  margin: 0 0 40px;
  padding: 26px 28px 22px;
  border: 1px solid var(--sns-blue-200, #C9DEC8);
  border-radius: 18px;
  background: linear-gradient(160deg, #F3F8F1 0%, #FFFFFF 70%);
}
.ev-match-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.ev-match-orb { flex: none; width: 44px; height: 44px; }
.ev-match h2 { font-size: clamp(21px, 2.4vw, 25px); margin: 2px 0 6px; }
.ev-match-head p { margin: 0; font-size: 15.5px; line-height: 1.6; color: #475569; max-width: 70ch; }
.ev-match-form { max-width: 640px; }
.ev-match-row { display: flex; gap: 10px; }
.ev-match-row input { flex: 1; min-width: 0; font-size: 16px !important; min-height: 50px !important; }
.ev-match-row .rg-btn { flex: none; min-height: 50px; padding-inline: 22px; }
.ev-match-what { display: grid; gap: 5px; margin-top: 12px; }
.ev-match-what label { font: 600 12.5px/1.3 Inter, sans-serif; color: #344054; }
.ev-match-row input, .ev-match-what input, .ev-match-email input[type="email"] {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--sns-grey-300, #CBD5E1);
  border-radius: 10px;
  background: #fff;
  font: 400 15px/1.3 Inter, sans-serif;
  color: #0f172a;
}
.ev-match-row input:focus, .ev-match-what input:focus, .ev-match-email input[type="email"]:focus { outline: 3px solid rgba(63, 125, 78, .3); outline-offset: 1px; border-color: var(--sns-brand, #3F7D4E); }
.ev-match-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--sns-grey-500, #667085); }
.ev-match-note a { color: inherit; text-underline-offset: 2px; }

/* What the AI understood about the brand: the "it knows us" moment. */
.ev-brand {
  margin: 0 0 20px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #143A2E url('/assets/silk-card.jpg') center / cover no-repeat;
  color: #fff;
}
.ev-brand p { margin: 0; }
.ev-brand-label { font: 700 11.5px/1.2 Inter, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); }
.ev-brand-name { margin-top: 6px !important; font: 700 21px/1.25 Poppins, sans-serif; letter-spacing: -0.01em; }
.ev-brand-summary { margin-top: 4px !important; font-size: 15.5px; line-height: 1.55; color: rgba(255, 255, 255, 0.92); max-width: 70ch; }
.ev-brand-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 12px 0 0; }
.ev-brand-facts div { min-width: 0; }
.ev-brand-facts dt { font: 600 11.5px/1.3 Inter, sans-serif; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.ev-brand-facts dd { margin: 2px 0 0; font: 500 14px/1.45 Inter, sans-serif; color: #fff; }
.ev-match-status { margin: 12px 0 0; font: 500 14.5px/1.5 Inter, sans-serif; color: #344054; }
.ev-match-status:empty { display: none; }
/* "We focus on fast-moving consumer goods here" for a bank or a software
   company: a calm note, not an error. */
.ev-match-status.is-note { padding: 12px 16px; border: 1px solid var(--sns-grey-200, #D9E0E8); border-radius: 10px; background: #fff; }
.ev-match-status.is-busy::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  vertical-align: -1px;
  border: 2px solid var(--sns-blue-200, #C9DEC8);
  border-top-color: var(--sns-brand, #3F7D4E);
  border-radius: 50%;
  animation: ev-spin .8s linear infinite;
}
@keyframes ev-spin { to { transform: rotate(360deg); } }
.ev-match-results { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--sns-blue-200, #C9DEC8); }
.ev-match-results h3 { font: 700 17px/1.3 Poppins, sans-serif; color: #0f172a; margin: 0 0 12px; }
.ev-match-list { list-style: none; counter-reset: evm; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ev-match-item { counter-increment: evm; position: relative; padding: 16px 18px 12px 52px; background: #fff; border: 1px solid var(--sns-grey-100, #E4E9EF); border-radius: 12px; }
.ev-match-item::before {
  content: counter(evm);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sns-blue-100, #E3EEE2);
  color: var(--sns-blue-700, #33683F);
  font: 700 12.5px/1 Inter, sans-serif;
}
.ev-match-item.is-key::before { background: var(--sns-brand, #3F7D4E); color: #fff; }
.ev-match-item p { margin: 0; }
.ev-match-name { font: 700 16px/1.3 Poppins, sans-serif; color: #0f172a; }
.ev-match-meta { margin-top: 2px !important; font: 500 13px/1.45 Inter, sans-serif; color: var(--sns-grey-500, #667085); }
.ev-match-why { margin-top: 8px !important; font-size: 14.5px; line-height: 1.55; color: #344054; }
.ev-match-item .ev-actions { padding-top: 8px; }
.ev-match-email { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.ev-match-email p { flex: 1 1 100%; margin: 0; font: 600 14.5px/1.4 Inter, sans-serif; color: #0f172a; }
.ev-match-email input[type="email"] { flex: 1 1 240px; width: auto; }
.ev-match-results .ev-msg { margin-top: 12px !important; }
@media (prefers-reduced-motion: reduce) { .ev-match-status.is-busy::before { animation: none; } }

/* --------------------------------------------------------------- filters */
/* The bar sticks while the list scrolls, and stops with it (.ev-cal wraps
   the two). */
.ev-filters {
  position: sticky;
  top: 72px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin: 0 0 34px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--sns-grey-100, #E4E9EF);
  border-radius: 14px;
  box-shadow: var(--sns-shadow-sm, 0 1px 2px rgba(16, 24, 40, 0.04));
}
.ev-filter { display: grid; gap: 5px; min-width: 170px; flex: 1 1 170px; }
.ev-filter label { font: 600 12.5px/1.3 Inter, sans-serif; color: #344054; }
.ev-filter select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 42px;
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--sns-grey-300, #CBD5E1);
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center no-repeat;
  font: 500 14.5px/1.3 Inter, sans-serif;
  color: #0f172a;
  cursor: pointer;
}
.ev-filter select:focus-visible { outline: 3px solid rgba(63, 125, 78, .35); outline-offset: 1px; border-color: var(--sns-brand, #3F7D4E); }
.ev-count { margin: 0 0 11px; font: 600 13.5px/1.3 Inter, sans-serif; color: var(--sns-grey-600, #475569); white-space: nowrap; }
.ev-reset {
  margin: 0 0 8px;
  padding: 6px 2px;
  border: 0;
  background: none;
  font: 600 13.5px/1.3 Inter, sans-serif;
  color: var(--sns-brand, #3F7D4E);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* List | Gantt */
.ev-view {
  display: inline-flex;
  margin: 0 0 4px auto;
  padding: 3px;
  border: 1px solid var(--sns-grey-200, #D9E0E8);
  border-radius: 10px;
  background: var(--sns-surface-2, #F6F7F2);
}
.ev-view button {
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: 600 13.5px/1.2 Inter, sans-serif;
  color: var(--sns-grey-600, #475569);
  cursor: pointer;
}
.ev-view button[aria-pressed="true"] { background: #fff; color: #0f172a; box-shadow: var(--sns-shadow-sm, 0 1px 2px rgba(16, 24, 40, 0.04)); }
.ev-view button:focus-visible { outline: 3px solid rgba(63, 125, 78, .35); outline-offset: 1px; }

/* ----------------------------------------------------------------- Gantt */
.ev-gantt { margin: 0 0 36px; border: 1px solid var(--sns-grey-100, #E4E9EF); border-radius: 14px; background: #fff; }
.ev-gantt-scroll { overflow-x: auto; border-radius: 14px; }
.ev-gantt-scroll:focus-visible { outline: 3px solid rgba(63, 125, 78, .35); outline-offset: 2px; }
.ev-gantt-inner { min-width: 860px; --ev-label: 270px; }
.ev-gantt-head {
  display: flex;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--sns-blue-200, #C9DEC8);
  background: var(--sns-surface-2, #F6F7F2);
}
.ev-gantt-corner {
  flex: none;
  width: var(--ev-label);
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--sns-surface-2, #F6F7F2);
}
.ev-gantt-months { position: relative; flex: 1; height: 38px; }
.ev-gantt-months span {
  position: absolute;
  top: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  font: 700 12px/1 Inter, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sns-brand, #3F7D4E);
}
.ev-gantt-body { position: relative; }
.ev-gantt-grid { position: absolute; top: 0; bottom: 0; left: var(--ev-label); right: 0; pointer-events: none; }
.ev-gantt-grid span { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--sns-grey-100, #E4E9EF); }
.ev-gantt-rows { list-style: none; margin: 0; padding: 4px 0; }
.ev-row { display: flex; align-items: stretch; }
.ev-row + .ev-row { border-top: 1px solid #f1f3f6; }
.ev-row:hover { background: rgba(227, 238, 226, 0.45); }
.ev-row-label {
  flex: none;
  width: var(--ev-label);
  box-sizing: border-box;
  position: sticky;
  left: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px 14px 8px 16px;
  background: #fff;
  text-decoration: none;
}
.ev-row:hover .ev-row-label { background: #f6faf5; }
.ev-row-name { font: 600 14px/1.3 Inter, sans-serif; color: #0f172a; }
.ev-row-meta { font: 500 12px/1.3 Inter, sans-serif; color: var(--sns-grey-500, #667085); }
.ev-row-label:hover .ev-row-name { color: var(--sns-brand, #3F7D4E); text-decoration: underline; text-underline-offset: 3px; }
.ev-row-label:focus-visible { outline: 3px solid rgba(63, 125, 78, .35); outline-offset: -3px; }
.ev-row-track { position: relative; flex: 1; min-height: 48px; }
.ev-bar {
  position: absolute;
  top: 50%;
  height: 16px;
  min-width: 8px;
  transform: translateY(-50%);
  border-radius: 5px;
  background: var(--sns-blue-200, #C9DEC8);
  border: 1px solid var(--sns-blue-500, #4F9160);
  box-sizing: border-box;
}
.ev-row.is-key .ev-bar { background: var(--sns-brand, #3F7D4E); border-color: var(--sns-blue-700, #33683F); }
.ev-card.is-flash { animation: ev-flash 1.6s ease-out; }
@keyframes ev-flash { 0%, 40% { box-shadow: 0 0 0 4px rgba(63, 125, 78, 0.35); } 100% { box-shadow: 0 0 0 0 rgba(63, 125, 78, 0); } }
@media (prefers-reduced-motion: reduce) { .ev-card.is-flash { animation: none; } }

/* ---------------------------------------------------------------- months */
.ev-month { margin: 0 0 36px; scroll-margin-top: 170px; }
.ev-month-name.ev-month-name {
  font-size: 15px;
  font-family: Inter, sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sns-brand, #3F7D4E);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sns-blue-200, #C9DEC8);
}
.ev-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ----------------------------------------------------------------- cards */
.ev-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 18px;
  background: #fff;
  border: 1px solid var(--sns-grey-100, #E4E9EF);
  border-radius: 14px;
  scroll-margin-top: 170px;
}
.ev-card.is-key { border-color: var(--sns-blue-200, #C9DEC8); box-shadow: inset 4px 0 0 var(--sns-brand, #3F7D4E); }
.ev-card p { margin: 0; }
.ev-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ev-when { font: 600 14px/1.4 Inter, sans-serif; color: #0f172a; }
/* Marca's buyers preview: its own line, under the dates. */
.ev-datenote { display: block; font-weight: 500; font-size: 13px; color: var(--sns-grey-500, #667085); }
.ev-key {
  flex: none;
  font: 700 11px/1 Inter, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sns-blue-700, #33683F);
  background: var(--sns-blue-100, #E3EEE2);
  border-radius: 999px;
  padding: 6px 9px;
}
.ev-name { font: 700 18px/1.3 Poppins, sans-serif; letter-spacing: -0.01em; color: #0f172a; margin: 0; }
.ev-where { font: 500 14px/1.45 Inter, sans-serif; color: var(--sns-grey-600, #475569); }
.ev-cc {
  display: inline-block;
  margin-right: 4px;
  padding: 2px 6px;
  border: 1px solid var(--sns-grey-200, #D9E0E8);
  border-radius: 6px;
  font: 700 11.5px/1.2 Inter, sans-serif;
  letter-spacing: 0.04em;
  color: #344054;
  text-decoration: none;
  vertical-align: 1px;
}
.ev-tags { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font: 500 13.5px/1.45 Inter, sans-serif; color: var(--sns-grey-600, #475569); }
.ev-type {
  font-weight: 600;
  color: #0f172a;
  background: var(--sns-surface-2, #F6F7F2);
  border-radius: 6px;
  padding: 2px 8px;
}
.ev-note { font-size: 15px; line-height: 1.6; color: #344054; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: auto !important; padding-top: 6px; }
.ev-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  font: 600 14px/1.3 Inter, sans-serif;
  color: var(--sns-brand, #3F7D4E);
  text-decoration: none;
}
.ev-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ev-link:focus-visible { outline: 3px solid rgba(63, 125, 78, .35); outline-offset: 2px; border-radius: 4px; }

.ev-empty {
  margin: 0 0 36px;
  padding: 22px;
  text-align: center;
  font: 500 15px/1.5 Inter, sans-serif;
  color: var(--sns-grey-600, #475569);
  border: 1px dashed var(--sns-grey-300, #CBD5E1);
  border-radius: 14px;
}

/* ------------------------------------------------------- not announced */
.ev-tba { margin: 56px 0 0; }
.ev-sub { margin: 0 0 18px; font-size: 15.5px; line-height: 1.6; color: #56607a; max-width: 70ch; }
.ev-tba-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.ev-tba-item { padding: 16px 18px; border: 1px solid var(--sns-grey-100, #E4E9EF); border-radius: 12px; background: var(--sns-surface-2, #F6F7F2); }
.ev-tba-item p { margin: 0 0 4px; }
.ev-tba-name { font: 700 15.5px/1.35 Poppins, sans-serif; }
.ev-tba-name a { color: #0f172a; text-decoration: none; }
.ev-tba-name a:hover { color: var(--sns-brand, #3F7D4E); text-decoration: underline; text-underline-offset: 3px; }
.ev-tba-line { font: 500 13px/1.45 Inter, sans-serif; color: var(--sns-grey-500, #667085); }
.ev-not { margin: 18px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--sns-grey-600, #475569); }

/* ------------------------------------------------------------ checklist */
.ev-prep { margin: 56px 0 0; max-width: 820px; }
.ev-checklist { list-style: none; counter-reset: ev; margin: 0; padding: 0; display: grid; gap: 12px; }
.ev-checklist li {
  counter-increment: ev;
  position: relative;
  padding-left: 46px;
  min-height: 32px;
  font-size: 16px;
  line-height: 1.6;
  color: #344054;
}
.ev-checklist li::before {
  content: counter(ev);
  position: absolute;
  left: 0;
  top: -1px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sns-blue-100, #E3EEE2);
  color: var(--sns-blue-700, #33683F);
  font: 700 13.5px/1 Inter, sans-serif;
}

/* ----------------------------------------------------------- PDF + demo */
.ev-leads { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 56px 0 0; }
.ev-pdf, .ev-cta { border-radius: 16px; padding: 26px 28px; }
.ev-pdf { background: var(--sns-blue-100, #E3EEE2); border: 1px solid var(--sns-blue-200, #C9DEC8); }
.ev-pdf h2 { font-size: 21px; margin-bottom: 8px; }
.ev-pdf > p { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: #344054; }
.ev-pdf-form { display: flex; flex-wrap: wrap; gap: 10px; }
.ev-pdf-form input[type="email"] {
  flex: 1 1 220px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--sns-grey-300, #CBD5E1);
  border-radius: 10px;
  background: #fff;
  font: 400 15px/1.3 Inter, sans-serif;
  color: #0f172a;
}
.ev-pdf-form input[type="email"]:focus { outline: 3px solid rgba(63, 125, 78, .3); outline-offset: 1px; border-color: var(--sns-brand, #3F7D4E); }
.ev-msg { margin: 0 !important; font: 500 14.5px/1.5 Inter, sans-serif; }
.ev-msg--ok { color: var(--sns-blue-700, #33683F); }
.ev-msg--ok a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.ev-msg--error { color: var(--sns-risk, #BE123C); margin-top: 10px !important; }
/* Forest silk with white type, as the retail news's dark card. The colour
   shows while the image loads. */
.ev-cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  background: #143A2E url('/assets/silk-card.jpg') center / cover no-repeat;
  color: #fff;
}
.ev-cta p { margin: 0; font: 600 19px/1.45 Poppins, sans-serif; letter-spacing: -0.01em; color: #fff; }
.ev-cta .rg-btn { align-self: flex-start; }

/* ------------------------------------------------------------------ FAQ */
.ev-faq { margin: 56px 0 0; max-width: 820px; }
.ev-faq h3 { font: 600 17px/1.4 Poppins, sans-serif; color: #0f172a; margin: 22px 0 6px; }
.ev-faq p { margin: 0; font-size: 16px; line-height: 1.65; color: #344054; }
.ev-footnote {
  margin: 40px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e9ebf1;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--sns-grey-500, #667085);
}

/* --------------------------------------------------------------- phones */
@media (max-width: 860px) {
  .ev-leads { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ev-filters { position: static; padding: 12px; }
  .ev-filter { min-width: 0; flex: 1 1 100%; }
  .ev-cards { grid-template-columns: 1fr; }
  .ev-view { margin-left: 0; }
  .ev-match { padding: 20px 16px 18px; }
  .ev-match-row { flex-direction: column; }
  .ev-match-row .rg-btn { align-self: flex-start; }
  .ev-match-list { grid-template-columns: 1fr; }
  .ev-gantt-inner { min-width: 720px; --ev-label: 170px; }
  .ev-row-label { padding-left: 12px; }
  .ev-card { padding: 18px 16px 16px; }
  .ev-pdf, .ev-cta { padding: 22px 18px; }
  .ev-cta p { font-size: 17px; }
}
