/* grail.works — /insights article reading surface (v4 "sand-tone").
   A warm printed-object reading experience: cream paper, Fraunces display +
   Source Serif body, teal ink, single gold accent. Chrome (header/footer)
   comes from base.html + site.css; this file styles only the article surface.
   Fonts (Fraunces, Source Serif 4) are loaded by article.html's extra_head.
   Measure is ONE column (text + figures share it) at a laptop-optimal ~72–76ch. */

:root{
  --cream:#F4ECDA; --teal:#14373A; --teal-deep:#0E2A2C; --ink:#23312E;
  --mute:#6A7B79; --gold:#C99A3B; --amber:#B07A1E; --deck:#3F524F;
  --measure:800px;
}

/* the site header sits over cream here (no dark hero), so render the real
   header component in its own solid state from the top instead of translucent */
body.page-article header.site{background:rgba(11,15,22,.9);}

/* page surface + a whisper of paper grain (self-contained SVG, ~4.5% net) */
body.page-article{background:#F4ECDA;color:var(--ink);
  font-family:"Source Serif 4",Georgia,serif;font-size:21px;line-height:1.72;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}
body.page-article::before{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%27180%27%20height%3D%27180%27%3E%3Cfilter%20id%3D%27p%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.85%27%20numOctaves%3D%272%27%20stitchTiles%3D%27stitch%27%20result%3D%27n%27/%3E%3CfeColorMatrix%20in%3D%27n%27%20type%3D%27saturate%27%20values%3D%270%27/%3E%3C/filter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23p%29%27%20opacity%3D%270.5%27/%3E%3C/svg%3E") repeat;
  background-size:180px 180px;opacity:.09;mix-blend-mode:multiply;}

/* ---- article ---- */
.ins-article{padding:44px 24px 40px;position:relative;z-index:1;}
.ins-column{max-width:var(--measure);margin:0 auto;}

/* kicker (the template's byline, restyled) */
.ins-byline{font-family:'Inter',sans-serif;text-transform:uppercase;letter-spacing:2.6px;
  font-size:12.5px;font-weight:600;color:var(--gold);margin:0 0 24px;}
.ins-byline::before{content:"Insight\00a0\00b7\00a0";}
.ins-byline a{color:inherit;text-decoration:none;border-bottom:1px solid rgba(201,154,59,.5);}

.ins-title{font-family:'Fraunces',serif;font-weight:600;font-size:clamp(40px,5.2vw,60px);
  line-height:1.03;letter-spacing:-.6px;color:var(--teal);margin:0 0 6px;font-optical-sizing:auto;}

.ins-body{color:var(--ink);}
.ins-body p{margin:0 0 23px;}
.ins-body p.sqsrte-large{font-size:21px;line-height:1.72;}
.ins-body p.sqsrte-small{font-size:15px;line-height:1.55;color:var(--mute);}

/* headings: Fraunces teal with a small gold rule */
.ins-body h2,.ins-body h3,.ins-body h4{font-family:'Fraunces',serif;font-weight:600;color:var(--teal);
  line-height:1.18;letter-spacing:-.3px;margin:54px 0 6px;}
.ins-body h2{font-size:32px;}
.ins-body h3{font-size:28px;}
.ins-body h4{font-size:22px;}
.ins-body h2::before,.ins-body h3::before,.ins-body h4::before{
  content:"";display:block;width:34px;height:3px;background:var(--gold);border-radius:2px;margin-bottom:18px;}
.ins-body h2 strong,.ins-body h3 strong,.ins-body h4 strong{font-weight:inherit;}

/* the stand-first / deck = the first h3 (wraps an <em>): italic serif, no rule */
.ins-body > h3:first-of-type:has(em){font-family:"Source Serif 4",serif;font-weight:400;
  font-size:25px;line-height:1.5;color:var(--deck);margin:26px 0 42px;max-width:33em;letter-spacing:0;}
.ins-body > h3:first-of-type:has(em)::before{display:none;}
.ins-body > h3:first-of-type:has(em) em{font-style:italic;}
/* drop cap on the first paragraph after the deck */
.ins-body > h3:first-of-type:has(em) + p::first-letter{float:left;font-family:'Fraunces',serif;
  font-weight:600;color:var(--teal);font-size:70px;line-height:.66;padding:9px 14px 0 0;}

.ins-body strong{font-weight:600;color:var(--teal-deep);}
.ins-body em{font-style:italic;}
.ins-body a{color:var(--teal);text-decoration:none;border-bottom:1px solid var(--gold);transition:background .15s ease;}
.ins-body a:hover{background:rgba(201,154,59,.16);}

/* answer-first (present in some articles) */
.ins-body .answer-first{border-left:3px solid var(--gold);padding:4px 0 4px 20px;
  font-weight:600;color:var(--teal-deep);white-space:normal;margin:26px 0;}

/* lists */
.ins-body ul,.ins-body ol{margin:0 0 23px;padding-left:0;}
.ins-body li{margin:0 0 16px;}
.ins-body li p{margin:0;}
.ins-body ul{list-style:none;}
.ins-body ul li{position:relative;padding-left:26px;}
.ins-body ul li::before{content:"";position:absolute;left:2px;top:.66em;width:7px;height:7px;background:var(--gold);border-radius:50%;}
.ins-body ol{list-style:decimal;padding-left:1.4em;}
.ins-body ol li{padding-left:6px;}
.ins-body ol li::marker{color:var(--gold);font-weight:600;}

