:root {
  --feed-ink: #20242b;
  --feed-muted: #a3a7ad;
  --feed-copy: #737980;
  --feed-line: #edf0f2;
  --feed-link: #6f91ad;
  --feed-accent: #165f84;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--feed-ink);
  background: #f4f5f6;
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--feed-ink);
  background: #f4f5f6;
}

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

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

.feed-page,
.feed-detail-page {
  min-height: 100vh;
}

.feed-page {
  background: transparent;
}

.feed-detail-page {
  background: transparent;
}

.feed-list {
  display: grid;
  gap: 14px;
  padding: 0;
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
  padding: 18px 0 40px;
}

.feed-item {
  display: block;
  padding: 18px 20px 20px;
  border: 1px solid #e7ebee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 14px rgb(27 39 51 / 6%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.feed-item:hover {
  border-color: #d7e0e5;
  box-shadow: 0 8px 24px rgb(27 39 51 / 10%);
  transform: translateY(-1px);
}

.feed-item:active {
  transform: translateY(0);
}

.feed-item:focus-visible,
.feed-back:focus-visible,
.feed-next:focus-visible {
  outline: 3px solid rgb(22 95 132 / 22%);
  outline-offset: 4px;
}

.feed-item__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.feed-item h2 {
  margin: 0;
  color: #202328;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.01em;
}

.feed-item time {
  display: block;
  margin-top: 3px;
  color: var(--feed-muted);
  font-size: 13px;
  line-height: 1.5;
}

.feed-item__source svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.feed-item__summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--feed-copy);
  font-size: 15px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.feed-item__source {
  display: inline;
  margin-left: 6px;
  color: var(--feed-link);
  white-space: nowrap;
}

.feed-item__source svg {
  display: inline-block;
  margin-right: 3px;
  vertical-align: -2px;
}

.feed-ranking {
  position: sticky;
  top: 88px;
  margin-top: 0;
  padding: 18px 20px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 14px rgb(27 39 51 / 8%);
}

.feed-ranking h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  color: #20242b;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.feed-ranking h2::before {
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--feed-accent);
  content: "";
}

.feed-ranking__list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.feed-ranking__list li {
  border-bottom: 1px dashed #e2e7eb;
}

.feed-ranking__list li:last-child {
  border-bottom: 0;
}

.feed-ranking__item {
  display: flex;
  gap: 11px;
  padding: 9px 0;
}

.feed-ranking__number {
  color: #b6c0ce;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
}

.feed-ranking__list li:nth-child(1) .feed-ranking__number {
  color: #d63842;
}

.feed-ranking__list li:nth-child(2) .feed-ranking__number {
  color: #e07028;
}

.feed-ranking__list li:nth-child(3) .feed-ranking__number {
  color: #d4a125;
}

.feed-ranking__content {
  min-width: 0;
}

.feed-ranking__title {
  display: -webkit-box;
  overflow: hidden;
  color: #2d3238;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  transition: color 160ms ease;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.feed-ranking__item:hover .feed-ranking__title {
  color: var(--feed-accent);
}

.feed-ranking__content small {
  display: block;
  margin-top: 3px;
  color: var(--feed-muted);
  font-size: 11.5px;
}

.feed-ranking__item:focus-visible {
  outline: 3px solid rgb(22 95 132 / 22%);
  outline-offset: 3px;
}

.feed-detail-page {
  padding-bottom: 56px;
}

.feed-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
  padding-top: 18px;
}

.feed-detail-primary {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.feed-detail-main {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e7ebee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 14px rgb(27 39 51 / 6%);
}

.feed-related {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.feed-related h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #20242b;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.feed-related h2::before {
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: #e8590c;
  content: "";
}

.feed-related__list {
  display: block;
}

.feed-related__item {
  display: block;
  padding: 20px 22px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(14 26 43 / 5%), 0 6px 20px rgb(14 26 43 / 6%);
  transition: 180ms ease;
}

.feed-related__item:hover {
  box-shadow: 0 4px 8px rgb(14 26 43 / 7%), 0 12px 28px rgb(14 26 43 / 10%);
  transform: translateY(-2px);
}

.feed-related__item h3 {
  margin: 7px 0;
  color: #202328;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  transition: color 160ms ease;
}

.feed-related__item:hover h3 {
  color: var(--feed-accent);
}

.feed-related__item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--feed-copy);
  font-size: 13.5px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.feed-related__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 11px;
  color: var(--feed-muted);
  font-size: 12.5px;
}

