/* ==========================================================================
   APPTHIS — markets-news publisher demo (ad-placement preview)
   Editorial identity: paper columns on a cool gutter, terminal-teal brand,
   Newsreader serif headlines, Archivo chrome, IBM Plex Mono ticker/data.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Archivo:wght@500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #eef0f2;
  --paper: #ffffff;
  --ink: #0e1116;
  --ink-2: #3c4350;
  --ink-3: #717784;
  --line: #e3e6ea;
  --line-strong: #d3d8de;

  --brand: #0b5d4e;       /* terminal teal-green */
  --brand-deep: #084236;
  --up: #0e8a43;
  --down: #d2342a;
  --exclusive: #b11226;   /* oxblood — EXCLUSIVE tag only */

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Archivo", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --container: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ----- Signature: live ticker tape ----- */
.tape {
  background: var(--ink);
  color: #e8eaed;
  border-bottom: 1px solid #000;
  overflow: hidden;
}
.tape-inner {
  display: flex;
  align-items: stretch;
  max-width: 100%;
}
.tape-tag {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: var(--brand);
  color: #fff;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 2;
}
.tape-tag .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
  animation: blink 1.6s ease-in-out infinite;
}
.tape-mask {
  position: relative;
  overflow: hidden;
  flex: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.tape-track {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding: 8px 0;
  white-space: nowrap;
  will-change: transform;
  animation: tape 48s linear infinite;
}
.tape-mask:hover .tape-track { animation-play-state: paused; }
.tick {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}
.tick b { font-weight: 600; color: #fff; }
.tick .px { color: #c4c8cf; }
.tick .up { color: #3ad07e; }
.tick .down { color: #ff6f63; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ----- Masthead ----- */
.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 14px;
}
.wordmark { display: flex; align-items: baseline; gap: 9px; }
.wordmark .logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1;
}
.wordmark .logo .dot { color: var(--brand); }
.wordmark .kicker {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.masthead-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.dateline {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  text-align: right;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 13px;
  background: #fff;
}
.search svg { width: 15px; height: 15px; }
.btn-signin {
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 140ms ease;
}
.btn-signin:hover { background: var(--brand-deep); }

/* ----- Primary nav ----- */
.nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav .wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 46px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav .wrap::-webkit-scrollbar { display: none; }
.nav a {
  flex: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-2);
  height: 46px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 140ms ease;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* ----- Topic chips ----- */
.chips {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.chips .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 38px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips .wrap::-webkit-scrollbar { display: none; }
.chips a {
  flex: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-3);
}
.chips a:hover { color: var(--brand); }
.chips a.hot { color: var(--down); }

/* ----- Fund spotlight promo strip ----- */
.promo {
  background: linear-gradient(90deg, #f3fbf8, #eef0f2);
  border-bottom: 1px solid var(--line);
}
.promo .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 44px;
  font-family: var(--sans);
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
}
.promo .pill {
  font-weight: 800; font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brand);
  border: 1px solid var(--brand); border-radius: 4px; padding: 3px 7px;
  flex: none;
}
.promo .fund { font-weight: 700; color: var(--ink); }
.promo .ret { color: var(--ink-2); }
.promo .ret b { font-family: var(--mono); color: var(--up); }
.promo .go {
  margin-left: auto; flex: none;
  font-weight: 700; color: var(--brand);
}
.promo .partner { flex: none; color: var(--ink-3); font-size: 10px; letter-spacing: 0.08em; }

/* ----- Ad slots ----- */
.ad { display: flex; flex-direction: column; align-items: center; margin: 0 auto; }
.ad-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans);
  font-size: 9px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 5px;
}
.ad-head .rm { color: var(--ink-3); font-weight: 600; letter-spacing: 0.04em; }
.ad a { display: block; line-height: 0; }
.ad img {
  display: block; max-width: 100%; height: auto;
  border: 1px solid var(--line);
}
.ad-billboard { padding: 18px 0; background: var(--bg); }

/* ----- Main grid ----- */
.layout {
  padding: 24px 0 40px;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: start;
}
.col { min-width: 0; }

/* Lead story */
.eyebrow {
  font-family: var(--sans);
  font-weight: 700; font-size: 11px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-3);
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px; background: var(--brand);
}
.tag {
  font-family: var(--sans); font-weight: 800; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--exclusive);
  padding: 2px 6px; border-radius: 3px;
  vertical-align: middle;
}
.lead h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 3.3vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
}
.lead h1 a:hover { color: var(--brand-deep); }
.standfirst {
  font-size: 18px; line-height: 1.5; color: var(--ink-2);
  margin: 0 0 12px;
}
.byline {
  font-family: var(--sans); font-size: 12px; color: var(--ink-3);
  margin: 0 0 16px;
}
figure.photo { margin: 0 0 14px; }
figure.photo .frame {
  border-radius: 4px; overflow: hidden; border: 1px solid var(--line-strong);
  background: var(--brand-deep);
}
figure.photo svg { display: block; width: 100%; height: auto; }
figure.photo figcaption {
  font-family: var(--sans); font-size: 11px; color: var(--ink-3);
  margin-top: 6px;
}
.hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* Bulleted secondary stories */
.storylist { list-style: none; margin: 0; padding: 0; }
.storylist li {
  display: flex; gap: 10px; padding: 12px 0;
  border-top: 1px solid var(--line);
}
.storylist li:first-child { border-top: 0; }
.storylist .mk {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); margin-top: 8px;
}
.storylist h3 {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: 18px; line-height: 1.25;
}
.storylist h3 a:hover { color: var(--brand-deep); }

