/* Home edition, opt-in and removable. Existing scripts and motion remain unchanged.
   Public cards and administrative previews deliberately share these selectors. */
:where([data-eco-theme="home"], .editorial-public-preview) {
  --eco-ink: #231f1a;
  --eco-ink-soft: #30291f;
  --eco-paper: #e8dfcd;
  --eco-paper-light: #ede8dc;
  --eco-bronze: #b69b72;
  --eco-sand: #c3b49d;
  --eco-line: rgb(182 155 114 / 34%);
  --eco-line-paper: rgb(48 41 31 / 24%);
  --eco-paper-ink: #30291f;
  --eco-paper-muted: #705b3e;
}

[data-eco-theme="home"] .ecosystem-section {
  padding-block: clamp(72px, 7.5vw, 126px);
}

[data-eco-theme="home"] .ecosystem-section-header {
  gap: clamp(28px, 6vw, 96px);
  margin-bottom: clamp(38px, 5vw, 72px);
}

[data-eco-theme="home"] .eco-hero {
  padding-block: clamp(38px, 5vw, 80px) clamp(64px, 7vw, 112px);
}

[data-eco-theme="home"] .eco-hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(32px, 5vw, 84px);
}

[data-eco-theme="home"] .eco-hero-copy .display-title {
  max-width: 13ch;
  font-size: clamp(54px, 5.9vw, 106px);
  line-height: 1.02;
}

[data-eco-theme="home"] .eco-hero-status {
  margin-top: clamp(32px, 4vw, 58px);
}

[data-eco-theme="home"] .eco-hero-card {
  border: 7px solid var(--eco-paper);
  outline: 1px solid var(--eco-line);
  box-shadow: 0 22px 54px rgb(7 6 5 / 24%);
}

[data-eco-theme="home"] .ecosystem-index-wrap {
  border-block: 1px solid var(--eco-line);
  background: rgb(35 31 26 / 96%);
}

/* A news desk on beige paper, followed by the brown press room. */
[data-eco-theme="home"] .eco-news {
  color: var(--eco-paper-ink);
  background:
    linear-gradient(to bottom, rgb(48 41 31 / 4%), transparent 140px),
    var(--eco-paper);
}

[data-eco-theme="home"] .eco-news :is(.eco-kicker, .section-title em, .eco-meta, .eco-arrow, .eco-rail-status, .eco-rail-status strong) {
  color: var(--eco-paper-muted);
}

[data-eco-theme="home"] .eco-news .section-intro {
  color: var(--eco-paper-ink);
}

[data-eco-theme="home"] .eco-news :is(.eco-headlines, .eco-headline, .eco-rail-toolbar, .eco-round-button) {
  border-color: var(--eco-line-paper);
}

[data-eco-theme="home"] .eco-news .eco-headline {
  color: var(--eco-paper-ink);
}

[data-eco-theme="home"] .eco-news .eco-headline > span:first-child {
  color: var(--eco-paper-muted);
}

[data-eco-theme="home"] .eco-news .eco-headline:is(:hover, :focus-visible, .is-active, .is-current, [aria-pressed="true"]) {
  color: var(--eco-paper-ink);
  background: rgb(48 41 31 / 6%);
}

[data-eco-theme="home"] .eco-news .eco-round-button {
  color: var(--eco-paper-muted);
}

[data-eco-theme="home"] .eco-news .eco-round-button:is(:hover, :focus-visible) {
  color: var(--eco-paper);
  background: var(--eco-ink-soft);
}

[data-eco-theme="home"] .eco-news-feature {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(28px, 4vw, 64px);
  margin-bottom: clamp(44px, 6vw, 84px);
}

[data-eco-theme="home"] .eco-news-feature-media {
  min-height: clamp(350px, 38vw, 570px);
  border: 8px solid var(--eco-ink-soft);
  border-radius: 42% 42% 0 0 / 16% 16% 0 0;
}

[data-eco-theme="home"] .eco-news-feature-media img {
  object-fit: contain;
}

