/* ==========================================================================
   Milkinmelanin — 06. Page: /articles/
   Only what the shared system does not already provide. Every colour comes
   from a token; nothing here redefines .band / .chip / .index-row / .stat.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page head — adds a decorative milk-drop on top of the shared .pagehead
   -------------------------------------------------------------------------- */
.pagehead__orn {
  position: absolute;
  right: clamp(1rem, 7vw, 6rem);
  top: clamp(1.6rem, 4vw, 3rem);
  width: clamp(52px, 7vw, 96px);
  color: var(--amber-500);
  opacity: 0.3;
  pointer-events: none;
  z-index: var(--z-deco);
}

.pagehead__meta {
  align-items: center;
  font-family: var(--font-ui);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   2. Topic filter — the shared .chip is a tag pill, so a filter row needs its
      own airier box: a hairline shelf that becomes horizontally scrollable on
      narrow screens instead of wrapping into a ragged block.
   -------------------------------------------------------------------------- */
.topicbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  padding: 0.35rem 0 1.15rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.topicbar::-webkit-scrollbar { display: none; }

.topics {
  flex-wrap: wrap;
  overflow: visible;
  border-bottom: 0;
  padding-bottom: 0.35rem;
}

/* --------------------------------------------------------------------------
   3. Lead: asymmetric feature slots beside a vertical, numbered editorial
      aside (not a centred hero, not a uniform rounded card grid)
   -------------------------------------------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 0.58fr);
  gap: clamp(1.2rem, 3.4vw, 2.8rem);
  align-items: start;
  margin-top: clamp(1.9rem, 4.6vw, 3.2rem);
}

.feature__list { display: grid; gap: clamp(1rem, 2.6vw, 1.5rem); }

.feature__card {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out);
}
.feature__card:hover { border-color: var(--cocoa-800); }
.feature__card:nth-child(even) .feature__media { order: 2; }

.feature__media {
  position: relative;
  /* the ratio keeps a supplied photograph from stretching to the slot's
     min-height, and lands close to the height the text column needs */
  aspect-ratio: 4 / 3;
  min-height: clamp(190px, 22vw, 290px);
  background:
    repeating-linear-gradient(135deg,
      rgba(189, 130, 66, 0.18) 0 12px,
      rgba(189, 130, 66, 0.05) 12px 24px),
    var(--cream-200);
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.feature__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feature__card:nth-child(even) .feature__media { border-right: 0; border-left: 1px solid var(--line); }

.feature__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: clamp(1.05rem, 2.6vw, 1.85rem);
}
.feature__title {
  font-size: var(--t-lg);
  line-height: 1.2;
}
.feature__title a:hover { color: var(--clay-600); }
.feature__text {
  font-size: var(--t-sm);
  line-height: 1.7;
  color: var(--text-soft);
  max-width: 58ch;
}

/* vertical numbered spine — the "how this section works" column */
.feature__aside {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.feature__aside-item {
  display: grid;
  gap: 0.3rem;
  padding: clamp(0.95rem, 2.4vw, 1.3rem) clamp(0.95rem, 2.4vw, 1.25rem);
  background: var(--surface);
}
.feature__aside-num {
  font-family: var(--font-ui);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--clay-600);
}
.feature__aside-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--t-md);
  letter-spacing: -0.02em;
}
.feature__aside-text {
  font-size: var(--t-xs);
  line-height: 1.62;
  color: var(--text-soft);
}

/* --------------------------------------------------------------------------
   4. Shared band head padding for this page
   -------------------------------------------------------------------------- */
.band--articles { padding-top: clamp(2.4rem, 6vw, 4.2rem); }

/* --------------------------------------------------------------------------
   5. Editorial index — real annotations under each numbered row
   -------------------------------------------------------------------------- */
.index-annot {
  display: block;
  margin-top: 0.5rem;
  max-width: 62ch;
  font-size: var(--t-sm);
  line-height: 1.68;
  color: var(--text-soft);
}
.band--deep .index-annot { color: var(--text-on-deep-soft); }

.index-row__link { align-items: start; }
.index-row__arrow { margin-top: 0.35rem; }

@media (max-width: 560px) {
  .index-annot { font-size: var(--t-xs); }
}

/* The deep band needs lighter labels than the light bands give by default */
.band--deep .stat__label { color: var(--text-on-deep-soft); }

/* --------------------------------------------------------------------------
   6. "How to use this section" — sticky side column, ink-on-paper
   -------------------------------------------------------------------------- */
.sidecard--ink {
  background: var(--bg-ink);
  border-color: transparent;
  color: var(--text-on-deep);
}
.sidecard--ink .sidecard__title { color: var(--amber-300); }
.sidecard--ink .sidecard__list a { color: var(--text-on-deep-soft); }
.sidecard--ink .sidecard__list a:hover { color: var(--cream-100); }

.sidecard__steps { display: grid; gap: 0.85rem; }
.sidecard__step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  font-size: var(--t-sm);
  line-height: 1.6;
  color: var(--text-on-deep-soft);
}
.sidecard__step-num {
  font-family: var(--font-ui);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--amber-500);
  padding-top: 0.25rem;
}

/* meter reused as an editorial "how much to read" gauge */
.sidecard__meter { margin-top: 1.1rem; }
.sidecard__meter .meter { color: var(--text-on-deep-soft); }
.sidecard--ink .meter__bar { background: var(--line-on-deep); }

/* --------------------------------------------------------------------------
   7. Responsive — nothing may overflow horizontally at narrow widths
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .feature { grid-template-columns: 1fr; }
  .feature__aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .feature__card,
  .feature__card:nth-child(even) { grid-template-columns: 1fr; }
  .feature__media,
  .feature__card:nth-child(even) .feature__media {
    order: 0;
    min-height: 170px;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
  .feature__aside { grid-template-columns: 1fr; }
  .pagehead__orn { display: none; }
}
