/* Insights — shares the tokens and masthead of the emmasanti.ai homepage */

:root {
  --paper: #FCFCFB;
  --panel: #F5F4F2;
  --ink: #1C1B22;
  --muted: #6A6875;
  --rule: rgba(28, 27, 34, 0.12);
  --rule-strong: rgba(28, 27, 34, 0.28);
  --accent: #534AB7;
  --accent-ink: #EEEDFE;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, sans-serif;
  --measure: 46ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --read: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131319;
    --panel: #1A1A21;
    --ink: #EDECF2;
    --muted: #9C9AA8;
    --rule: rgba(237, 236, 242, 0.14);
    --rule-strong: rgba(237, 236, 242, 0.32);
    --accent: #AFA9EC;
    --accent-ink: #1C1B22;
  }
}

*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.shell { max-width: 1080px; margin: 0 auto; padding-inline: var(--gutter); }

/* Masthead — same as the homepage */
.masthead { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--rule); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.875rem; font-weight: 500; letter-spacing: 0.03em; text-decoration: none; white-space: nowrap; }
.wordmark__mark { width: 18px; height: 18px; flex: 0 0 auto; }
.nav { display: flex; align-items: center; gap: 1.75rem; font-size: 0.8125rem; }
.nav a { color: var(--muted); text-decoration: none; padding-block: 0.25rem; border-bottom: 1px solid transparent; transition: color 120ms, border-color 120ms; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a.nav__call { color: var(--ink); border-bottom-color: var(--rule-strong); }
@media (max-width: 720px) {
  .nav a:not(.nav__call):not(.nav__keep) { display: none; }
  .nav { gap: 1.25rem; }
}

.eyebrow { margin: 0 0 1.25rem; font-size: 0.75rem; letter-spacing: 0.09em; color: var(--muted); }
.eyebrow a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.eyebrow a:hover { border-bottom-color: var(--accent); }

.btn { display: inline-block; font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1; padding: 0.85rem 1.4rem; border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); text-decoration: none; cursor: pointer; transition: opacity 120ms; }
.btn:hover { opacity: 0.88; }
.link-quiet { font-size: 0.875rem; text-decoration: none; border-bottom: 1px solid var(--rule-strong); padding-bottom: 3px; transition: border-color 120ms; }
.link-quiet:hover { border-bottom-color: var(--accent); }
.actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.75rem; }

/* Insights list */
.listing { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(3rem, 7vw, 4.5rem); }
.listing h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.35rem, 4.6vw, 3.1rem); line-height: 1.14; letter-spacing: -0.015em; margin: 0; }
.listing .lede { margin: 1.1rem 0 0; max-width: var(--measure); color: var(--muted); font-size: 0.9375rem; }
.posts { list-style: none; margin: clamp(2.5rem, 6vw, 3.5rem) 0 0; padding: 0; }
.post { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: clamp(1rem, 4vw, 2rem); padding-block: 1.75rem; border-top: 1px solid var(--rule); }
.post:last-child { border-bottom: 1px solid var(--rule); }
.post time { font-size: 0.8125rem; color: var(--muted); padding-top: 0.3rem; }
.post h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 2.4vw, 1.5rem); line-height: 1.3; margin: 0 0 0.5rem; text-wrap: balance; }
.post h2 a { text-decoration: none; }
.post h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.post p { margin: 0; color: var(--muted); font-size: 0.875rem; max-width: 58ch; }
@media (max-width: 600px) {
  .post { grid-template-columns: 1fr; gap: 0.35rem; }
  .post time { padding-top: 0; }
}

/* Article */
.article { padding-block: clamp(3rem, 8vw, 5rem) 0; }
.article__head { max-width: var(--read); margin: 0 auto; }
.article h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 4.4vw, 2.85rem); line-height: 1.15; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
.dek { font-family: var(--serif); font-style: italic; font-size: 1.1875rem; line-height: 1.5; color: var(--muted); margin: 1rem 0 0; }
.byline { margin: 1.5rem 0 0; font-size: 0.8125rem; color: var(--muted); }

figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 4px; background: var(--panel); }
figcaption { margin-top: 0.65rem; font-size: 0.75rem; line-height: 1.5; color: var(--muted); }
.lead-figure { max-width: 56rem; margin: clamp(2rem, 5vw, 3rem) auto 0; }

.prose { max-width: var(--read); margin: clamp(2rem, 5vw, 3rem) auto 0; font-family: var(--serif); font-size: 1.1875rem; line-height: 1.7; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 1.65rem); line-height: 1.3; margin: 2.2em 0 0.7em; text-wrap: balance; }
.prose > h2:first-child { margin-top: 0; }
.prose strong { font-weight: 600; }
.prose a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.55em; padding-left: 0.2em; }
.prose li::marker { color: var(--accent); }
.prose figure { margin: 2em 0; }
@media (max-width: 600px) {
  .prose { font-size: 1.125rem; }
}

.next { max-width: var(--read); margin: clamp(2.5rem, 6vw, 3.5rem) auto 0; padding-block: clamp(2rem, 5vw, 3rem) clamp(3rem, 7vw, 4.5rem); border-top: 1px solid var(--rule); }
.next h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 3vw, 1.75rem); line-height: 1.3; margin: 0 0 0.5rem; }
.next p { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.next .eyebrow { margin-bottom: 0.75rem; }

/* Footer — same as the homepage */
.colophon { border-top: 1px solid var(--rule); }
.colophon__inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding-block: 1.25rem; font-size: 0.75rem; color: var(--muted); }
.colophon nav { display: flex; gap: 1.25rem; }
.colophon a { text-decoration: none; }
.colophon a:hover { color: var(--ink); }
