.page-news {
  --news-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --news-shadow: 0 12px 32px rgba(10, 25, 47, 0.12);
  --news-shadow-hover: 0 18px 40px rgba(10, 25, 47, 0.18);
}

.page-news [id] {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

/* ===== Hero ===== */
.page-news .news-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-deep) 100%);
  color: var(--clr-white);
  padding: calc(var(--header-height) + 48px) 0 var(--space-6);
}

.page-news .news-hero::before {
  content: '壹';
  position: absolute;
  right: 4%;
  top: 16%;
  font-family: var(--font-heading);
  font-size: 200px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.045);
  pointer-events: none;
}

.page-news .news-hero::after {
  content: '';
  position: absolute;
  right: -8%;
  top: -18%;
  width: 52%;
  height: 64%;
  background: var(--clr-accent);
  opacity: 0.14;
  border-radius: 42% 58% 64% 36% / 48% 42% 58% 52%;
  transform: rotate(14deg);
  pointer-events: none;
}

.page-news .news-hero__inner {
  position: relative;
  z-index: 1;
}

.page-news .news-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.page-news .news-hero__intro {
  max-width: 720px;
}

.page-news .news-hero__kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--clr-accent);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.page-news .news-hero h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.18;
  color: var(--clr-white);
  margin-bottom: var(--space-3);
}

.page-news .news-hero__lead {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0;
}

.page-news .news-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin: 0;
}

.page-news .news-hero__stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-2);
  text-align: center;
  backdrop-filter: blur(6px);
}

.page-news .news-hero__stat dt {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-1);
}

.page-news .news-hero__stat dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--clr-accent);
  line-height: 1.1;
}

/* ===== Magazine layout ===== */
.page-news .news-magazine {
  background: var(--clr-neutral-light);
  padding: var(--space-5) 0 var(--space-6);
}

.page-news .news-magazine__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

/* ===== Sidebar / Category panel ===== */
.page-news .news-cats__inner {
  position: relative;
  overflow: hidden;
  background: var(--clr-primary);
  border-radius: var(--radius-lg);
  color: var(--clr-white);
  padding: var(--space-4);
}

.page-news .news-cats__inner::after {
  content: '壹';
  position: absolute;
  right: -16px;
  bottom: -32px;
  font-family: var(--font-heading);
  font-size: 120px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.045);
  pointer-events: none;
}

.page-news .news-cats h2 {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: var(--space-3);
}

.page-news .news-cats ul {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.page-news .news-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--clr-white);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background var(--news-transition), transform var(--news-transition), color var(--news-transition);
}

.page-news .news-cats a:hover,
.page-news .news-cats a:focus-visible {
  background: var(--clr-accent);
  color: var(--clr-primary);
  transform: translateX(4px);
  outline: none;
}

.page-news .news-cats a strong {
  background: var(--clr-accent);
  color: var(--clr-primary);
  border-radius: var(--radius-sm);
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  transition: background var(--news-transition), color var(--news-transition);
}

.page-news .news-cats a:hover strong,
.page-news .news-cats a:focus-visible strong {
  background: var(--clr-white);
}

.page-news .news-cats__more-link {
  opacity: 0.88;
}

.page-news .news-cats__more-link:hover {
  opacity: 1;
}

.page-news .news-cats__note {
  position: relative;
  z-index: 1;
  margin-top: var(--space-3);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
}

/* ===== Feed ===== */
.page-news .news-feed {
  min-width: 0;
}

.page-news .news-feed__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.page-news .news-feed__heading h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: 0;
}

.page-news .news-feed__badge {
  background: var(--clr-accent);
  color: var(--clr-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.page-news .news-feed__list {
  display: grid;
  gap: var(--space-4);
  position: relative;
}

/* ===== Article item ===== */
.page-news .news-item {
  position: relative;
  background: var(--clr-white);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--news-shadow);
  border: 1px solid rgba(10, 25, 47, 0.06);
  transition: box-shadow var(--news-transition), transform var(--news-transition);
}

.page-news .news-item:hover {
  box-shadow: var(--news-shadow-hover);
  transform: translateY(-3px);
}

.page-news .news-item:focus-within {
  outline: 2px solid var(--clr-accent);
  outline-offset: 4px;
}

.page-news .news-item__media {
  margin-bottom: var(--space-3);
}

.page-news .news-item__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--clr-neutral-deep);
}

.page-news .news-item__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}

.page-news .news-item__dot {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--clr-neutral-deep);
  background: var(--clr-neutral-light);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.page-news .news-item__content h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--clr-primary);
  line-height: 1.35;
  margin-bottom: var(--space-2);
}

.page-news .news-item__content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--clr-neutral-deep);
  margin-bottom: var(--space-3);
}

.page-news .news-item__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--clr-accent);
  text-decoration: none;
  transition: gap var(--news-transition);
}

.page-news .news-item__link:hover,
.page-news .news-item__link:focus-visible {
  gap: 10px;
  outline: none;
}

