/* ============================================================================
 * Quiltler - What's new: the release notes timeline.
 * Layered on styles.css and content.css (hero, breadcrumbs, CTA banner). Each
 * entry is a stitched card with a four-patch swatch in its kind's colours.
 * ==========================================================================*/

.wn-page {
  background:
    radial-gradient(38% 30% at 100% 0%, rgba(126, 168, 190, 0.16), transparent 70%),
    var(--cream-linen);
  padding: 8px 0 88px;
}

.wn-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.wn-intro {
  max-width: 720px;
  margin: 4px 0 40px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ---- Months ------------------------------------------------------------- */
.wn-month {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
  /* The site gives every section generous padding; a month is a row, not a section band. */
  padding: 0;
  margin-bottom: 48px;
}

.wn-month-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.wn-month-label span {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  display: inline-block;
  padding: 8px 14px;
  border: 1px dashed rgba(46, 58, 89, 0.28);
  border-radius: 999px;
  background: #fff;
}

.wn-list {
  display: grid;
  gap: 18px;
}

/* ---- Entries ------------------------------------------------------------ */
.wn-entry {
  --kind: var(--patch-blue);
  --kind-wash: #e3eef3;
  --kind-ink: #2e3a59;
  --kind-alt: #f5f3ef;
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 20px;
  padding: 24px 26px 22px 22px;
  background: #fff;
  border: 1px solid rgba(46, 58, 89, 0.08);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--nav-height) + 24px);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* The stitch line a few millimetres in from the edge, like a quilted border. */
.wn-entry::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed color-mix(in srgb, var(--kind) 45%, transparent);
  border-radius: 14px;
  pointer-events: none;
}

.wn-entry:hover,
.wn-entry:target {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.wn-entry:target {
  outline: 3px solid color-mix(in srgb, var(--kind) 70%, transparent);
  outline-offset: 3px;
}

.wn-kind-technique { --kind: #e2725b; --kind-wash: #fbe7e1; --kind-ink: #8f3524; --kind-alt: #f3c969; }
.wn-kind-tool { --kind: #2e3a59; --kind-wash: #e6e9f1; --kind-ink: #2e3a59; --kind-alt: #7ea8be; }
.wn-kind-new { --kind: #7ea8be; --kind-wash: #e3eef3; --kind-ink: #2c5568; --kind-alt: #e2725b; }
.wn-kind-improvement { --kind: #a4b494; --kind-wash: #edf1e7; --kind-ink: #4c5c3f; --kind-alt: #f5f3ef; }
.wn-kind-free { --kind: #f3c969; --kind-wash: #fdf3d8; --kind-ink: #7a5a12; --kind-alt: #a4b494; }
.wn-kind-ios { --kind: #8e735b; --kind-wash: #f1ebe4; --kind-ink: #5c4836; --kind-alt: #7ea8be; }

/* A four-patch in the entry's colours: the card's quilt block. */
.wn-swatch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 6px 14px -8px rgba(30, 36, 51, 0.55);
  transform: rotate(-4deg);
}

.wn-swatch i:nth-child(1),
.wn-swatch i:nth-child(4) { background: var(--kind); }
.wn-swatch i:nth-child(2) { background: var(--kind-wash); }
.wn-swatch i:nth-child(3) { background: var(--kind-alt); }

.wn-body {
  min-width: 0;
}

.wn-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.wn-kind {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--kind-wash);
  color: var(--kind-ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wn-entry h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.wn-entry h3 a {
  color: inherit;
  text-decoration: none;
}

.wn-entry h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.wn-summary {
  margin: 0;
  color: #3d4763;
  line-height: 1.65;
}

.wn-details {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #3d4763;
  line-height: 1.6;
}

.wn-details li {
  margin: 0 0 4px;
}

.wn-details li::marker {
  color: var(--kind);
}

.wn-media {
  margin: 16px 0 0;
}

.wn-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: var(--kind-wash);
}

.wn-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 16px;
}

.wn-platforms {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.wn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--primary-strong);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.wn-cta:hover {
  background: var(--primary-strong-hover);
  transform: translateX(2px);
}

.wn-cta:focus-visible,
.wn-entry h3 a:focus-visible {
  outline: 3px solid var(--midnight-indigo);
  outline-offset: 3px;
}

/* ---- Narrow screens ----------------------------------------------------- */
@media (max-width: 860px) {
  .wn-month {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .wn-month-label span {
    position: static;
  }
}

@media (max-width: 560px) {
  .wn-inner {
    padding: 0 16px;
  }

  .wn-entry {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 18px 18px;
  }

  .wn-swatch {
    width: 34px;
    height: 34px;
  }

  .wn-cta {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wn-entry,
  .wn-cta {
    transition: none;
  }

  .wn-entry:hover,
  .wn-entry:target,
  .wn-cta:hover {
    transform: none;
  }
}