.feed-related__source {
  color: var(--feed-accent);
  font-weight: 500;
}

.feed-related__tag {
  padding: 1px 8px;
  border-radius: 4px;
  color: #1456a8;
  background: #e8f0fb;
  font-size: 12px;
}

.feed-related__pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.feed-related__pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #dbe2ea;
  border-radius: 6px;
  color: #33405a;
  background: #fff;
  font: inherit;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.feed-related__pagination button:hover:not(:disabled):not([aria-current="page"]) {
  border-color: #1677ff;
  color: #1677ff;
}

.feed-related__pagination button[aria-current="page"] {
  border-color: #1677ff;
  color: #fff;
  background: #1677ff;
}

.feed-related__pagination button:disabled {
  color: #b6c2d2;
  background: #f5f7fa;
  cursor: not-allowed;
}

.feed-detail-nav {
  padding: 18px 44px 16px;
  border-bottom: 1px solid var(--feed-line);
}

.feed-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6e747a;
  font-size: 13px;
}

.feed-back span {
  font-size: 18px;
  line-height: 1;
  transition: transform 180ms ease;
}

.feed-back:hover span {
  transform: translateX(-4px);
}

.feed-article {
  width: 100%;
  padding-inline: 44px;
}

.feed-article__header {
  padding: 40px 0 26px;
  border-bottom: 1px solid var(--feed-line);
}

.feed-article__eyebrow {
  display: none;
}

.feed-article__title {
  margin: 0;
  font-size: clamp(24px, 3.7vw, 30px);
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -.02em;
}

.feed-article__time {
  display: block;
  margin-top: 14px;
  color: var(--feed-muted);
  font-size: 13px;
}

.feed-article__content {
  padding: 28px 0 38px;
  color: #41464d;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
}

.feed-article__content p {
  margin: 0 0 1.25em;
}

.feed-article__footer {
  padding: 22px 0 32px;
  border-top: 1px solid var(--feed-line);
}

.feed-next {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 20px;
  padding: 16px 52px 16px 18px;
  border: 1px solid #e4e8eb;
  border-radius: 2px;
  background: #fafbfb;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.feed-next:hover {
  border-color: #cfd9de;
  background: #f5f8f9;
}

.feed-next span {
  grid-column: 1;
  color: var(--feed-muted);
  font-size: 12px;
}

.feed-next strong {
  grid-column: 1;
  overflow: hidden;
  color: #30343a;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-next i {
  position: absolute;
  top: 50%;
  right: 18px;
  color: var(--feed-accent);
  font-size: 20px;
  font-style: normal;
  transform: translateY(-50%);
  transition: transform 180ms ease;
}

.feed-next:hover i {
  transform: translate(4px, -50%);
}

.feed-message {
  padding: 48px 24px;
  color: var(--feed-copy);
  text-align: center;
}

@media (max-width: 900px) {
  .feed-layout {
    grid-template-columns: 1fr;
  }

  .feed-detail-layout {
    grid-template-columns: 1fr;
  }

  .feed-ranking {
    position: static;
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  html {
    background: #fff;
  }

  .feed-list {
    padding: 0;
  }

  .feed-layout {
    gap: 20px;
    padding: 14px 0 28px;
  }

  .feed-detail-layout {
    gap: 20px;
    padding-top: 14px;
  }

  .feed-detail-primary {
    gap: 14px;
  }

  .feed-ranking {
    padding: 16px 18px;
    border: 1px solid var(--feed-line);
    box-shadow: none;
  }

  .feed-item {
    padding: 16px 17px 18px;
  }

  .feed-related {
    padding: 0;
  }

  .feed-related__item {
    padding: 20px 22px;
  }

  .feed-item__heading {
    display: block;
  }

  .feed-item time {
    margin-top: 2px;
    font-size: 12px;
  }

  .feed-item h2 {
    font-size: 17px;
  }

  .feed-item__summary {
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.7;
  }

  .feed-detail-page {
    padding-bottom: 44px;
  }

  .feed-detail-nav {
    padding: 16px 0 13px;
  }

  .feed-article__header {
    padding: 30px 0 22px;
  }

  .feed-article__title {
    font-size: 23px;
  }

  .feed-article__content {
    padding: 24px 0 32px;
    font-size: 15px;
    line-height: 1.85;
  }

  .feed-next {
    padding-left: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
