/* Weekly Brief archive: Finimize-inspired editorial hierarchy, translated to 51's
   own content, typography, and monochrome publication system. */

body.editorial-page[data-editorial-page='weekly-brief'] {
  --weekly-paper: #ffffff;
  --weekly-ink: #111111;
  --weekly-muted: #666666;
  --weekly-rule: rgba(17, 17, 17, 0.16);
  --weekly-soft-rule: rgba(17, 17, 17, 0.08);
  --weekly-accent: #0a06e5;
  background: var(--weekly-paper) !important;
  color: var(--weekly-ink);
}

body.editorial-page[data-editorial-page='weekly-brief'] .editorial-main {
  background: var(--weekly-paper);
}

body.editorial-page[data-editorial-page='weekly-brief'] .nav {
  border-bottom: 1px solid var(--weekly-rule) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: none !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .nav
  :is(.nav-logo, .nav-link, .nav-link--active, .theme-toggle, .nav-mobile-btn) {
  color: var(--weekly-ink) !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .nav-divider {
  background: var(--weekly-rule) !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .nav-link--active {
  color: var(--weekly-ink) !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero {
  display: block !important;
  min-height: 0 !important;
  padding: 132px 0 28px !important;
  overflow: visible !important;
  border: 0 !important;
  background: var(--weekly-paper) !important;
  color: var(--weekly-ink) !important;
  text-align: left !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero::before,
body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero::after {
  display: none !important;
  content: none !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .weekly-hero-inner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 294px;
  width: min(100% - 48px, 1200px) !important;
  max-width: none !important;
  margin: 0 auto !important;
  gap: 72px;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-intro {
  max-width: 690px;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-kicker,
body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-topics > p,
body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-aside > span {
  display: block;
  margin: 0 0 15px;
  color: var(--weekly-accent);
  font: 600 11px/1.2 'DM Sans', sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero h1 {
  max-width: none !important;
  margin: 0 !important;
  color: var(--weekly-ink) !important;
  font-family: 'Sora', sans-serif !important;
  font-size: clamp(42px, 4.2vw, 56px) !important;
  font-weight: 700 !important;
  line-height: 0.98 !important;
  letter-spacing: -0.06em !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .weekly-hero-copy {
  max-width: 565px !important;
  margin: 18px 0 0 !important;
  color: var(--weekly-muted) !important;
  font-family: 'DM Sans', sans-serif;
  font-size: 18px !important;
  line-height: 1.45 !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .editorial-signup {
  width: min(100%, 510px) !important;
  margin: 28px 0 0 !important;
  border-color: var(--weekly-rule) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .editorial-signup input {
  color: var(--weekly-ink) !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .editorial-signup button {
  background: #111111 !important;
  color: #ffffff !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .editorial-signup-status {
  margin: 10px 0 0 !important;
  color: var(--weekly-muted) !important;
  text-align: left;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-topics {
  align-self: start;
  padding: 5px 0 0 28px;
  border-left: 1px solid var(--weekly-rule);
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-topics > p {
  margin-bottom: 19px;
  color: var(--weekly-muted);
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-topics a {
  display: block;
  width: fit-content;
  margin: 0 0 13px;
  color: var(--weekly-accent);
  font: 500 14px/1.3 'IBM Plex Mono', monospace;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-topics a:hover {
  color: var(--weekly-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-archive {
  padding: 22px 0 96px !important;
  border-top: 1px solid var(--weekly-rule);
  background: var(--weekly-paper) !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-archive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 56px;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-section-head {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  gap: 20px;
  text-align: left;
  margin: 0 0 30px;
  padding: 0;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-section-head h2 {
  color: var(--weekly-ink);
  font-family: 'Sora', sans-serif;
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.048em;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-section-head .editorial-section-link {
  color: var(--weekly-muted);
  font: 500 12px/1.2 'IBM Plex Mono', monospace;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  border: 0 !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-list-loading {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-list-loading span {
  height: 244px;
  border: 1px solid var(--weekly-soft-rule);
  border-radius: 0;
  background: #f3f3f3;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item {
  position: relative;
  display: flex !important;
  min-height: 272px;
  margin: 0 !important;
  padding: 0 0 20px !important;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  color: var(--weekly-ink) !important;
}

.weekly-item-image {
  width: 100%;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface, #f3f3f3);
}
.weekly-item-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.weekly-item-image .editorial-card-fallback { display: grid; place-items: center; height: 100%; color: var(--text-primary); font-size: 64px; font-weight: 700; }

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item:hover,
body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item:focus-visible {
  border-color: var(--weekly-ink) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item-kicker {
  margin-top: 18px;
  color: var(--weekly-accent);
  font: 600 11px/1.1 'DM Sans', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item h2,
body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item h3 {
  margin: 10px 0 0;
  color: var(--weekly-ink) !important;
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.2px;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item h2 span,
body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item h3 span {
  padding: 0 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-color 140ms ease, color 140ms ease;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item:hover h2 span,
body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item:hover h3 span,
body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item:focus-visible h2 span,
body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item:focus-visible h3 span {
  background: #edff00;
  color: #111111 !important;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 13px 0 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--weekly-muted);
  font: 400 14px/1.45 'DM Sans', sans-serif;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--weekly-muted);
  font: 500 11px/1.2 'DM Sans', sans-serif;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item-arrow {
  display: none;
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: var(--weekly-ink) !important;
  font-size: 22px;
  line-height: 1;
  transition: transform 140ms ease;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item:hover .weekly-item-arrow {
  color: var(--weekly-ink) !important;
  transform: translateX(4px);
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-pagination {
  justify-content: flex-start;
  margin-top: 30px;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-pagination button {
  border-color: var(--weekly-rule);
  border-radius: 999px;
  color: var(--weekly-ink);
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-pagination button[aria-current='page'],
body.editorial-page[data-editorial-page='weekly-brief'] .weekly-pagination button:hover {
  border-color: var(--weekly-ink);
  background: var(--weekly-ink);
  color: #ffffff;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-aside {
  align-self: start;
  padding: 28px;
  border: 1px solid var(--weekly-rule);
  background: #f4f4f4;
  color: var(--weekly-ink);
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-aside > span {
  margin-bottom: 28px;
  color: var(--weekly-muted);
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-aside h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-aside p {
  margin: 18px 0 25px;
  color: var(--weekly-muted);
  font-size: 14px;
  line-height: 1.45;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-aside a {
  color: var(--weekly-ink);
  font: 600 13px/1.2 'DM Sans', sans-serif;
}

body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-aside a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

html[data-theme='dark'] body.editorial-page[data-editorial-page='weekly-brief'] {
  --weekly-paper: #000000;
  --weekly-ink: #f4f4f2;
  --weekly-muted: #a7a7a3;
  --weekly-rule: rgba(255, 255, 255, 0.2);
  --weekly-soft-rule: rgba(255, 255, 255, 0.1);
  --weekly-accent: #58c7f7;
}

html[data-theme='dark'] body.editorial-page[data-editorial-page='weekly-brief'] .nav,
html[data-theme='dark'] body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero,
html[data-theme='dark'] body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-archive,
html[data-theme='dark'] body.editorial-page[data-editorial-page='weekly-brief'] .weekly-item {
  background: #000000 !important;
}

html[data-theme='dark'] body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .editorial-signup {
  background: #0f0f0f !important;
}

html[data-theme='dark'] body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .editorial-signup button {
  background: #f4f4f2 !important;
  color: #111111 !important;
}

html[data-theme='dark'] body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-aside {
  background: #111111;
}

html[data-theme='dark'] body.editorial-page[data-editorial-page='weekly-brief'] .weekly-list-loading span {
  background: #111111;
}

@media (max-width: 940px) {
  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .weekly-hero-inner,
  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-archive-grid {
    grid-template-columns: minmax(0, 1fr) 244px;
    gap: 36px;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-list-loading {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero {
    padding: 108px 0 24px !important;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .weekly-hero-inner,
  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-archive-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-topics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
    padding: 22px 0 0;
    border-top: 1px solid var(--weekly-rule);
    border-left: 0;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-topics > p {
    grid-column: 1 / -1;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-topics a {
    margin-bottom: 12px;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-list,
  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-list-loading {
    grid-template-columns: 1fr;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-aside {
    padding: 25px;
  }
}

@media (max-width: 460px) {
  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .weekly-hero-inner,
  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-archive-grid {
    width: min(100% - 36px, 1200px) !important;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero h1 {
    font-size: 42px !important;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-hero .weekly-hero-copy {
    font-size: 16px !important;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .weekly-finimize-topics {
    grid-template-columns: 1fr;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .editorial-signup {
    grid-template-columns: 1fr;
    gap: 5px;
    min-height: 102px;
    padding: 6px;
  }

  body.editorial-page[data-editorial-page='weekly-brief'] .editorial-signup input {
    min-height: 42px;
  }
}
