/* The Cart Plot: deep navy, warm white, blue accents; structured layouts for case studies and comparisons. */
@font-face { font-family: 'Source Serif'; src: url('/fonts/source-serif/source-serif-4-latin-opsz-normal.woff2') format('woff2-variations'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Serif'; src: url('/fonts/source-serif/source-serif-4-latin-opsz-italic.woff2') format('woff2-variations'); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/plex/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/plex/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/plex/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --bg: #FBF9F5; --card: #FFFFFF; --ink: #12213B; --ink-2: #33415C; --muted: #5E6A80; --rule: #D9DEE8; --tint: #EEF2F9;
  --accent: #2F6FEB; --accent-ink: #1F57C8; --navy: #12213B; --navy-2: #1B2D4E;
  --display: 'Source Serif', 'Iowan Old Style', Georgia, serif; --text: 'Source Serif', Georgia, serif; --ui: 'Plex', 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1200px; --radius: 4px; --measure: 70ch;
}
body.theme-cartplot { font-size: 18px; line-height: 1.62; }
.theme-cartplot .headline { font-weight: 650; }
.label { font: 600 12.5px/1.4 var(--ui); text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-ink); margin: 0 0 10px; }
.label a { color: inherit; text-decoration: none; }

/* Header */
.site-header { background: var(--navy); color: #fff; }
.bar { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.brand img { border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.wordmark { font: 700 1.6rem/1 var(--display); letter-spacing: -0.01em; }
.edition { font: 13px var(--ui); color: #A9B6CE; margin-right: auto; padding-left: 16px; border-left: 1px solid #34466A; }
.bar .search-form { width: min(280px, 34vw); background: var(--navy-2); border-color: #34466A; }
.bar .search-form input, .bar .search-form button { color: #fff; }
.bar .search-form input::placeholder { color: #A9B6CE; }
.navrow { background: var(--navy-2); border-top: 1px solid #2A3D62; }
.navrow ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.navrow ul::-webkit-scrollbar { display: none; }
.navrow a { display: block; padding: 11px 14px; font: 500 14.5px var(--ui); color: #DCE3F0; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.navrow a:hover { color: #fff; }
.navrow a[aria-current='page'] { color: #fff; border-bottom-color: var(--accent); }

/* Feature */
.cp-feature { background: var(--navy); color: #fff; padding: clamp(28px, 5vw, 60px) 0; }
.cp-feature .label { color: #8DB2FF; }
.cp-feature-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.cp-feature h1.headline { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.08; }
.cp-feature .headline a:hover { color: #fff; text-decoration-color: var(--accent); }
.cp-feature .dek { color: #D2DAE8; font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
.cp-feature .meta { color: #A9B6CE; }
.cp-feature-img img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.cp-feature a { color: inherit; }
.cp-empty { max-width: 860px; }
.cp-empty a { color: #8DB2FF; }

/* Index table */
.cp-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; padding: 40px 0 14px; border-bottom: 2px solid var(--navy); margin-bottom: 4px; }
.cp-head h2 { font: 700 clamp(1.5rem, 3vw, 2rem) var(--display); margin: 0; }
.cp-head p { margin: 0; font: 14px var(--ui); color: var(--muted); }
.cp-table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: 14.5px; }
.cp-table th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 10px 12px 8px 0; border-bottom: 1px solid var(--rule); }
.cp-table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.cp-table .no { font: 600 13px var(--ui); color: var(--accent-ink); font-variant-numeric: tabular-nums; width: 48px; }
.cp-table .t { font: 650 1.12rem/1.3 var(--display); text-decoration: none; color: var(--ink); display: block; }
.cp-table .t:hover { color: var(--accent-ink); text-decoration: underline; }
.cp-table .d { display: block; color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.cp-table .date { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.cp-table tbody tr:hover { background: var(--tint); }

/* Cards and sections */
.cp-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; padding-top: 18px; }
.cp-card img { aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 12px; }
.cp-card .headline { font-size: 1.2rem; }
.cp-desk:nth-of-type(even) .cp-card .label { color: var(--muted); }
.cp-section-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 18px; }
.cp-section { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--accent); text-decoration: none; font-family: var(--ui); border-radius: var(--radius); }
.cp-section strong { font: 700 1.15rem var(--display); }
.cp-section span { font-size: 14px; color: var(--ink-2); }
.cp-section em { font-style: normal; font-size: 13px; color: var(--muted); margin-top: auto; }
.cp-section:hover { border-color: var(--accent); }

/* Article */
.cp-article-head { background: var(--tint); border-bottom: 1px solid var(--rule); padding: clamp(26px, 5vw, 52px) 0 clamp(20px, 3vw, 30px); }
.cp-article-head h1.headline { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.1; max-width: 26ch; }
.cp-article-head .dek { font-size: clamp(1.08rem, 1.9vw, 1.3rem); max-width: 60ch; }
.cp-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 22px 0 0; font: 14px var(--ui); }
.cp-facts dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.cp-facts dd { margin: 2px 0 0; font-weight: 500; }
.cp-article-grid { display: grid; grid-template-columns: 240px minmax(0, var(--measure)); gap: clamp(28px, 5vw, 60px); padding-top: 30px; }
.cp-toc { position: sticky; top: 16px; align-self: start; border-left: 3px solid var(--navy); padding-left: 16px; }
.cp-toc ol { counter-reset: c; list-style: none; padding: 0; }
.cp-toc li { counter-increment: c; display: grid; grid-template-columns: 26px 1fr; }
.cp-toc li::before { content: counter(c, decimal-leading-zero); font: 600 12px/1.6 var(--ui); color: var(--accent-ink); }
.cp-glance { background: var(--card); border: 1px solid var(--rule); border-left: 5px solid var(--accent); padding: 16px 20px; margin-bottom: 26px; font-family: var(--ui); font-size: 15px; }
.cp-glance h2 { color: var(--accent-ink); }
.hero { margin-bottom: 24px; }
.hero img { width: 100%; border-radius: var(--radius); }
.prose h2 { border-top: 1px solid var(--rule); padding-top: 22px; }
.table-wrap { border: 0; border-top: 3px solid var(--navy); border-radius: 0; }
.table-wrap th { background: var(--navy); color: #fff; }
.table-wrap tbody tr:nth-child(even) td { background: var(--tint); }
.table-wrap td:first-child { font-weight: 600; }
.sources { border-top-color: var(--navy); }
.cp-related { padding-top: 12px; }
.cp-cat-head .headline { max-width: none; }

/* Footer */
.site-footer { background: var(--navy); color: #C9D3E4; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.foot-brand { font: 700 1.4rem var(--display); color: #fff; margin: 0; }
.foot-tag { margin: 4px 0 0; color: #A9B6CE; }
.site-footer a:hover { color: #8DB2FF; }

@media (max-width: 1000px) {
  .cp-feature-grid { grid-template-columns: minmax(0, 1fr); }
  .cp-feature-img { order: -1; }
  .cp-cols { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .cp-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-article-grid { grid-template-columns: minmax(0, 1fr); }
  .cp-toc { display: none; }
  .edition { display: none; }
}
@media (max-width: 640px) {
  body.theme-cartplot { font-size: 17px; }
  .bar { flex-wrap: wrap; }
  .bar .search-form { width: 100%; }
  .cp-table thead { display: none; }
  .cp-table tr { display: grid; grid-template-columns: 40px 1fr; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .cp-table td { border: 0; padding: 0 8px 0 0; }
  .cp-table td:nth-child(n+3) { grid-column: 2; font-size: 13px; color: var(--muted); padding-top: 4px; }
  .cp-table td:nth-child(n+3) .kicker { font-size: 11px; }
  .cp-table .d { display: none; }
  .cp-section-grid { grid-template-columns: minmax(0, 1fr); }
}
