/* Shared styles for the Insights pages. Same palette and type as the main site:
   the blog sits at the sunlit surface, so pages are light and built for reading. */
:root {
  color-scheme: light;
  --surface: #EEF6F4;
  --paper: #FBFDFC;
  --shallows: #BCDCDD;
  --abyss: #071F33;
  --seabed: #04101B;
  --ink: #0A2A35;
  --ink-soft: #3C5A63;
  --foam-soft: #A9C3C8;
  --rule: rgba(10, 42, 53, 0.16);
  --tide: #1F5FA8;
  --lantern: #F0B45E;
  --note-bg: #FBF0D3;
  --note-ink: #6E4B00;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--tide); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 75rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

/* header and footer, matching the main site */
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: 0.625rem; font-weight: 600; letter-spacing: -0.02em; font-size: 1.125rem; line-height: 1.15; text-decoration: none; }
.wordmark img { width: 7rem; height: 7rem; flex: none; border-radius: 50%; }
.masthead nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; padding: 0; list-style: none; }
.masthead nav a { font-size: 0.9375rem; font-weight: 500; text-decoration: none; padding-block: 0.25rem; border-bottom: 1px solid transparent; }
.masthead nav a:hover, .masthead nav a[aria-current] { border-bottom-color: var(--tide); }
.menu-toggle { display: none; align-items: center; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: 0.9375rem; font-weight: 500; padding: 0.375rem 0.875rem; border-radius: 999px; cursor: pointer; }
@media (max-width: 46rem) {
  .masthead .wrap { padding-block: 0.75rem; gap: 0.5rem 1rem; }
  .wordmark { font-size: 1rem; min-width: 0; flex: 1 1 0; }
  .wordmark img { width: 4rem; height: 4rem; }
  .menu-toggle { display: inline-flex; }
  .masthead nav { display: none; flex-basis: 100%; }
  .masthead nav.open { display: block; }
  .masthead nav ul { flex-direction: column; gap: 0; padding-bottom: 0.5rem; }
  .masthead nav a { display: block; padding-block: 0.625rem; border-bottom: 1px solid var(--rule); }
}
footer { background: var(--seabed); color: var(--foam-soft); font-size: 0.9375rem; margin-top: clamp(4rem, 9vw, 8.5rem); }
.legal { flex-basis: 100%; margin: 0.625rem 0 0; padding-top: 1.125rem; border-top: 1px solid rgba(232, 242, 241, 0.12); font-size: 0.8125rem; line-height: 1.6; max-width: 62rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.625rem 2.5rem; padding-block: 2.5rem; }

.eyebrow { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tide); }
.eyebrow span { color: var(--ink-soft); }
/* Same scale as the home page: labels 0.8125, menu 0.9375, secondary 1, body 1.0625, lede, section heading, page headline. */
h1 { font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); font-weight: 500; line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; }
p { text-wrap: pretty; }
.standfirst { font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.375rem); line-height: 1.5; color: var(--ink-soft); max-width: 38rem; }

/* index */
.intro { display: grid; gap: 1.75rem; padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--rule); }
.topics { display: flex; flex-wrap: wrap; gap: 0.375rem 1.25rem; padding: 0; list-style: none; font-size: 0.9375rem; color: var(--ink-soft); }
.topics li::before { content: "· "; color: var(--tide); }
.posts { padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.posts li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0.625rem clamp(1.5rem, 4vw, 4.5rem); padding-block: 2.5rem; border-bottom: 1px solid var(--rule); }
.posts h2 { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.2; }
.posts h2 a { text-decoration: none; }
.posts h2 a:hover { color: var(--tide); }
.posts p { color: var(--ink-soft); max-width: 40rem; margin-top: 0.625rem; }
.posts .eyebrow { padding-top: 0.375rem; display: grid; gap: 0.125rem; align-content: start; }

/* article */
.article-head { display: grid; gap: 1.75rem; padding-block: clamp(3rem, 6vw, 5.5rem) clamp(1.75rem, 3vw, 2.5rem); border-top: 1px solid var(--rule); }
.byline { font-size: 0.9375rem; color: var(--ink-soft); }
.prose { max-width: 42rem; display: grid; gap: 1.25rem; }
.prose h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; margin-top: 2.5rem; }
.prose h3 { font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tide); margin-top: 0.5rem; }
.prose a { color: var(--tide); text-underline-offset: 0.2em; }
.prose ul, .prose ol { padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.view { border-left: 3px solid var(--lantern); padding: 0.25rem 0 0.25rem 1.125rem; display: grid; gap: 0.75rem; }
.tablewrap { overflow-x: auto; max-width: 56rem; margin-block: 0.5rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
th { text-align: left; font-family: var(--mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); padding: 0.5rem 1rem 0.5rem 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
td { padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; min-width: 9rem; }
td:first-child { font-weight: 600; min-width: 7rem; }
.sources { font-size: 0.9375rem; color: var(--ink-soft); }
.back { display: inline-block; margin-top: 2rem; font-weight: 500; color: var(--tide); text-underline-offset: 0.2em; }
.draft { background: var(--note-bg); color: var(--note-ink); font-size: 0.9375rem; padding: 0.625rem 1rem; border-radius: 6px; max-width: 42rem; }

@media (max-width: 46rem) {
  .posts li { grid-template-columns: minmax(0, 1fr); }
  .posts .eyebrow { display: flex; gap: 0.75rem; }
}
