@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap");

/* Newsletter (web version) — all rules are namespaced to avoid conflicts */
.css-web-newsletter {
  /* color palette tuned for long-form reading */
  --css-web-text: #0f172a; /* slate-900 */
  --css-web-subtle: #475569; /* slate-600 */
  --css-web-border: #e2e8f0; /* slate-200 */
  --css-web-bg: #f1f5f9; /* slate-100, reading surface */
  --css-web-card: #ffffff;
  --css-web-primary: #0f172a; /* neutral primary for high contrast */
  color: var(--css-web-text);
}

.css-web-container {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  padding: 24px 16px;
  background-color: var(--css-web-bg); /* reading surface over site dark bg */
  border: 1px solid var(--css-web-border);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(2, 6, 23, 0.08);
}

.css-web-card {
  background-color: var(--css-web-card);
  border: 1px solid var(--css-web-border);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.css-web-hero {
  text-align: center;
  padding: 16px 12px 4px 12px;
}

.css-web-hero-logo {
  width: 64px;
  height: 64px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 4px;
  margin-bottom: 12px;
}

.css-web-surtitle {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system,
    Segoe UI, Roboto, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--css-web-subtle);
}

.css-web-title {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system,
    Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 6px 0 10px 0;
}

.css-web-date {
  color: var(--css-web-subtle);
  font-size: 14px;
}

.css-web-headline {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system,
    Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.35;
  text-align: center;
  letter-spacing: -0.005em;
  margin: 0 0 18px 0;
}

.css-web-prose {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.66; /* tighter for better density */
  letter-spacing: 0.003em;
  color: var(--css-web-text);
}

.css-web-engaging {
  font-family: Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.78;
  letter-spacing: 0.005em;
  color: var(--css-web-text);
}

.css-web-prose p {
  margin: 0 0 1em 0;
}
.css-web-prose strong {
  font-weight: 700;
}
.css-web-prose em {
  font-style: italic;
}
.css-web-prose a {
  color: #0f172a;
  text-decoration: underline;
}
.css-web-prose ul,
.css-web-prose ol {
  padding-left: 1.25rem;
  margin: 0 0 1.1em 0;
}
.css-web-prose li {
  margin: 0.25em 0;
}

.css-web-edito {
  background: rgba(17, 17, 17, 0.04);
  border: 1px solid var(--css-web-border);
  border-radius: 12px;
  padding: 20px;
}

.css-web-card p,
.css-web-card li {
  color: var(--css-web-text);
}

.css-web-card a {
  color: #017953;
  text-decoration: underline;
}

.css-web-card h1,
.css-web-card h2,
.css-web-card h3 {
  color: #20283b;
}

.css-web-section-title {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system,
    Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  color: #0f172a;
  margin: 24px 0 12px 0;
}

.css-web-stock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  margin-left: -8px; /* slightly wider than prose */
  margin-right: -8px;
  background: rgba(2, 6, 23, 0.03);
  border-left: 3px solid var(--css-web-border);
  border-radius: 10px;
}

.css-web-stock h3 {
  margin: 0;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system,
    Segoe UI, Roboto, Arial, sans-serif;
  font-size: 18px;
  font-weight: 600; /* subtler */
  letter-spacing: -0.01em;
}

.css-web-highlight {
  background: #fff8e1;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 18px;
}

.css-web-video img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--css-web-border);
}

.css-web-card-footer {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--css-web-border);
  color: var(--css-web-subtle);
}

.css-web-cta {
  background: #e0e7ff; /* indigo-100 for better contrast on slate-100 */
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 18px;
}

.css-web-cta .btn-primary {
  background-color: var(--css-web-primary);
  border-color: var(--css-web-primary);
}
.css-web-cta .btn-primary:hover {
  filter: brightness(0.95);
}

.css-web-bg-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system,
    Segoe UI, Roboto, Arial, sans-serif;
  font-size: 72px;
  font-weight: 800;
  color: #111;
  opacity: 0.04;
  user-select: none;
  pointer-events: none;
}

.css-web-nav {
  text-align: center;
}

/* Responsive tweaks */
@media (min-width: 960px) {
  .css-web-title {
    font-size: 40px;
  }
  .css-web-headline {
    font-size: 26px;
  }
  .css-web-stock {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 28px;
    padding-right: 28px;
  }
}

/* Page: Newsletter Index */
.css-web-index-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem auto;
}
.css-web-index-header .lead {
  color: var(--css-web-subtle);
  font-family: "Source Serif 4", serif;
}

.css-web-newscard {
  background-color: var(--css-web-bg);
  border: 1px solid var(--css-web-border);
  border-radius: 14px;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.css-web-newscard:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.css-web-newscard .card-meta {
  font-family: "Space Grotesk", sans-serif;
  color: var(--css-web-subtle);
}

.css-web-newscard .card-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--css-web-text);
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.css-web-newscard .card-excerpt {
  flex-grow: 1;
  font-family: "Source Serif 4", serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--css-web-subtle);
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  overflow: hidden;
}

/* supporting small enhancements */
.css-web-engaging {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--css-web-text);
  opacity: 0.9;
}

/* Blog-style cards for the newsletter index */
.css-web-index-card {
  background-color: #f1f5f9; /* slate-100 */
  border: 1px solid #e2e8f0; /* slate-200 */
  border-radius: 16px;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: #0f172a; /* slate-900 */
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.css-web-index-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.06),
    0 0 0 8px rgba(18, 206, 143, 0.286); /* emerald halo */
}

.css-web-index-card-meta {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system,
    Segoe UI, Roboto, Arial, sans-serif;
  font-size: 0.875rem;
  color: #475569; /* slate-600 */
}

.css-web-index-card-title {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system,
    Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  color: #21252f;
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 8px 0 10px 0;
}

.css-web-index-card-excerpt {
  flex-grow: 1;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #334155; /* slate-700 for body against light bg */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5; /* fixed visual height */
  overflow: hidden;
}

@media (min-width: 960px) {
  .css-web-index-card-title {
    font-size: 1.35rem;
  }
}
