/*
 * Minimal shared shadow-root reset, prepended once to the bundled
 * `ds.css` every component links to (see `scripts/build-ds-css.mjs` in
 * src). The design-system skill requires a single global reset
 * (`global.css`), but that is light-DOM only and cannot reach into a
 * shadow root. This is the shadow-DOM equivalent: box-sizing plus a
 * token-driven focus ring.
 *
 * Focus-ring color on inverse surfaces is not handled with `:host-context`
 * here: `ds-section[data-surface="inverse"]` re-points the
 * `--elvaio-color-focus` custom property for its whole subtree, and every
 * component (light or shadow DOM) that reads that token for its focus ring
 * inherits the override automatically, because custom properties inherit
 * through shadow boundaries.
 */
:host {
  box-sizing: border-box;
}

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

:host(:focus-visible) {
  outline: var(--elvaio-focus-width) solid var(--elvaio-color-focus);
  outline-offset: 2px;
  border-radius: var(--elvaio-radius-field);
}


:host {
  display: block;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: var(--elvaio-space-03);
  min-height: 13.75rem;
  padding: var(--elvaio-space-06);
  background: var(--elvaio-color-card);
  border: 1px solid var(--elvaio-color-border-control);
  border-radius: var(--elvaio-radius-card);
  color: var(--elvaio-color-text);
  text-decoration: none;
}

.article-card:hover {
  border-color: var(--elvaio-color-text);
}

:host([featured]) .article-card {
  min-height: 17.5rem;
  background: var(--elvaio-color-band-inverse);
  color: var(--elvaio-color-text-inverse);
  border-color: transparent;
}

.category {
  font-family: var(--elvaio-font-mono);
  font-size: var(--elvaio-font-size-label);
  letter-spacing: var(--elvaio-letter-spacing-label);
  text-transform: uppercase;
  color: var(--elvaio-color-accent-text);
}

:host([featured]) .category {
  color: var(--elvaio-color-accent);
}

.title {
  flex-grow: 1;
  font-family: var(--elvaio-font-title);
  font-weight: var(--elvaio-font-weight-title);
  font-size: var(--elvaio-font-size-title-body);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.meta {
  display: flex;
  gap: var(--elvaio-space-03);
  justify-content: space-between;
  align-items: center;
  font-size: var(--elvaio-font-size-small);
  color: var(--elvaio-color-text-muted);
}

:host([featured]) .meta {
  color: var(--elvaio-color-text-inverse-muted);
}

.go {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--elvaio-color-accent-text);
  flex: none;
}

:host([featured]) .go {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--elvaio-color-accent);
  color: var(--elvaio-color-on-accent);
}
