/* Article listing card treatment only. Does not style standalone article-reading pages. */
body.articles-page #articlesGrid.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 1.15rem;
  width: 100%;
}
body.articles-page #articlesGrid .article-card--horizontal {
  display: grid;
  grid-template-columns: minmax(104px, 30%) minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(105, 129, 164, .15) !important;
  border-radius: 26px !important;
  background: linear-gradient(135deg, #fff 0%, #fbfdff 62%, #f1f7ff 100%) !important;
  color: #202226 !important;
  box-shadow: 0 9px 24px rgba(62, 112, 170, .10),
              0 2px 5px rgba(31, 47, 67, .055),
              inset 0 1px 0 rgba(255,255,255,.96) !important;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
body.articles-page #articlesGrid .article-card--horizontal:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(49, 91, 234, .24) !important;
  box-shadow: 0 16px 34px rgba(62, 112, 170, .16),
              0 5px 12px rgba(31, 47, 67, .07),
              inset 0 1px 0 rgba(255,255,255,.96) !important;
}
body.articles-page #articlesGrid .article-card__media {
  position: relative;
  display: block;
  align-self: stretch;
  min-width: 0;
  min-height: 150px;
  margin: 10px 0 10px 10px;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255,107,53,.78), transparent 46%),
              radial-gradient(circle at 70% 28%, rgba(255,183,3,.52), transparent 28%), #15171b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 2px 8px rgba(0,0,0,.10);
}
body.articles-page #articlesGrid .article-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transition: transform .35s ease;
}
body.articles-page #articlesGrid .article-card--horizontal:hover .article-card__image { transform: scale(1.035); }
body.articles-page #articlesGrid .article-card__category {
  position: absolute;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 7px;
  background: rgba(18,20,24,.76);
  color: #fff;
  font: 700 .58rem/1.1 "Space Grotesk", sans-serif;
  letter-spacing: .045em;
  text-transform: uppercase;
}
body.articles-page #articlesGrid .article-card__media-mark {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #ff6b35;
  color: #17191d;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
}
body.articles-page #articlesGrid .article-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 16px 17px 15px !important;
  box-sizing: border-box;
}
body.articles-page #articlesGrid .article-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 10px;
  width: 100%;
  margin: 0 0 9px;
  color: #7b8798;
  font: 700 .58rem/1.35 "Space Grotesk", sans-serif;
  letter-spacing: .055em;
  text-transform: uppercase;
}
body.articles-page #articlesGrid .article-card__category-text { color: #2474f5; }
body.articles-page #articlesGrid .article-card__title {
  margin: 0;
  color: #202226 !important;
  font: 700 clamp(1rem, 1.12vw, 1.28rem)/1.22 "Space Grotesk", sans-serif !important;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
body.articles-page #articlesGrid .article-card__title a { color: inherit !important; text-decoration: none; }
body.articles-page #articlesGrid .article-card__title a:hover { color: #b9441f !important; }
body.articles-page #articlesGrid .article-card__author {
  margin: 6px 0 0 !important;
  color: #7b8798 !important;
  font: 600 .7rem/1.45 "Space Grotesk", sans-serif !important;
}
body.articles-page #articlesGrid .article-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: 8px 0 11px !important;
  color: #68768a !important;
  font: 400 .75rem/1.55 "Merriweather", Georgia, serif !important;
}
body.articles-page #articlesGrid .article-card__read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 2px;
  border-bottom: 1px solid #ff6b35;
  color: #2474f5 !important;
  font: 700 .65rem/1.6 "Space Grotesk", sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .015em;
}
body.articles-page #articlesGrid .article-card__read span { color: #ff6b35; font-size: .9rem; }

