/* This Week in Puroresu History: home page card (added 16 Nov 2026).
   Style rules (owner, 11 Nov): no photos, icons or thumbnails; no red pill tags; no boxed rows;
   red only for "Today", the big year and the selected row's date; buttons like the Archive Trails pager;
   size to content. Load after css/pages/home.css. */

.this-week {
  background: var(--color-black, #050505);
  color: var(--color-paper-cool, #f5f5f0);
  font-family: var(--font-heading, "D-DIN-PRO", Arial, sans-serif);
  --tw-gutter: clamp(1.25rem, 3.6vw, 3.4rem); /* the section's side padding; phone rows reach past it */
  padding: clamp(2.5rem, 4vw, 4rem) var(--tw-gutter) clamp(2.5rem, 3.6vw, 4rem);
  scroll-margin-top: var(--site-header-height, 72px);
}

.this-week[hidden] {
  display: none;
}

.this-week__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-inline: auto;
  max-width: 88rem;
  width: min(100%, 88rem);
}

/* ---------- header ---------- */
.this-week__header {
  border-bottom: 1px solid #333333;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1.125rem;
}

.this-week__header-top {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
}

.this-week__titles {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.this-week__jp {
  color: #c9c9c2;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin: 0;
}

.this-week__title {
  font-size: clamp(2.1rem, 3.4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.this-week__title span {
  color: #e33131;
}

.this-week__pager {
  align-items: center;
  display: flex;
  gap: 0.625rem;
}

.this-week__page-button {
  align-items: center;
  background: #0d0d0d;
  border: 1px solid #484848;
  border-radius: 8px;
  color: var(--color-paper, #f5f5f0);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.this-week__page-button svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  width: 20px;
}

.this-week__page-button:enabled:hover {
  border-color: #8a8a84;
}

/* at the latest week (forward) or the oldest filled week (back) the arrow stays in place
   but clearly reads as unavailable (owner, 16 Nov: "look more disabled"): no fill, faint
   outline, faint arrow */
.this-week__page-button:disabled {
  background: transparent;
  border-color: #1f1f1f;
  color: #333331;
  cursor: not-allowed;
}

.this-week__page-button:focus-visible,
.this-week__today-button:focus-visible,
.this-week__button:focus-visible,
.this-week__row:focus-visible {
  outline: 2px solid #f5f5f0;
  outline-offset: 2px;
}

.this-week__range {
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin: 0;
  /* fixed width so the arrows never move when the dates change length ("Nov 16 – 22" vs "Dec 28 – Jan 3") */
  min-width: 9.75rem;
  text-align: center;
  white-space: nowrap;
}

.this-week__today-button {
  background: transparent;
  border: 1px solid #484848;
  border-radius: 8px;
  color: var(--color-paper, #f5f5f0);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  align-items: center;
  min-height: 44px;
  padding: 0 0.875rem;
  text-transform: uppercase;
}

/* keep its space when hidden, so the arrows don't shift when it appears */
.this-week__today-button[hidden] {
  display: inline-flex;
  visibility: hidden;
}

.this-week__subrow {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.this-week__note-line {
  color: #a8a8a0;
  font-size: 0.875rem;
  margin: 0;
}

/* quiet week: a clear statement at the top of the left column */
.this-week__quiet {
  margin: 0 0 0.5rem;
  padding-top: 2rem;
}

.this-week__quiet-kicker {
  color: #e33131;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

.this-week__quiet-line {
  color: #f5f5f0;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
}

/* keep a date range like "Nov 30 – Dec 6" on one line */
.this-week__quiet-range {
  white-space: nowrap;
}

.this-week__quiet-next {
  color: #c9c9c2;
  display: block;
  font-size: 0.6em;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0.5rem;
}

.this-week__quiet[hidden] {
  display: none;
}

/* ---------- body: panel + list ---------- */
.this-week__body {
  align-items: start;
  column-gap: 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  /* row 1 holds the quiet-week message (left column only), so the list on the right
     never moves when it appears */
  grid-template-rows: auto auto;
  row-gap: 0;
}

.this-week__body > .this-week__quiet {
  grid-column: 1;
  grid-row: 1;
}

.this-week__body > .this-week__panel {
  grid-column: 1;
  grid-row: 2;
}

.this-week__body > .this-week__list-wrap {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.this-week__panel {
  /* front-page treatment: no box, faint newsprint behind the left side */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  isolation: isolate;
  min-height: 32.5rem;
  padding: 2rem 0 2.25rem 4.25rem;
  position: relative;
}

.this-week__panel::before {
  background: url("../../assets/backgrounds/this-week-newsprint.webp") center / cover no-repeat;
  content: "";
  inset: 0;
  /* soft on every side: short fade in on the left, long fade out to the right,
     and fades at the top and bottom, so there is no visible rectangle */
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0, #000 8%, #000 55%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 18%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0, #000 8%, #000 55%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 18%, #000 78%, transparent 100%);
  mask-composite: intersect;
  opacity: 0.05;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

/* 今週のプロレス史 set vertically down the panel's edge (decorative, hidden from screen readers) */
.this-week__tategaki {
  border-right: 1px solid #2a2a2a;
  color: #a8a297;
  /* Japanese fonts that ship a real bold on Windows, Mac and phones */
  font-family: "Yu Gothic", "YuGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  height: calc(100% - 4.25rem);
  left: 10px;
  letter-spacing: 0.35em;
  overflow: hidden;
  padding-right: 1.1rem;
  position: absolute;
  top: 2rem;
  writing-mode: vertical-rl;
}

.this-week__jdate {
  color: #8f8a80;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.this-week__meta {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin: 0;
}

.this-week__type,
.this-week__list-title {
  color: #c9c9c2;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.this-week__date {
  color: #c9c9c2;
  font-size: 0.9375rem;
  font-weight: 600;
}

.this-week__date--block {
  margin: 0;
}

.this-week__year {
  color: #d62828;
  font-size: 9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.82;
  margin: 0;
}

.this-week__headline {
  font-size: clamp(2.1rem, 2.7vw, 2.6rem);
  font-weight: 800;
  line-height: 1.02;
  margin: 0.375rem 0 0;
  max-width: 26ch;
}

.this-week__text {
  color: #e0ded7;
  font-family: var(--font-body, inherit);
  font-size: 1.0625rem;
  line-height: 1.62;
  margin: 0;
  max-width: 60ch;
}

.this-week__note {
  color: #a8a8a0;
  font-size: 0.9375rem;
  line-height: 1.4;
  margin: 0;
}

.this-week__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.this-week__button {
  align-items: center;
  border: 1px solid #555555;
  border-radius: 8px;
  color: #f5f5f0;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 600;
  min-height: 48px;
  padding: 0 1.25rem;
  text-decoration: none;
}

.this-week__button:hover {
  border-color: #f5f5f0;
  color: #ffffff;
}

.this-week__button--primary {
  background: #c1121f;
  border-color: #c1121f;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.this-week__button--primary:hover {
  background: #a6111b;
  border-color: #a6111b;
}

/* second action: a plain text link, so there's one clear button */
.this-week__link {
  align-items: center;
  color: #f5f5f0;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 600;
  min-height: 44px; /* comfortable tap target */
  text-decoration: underline;
  text-decoration-color: rgba(239, 233, 220, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.this-week__link:hover {
  text-decoration-color: currentColor;
}

.this-week__link:focus-visible {
  outline: 2px solid #f5f5f0;
  outline-offset: 3px;
}

.this-week__actions {
  align-items: center;
  column-gap: 1.5rem;
}

/* ---------- list ---------- */
.this-week__list-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.this-week__list-title {
  margin: 0;
  padding-left: 0.75rem; /* lines up with the row text inside the dividers */
}

.this-week__list {
  border-top: 1px solid #222222;
  list-style: none;
  margin: 0;
  padding: 0;
}

.this-week__item {
  border-bottom: 1px solid #222222;
}

.this-week__row {
  align-items: start;
  background: transparent;
  border: 0;
  border-radius: 0; /* the hover band fills the space between the divider lines exactly */
  color: #f5f5f0;
  cursor: pointer;
  display: grid;
  font-family: inherit;
  gap: 0.875rem;
  grid-template-columns: 3rem minmax(0, 1fr);
  margin: 0;
  padding: 0.875rem 0.75rem;
  text-align: left;
  transition: background-color 0.15s ease;
  width: 100%;
}

.this-week__row:hover {
  background: #151515;
}

/* keyboard focus ring drawn inside the row so it also stays within the dividers */
.this-week__row:focus-visible {
  outline-offset: -2px;
}

.this-week__row:active {
  background: #1b1b1b;
}

.this-week__day {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}

.this-week__mon {
  color: #c9c9c2;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.this-week__num {
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1;
}

.this-week__today-tag {
  background: #d62828;
  border-radius: 3px;
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.125rem 0.3125rem;
  text-transform: uppercase;
}

.this-week__row-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.this-week__row-label {
  align-items: center;
  color: #a8a8a0;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.75rem;
  font-weight: 800;
  gap: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.this-week__row-date,
.this-week__today-tag--inline {
  display: none;
}

.this-week__row-headline {
  color: #c9c9c2;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.this-week__row:hover .this-week__row-headline,
.this-week__row:hover .this-week__num {
  color: #ffffff;
}

.this-week__item.is-selected .this-week__num,
.this-week__item.is-selected .this-week__row:hover .this-week__num {
  color: #e33131;
}

.this-week__item.is-selected .this-week__row-headline {
  color: #ffffff;
  font-weight: 800;
}

.this-week__chevron {
  display: none;
}

.this-week__inline {
  display: none;
}

/* ---------- tablet ---------- */
/* desktop: the vertical 今週のプロレス史 on the panel already carries the Japanese,
   so the small label above the title goes (it stays on tablet and phone, where the vertical one is hidden) */
@media (min-width: 1121px) {
  .this-week__jp {
    display: none;
  }
}

@media (max-width: 1120px) {
  .this-week__body {
    column-gap: 1.75rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .this-week__panel {
    padding: 1.75rem 0 2rem;
  }

  /* half-width panel on tablet: no room for the vertical label */
  .this-week__tategaki {
    display: none;
  }

  .this-week__year {
    font-size: 6rem;
  }

  .this-week__headline {
    font-size: 1.875rem;
  }
}

/* ---------- phone: rows open in place ---------- */
@media (max-width: 760px) {
  .this-week__inner {
    gap: 0;
  }

  .this-week__header {
    gap: 0.875rem;
    padding-bottom: 1rem;
    /* its bottom line runs edge to edge like the row dividers below it; the content keeps its padding */
    margin-inline: calc(-1 * var(--tw-gutter));
    padding-inline: var(--tw-gutter);
  }

  .this-week__header-top {
    align-items: stretch;
    flex-direction: column;
  }

  /* arrows at the edges, the week centred between them, with a little air above and below */
  .this-week__pager {
    justify-content: space-between;
    padding: 0.5rem 0;
    width: 100%;
  }

  /* the button keeps its place (hidden, not removed) on the note row, so nothing moves
     when it appears; the note may wrap to two lines beside it */
  .this-week__subrow {
    flex-wrap: nowrap;
    min-height: 44px;
  }

  .this-week__note-line {
    flex: 1 1 auto;
    min-width: 0;
  }

  .this-week__today-button {
    flex: 0 0 auto;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    padding: 0 0.75rem;
  }

  .this-week__title {
    font-size: 2.125rem;
  }

  .this-week__quiet {
    margin: 0 0 0.5rem;
    padding-top: 1.5rem;
  }

  .this-week__quiet-line {
    font-size: 1.375rem;
  }

  .this-week__body {
    display: block;
  }

  .this-week__panel,
  .this-week__list-title,
  .this-week__day,
  .this-week__row-year {
    display: none;
  }

  .this-week__list {
    border-top: 0;
  }

  /* owner, 17 Nov: each row spans the full screen width (tap area, pressed state, dividers and
     the open entry's background); the text keeps the section's side padding */
  .this-week__item {
    margin-inline: calc(-1 * var(--tw-gutter));
  }

  .this-week__row {
    grid-template-columns: minmax(0, 1fr) 1.25rem;
    margin: 0;
    padding: 1rem var(--tw-gutter);
    width: 100%;
  }

  .this-week__row:hover {
    background: transparent;
  }

  .this-week__row:active {
    background: #151515;
  }

  .this-week__row-date,
  .this-week__today-tag--inline {
    display: inline;
  }

  .this-week__row-headline {
    color: #e0ded7;
    font-size: 1.0625rem;
  }

  .this-week__chevron {
    display: block;
    fill: none;
    height: 1.25rem;
    margin-top: 0.125rem;
    stroke: #a8a8a0;
    stroke-width: 2;
    transition: transform 0.15s ease;
    width: 1.25rem;
  }

  .this-week__item.is-open .this-week__chevron {
    transform: rotate(180deg);
  }

  .this-week__item.is-selected:not(.is-open) .this-week__row-headline {
    color: #e0ded7;
    font-weight: 600;
  }

  .this-week__item.is-open .this-week__inline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 var(--tw-gutter) 1.25rem;
  }

  /* open entry: the big year sits in the row, above the headline (same order as the desktop panel) */
  .this-week__year--row {
    display: block;
    font-size: 5rem;
    margin: 0.75rem 0 0.5rem;
    max-height: 4.25rem; /* just above its height, so it can fold away, so it can fold away when the entry closes */
  }

  .this-week__inline .this-week__date {
    font-size: 0.875rem;
  }

  .this-week__inline .this-week__text {
    font-size: 1.0625rem;
  }

  .this-week__inline .this-week__actions {
    flex-direction: column;
    margin-top: 0.25rem;
    padding-top: 0;
  }

  .this-week__inline .this-week__button {
    justify-content: center;
  }

  .this-week__inline .this-week__actions {
    align-items: stretch;
    row-gap: 1rem;
  }

  .this-week__inline .this-week__link {
    align-self: center;
  }

  /* open entry: the same faint newsprint as the desktop panel, fading out downwards */
  .this-week__item.is-open {
    isolation: isolate;
    position: relative;
  }

  .this-week__item.is-open::before {
    background: url("../../assets/backgrounds/this-week-newsprint.webp") center top / cover no-repeat;
    content: "";
    /* the row itself is full width now, so the background is too */
    inset: 0;
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 45%, transparent);
    mask-image: linear-gradient(180deg, #000 0, #000 45%, transparent);
    opacity: 0.05;
    pointer-events: none;
    position: absolute;
    z-index: -1;
  }

  .this-week__inline .this-week__jdate {
    display: block;
    font-size: 0.875rem;
    margin-top: 0.375rem;
  }
}

/* ---------- selection motion (owner, 17 Nov) ----------
   The new entry's lines rise in one after another: a short lift and fade, 70ms apart.
   On phones the opened entry also slides open while the old one slides shut. */
@keyframes this-week-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.this-week__panel.is-entering > :not(.this-week__tategaki),
.this-week__inline.is-entering > *,
.this-week__year--row.is-rising {
  animation: this-week-rise 0.46s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  animation-delay: calc(var(--tw-i, 0) * 70ms);
}

/* the big year travels a little further, so the change of year reads first */
.this-week__panel.is-entering > .this-week__year,
.this-week__year--row.is-rising {
  animation-name: this-week-rise-year;
}

@keyframes this-week-rise-year {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.this-week__item {
  box-sizing: border-box;
}

.this-week__panel.is-sliding,
.this-week__item.is-sliding {
  transition: height 0.34s cubic-bezier(0.2, 0.75, 0.25, 1);
}

/* the entry being closed keeps its content while it slides shut, fading as it goes */
.this-week__item.is-closing > .this-week__inline,
.this-week__item.is-closing .this-week__year--row {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* closing (owner, 17 Nov: it looked stuck before it shut): the closing row turns into the closed row as it
   slides, so nothing changes when the real closed row is put back. The big year folds away in step with
   the height, the headline stays in view, the arrow turns back and the newsprint fades. An even curve,
   with no slow tail at the end. */
.this-week__item.is-closing.is-sliding {
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.this-week__item.is-closing .this-week__year--row {
  margin-bottom: 0;
  margin-top: -0.25rem; /* also takes back the 0.25rem gap the year adds in the row */
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.15s ease, max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.this-week__item.is-closing .this-week__chevron {
  transform: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.this-week__item.is-closing::before {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.this-week__item.is-closing .this-week__row-headline {
  color: #e0ded7;
  font-weight: 600;
  transition: color 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .this-week__row,
  .this-week__chevron {
    transition: none;
  }

  .this-week__panel.is-entering > *,
  .this-week__inline.is-entering > *,
  .this-week__year--row.is-rising {
    animation: none;
  }

  .this-week__panel.is-sliding,
  .this-week__item.is-sliding,
  .this-week__item.is-closing > .this-week__inline,
  .this-week__item.is-closing .this-week__year--row,
  .this-week__item.is-closing .this-week__chevron,
  .this-week__item.is-closing::before,
  .this-week__item.is-closing .this-week__row-headline {
    transition: none;
  }
}
