/* ===========================================
   ACSPL — Trade News pages
   blog.html (today's news), featured-story.html, weekly-trade-insights.html
   and trade-news-archive.html. Built on the site's own look: navy and red,
   Manrope with Abril Fatface headlines, rounded white cards.
   Each news category keeps one colour wherever it appears.
   =========================================== */

.nd-c-policy    { --cat: #E63329; }
.nd-c-shipping  { --cat: #2563eb; }
.nd-c-customs   { --cat: #16a34a; }
.nd-c-economy   { --cat: #ea580c; }
.nd-c-logistics { --cat: #7c3aed; }
.nd-c-other     { --cat: #5b5e80; }

/* Tabs link to the four pages; a small live dot marks the daily one */
.np-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 0.45rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
}
.np-tab.is-active .np-live-dot { background: #fff; box-shadow: none; }
/* The tab bar stays locked under the header and never slides away */
.np-tabnav.is-hidden { transform: none; }

/* ---------- Category mix bar ---------- */
.nd-mix { margin: 1.25rem 0 2.25rem; }
.nd-mix-label { font-size: 0.92rem; color: var(--text-secondary); margin: 0 0 0.6rem; }
.nd-mix-bar { display: flex; gap: 6px; }
.nd-seg {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.nd-seg-fill {
  display: block;
  height: 12px;
  background: var(--cat);
  border-radius: var(--radius-full);
  transition: opacity 0.2s, transform 0.2s;
}
.nd-seg-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nd-seg-label b { color: var(--cat); font-weight: 800; }
.nd-seg:hover .nd-seg-fill,
.nd-seg[aria-pressed="true"] .nd-seg-fill { transform: scaleY(1.5); }
.nd-seg.is-dim .nd-seg-fill { opacity: 0.25; }
.nd-seg:focus-visible { outline: 2px solid var(--cat); outline-offset: 4px; border-radius: 6px; }
.nd-show-all {
  margin-top: 0.9rem;
  padding: 0;
  border: 0;
  background: none;
  font: 700 0.9rem 'Manrope', sans-serif;
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Story meta ---------- */
.nd-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}
.nd-cat {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cat);
  background: color-mix(in srgb, var(--cat) 10%, transparent);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}
.nd-impact { padding-left: 0.85rem; position: relative; }
.nd-impact::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
}
.nd-impact.is-positive::before { background: #059669; }
.nd-impact.is-negative::before { background: #dc2626; }
.nd-impact.is-neutral::before  { background: #94a3b8; }

.nd-desk h3 a,
.nd-desk h4 a { color: inherit; text-decoration: none; }
.nd-desk h3 a:hover,
.nd-desk h4 a:hover { color: var(--cat); }
.nd-row-source { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin: 0.5rem 0 0; }
.nd-empty { padding: 3rem 0; color: var(--text-secondary); text-align: center; }

/* ---------- Lead story + side list ---------- */
.nd-top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
}
.nd-lead,
.nd-side,
.nd-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(27,31,94,0.06);
}
.nd-lead {
  padding: 2.25rem 2.25rem 2rem;
  border-top: 4px solid var(--cat);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.nd-lead .nd-source { margin-top: auto; }
.nd-lead-summary + .nd-source { padding-top: 1rem; }
.nd-lead::after {
  content: '';
  position: absolute;
  right: -90px;
  top: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cat) 12%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
.nd-lead-title {
  font-family: 'Abril Fatface', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  color: var(--navy);
  margin: 0.2rem 0 1rem;
  max-width: 24ch;
}
.nd-lead-summary { font-size: 1.05rem; line-height: 1.75; color: var(--text-secondary); max-width: 62ch; margin: 0; }
.nd-source { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border-light); font-size: 0.85rem; color: var(--text-muted); }
.nd-source a { margin-left: 0.6rem; font-weight: 700; color: var(--cat); }

.nd-side { padding: 1.5rem 1.6rem 0.6rem; }
.nd-side-head {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 0.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-light);
}
.nd-row { padding: 1rem 0; border-bottom: 1px solid var(--border-light); }
.nd-row:last-child { border-bottom: 0; }
.nd-row .nd-meta { margin-bottom: 0.4rem; }
.nd-row-title { font-size: 1rem; font-weight: 700; line-height: 1.4; color: var(--navy); margin: 0; }

.nd-more {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.nd-item {
  padding: 1.6rem 1.75rem;
  border-top: 4px solid var(--cat);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.nd-item:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(27,31,94,0.1); }
.nd-item-title { font-size: 1.12rem; font-weight: 700; line-height: 1.35; margin: 0 0 0.55rem; color: var(--navy); }
.nd-item p:not(.nd-row-source) {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Today: links to the other three pages ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.5rem;
}
.dl-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(27,31,94,0.06);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.dl-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(27,31,94,0.1); }
.dl-card:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.dl-kind {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(230,51,41,0.06);
  border: 1px solid rgba(230,51,41,0.1);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
}
.dl-title { font-size: 1.2rem; font-weight: 800; line-height: 1.3; color: var(--navy); }
.dl-meta { margin-top: auto; font-size: 0.85rem; color: var(--text-muted); }
.dl-featured {
  background: linear-gradient(135deg, var(--navy-950), var(--navy-dark) 45%, var(--navy));
  border: 0;
  color: #fff;
}
.dl-featured .dl-kind { color: #FF6B63; background: rgba(255,77,66,0.12); border-color: rgba(255,77,66,0.2); }
.dl-featured .dl-title { font-family: 'Abril Fatface', Georgia, serif; font-weight: 400; font-size: 1.55rem; line-height: 1.2; color: #fff; }
.dl-featured .dl-meta { color: rgba(255,255,255,0.7); }

/* ---------- Featured story: every feature as a cover ---------- */
.ft-stamp { margin: 0 auto 1.5rem; max-width: 780px; }
.fc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.fc-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.6rem;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(27,31,94,0.06);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.fc-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(27,31,94,0.1); }
.fc-card:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.fc-card.is-current { border-top-color: var(--red); box-shadow: 0 0 0 2px rgba(230,51,41,0.25), 0 8px 32px rgba(27,31,94,0.06); }
.fc-card.is-current .fc-read::after { content: ' · Reading now'; color: var(--red); font-weight: 700; }
.fc-date { font-family: 'Abril Fatface', Georgia, serif; font-size: 1.05rem; color: var(--red); }
.fc-cat { font-size: 0.7rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); }
.fc-title { font-size: 1.15rem; font-weight: 800; line-height: 1.35; color: var(--navy); }
.fc-deck {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fc-read { margin-top: auto; padding-top: 0.4rem; font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Weekly insights: issue list beside the issue ---------- */
.wk-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.wk-rail {
  position: sticky;
  top: calc(var(--np-lock, 180px) + 16px);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--np-lock, 180px) - 40px);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(27,31,94,0.06);
}
.wk-rail-head {
  flex: none;
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
}
.wk-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(27,31,94,0.25) transparent;
}
.wk-list::-webkit-scrollbar { width: 6px; }
.wk-list::-webkit-scrollbar-thumb { background: rgba(27,31,94,0.25); border-radius: 3px; }
.wk-issue {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.75rem 0.7rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
}
.wk-issue:hover { background: var(--bg-alt); }
.wk-issue.is-current { background: rgba(230,51,41,0.06); }
.wk-issue:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.wk-issue-no {
  font-family: 'Abril Fatface', Georgia, serif;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--navy);
  text-align: right;
}
.wk-issue.is-current .wk-issue-no { color: var(--red); }
.wk-issue-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.wk-issue-date { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.wk-issue-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wk-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  max-width: 780px;
  margin: 0 auto 0.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy-950), var(--navy-dark) 45%, var(--navy));
  color: #fff;
}
.wk-no {
  font-family: 'Abril Fatface', Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  background: linear-gradient(135deg, #fff 20%, #FF6B63 70%, #E63329 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wk-date { font-size: 1.05rem; font-weight: 700; color: rgba(255,255,255,0.85); }
.wk-latest {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #FF6B63;
  background: rgba(255,77,66,0.12);
  border: 1px solid rgba(255,77,66,0.2);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
}
.wk-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 780px;
  margin: 2rem auto 0;
}
.wk-pager a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.3rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  line-height: 1.4;
  transition: border-color var(--duration) var(--ease);
}
.wk-pager a:hover { border-color: rgba(230,51,41,0.35); }
.wk-pager a span { font-size: 0.7rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); }
.wk-pager a.is-next { text-align: right; grid-column: 2; }