[data-eco-theme="home"] .eco-news-feature-media figcaption {
  color: var(--eco-paper);
}

/* Same image frame, paper copy and bronze rules in the site and admin preview. */
:where([data-eco-theme="home"], .editorial-public-preview) .eco-news-card {
  grid-template-rows: auto 1fr;
  min-height: 0;
  border-color: var(--eco-line-paper);
  color: var(--eco-paper-ink);
  background: var(--eco-paper-light);
  box-shadow: 0 12px 30px rgb(48 41 31 / 12%);
}

:where([data-eco-theme="home"], .editorial-public-preview) :is(.eco-news-card-media, .editorial-card-image) {
  display: block;
  min-height: 0;
  aspect-ratio: 3 / 2;
  background: var(--eco-ink-soft);
}

:where([data-eco-theme="home"], .editorial-public-preview) :is(.eco-news-card-media, .editorial-card-image) picture {
  display: block;
  height: 100%;
}

:where([data-eco-theme="home"], .editorial-public-preview) :is(.eco-news-card-media, .editorial-card-image) img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}

:where([data-eco-theme="home"], .editorial-public-preview) :is(.eco-news-card, .editorial-card):is(:hover, :focus-within) img {
  transform: none;
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-news-card-copy {
  gap: 16px 22px;
  padding: clamp(24px, 2.4vw, 38px);
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-news-card h3 {
  max-width: 23ch;
  font-size: clamp(28px, 2.6vw, 42px);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-news-card :is(p, .eco-meta, .eco-news-card-number, .editorial-read-link) {
  color: var(--eco-paper-muted);
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-news-card-footer {
  flex-wrap: wrap;
  border-color: var(--eco-line-paper);
}

[data-eco-theme="home"] .eco-agenda {
  border-top: 3px double var(--eco-line-paper);
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-agenda-card {
  min-height: 430px;
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-agenda-card p {
  opacity: 1;
}

[data-eco-theme="home"] .eco-press-grid {
  align-items: stretch;
}

:where([data-eco-theme="home"], .editorial-public-preview) :is(.eco-press-card, .eco-press-card:nth-child(n)) {
  --press-offset: 0px;
  align-content: start;
  gap: 24px;
  min-height: 0;
  padding: clamp(22px, 2.5vw, 36px);
  color: var(--eco-paper-light);
  background: var(--eco-ink-soft);
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-press-card-media {
  position: relative;
  inset: auto;
  width: 100%;
  aspect-ratio: 3 / 2;
  opacity: 1;
  background: var(--eco-ink);
  transform: none;
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-press-card-media::after {
  display: none;
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-press-card-media picture {
  display: block;
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-press-card-media img {
  object-fit: contain;
  filter: none;
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-press-card:is(:hover, :focus-within, .is-active, .is-open) .eco-press-card-media {
  opacity: 1;
  transform: none;
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-press-trigger {
  gap: 28px;
  min-height: 280px;
}

:where([data-eco-theme="home"], .editorial-public-preview) .eco-press-title {
  max-width: 22ch;
  font-size: clamp(28px, 2.4vw, 39px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

[data-eco-theme="home"] .eco-press-js .eco-press-card.is-open .eco-press-drawer {
  max-height: 340px;
}

[data-eco-theme="home"] .eco-press-contact {
  margin-top: clamp(54px, 6vw, 92px);
}

:where([data-eco-theme="home"], .editorial-public-preview) .editorial-card {
  border-color: var(--eco-line-paper);
  color: var(--eco-paper-ink);
  background: var(--eco-paper-light);
  box-shadow: 0 8px 24px rgb(48 41 31 / 8%);
}

:where([data-eco-theme="home"], .editorial-public-preview) .editorial-card :is(.editorial-card-meta, p, .editorial-read-link, .editorial-event-badge) {
  color: var(--eco-paper-muted);
}

/* Reading and category archives use a continuous beige sheet, dark navigation. */
.editorial-page[data-eco-theme="home"] .editorial-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: max(var(--softown-gutter), calc((100vw - 1440px) / 2));
  color: var(--eco-paper-ink);
  background: var(--eco-paper);
  color-scheme: light;
}

.editorial-page[data-eco-theme="home"] :is(.editorial-main .eyebrow, .editorial-article-lead, .editorial-article-meta, .editorial-article-image figcaption, .editorial-breadcrumb, .editorial-results-count, .editorial-source, .editorial-source a, .editorial-bottom-contact, .editorial-bottom-contact a, .editorial-error > p:not(.eyebrow)) {
  color: var(--eco-paper-muted);
}

.editorial-page[data-eco-theme="home"] .editorial-archive-header > p:last-child {
  color: var(--eco-paper-ink);
}

.editorial-page[data-eco-theme="home"] :is(.editorial-category-nav, .editorial-category-nav a, .editorial-source, .editorial-related, .editorial-bottom-contact, .editorial-event-badge) {
  border-color: var(--eco-line-paper);
}

.editorial-page[data-eco-theme="home"] .editorial-category-nav a {
  color: var(--eco-paper-ink);
}

.editorial-page[data-eco-theme="home"] .editorial-event-badge {
  color: var(--eco-paper-muted);
}

.editorial-page[data-eco-theme="home"] .editorial-category-nav a:is([aria-current="page"], :hover, :focus-visible) {
  color: var(--eco-paper-light);
  background: var(--eco-ink-soft);
}

.editorial-page[data-eco-theme="home"] .editorial-article-header {
  max-width: 1100px;
  margin-inline: auto;
}

.editorial-page[data-eco-theme="home"] .editorial-article-header h1 {
  max-width: 22ch;
  font-size: clamp(38px, 5vw, 76px);
  line-height: 1.08;
}

.editorial-page[data-eco-theme="home"] .editorial-article-image {
  max-width: 1200px;
  margin-inline: auto;
}

.editorial-page[data-eco-theme="home"] .editorial-article-image picture {
  max-height: none;
  aspect-ratio: auto;
  background: var(--eco-ink-soft);
}

.editorial-page[data-eco-theme="home"] .editorial-article-image img {
  width: 100%;
  height: auto;
  max-height: 780px;
  object-fit: contain;
}

.editorial-page[data-eco-theme="home"] .editorial-body {
  color: var(--eco-paper-ink);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.85;
}

.editorial-page[data-eco-theme="home"] .editorial-event-details {
  border-color: var(--eco-line-paper);
  background: var(--eco-paper-light);
}

.editorial-page[data-eco-theme="home"] .editorial-event-details :is(dt, .editorial-event-note) {
  color: var(--eco-paper-muted);
  border-color: var(--eco-line-paper);
}

.editorial-page[data-eco-theme="home"] .editorial-primary-link {
  color: var(--eco-paper-light);
  background: var(--eco-ink-soft);
}

[data-eco-theme="home"] :is(.eco-news, .paper-panel, .editorial-main) :focus-visible {
  outline-color: var(--eco-paper-ink);
}

@media (max-width: 1180px) {
  [data-eco-theme="home"] .eco-news-feature {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  [data-eco-theme="home"] .eco-hero-grid {
    grid-template-columns: 1fr;
  }
  [data-eco-theme="home"] .eco-hero-copy .display-title {
    max-width: 16ch;
  }
}

@media (max-width: 680px) {
  [data-eco-theme="home"] .ecosystem-section {
    padding-block: 64px;
  }
  [data-eco-theme="home"] .eco-hero-copy .display-title {
    font-size: clamp(46px, 12vw, 72px);
  }
  [data-eco-theme="home"] .ecosystem-index-wrap {
    margin-inline: 0;
  }
  [data-eco-theme="home"] .eco-news-feature-media {
    min-height: 360px;
  }
  :where([data-eco-theme="home"], .editorial-public-preview) .eco-news-card-copy {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 16px;
    padding: 24px;
  }
  :where([data-eco-theme="home"], .editorial-public-preview) .eco-press-trigger {
    min-height: 240px;
  }
}
