:root {
  --bg: #f4efe8;
  --bg-soft: #fbf8f2;
  --ink: #111918;
  --muted: #626968;
  --accent: #18574f;
  --accent-soft: #d8ebe6;
  --line: rgba(17, 25, 24, 0.12);
  --shadow: 0 24px 60px rgba(17, 25, 24, 0.06);
  --max-width: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background: rgba(232, 234, 236, 0.88);
  color: var(--ink);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(24, 87, 79, 0.08), transparent 28%),
    linear-gradient(180deg, #faf6ef 0%, var(--bg) 52%, #eee7de 100%);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  width: auto;
  height: auto;
  clip: auto;
  margin: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  z-index: 20;
}

.site-header,
.feature-story,
.categories,
.latest-posts,
.editorial-band,
.newsletter,
.site-footer,
.article-shell,
.article-related {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  width: 100%;
  padding-left: clamp(1rem, 4vw, 3.75rem);
  padding-right: clamp(1rem, 4vw, 3.75rem);
  background: linear-gradient(180deg, rgba(10, 22, 21, 0.98), rgba(15, 34, 32, 0.97));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 45px rgba(5, 12, 12, 0.24);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink), var(--accent));
  color: #fff;
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
}

.eyebrow,
.hero-tag,
.feature-label,
.post-meta {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.55rem;
}

.brand-name {
  display: inline-block;
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #f7f2ea;
}

.top-nav,
.hero-actions,
.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-nav a {
  color: rgba(247, 242, 234, 0.8);
  font-weight: 600;
}

.site-header .eyebrow {
  color: rgba(247, 242, 234, 0.5);
}

.hero {
  width: min(calc(100% - 2rem), 1320px);
  min-height: auto;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(320px, 0.95fr);
  align-items: start;
  gap: 2rem;
  padding: 1.4rem 0 1.2rem;
}

.section-heading h2,
.feature-copy h3,
.newsletter h2,
.article-header h1,
.article-body h2,
.band-lead h2 {
  font-family: "Fraunces", serif;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
}

.hero-text,
.feature-copy p,
.post-row-main p,
.band-columns p,
.newsletter-copy p,
.article-meta,
.article-body p,
.article-body li,
.section-heading p {
  color: var(--muted);
}

.hero-text {
  max-width: 42rem;
  font-size: 1rem;
  margin: 0.35rem 0 0;
}

.market-widget-shell {
  padding: 0.9rem 1rem 0.7rem;
  border: 1px solid rgba(17, 25, 24, 0.08);
  border-radius: 1.7rem;
  background: #48494B;
  box-shadow: 0 18px 42px rgba(17, 25, 24, 0.08);
}

.market-widget-shell h2 {
  margin: 0 0 0.9rem;
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  line-height: 1.05;
  color: #f5f3ef;
}

.market-widget-label {
  margin: 0 0 0.45rem;
  color: rgba(245, 243, 239, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}

.market-widget {
  min-height: 156px;
  overflow: hidden;
  border-radius: 1rem;
}

.tradingview-widget-copyright {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: rgba(245, 243, 239, 0.55);
}

.tradingview-widget-copyright a {
  color: rgba(245, 243, 239, 0.55);
}

.hero-actions {
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.button-secondary {
  background: transparent;
  border: 1px solid var(--line);
}

.feature-story,
.categories,
.latest-posts,
.editorial-band,
.newsletter,
.article-related {
  padding: 3rem 0;
}

.anchor-section {
  scroll-margin-top: 5.5rem;
}

.top-latest {
  padding-top: 0.5rem;
}

.top-latest .section-heading {
  margin-bottom: 1rem;
}

.section-heading {
  max-width: 42rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.feature-layout,
.band-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 2rem;
}

.feature-copy,
.newsletter-form,
.article-body,
.article-related-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 1.8rem;
  box-shadow: var(--shadow);
}

.feature-copy,
.article-body,
.article-related-card {
  padding: 1.8rem;
}

.feature-copy h3,
.post-row h3,
.article-related-card h3 {
  font-size: clamp(1.55rem, 2.2vw, 2.1rem);
  margin-bottom: 1rem;
}

.feature-panel {
  padding-top: 0.2rem;
  border-top: 1px solid var(--line);
}

.feature-kicker {
  margin: 0 0 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.feature-quote {
  margin: 0 0 1.25rem;
  font-size: 1.28rem;
  line-height: 1.35;
  font-family: "Fraunces", serif;
}

.feature-points,
.article-body ul {
  margin: 0;
  padding-left: 1.2rem;
}

.feature-points li,
.article-body li {
  margin-bottom: 0.8rem;
}

.category-grid,
.article-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.category-grid article {
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}

.category-grid h3 {
  margin: 0 0 0.6rem;
  font-size: 1.12rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  color: var(--accent);
}

.text-link::after {
  content: "->";
  transition: transform 180ms ease;
}

.text-link:hover::after,
.text-link:focus-visible::after {
  transform: translateX(0.18rem);
}

.post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, opacity 240ms ease;
}

.post-card h3,
.post-card p {
  margin: 0;
}

.post-card:hover,
.post-card:focus-visible {
  transform: scale(1.03);
  box-shadow: 0 28px 70px rgba(17, 25, 24, 0.1);
}

.editorial-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.band-lead h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, auto);
  align-items: center;
  gap: 2rem;
}

.about-band {
  margin-bottom: 3rem;
}

.newsletter-form {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem;
  min-width: min(100%, 30rem);
  background: rgba(255, 255, 255, 0.74);
}

.newsletter-form input {
  flex: 1;
  min-width: 12rem;
  border: none;
  background: transparent;
  padding: 0 0.4rem;
  font: inherit;
  color: var(--ink);
}

.newsletter-form input:focus {
  outline: none;
}

.site-footer {
  padding: 2rem 0 3rem;
  display: grid;
  gap: 0.8rem;
  border-top: 1px solid var(--line);
}

.footer-note {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  padding: 2rem 0 4rem;
}

.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: clamp(2.7rem, 6vw, 5rem);
  max-width: 11ch;
}

.article-meta {
  margin-top: 1rem;
}

.article-lead {
  font-size: 1.18rem;
  margin-top: 1rem;
}

.article-body h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 2rem 0 0.8rem;
}

.article-body p {
  margin: 0 0 1rem;
}

.article-back {
  margin-bottom: 1.5rem;
}

.article-related-grid {
  margin-top: 1.5rem;
}

.stocks-shell {
  padding-top: 2rem;
}

.stocks-directory {
  width: 100%;
}

.stocks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.stock-entry {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
}

.stock-entry h3,
.stock-entry p {
  margin-top: 0;
}

@media (max-width: 980px) {
  .site-header,
  .hero,
  .feature-layout,
  .category-grid,
  .band-columns,
  .newsletter,
  .article-related-grid,
  .editorial-band,
  .stocks-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
    width: 100%;
    background: linear-gradient(180deg, rgba(10, 22, 21, 0.98), rgba(15, 34, 32, 0.97));
    backdrop-filter: none;
  }

  .hero {
    min-height: auto;
    padding-top: 1rem;
    grid-template-columns: 1fr;
  }

  .post-list {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    min-width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-copy h1,
  .article-header h1 {
    max-width: none;
  }

  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
  }
}