/* ---------- Archive: search and aligned rows ---------- */
.ar-search { margin: 0.5rem 0 1.5rem; }
.ar-search label { display: block; font-weight: 700; margin-bottom: 0.5rem; color: var(--navy); }
.ar-search input {
  width: 100%;
  max-width: 640px;
  height: 54px;
  padding: 0 1.25rem;
  font: 500 1rem 'Manrope', sans-serif;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(27,31,94,0.05);
}
.ar-search input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(230,51,41,0.1); }
.ar-result { min-height: 1.4em; margin: 0.6rem 0 0 0.5rem; font-size: 0.9rem; color: var(--text-secondary); }

.np-archive-item-row {
  display: grid;
  grid-template-columns: 4.5rem 5rem 7rem minmax(0, 1fr) 1.75rem;
  align-items: center;
  gap: 0 1rem;
}
[data-cat="Logistics"] .np-archive-cat { color: #7c3aed; }
[data-cat="Shipping"] .np-archive-cat { color: #2563eb; }
[data-cat="Trade Policy"] .np-archive-cat { color: #E63329; }
[data-cat="Economy"] .np-archive-cat { color: #ea580c; }
[data-cat="Customs"] .np-archive-cat { color: #16a34a; }
.np-archive-cat-select { width: auto; min-width: 220px; flex: 0 0 auto; }

/* Bullet points inside articles */
.np-body ul { list-style: disc; padding-left: 1.4rem; }
.np-body ol { list-style: decimal; padding-left: 1.4rem; }
.np-body li::marker { color: var(--red); }

/* ---------- Smaller screens ---------- */
@media (max-width: 1024px) {
  .nd-top { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr 1fr; }
  .dl-featured { grid-column: 1 / -1; }
  .fc-grid { grid-template-columns: 1fr 1fr; }
  .wk-layout { grid-template-columns: 1fr; gap: 2rem; }
  .wk-rail { position: static; max-height: 340px; order: 2; }
}
@media (max-width: 640px) {
  .nd-more, .dl-grid, .fc-grid { grid-template-columns: 1fr; }
  .nd-lead { padding: 1.6rem 1.4rem; }
  .nd-seg-label { font-size: 0.75rem; }
  .wk-pager { grid-template-columns: 1fr; }
  .wk-pager a.is-next { grid-column: 1; text-align: left; }
  .np-archive-item-row { grid-template-columns: 4rem minmax(0, 1fr) 1.5rem; }
  .np-archive-typetag, .np-archive-cat { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nd-seg-fill, .nd-item, .dl-card, .fc-card { transition: none; }
}