/* blockquote / pull-quote */
.ins-body blockquote{margin:36px 0;padding:2px 0 2px 26px;border-left:3px solid var(--gold);
  font-family:'Fraunces',serif;font-style:italic;font-weight:500;font-size:26px;line-height:1.35;color:var(--teal);}

/* inline colour + highlight utilities (Squarespace-origin) */
.ins-body .sqsrte-text-highlight{background:linear-gradient(transparent 55%, rgba(201,154,59,.38) 55%);padding:0 .08em;color:var(--ink);}
.ins-body .sqsrte-text-highlight *{color:var(--ink) !important;}
.ins-body .sqsrte-text-color--white{color:#FFFFFF;}
.ins-body .sqsrte-text-color--black{color:#000000;}
.ins-body .sqsrte-text-color--accent{color:var(--amber);}
.ins-body .sqsrte-text-color--darkAccent{color:var(--teal-deep);}
.ins-body .sqsrte-text-color--custom{color:var(--amber);}
.ins-body .sqsrte-text-color--lightAccent{color:var(--mute);}

/* ---- figures: same column width as the text; nothing overhangs ---- */
.article-image{margin:40px 0;text-align:center;}
.article-image img{display:block;width:100%;height:auto;border-radius:6px;box-shadow:0 18px 44px -26px rgba(14,42,44,.5);}
.article-image figcaption{font-size:14.5px;line-height:1.55;color:var(--mute);font-style:italic;text-align:left;margin-top:12px;white-space:pre-wrap;}
/* first figure = cover image: tighter to the deck below it */
.ins-body > .article-image:first-child{margin:6px 0 30px;}
/* Squarespace card-layout figures: image one side, caption card beside it */
@media (min-width:768px){
  .article-image.img-card{display:flex;align-items:center;gap:44px;text-align:left;}
  .article-image.img-card img{width:100%;}
  .article-image.img-card > picture,.article-image.img-card > img{flex:0 0 55%;min-width:0;}
  .article-image.img-card figcaption{flex:1;min-width:0;margin-top:0;}
  .article-image.img-card.card-right{flex-direction:row-reverse;}
}
.article-video{position:relative;margin:34px 0;height:0;padding-bottom:56.25%;overflow:hidden;border-radius:6px;}
.article-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}

/* end-of-article CTA (auto-injected gold pill) */
.article-button-wrap{text-align:center;margin:56px 0 8px;}
.ins-body a.article-button,.article-button{color:#1C2331 !important;text-decoration:none;border:0;}
.article-button{display:inline-block;background:linear-gradient(96deg,#FFD98A,#FDB833 55%,#E8981D);
  font-family:'Inter',sans-serif;font-weight:700;font-size:16px;letter-spacing:.3px;text-transform:none;
  padding:16px 38px;border-radius:40px;box-shadow:0 14px 40px -12px rgba(253,184,51,.5);
  transition:transform .2s ease,box-shadow .2s ease;}
.article-button:hover{background:linear-gradient(96deg,#FFD98A,#FDB833 55%,#E8981D);transform:translateY(-2px);box-shadow:0 20px 52px -12px rgba(253,184,51,.62);}

/* soft end rule between body and pagination */
.ins-body::after{content:"\2022 \2022 \2022";display:block;text-align:center;color:var(--gold);letter-spacing:6px;font-size:15px;margin:52px 0 0;}

/* ---- prev/next pagination (cream, teal) ---- */
.ins-pagination{display:flex;justify-content:space-between;align-items:center;gap:32px;
  max-width:calc(var(--measure) + 96px);margin:8px auto 0;padding:44px 24px 8px;position:relative;z-index:1;
  border-top:1px solid rgba(20,55,58,.14);}
.ins-pagination a{display:flex;align-items:center;gap:18px;text-decoration:none;max-width:49%;}
.ins-pagination a.pag-next{margin-left:auto;text-align:right;}
.ins-pagination .pag-title{font-family:'Fraunces',serif;font-weight:600;font-size:22px;line-height:1.1;color:var(--teal);transition:color .15s ease;}
.ins-pagination a:hover .pag-title{color:var(--amber);}
.ins-pagination svg{width:11px;height:20px;flex:0 0 auto;stroke:var(--gold);fill:none;stroke-width:1.6;stroke-miterlimit:10;}
.ins-pagination .visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);}

@media (max-width:900px){
  body.page-article{font-size:20px;}
  .ins-body p.sqsrte-large{font-size:20px;}
}
@media (max-width:640px){
  body.page-article{font-size:19px;}
  .ins-article{padding:30px 22px 24px;}
  .ins-body p.sqsrte-large{font-size:19px;}
  .ins-title{margin-bottom:4px;}
  .ins-body > h3:first-of-type:has(em){font-size:22px;margin-bottom:34px;}
  .ins-body h2{font-size:27px;}
  .ins-body h3{font-size:25px;}
  .ins-body h4{font-size:21px;}
  .ins-body > h3:first-of-type:has(em) + p::first-letter{font-size:58px;}
  .ins-body blockquote{font-size:22px;}
  .ins-pagination{flex-direction:column;align-items:stretch;gap:20px;padding:32px 22px 8px;}
  .ins-pagination a,.ins-pagination a.pag-next{max-width:100%;margin-left:0;text-align:left;}
  .ins-pagination .pag-title{font-size:19px;}
}
