/* Research section: list of posts and the post page. Written phone-first; wider layouts are added below. */
.research-page{background:linear-gradient(125deg,#e2e4e6 0%,#d8dadd 48%,#cbd0d4 100%);min-height:100vh;--soft:#454c52;--meta:#50575d}
.research-page .eyebrow{font:11px/1.7 var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--meta)}
.research-page .eyebrow a{display:inline-block;padding-block:13px;margin-block:-13px;text-decoration:underline;text-underline-offset:4px}
.research-page :is(a,button,summary,pre,[tabindex]):focus-visible{outline:2px solid #2f4a5c;outline-offset:3px}
.header nav a[aria-current]:after{right:0}
@media(max-width:1024px){.header #navigation a[aria-current]{font-weight:700}}
.research-page .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* ---- list of posts */
.research-main{padding-bottom:72px}
.research-hero{padding:34px 0 26px}
.research-hero h1{font:500 clamp(54px,9vw,96px)/1 'Barlow Condensed',var(--sans);letter-spacing:-.02em;margin:10px 0 16px}
.research-hero .lead{font-size:17px;line-height:1.6;color:var(--soft);max-width:660px}
.research-follow{display:flex;flex-wrap:wrap;gap:6px 22px;margin-top:10px;font:11.5px var(--mono);letter-spacing:.06em;text-transform:uppercase}
.research-follow a,.post-foot a{display:inline-flex;align-items:center;gap:8px;min-height:44px;text-decoration:underline;text-underline-offset:4px}
.post-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.post-list>li{min-width:0;display:flex}
.post-card{display:flex;flex:1;min-width:0}
.post-card>a{position:relative;display:flex;flex-direction:column;flex:1;min-width:0;border:1px solid #858d9570;background:linear-gradient(115deg,#f1f3f4b3,#c9ced3);box-shadow:inset 0 1px 0 #ffffffc4,0 12px 32px #26313a08;transition:background-color .2s,box-shadow .2s,transform .2s}
.post-card>a:before{content:'';position:absolute;z-index:1;top:-1px;left:-1px;width:30px;height:3px;background:var(--ink)}
.post-card>a:active{background-color:#f4f6f7}
.post-card-art{width:100%;height:auto;aspect-ratio:1200/630;object-fit:cover;background:#111315}
.post-card-text{display:flex;flex-direction:column;flex:1;min-width:0;padding:20px 20px 16px}
.post-meta{display:flex;flex-wrap:wrap;gap:4px 14px;font:12px/1.6 var(--mono);letter-spacing:.04em;color:var(--meta)}
.post-meta span:before{content:'·';margin-right:14px}
.post-tag{align-self:flex-start;margin-top:12px;padding:4px 9px;border:1px solid #20262b59;font:10.5px/1.5 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink)}
.post-card h2{font:500 28px/1.12 'Barlow Condensed',var(--sans);letter-spacing:-.01em;margin:14px 0 10px;overflow-wrap:anywhere}
.post-summary{font-size:16px;line-height:1.6;color:var(--soft)}
.post-more{display:flex;align-items:center;gap:10px;min-height:44px;margin-top:auto;padding-top:8px;font:12px var(--mono);letter-spacing:.06em;text-transform:uppercase}

/* ---- post page */
.post-layout{padding-bottom:64px}
.post-head{padding:30px 0 22px}
.post-head h1{font:500 clamp(35px,8.8vw,66px)/1.06 'Barlow Condensed',var(--sans);letter-spacing:-.015em;margin:12px 0 18px;max-width:1040px;overflow-wrap:anywhere;text-wrap:balance}
.byline{display:flex;flex-wrap:wrap;gap:4px 14px;font:12px/1.7 var(--mono);letter-spacing:.04em;color:var(--meta)}
.byline .reading-time:before{content:'·';margin-right:14px}

.toc-mobile{border:1px solid #20262b40;background:#ffffff2e;margin-bottom:8px}
.toc-mobile summary{display:flex;align-items:center;justify-content:space-between;min-height:50px;padding:0 16px;font:12px var(--mono);letter-spacing:.08em;text-transform:uppercase;cursor:pointer;list-style:none}
.toc-mobile summary::-webkit-details-marker{display:none}
.toc-mobile summary:after{content:'+';font:20px/1 var(--mono)}
.toc-mobile[open] summary:after{content:'−'}
.toc-mobile[open] summary{border-bottom:1px solid var(--line)}
.toc-mobile nav{padding:6px 0 10px;max-height:60vh;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.toc-mobile ol,.toc ol{list-style:none;margin:0;padding:0}
.toc-mobile a{display:flex;align-items:center;min-height:44px;padding:6px 16px;font-size:15px;line-height:1.35}
.toc-mobile ol ol a{padding-left:32px;font-size:14px;color:var(--soft)}
.post-sidebar{display:none}

.post-body{min-width:0;font-size:17px;line-height:1.65;color:#3b4247;overflow-wrap:anywhere}
.post-body>p,.post-body>ul,.post-body>ol,.post-body>blockquote{max-width:760px}
.post-body p{margin:18px 0}
.post-body h2,.post-body h3{color:var(--ink);scroll-margin-top:16px;overflow-wrap:break-word}
.post-body h2{font:500 31px/1.14 'Barlow Condensed',var(--sans);letter-spacing:-.012em;margin:46px 0 16px;padding-top:22px;border-top:1px solid var(--line)}
.post-body h2:first-child{margin-top:22px}
.post-body h3{font:500 25px/1.2 'Barlow Condensed',var(--sans);letter-spacing:-.008em;margin:36px 0 10px}
.post-body a{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.post-body a:hover{text-decoration-thickness:2px}
.post-body strong{color:var(--ink);font-weight:600}
.post-body ul,.post-body ol{margin:18px 0;padding-left:24px}
.post-body li{margin:10px 0;padding-left:2px}
.post-body blockquote{margin:22px 0;padding-left:16px;border-left:2px solid #646f78}
.post-body code{font-family:var(--mono);font-size:.86em}
.post-body :not(pre)>code{background:#ffffff59;border:1px solid #ffffff73;padding:1px 5px}

.code-example{position:relative;margin:22px 0;background:#1c2227;border:1px solid #41494f;box-shadow:inset 0 1px 0 #ffffff17}
.code-example[data-language]:before{content:attr(data-language);position:absolute;left:16px;top:21px;font:10.5px/1 var(--mono);letter-spacing:.1em;text-transform:uppercase;color:#a9b5be}
.code-example pre{margin:0;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;padding:60px 16px 18px;color:#e6ebef;font:13px/1.75 var(--mono);white-space:pre;tab-size:2;overflow-wrap:normal}
.code-example pre code{font-size:inherit}
.code-example pre:focus-visible{outline-color:#aabecb;outline-offset:-3px}
.copy-example{position:absolute;right:7px;top:7px;min-width:76px;min-height:44px;padding:0 14px;font:11px var(--mono);letter-spacing:.06em;color:#e1e7eb;background:#ffffff12;border:1px solid #ffffff47}
.copy-example:active{background:#ffffff2e}
.code-example .copy-example:focus-visible{outline-color:#aabecb}

.table-scroll{margin:22px 0;border:1px solid var(--line);overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;
  background:linear-gradient(90deg,#e4e6e8 30%,#e4e6e800) 0 0/40px 100% no-repeat local,linear-gradient(270deg,#e4e6e8 30%,#e4e6e800) 100% 0/40px 100% no-repeat local,linear-gradient(90deg,#20262b3d,#20262b00) 0 0/16px 100% no-repeat scroll,linear-gradient(270deg,#20262b3d,#20262b00) 100% 0/16px 100% no-repeat scroll,#e4e6e8}
.post-body table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.5;text-align:left;overflow-wrap:break-word}
.post-body th{font:11px/1.5 var(--mono);letter-spacing:.07em;text-transform:uppercase;color:var(--ink);border-bottom:1px solid #20262b59;white-space:nowrap}
.post-body td,.post-body th{padding:13px 14px;vertical-align:top}
.post-body td{border-bottom:1px solid var(--line)}
.post-body tr:last-child td{border-bottom:0}
.post-body td:first-child{color:var(--ink);font-weight:500}
.table-wide table{min-width:760px}
.table-wide :is(th,td):first-child{position:sticky;left:0;z-index:1;width:150px;min-width:132px;background:#e4e6e8;box-shadow:1px 0 0 var(--line)}

.post-figure{margin:28px 0}
.post-figure svg{display:block;width:100%;height:auto;border:1px solid #20262b40}
.post-figure .request-path-wide{display:none}
.post-figure .request-path-stacked{max-width:430px}
.post-figure figcaption{margin-top:10px;font-size:14px;line-height:1.55;color:var(--meta);max-width:760px}

.post-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 24px;margin-top:52px;padding-top:14px;border-top:1px solid var(--line);font:12px var(--mono);letter-spacing:.06em;text-transform:uppercase}
.post-foot-links{display:flex;flex-wrap:wrap;gap:4px 22px}

@media(max-width:429px){.byline{flex-direction:column;gap:0}.byline .reading-time:before{display:none}}
/* Two- and three-column tables become one card per row on a phone. */
@media(max-width:520px){
  .table-stack{border:0;background:none;overflow:visible}
  .table-stack table,.table-stack tbody,.table-stack tr,.table-stack td{display:block}
  .table-stack thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .table-stack tr{margin-bottom:12px;border:1px solid #20262b33;background:#ffffff33}
  .table-stack td,.table-stack tr:last-child td{padding:10px 14px 11px;border-bottom:1px solid var(--line)}
  .table-stack td:last-child,.table-stack tr:last-child td:last-child{border-bottom:0}
  .table-stack td:first-child{font-size:16px;font-weight:600;background:#ffffff38}
  .table-stack td:not(:first-child):before{content:attr(data-label);display:block;margin-bottom:3px;font:10.5px/1.5 var(--mono);letter-spacing:.09em;text-transform:uppercase;color:var(--meta)}
  .table-stack td:empty{display:none}
}
@media(min-width:521px){
  .table-stack table{min-width:520px}
}
@media(min-width:760px){
  .research-hero{padding:64px 0 40px}
  .research-hero .lead{font-size:19px}
  .post-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
  .post-list>li:first-child{grid-column:1/-1}
  .post-card.featured>a{flex-direction:row;align-items:stretch}
  .post-card.featured .post-card-art{width:48%;flex:0 0 48%;align-self:center}
  .post-card.featured .post-card-text{padding:30px 34px 22px;justify-content:center}
  .post-card.featured .post-more{margin-top:8px}
  .post-card.featured h2{font-size:clamp(30px,3vw,42px);line-height:1.08}
  .post-card-text{padding:26px 26px 18px}
  .post-head{padding:56px 0 30px}
  .post-body{line-height:1.72}
  .post-body h2{font-size:38px;margin-top:60px}
  .post-body h3{font-size:28px}
  .post-body td,.post-body th{padding:15px 18px}
  .code-example pre{padding:56px 24px 22px}
  .code-example[data-language]:before{left:24px}
  .table-wide :is(th,td):first-child{position:static;width:auto;min-width:0;background:none;box-shadow:none}
}
@media(min-width:900px){
  .post-figure .request-path-wide{display:block}
  .post-figure .request-path-stacked{display:none}
}
@media(min-width:1200px){
  .post-list{grid-template-columns:repeat(3,minmax(0,1fr))}
  .toc-mobile{display:none}
  .post-grid{display:grid;grid-template-columns:220px minmax(0,880px);gap:clamp(40px,5vw,88px);align-items:start}
  .post-sidebar{display:block;position:sticky;top:24px;max-height:calc(100vh - 48px);overflow-y:auto;padding-top:22px}
  .toc{margin-top:14px;border-left:1px solid var(--line)}
  .toc a{display:block;padding:6px 14px;margin-left:-1px;border-left:2px solid transparent;font-size:13px;line-height:1.4}
  .toc ol ol a{padding-left:26px;font-size:12px;color:var(--meta)}
  .toc a:hover,.toc a:focus-visible{background:#ffffff45;border-left-color:var(--ink)}
}
@media(hover:hover) and (pointer:fine){
  .post-card>a:hover{background-color:#f4f6f7;box-shadow:inset 0 1px 0 #ffffffc4,0 18px 40px #26313a1c;transform:translateY(-2px)}
  .copy-example{min-height:34px;min-width:64px;right:12px;top:11px}
  .copy-example:hover{background:#ffffff24}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .post-card>a{transition:none}
  .post-card>a:hover{transform:none}
}
@media print{
  .header nav,.menu-toggle,.header-access,.toc-mobile,.post-sidebar,.copy-example,.reading-progress{display:none}
  .code-example pre{white-space:pre-wrap;overflow-wrap:anywhere}
}
