/* STOFIE Newsletter Block — Design C (scoped; RUCSS-safe; mobile-safe) */
.stofie-nb {
  --stofie-nb-orange: #E67E22;
  --stofie-nb-ink: #1a1a1a;
  --stofie-nb-muted: #667085;
  --stofie-nb-line: #E8E8E8;
  --stofie-nb-bg: #F7F7F8;
  --stofie-nb-active: #FFF7EF;
  box-sizing: border-box;
  width: 100%;
  max-width: 1100px;
  margin: 28px 0 8px;
  padding: 0 4px;
  color: var(--stofie-nb-ink);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  overflow-x: hidden;
}
.stofie-nb *,
.stofie-nb *::before,
.stofie-nb *::after {
  box-sizing: border-box;
}
.stofie-nb__badge {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--stofie-nb-line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--stofie-nb-muted);
  margin-bottom: 12px;
  max-width: 100%;
}
.stofie-nb__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--stofie-nb-ink);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.stofie-nb__sub {
  color: var(--stofie-nb-muted);
  margin: 0 0 16px;
  font-size: 0.95rem;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.stofie-nb__shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--stofie-nb-line);
  border-radius: 14px;
  overflow: hidden;
  min-height: 320px;
  width: 100%;
  max-width: 100%;
}
.stofie-nb__list,
.stofie-nb__preview {
  min-width: 0; /* prevent CSS grid blowout on iOS */
  max-width: 100%;
}
.stofie-nb__list {
  border-right: 1px solid var(--stofie-nb-line);
  background: #fff;
}
.stofie-nb__item {
  display: block;
  width: 100%;
  max-width: 100%;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--stofie-nb-line);
  border-left: 3px solid transparent;
  padding: 14px 16px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  overflow: hidden;
}
.stofie-nb__item:hover {
  background: #fafafa;
}
.stofie-nb__item.is-active {
  background: var(--stofie-nb-active);
  border-left-color: var(--stofie-nb-orange);
}
.stofie-nb__meta {
  font-size: 12px;
  color: var(--stofie-nb-muted);
  margin-bottom: 4px;
}
.stofie-nb__subj {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.stofie-nb__snip {
  font-size: 13px;
  color: var(--stofie-nb-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.stofie-nb__preview {
  padding: 18px;
  background: #fff;
  overflow: hidden;
}
.stofie-nb__label {
  font-size: 12px;
  color: var(--stofie-nb-muted);
  margin-bottom: 10px;
}
.stofie-nb__shot {
  border: 1px dashed #f0c39a;
  border-radius: 10px;
  background: var(--stofie-nb-bg);
  padding: 10px;
  margin: 0 0 14px;
  width: 100%;
  max-width: 100%;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}
.stofie-nb__shot-img {
  display: block;
  width: auto !important;
  max-width: 100%;
  height: auto !important;
  max-height: 100%;
  object-fit: contain;
  object-position: top center;
  border-radius: 6px;
  margin: 0 auto;
  flex: 0 1 auto;
}
.stofie-nb__shot-placeholder {
  font-size: 12px;
  color: #999;
  padding: 24px;
  text-align: center;
  max-width: 100%;
}
.stofie-nb__preview-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.stofie-nb__preview-sum {
  margin: 0 0 14px;
  color: var(--stofie-nb-muted);
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.stofie-nb__btn {
  display: inline-block;
  max-width: 100%;
  background: var(--stofie-nb-orange);
  color: #fff !important;
  text-decoration: none !important;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
}
.stofie-nb__btn:hover {
  filter: brightness(0.95);
  color: #fff !important;
}
.stofie-nb__btn.is-hidden {
  display: none !important;
}
@media (max-width: 800px) {
  .stofie-nb {
    margin: 20px 0 8px;
    padding: 0 12px;
    width: 100%;
    max-width: 100%;
  }
  .stofie-nb__shell {
    grid-template-columns: 1fr;
    min-height: 0;
    width: 100%;
    max-width: 100%;
  }
  .stofie-nb__list {
    border-right: 0;
    border-bottom: 1px solid var(--stofie-nb-line);
  }
  .stofie-nb__preview {
    padding: 14px 12px 16px;
  }
  .stofie-nb__shot {
    padding: 8px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
  }
  .stofie-nb__shot-img {
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    max-height: 100%;
    object-fit: contain;
    object-position: top center;
    margin: 0 auto;
    display: block;
    flex: 0 1 auto;
  }
  .stofie-nb__item {
    padding: 12px 14px;
  }
}