/* Dark theme: softly raised graphite cards, with restrained blue ambient depth. */
html[data-theme="dark"] body.articles-page #articlesGrid .article-card--horizontal {
  background: linear-gradient(135deg, #272b32 0%, #20242b 58%, #1d2127 100%) !important;
  color: #f5f6f8 !important;
  border-color: rgba(190,205,230,.075) !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.28),
              0 2px 7px rgba(74,110,160,.10),
              inset 0 1px 0 rgba(255,255,255,.055) !important;
}
html[data-theme="dark"] body.articles-page #articlesGrid .article-card--horizontal:hover {
  border-color: rgba(72,127,255,.25) !important;
  box-shadow: 0 15px 34px rgba(0,0,0,.34),
              0 5px 17px rgba(45,99,210,.13),
              inset 0 1px 0 rgba(255,255,255,.06) !important;
}
html[data-theme="dark"] body.articles-page #articlesGrid .article-card__title,
html[data-theme="dark"] body.articles-page #articlesGrid .article-card__title a { color: #f5f6f8 !important; }
html[data-theme="dark"] body.articles-page #articlesGrid .article-card__title a:hover { color: #ff8a61 !important; }
html[data-theme="dark"] body.articles-page #articlesGrid .article-card__meta,
html[data-theme="dark"] body.articles-page #articlesGrid .article-card__author { color: #a5adbb !important; }
html[data-theme="dark"] body.articles-page #articlesGrid .article-card__excerpt { color: #b2bac7 !important; }
html[data-theme="dark"] body.articles-page #articlesGrid .article-card__category-text,
html[data-theme="dark"] body.articles-page #articlesGrid .article-card__read { color: #6ea2ff !important; }
html[data-theme="dark"] body.articles-page #articlesGrid .article-card__read span { color: #ff8a61 !important; }

/* Light theme: paper-white surfaces, cool soft shadows and legible ink. */
html[data-theme="light"] body.articles-page #articlesGrid .article-card--horizontal {
  background: linear-gradient(135deg, #fff 0%, #fcfdff 60%, #f1f7ff 100%) !important;
  color: #202226 !important;
  border-color: rgba(105,129,164,.15) !important;
  box-shadow: 0 10px 26px rgba(66,120,184,.12),
              0 2px 6px rgba(31,47,67,.055),
              inset 0 1px 0 rgba(255,255,255,.98) !important;
}
html[data-theme="light"] body.articles-page #articlesGrid .article-card__title,
html[data-theme="light"] body.articles-page #articlesGrid .article-card__title a { color: #202226 !important; }
html[data-theme="light"] body.articles-page #articlesGrid .article-card__meta,
html[data-theme="light"] body.articles-page #articlesGrid .article-card__author { color: #7b8798 !important; }
html[data-theme="light"] body.articles-page #articlesGrid .article-card__excerpt { color: #68768a !important; }
html[data-theme="light"] body.articles-page #articlesGrid .article-card__category-text,
html[data-theme="light"] body.articles-page #articlesGrid .article-card__read { color: #2474f5 !important; }
html[data-theme="light"] body.articles-page #articlesGrid .article-card__read span { color: #ff6b35 !important; }

@media (max-width: 1050px) {
  body.articles-page #articlesGrid.articles-grid { grid-template-columns: 1fr; }
  body.articles-page #articlesGrid .article-card--horizontal { grid-template-columns: minmax(112px, 25%) minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body.articles-page #articlesGrid.articles-grid { gap: 14px; }
  body.articles-page #articlesGrid .article-card--horizontal {
    grid-template-columns: 94px minmax(0, 1fr);
    border-radius: 21px !important;
  }
  body.articles-page #articlesGrid .article-card__media { min-height: 148px; margin: 8px 0 8px 8px; border-radius: 14px; }
  body.articles-page #articlesGrid .article-card__body { padding: 12px 12px 12px !important; }
  body.articles-page #articlesGrid .article-card__meta { font-size: .53rem; gap: 4px; }
  body.articles-page #articlesGrid .article-card__title { font-size: 1rem !important; line-height: 1.22 !important; }
  body.articles-page #articlesGrid .article-card__author { font-size: .66rem !important; }
  body.articles-page #articlesGrid .article-card__excerpt { -webkit-line-clamp: 3; font-size: .68rem !important; line-height: 1.5 !important; }
  body.articles-page #articlesGrid .article-card__category { top: 7px; left: 7px; padding: 4px 5px; font-size: .48rem; }
  body.articles-page #articlesGrid .article-card__media-mark { width: 23px; height: 23px; right: 6px; bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  body.articles-page #articlesGrid .article-card--horizontal,
  body.articles-page #articlesGrid .article-card__image { transition: none !important; }
  body.articles-page #articlesGrid .article-card--horizontal:hover { transform: none !important; }
}


