/* Vantage Markets Guide — standalone editorial styles */
:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --ink: #242522;
  --muted: #595b58;
  --navy: #172d50;
  --cobalt: #2345ad;
  --coral: #c96d5c;
  --line: #c9c8c0;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, li, a, summary, th, td { overflow-wrap: anywhere; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}
a { color: var(--cobalt); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--navy); }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 4px;
  border-radius: 2px;
}
.wrap { width: min(100% - 3rem, 1120px); margin-inline: auto; }
.mast {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.identity {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  min-height: 56px;
  color: var(--ink);
  font: 700 .86rem/1.1 var(--sans);
  letter-spacing: .025em;
  text-decoration: none;
}
.mark {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 27px;
  flex: 0 0 auto;
  border-bottom: 2px solid var(--navy);
}
.mark::before, .mark::after {
  position: absolute;
  bottom: 2px;
  width: 16px;
  height: 21px;
  content: '';
  border: 2px solid var(--navy);
  background: var(--paper);
}
.mark::before { left: 1px; border-radius: 2px 4px 0 1px; transform: skewY(7deg); }
.mark::after { right: 1px; border-radius: 4px 2px 1px 0; transform: skewY(-7deg); }
.langs { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .15rem .65rem; }
.langs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .82rem; }
.langs a[aria-current='page'] { color: var(--navy); font-weight: 700; }
.crumbs { display: flex; gap: .55rem; align-items: center; margin: 1.2rem 0 2rem; color: var(--muted); font-size: .82rem; }
.crumbs a { min-height: 44px; display: inline-flex; align-items: center; }
.lead { max-width: 850px; padding: .2rem 0 2.3rem; border-bottom: 4px solid var(--coral); }
.eyebrow, .rail-label { margin: 0 0 .6rem; color: var(--navy); font-size: .75rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3 { color: var(--ink); }
h1 { max-width: 19ch; margin: 0; font: 400 clamp(2.8rem, 7vw, 5.5rem)/.99 var(--serif); letter-spacing: -.045em; }
.summary { max-width: 62ch; margin: 1.35rem 0 0; color: #424440; font-size: clamp(1.05rem, 2vw, 1.22rem); line-height: 1.55; }
.layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: start; margin: 2.6rem 0 4rem; }
.rail { position: sticky; top: 1.5rem; border-left: 3px solid var(--navy); padding: .4rem 0 .6rem 1rem; }
.rail-label { letter-spacing: .08em; }
.rail ul, .article ul, .article ol { margin: .55rem 0 0; padding-left: 1.25rem; }
.rail ul { list-style: none; padding: 0; }
.rail li { margin: .15rem 0; }
.rail a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: .9rem; }
.article { min-width: 0; max-width: 68ch; }
.section { position: relative; padding: 0 0 2rem; margin: 0 0 2.2rem; border-bottom: 1px solid var(--line); scroll-margin-top: 1.5rem; }
.section:last-child { border-bottom: 0; }
.section-index { margin: 0 0 .35rem; color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
h2 { margin: 0 0 .65rem; font: 400 clamp(1.8rem, 3vw, 2.45rem)/1.1 var(--serif); letter-spacing: -.025em; }
h3 { font: 700 1.1rem/1.3 var(--sans); }
.article p { max-width: 64ch; }
.article ol li, .article ul li { padding: .2rem 0 .4rem .15rem; }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem 1.2rem; margin-top: 1.4rem !important; padding: 0 !important; list-style: none; }
.topic-link { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .65rem .15rem; border-top: 1px solid var(--line); color: var(--ink); font-weight: 700; text-decoration: none; }
.topic-link span:last-child { color: var(--cobalt); font-size: 1.2rem; }
.topic-link:hover { color: var(--cobalt); }
.pathfinder { margin: 0 0 2.2rem; border: 2px solid var(--navy); background: #fffefa; }
.pathfinder > summary { min-height: 52px; display: flex; align-items: center; padding: .7rem 1rem; color: #fff; background: var(--navy); cursor: pointer; font-weight: 700; }
.pathfinder > p { margin: 0; padding: 1rem 1.1rem 1.2rem; font-size: 1.04rem; }
details:not(.pathfinder) { margin: 1.3rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details:not(.pathfinder) > summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
details:not(.pathfinder) > p { margin-top: 0; }
summary { color: var(--ink); }
.source-note { margin-top: 1.25rem; color: var(--muted); font-size: .84rem; }
.back-link { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; }
figure { margin: 1.5rem 0; }
figcaption { margin-top: .45rem; color: var(--muted); font-size: .84rem; }
table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; text-align: left; }
th, td { padding: .7rem .55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--navy); font-size: .85rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: 1.2rem 0 1.8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }

@media (max-width: 700px) {
  .wrap { width: min(100% - 2rem, 600px); }
  .mast { align-items: flex-start; flex-direction: column; justify-content: center; gap: .25rem; padding: .7rem 0 .65rem; }
  .identity { min-height: 48px; }
  .langs { justify-content: flex-start; gap: 0 .8rem; }
  .langs a { min-height: 44px; }
  .crumbs { margin: .75rem 0 1.3rem; }
  .lead { padding-bottom: 1.7rem; }
  h1 { max-width: 17ch; font-size: clamp(2.65rem, 13vw, 4rem); }
  .layout { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
  .article { order: 0; width: 100%; }
  .rail { position: static; order: 1; width: 100%; border-left: 3px solid var(--navy); }
  .rail ul { display: flex; flex-wrap: wrap; gap: .15rem .9rem; }
  .rail li { margin: 0; }
  .rail a { min-height: 44px; }
  .topic-grid { grid-template-columns: 1fr; }
  .pathfinder { margin-bottom: 1.7rem; }
  .section { margin-bottom: 1.7rem; }
}

@media (max-width: 380px) {
  .wrap { width: calc(100% - 1.5rem); }
  .langs { gap: 0 .55rem; }
  .langs a { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