/* ===== Article tags ===== */
.page-news .news-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

.page-news .news-tag--updates {
  background: rgba(10, 25, 47, 0.1);
  color: var(--clr-primary);
}

.page-news .news-tag--pc {
  background: rgba(42, 157, 143, 0.16);
  color: #1a6e63;
}

.page-news .news-tag--migrate {
  background: rgba(233, 196, 106, 0.36);
  color: #8a6d2b;
}

.page-news .news-tag--tips {
  background: rgba(255, 107, 53, 0.16);
  color: #c2431c;
}

/* ===== Quarter variant ===== */
.page-news .news-item--quarter {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-deep) 100%);
  border-color: var(--clr-primary);
  color: var(--clr-white);
}

.page-news .news-item--quarter .news-item__meta {
  color: rgba(255, 255, 255, 0.75);
}

.page-news .news-item--quarter .news-item__dot {
  background: rgba(255, 255, 255, 0.12);
  color: var(--clr-white);
}

.page-news .news-item--quarter h3,
.page-news .news-item--quarter p {
  color: var(--clr-white);
}

.page-news .news-item--quarter p {
  color: rgba(255, 255, 255, 0.78);
}

.page-news .news-item--quarter .news-item__link {
  color: var(--clr-accent);
}

.page-news .news-item--quarter .news-tag {
  background: rgba(255, 255, 255, 0.12);
  color: var(--clr-white);
}

.page-news .news-feed__footer {
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
}

/* ===== Quarter archive ===== */
.page-news .news-quarter {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-deep) 100%);
  color: var(--clr-white);
  padding: var(--space-6) 0;
}

.page-news .news-quarter::before {
  content: '12';
  position: absolute;
  right: 4%;
  top: 8%;
  font-family: var(--font-heading);
  font-size: 96px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.page-news .news-quarter .container {
  position: relative;
  z-index: 1;
}

.page-news .section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--clr-accent);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.page-news .news-quarter__header {
  max-width: 680px;
  margin-bottom: var(--space-5);
}

.page-news .news-quarter__header h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--clr-white);
  margin-bottom: var(--space-3);
}

.page-news .news-quarter__header p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 0;
}

.page-news .news-quarter__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.page-news .quarter-unit {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  transition: background var(--news-transition), transform var(--news-transition);
}

.page-news .quarter-unit:hover {
  background: rgba(255, 107, 53, 0.15);
  transform: translateY(-4px);
}

.page-news .quarter-unit__no {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--clr-highlight);
}

.page-news .quarter-unit__cat {
  display: inline-block;
  background: var(--clr-accent);
  color: var(--clr-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-2);
}

.page-news .quarter-unit h3 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--clr-white);
  margin-bottom: 0;
  padding-right: 20px;
}

.page-news .news-quarter__footer {
  display: flex;
  justify-content: center;
  margin-top: var(--space-5);
}

.page-news .news-quarter .btn-outline {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--clr-white);
}

.page-news .news-quarter .btn-outline:hover,
.page-news .news-quarter .btn-outline:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--clr-white);
}

/* ===== Subscribe ===== */
.page-news .news-subscribe {
  background: var(--clr-neutral-light);
  padding: var(--space-6) 0;
}

.page-news .news-subscribe__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}

.page-news .news-subscribe__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--clr-neutral-deep);
}

.page-news .news-subscribe__content h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: var(--space-3);
}

.page-news .news-subscribe__content p {
  color: var(--clr-neutral-deep);
  line-height: 1.8;
  margin-bottom: var(--space-3);
}

.page-news .news-subscribe__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.page-news .news-subscribe__note {
  font-size: 14px;
  color: rgba(43, 45, 66, 0.65);
  margin-bottom: 0;
}

/* ===== Tablet / Desktop modifications ===== */
@media (min-width: 768px) {
  .page-news .news-hero h1 {
    font-size: 52px;
  }

  .page-news .news-hero__stat dd {
    font-size: 40px;
  }

  .page-news .news-hero__stat {
    padding: var(--space-4) var(--space-2);
  }

  .page-news .news-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: var(--space-4);
    padding: var(--space-3);
  }

  .page-news .news-item__media {
    margin-bottom: 0;
  }

  .page-news .news-item--quarter {
    grid-template-columns: 1fr;
  }

  .page-news .news-subscribe__inner {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-5);
  }
}

@media (min-width: 992px) {
  .page-news .news-magazine__inner {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: var(--space-5);
    align-items: start;
  }

  .page-news .news-cats {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    align-self: start;
  }

  .page-news .news-hero__grid {
    grid-template-columns: 7fr 5fr;
    align-items: end;
    gap: var(--space-5);
  }

  .page-news .news-quarter__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-news .news-quarter__header h2 {
    font-size: 40px;
  }

  .page-news .news-subscribe__content h2 {
    font-size: 36px;
  }
}