/* Article archive search: scoped to the listing page only. */
body.articles-page .article-search {
  width: min(100%, 760px);
  margin: 2rem 0 1.5rem;
}
body.articles-page .article-search__label {
  display: block;
  margin-bottom: .65rem;
  color: #737d8d;
  font: 700 .68rem/1.4 "Space Grotesk", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
body.articles-page .article-search__controls { display: flex; align-items: stretch; gap: .65rem; }
body.articles-page .article-search__input-wrap {
  display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: .65rem;
  padding: 0 .85rem; border: 1px solid rgba(120,135,155,.35); border-radius: 15px;
  background: linear-gradient(135deg,#fff 0%,#f7faff 100%);
  box-shadow: 0 5px 16px rgba(50,85,130,.07), inset 0 1px 0 rgba(255,255,255,.9);
}
body.articles-page .article-search__icon { width: 20px; height: 20px; flex: 0 0 20px; color: #315bea; }
body.articles-page .article-search__input { width: 100%; min-width: 0; padding: .95rem 0; border: 0; outline: 0; background: transparent; color: #202226; font: 500 .92rem/1.4 "Space Grotesk",sans-serif; }
body.articles-page .article-search__input::placeholder { color: #858d99; opacity: 1; }
body.articles-page .article-search__input:focus-visible { outline: 0; }
body.articles-page .article-search__input-wrap:focus-within { border-color: #315bea; box-shadow: 0 0 0 3px rgba(49,91,234,.12),0 6px 18px rgba(50,85,130,.08); }
body.articles-page .article-search__clear { flex: 0 0 auto; border: 0; padding: .1rem .25rem; background: transparent; color: #727987; font: 400 1.5rem/1 Arial,sans-serif; cursor: pointer; }
body.articles-page .article-search__clear[hidden] { display: none; }
body.articles-page .article-search__submit { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: .5rem; min-width: 112px; padding: .8rem 1.1rem; border: 1px solid #315bea; border-radius: 15px; background: linear-gradient(145deg,#365ff0,#2448c8); color: #fff; font: 700 .83rem/1.2 "Space Grotesk",sans-serif; box-shadow: 0 6px 14px rgba(49,91,234,.2),inset 0 1px 0 rgba(255,255,255,.18); cursor: pointer; transition: transform .18s ease,box-shadow .18s ease; }
body.articles-page .article-search__submit:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(49,91,234,.25); }
body.articles-page .article-search__submit:focus-visible, body.articles-page .article-search__clear:focus-visible { outline: 3px solid rgba(49,91,234,.35); outline-offset: 3px; }
body.articles-page .article-search__submit svg { width: 17px; height: 17px; }
body.articles-page .article-search__help { margin: .55rem 0 0; color: #7d8797; font: 400 .75rem/1.5 "Space Grotesk",sans-serif; }
body.articles-page .article-search__results { margin: -.55rem 0 1rem; color: #788395; font: 600 .75rem/1.5 "Space Grotesk",sans-serif; }
body.articles-page .article-search__empty { margin-top: 1rem; padding: 2rem 1.25rem; border: 1px dashed rgba(120,135,155,.45); border-radius: 20px; background: rgba(125,145,175,.045); color: #737d8d; text-align: center; font: 500 .92rem/1.6 "Space Grotesk",sans-serif; }
html[data-theme="dark"] body.articles-page .article-search__label { color: #a5adbb; }
html[data-theme="dark"] body.articles-page .article-search__input-wrap { border-color: rgba(190,205,230,.16); background: linear-gradient(135deg,#272b32 0%,#20242b 100%); box-shadow: 0 7px 18px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.045); }
html[data-theme="dark"] body.articles-page .article-search__input { color: #f5f6f8; }
html[data-theme="dark"] body.articles-page .article-search__input::placeholder { color: #9ca6b6; }
html[data-theme="dark"] body.articles-page .article-search__clear { color: #c3cad5; }
html[data-theme="dark"] body.articles-page .article-search__help, html[data-theme="dark"] body.articles-page .article-search__results { color: #a5adbb; }
html[data-theme="dark"] body.articles-page .article-search__empty { border-color: rgba(190,205,230,.17); background: rgba(255,255,255,.025); color: #c0c7d2; }
@media (max-width: 520px) {
  body.articles-page .article-search { margin: 1.4rem 0 1.1rem; }
  body.articles-page .article-search__controls { gap: .45rem; }
  body.articles-page .article-search__input-wrap { gap: .45rem; padding: 0 .65rem; border-radius: 13px; }
  body.articles-page .article-search__input { padding: .82rem 0; font-size: .82rem; }
  body.articles-page .article-search__submit { min-width: 46px; padding: .75rem .8rem; border-radius: 13px; }
  body.articles-page .article-search__submit span { display: none; }
  body.articles-page .article-search__submit svg { width: 20px; height: 20px; }
  body.articles-page .article-search__help { font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) { body.articles-page .article-search__submit { transition: none; } body.articles-page .article-search__submit:hover { transform: none; } }