/* Middle column blocks */
.block { margin-bottom: 22px; }
.section-head {
  font-family: var(--sans); font-weight: 700; font-size: 12px;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink);
  border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-head .live {
  width: 7px; height: 7px; border-radius: 50%; background: var(--down);
  animation: blink 1.6s ease-in-out infinite;
}
.focus-lead {
  font-family: var(--serif); font-weight: 600; font-size: 20px;
  line-height: 1.22; margin: 0 0 10px;
}
.focus-lead a:hover { color: var(--brand-deep); }
.dashlist { list-style: none; margin: 0; padding: 0; }
.dashlist li {
  font-size: 15.5px; line-height: 1.4; color: var(--ink-2);
  padding: 8px 0 8px 16px; position: relative;
  border-top: 1px dashed var(--line-strong);
}
.dashlist li::before {
  content: ""; position: absolute; left: 0; top: 14px;
  width: 7px; height: 1px; background: var(--ink-3);
}
.dashlist a:hover { color: var(--brand-deep); }

/* The big number */
.bignum {
  background: var(--ink); color: #fff; border-radius: 6px;
  padding: 20px 22px;
}
.bignum .eyebrow { color: #8a91a0; }
.bignum .eyebrow::before { background: #3ad07e; }
.bignum .num {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(40px, 6vw, 58px); line-height: 1; letter-spacing: -0.02em;
  margin: 2px 0 8px;
}
.bignum .num small { font-size: 0.5em; color: #8a91a0; font-weight: 500; }
.bignum p { margin: 0; color: #c4c8cf; font-size: 15px; }

/* Right rail */
.rail { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 60px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden;
}
.card .card-head {
  font-family: var(--sans); font-weight: 700; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.quote-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-top: 1px solid var(--line);
  font-family: var(--sans);
}
.quote-row:first-of-type { border-top: 0; }
.quote-row .sym { font-weight: 700; font-size: 13px; flex: 1; }
.quote-row .last { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.quote-row .chg { font-family: var(--mono); font-size: 12px; width: 64px; text-align: right; }
.quote-row .chg.up { color: var(--up); }
.quote-row .chg.down { color: var(--down); }

.advisor { padding: 16px 14px; }
.advisor .who { display: flex; align-items: center; gap: 11px; }
.advisor .avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 700; font-size: 15px;
}
.advisor .name { font-family: var(--sans); font-weight: 700; font-size: 14px; }
.advisor .reg { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.advisor p { margin: 12px 0 14px; font-size: 15px; color: var(--ink-2); line-height: 1.4; }
.advisor .btn-ask {
  width: 100%; height: 36px; border: 1px solid var(--brand);
  background: #fff; color: var(--brand);
  font-family: var(--sans); font-weight: 700; font-size: 13px;
  border-radius: 6px; cursor: pointer; transition: background-color 140ms ease, color 140ms ease;
}
.advisor .btn-ask:hover { background: var(--brand); color: #fff; }

/* In-content leaderboard */
.ad-inline { margin: 8px 0 4px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ----- Footer ----- */
.foot {
  background: var(--ink); color: #aeb4c0; margin-top: 8px;
  font-family: var(--sans); font-size: 13px;
}
.foot .wrap { padding: 26px 20px; }
.foot .flogo { font-weight: 800; font-size: 18px; color: #fff; letter-spacing: -0.03em; }
.foot .flogo .dot { color: #3ad07e; }
.foot nav { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 16px; }
.foot nav a { color: #aeb4c0; }
.foot nav a:hover { color: #fff; }
.foot .disclaimer { color: #6b7280; font-size: 11.5px; line-height: 1.5; max-width: 720px; }

/* ----- Mobile sticky anchor ad ----- */
.mobile-anchor {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--line-strong);
  padding: 5px 0; text-align: center;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.08);
}
.mobile-anchor .ad-head { justify-content: center; gap: 8px; margin-bottom: 3px; }

/* ----- Vignette overlay ----- */
.vignette {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 14, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: vfade 220ms ease-out;
}
.vignette[hidden] { display: none; }
@keyframes vfade { from { opacity: 0; } to { opacity: 1; } }
.vignette-frame { position: relative; max-width: 92vw; max-height: 90vh; }
.vignette-frame .ad-head { color: #c4c8cf; margin-bottom: 8px; }
.vignette-frame img {
  display: block; max-width: 92vw; max-height: 84vh; width: auto; height: auto;
  border-radius: 8px; box-shadow: 0 18px 50px rgba(0,0,0,0.55);
}
.vignette-close {
  position: absolute; top: -16px; right: -16px;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #fff; color: #111; font-size: 22px; line-height: 36px;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 120ms ease;
}
.vignette-close:hover { transform: scale(1.08); }

/* ----- Responsive ----- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .rail { position: static; }
  .lead { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .grid { grid-template-columns: 1fr; gap: 26px; }
  .rail { flex-direction: column; }
  .dateline { display: none; }
  .ad-billboard { padding: 12px 0; }
  .mobile-anchor { display: block; }
  .layout { padding-bottom: 84px; }
}
@media (max-width: 460px) {
  .masthead .wrap { gap: 12px; }
  .search { display: none; }
  .wordmark .logo { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  .tape-track { animation: none; }
  .tape-mask { overflow-x: auto; }
  .live-dot, .section-head .live { animation: none; }
  *, *::before, *::after { transition-duration: 0.001ms !important; }
}
