/* Layout of the site's pages. Components and type come from brand.css. */

/* one frame for everything: 820 px of content; body text fills it, justified and hyphenated */
.wrap{max-width:916px}
.hero p.body,.page-intro .lead,.prose p,.prose dd{text-align:justify;hyphens:auto;-webkit-hyphens:auto}

/* overview: the hero, with the mark and the three gains as a nameplate on the right */
.hero{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center;padding:76px 0 80px}
.hero h1{line-height:1.02;margin-bottom:24px;white-space:nowrap}
.hero .sub{font-weight:600;font-size:21px;line-height:1.3;margin-bottom:16px}
.hero p.body{color:var(--mid);margin-bottom:30px}
.plate{justify-self:end;display:flex;flex-direction:column;align-items:center;gap:26px}
.plate .logo svg{width:230px;height:auto;display:block}
.hero .nameplate.lines{width:100%}
.hero .nameplate.lines th{font-size:18px;padding:8px 16px;border-left:0;border-top:1.5px solid var(--fg)}
.hero .nameplate.lines tr:first-child th{border-top:0}

/* the blog index */
.post-list{list-style:none;max-width:820px}
.post-list li{padding:18px 0;border-bottom:1px solid var(--line)}
.post-list li:first-child{padding-top:0}
.post-list time{display:block;font-size:14px;color:var(--mid);margin-bottom:4px}
.post-list a{font-weight:800;font-stretch:112%;font-size:24px;line-height:1.15;text-decoration:none}
.post-list a:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.post-list p{color:var(--mid);margin-top:6px}

/* inner pages */
.page{padding-bottom:40px}
.page-intro{padding:64px 0 36px}
.page-intro h1{line-height:1;margin-bottom:22px}
.page-intro .lead{font-size:21px;line-height:1.5}
.page-intro .feed{margin-top:14px;font-size:15px;color:var(--mid)}
.part{border-top:2px solid var(--fg);padding:52px 0 48px}

/* long text */
.prose h2{margin:0 0 18px}
.prose h3{margin:30px 0 10px}
.prose p,.prose li,.prose dd{color:var(--mid)}
.prose p{margin-bottom:14px}
.prose b,.prose strong,.prose dt{color:var(--fg)}  /* em keeps the text color: the italic sets it apart */
.prose a{color:var(--fg);text-decoration-thickness:1px;text-underline-offset:3px}
.prose ul,.prose ol{margin:0 0 16px 22px}
.prose li{margin-bottom:8px}
.prose ol.steps{list-style:none;margin-left:0;counter-reset:s}
.prose ol.steps li{counter-increment:s;position:relative;padding-left:40px;margin-bottom:12px}
.prose ol.steps li::before{content:counter(s);position:absolute;left:0;top:1px;width:24px;height:24px;border:1.5px solid var(--fg);
  border-radius:50%;font:700 13px/21px Archivo,sans-serif;text-align:center;color:var(--fg)}
.prose .fig{margin:34px 0 10px}
table.data{border-collapse:collapse;font-size:15px;font-variant-numeric:tabular-nums;margin:18px 0 18px}
table.data th,table.data td{text-align:left;padding:9px 22px 9px 0;border-bottom:1px solid var(--line);vertical-align:top}
table.data thead th{border-bottom:2px solid var(--fg);font-weight:700;color:var(--fg)}
table.data td{color:var(--mid)}
math{font-size:1.05em;font-family:"STIX Two Math",math}
.math{margin:20px 0;overflow-x:auto;overflow-y:hidden}
/* centered when it fits; when wider, the formula starts at the left edge and scrolls */
.math math{font-size:1.2em;width:fit-content;margin:0 auto}
.fig-scroll{overflow-x:auto}
/* the trust figure predates the figure rules: own swap classes, since .fig-h/.fig-v also restyle its text */
.fig.trust .trust-h{min-width:640px}
.fig.trust .trust-v{display:none;max-width:360px;margin:0 auto}
.bio{display:flow-root}
.bio h2{margin-top:44px;clear:both}
.portrait{float:left;width:120px;height:auto;margin:6px 32px 36px 0}
.legal h2{margin-top:28px}

/* overview: the sections below the hero. After the long-text rules on purpose: .tradeoffs and
   .model are .prose too, and override its margins and justification at equal specificity. */
.fig + .prose{margin-top:34px}
.pillars{display:grid;grid-template-columns:repeat(3,1fr);gap:36px;margin-top:30px}
.pillars h3{margin-bottom:12px}
.pillars p{color:var(--mid)}  /* columns too narrow to justify well */
.tradeoffs{margin-top:36px;border-left:4px solid var(--accent);padding:4px 0 4px 18px}
.tradeoffs p:last-child{margin-bottom:0}
.tradeoffs h3{margin:0 0 10px}
.model{display:grid;grid-template-columns:1fr 1fr;gap:18px 40px;margin-top:30px}
.model p{margin:0;text-align:left;hyphens:manual;-webkit-hyphens:manual}
.join .prose p{text-align:left;hyphens:manual;-webkit-hyphens:manual}  /* multi-column text: left-aligned, as in the pillars */
.join{display:grid;grid-template-columns:1.1fr 1fr;gap:40px;align-items:start;margin-top:48px}

/* blog posts; the title is the one heading with its own size, because post titles are long */
.post{padding:56px 0 30px}
.post .meta{font-size:15px;color:var(--mid);margin-bottom:12px;text-align:left;hyphens:manual;-webkit-hyphens:manual}
.post h1{font-size:50px;line-height:1.02;margin-bottom:30px;max-width:900px}
.post p.lead{font-size:21px;line-height:1.5;color:var(--mid);font-style:italic;text-align:left;hyphens:manual;-webkit-hyphens:manual;margin-bottom:30px}
.post h2{margin:44px 0 14px}
.post table.data{display:block;overflow-x:auto}
/* sideways scrolling: edge shadows show that more is hidden; the covers scroll along with the content
   and hide each shadow at its end (iOS fades its scrollbar out regardless) */
.math,.post table.data{
  background-image:linear-gradient(90deg,var(--bg) 40%,transparent),linear-gradient(270deg,var(--bg) 40%,transparent),
    radial-gradient(farthest-side at 0 50%,color-mix(in oklab,var(--fg) 22%,transparent),transparent),
    radial-gradient(farthest-side at 100% 50%,color-mix(in oklab,var(--fg) 22%,transparent),transparent);
  background-position:left center,right center,left center,right center;
  background-size:28px 100%,28px 100%,14px 100%,14px 100%;
  background-repeat:no-repeat;background-attachment:local,local,scroll,scroll}
/* a declared scrollbar stays visible on desktop WebKit/Blink and Android */
.math::-webkit-scrollbar,.post table.data::-webkit-scrollbar{height:6px;background:transparent}
.math::-webkit-scrollbar-thumb,.post table.data::-webkit-scrollbar-thumb{background:var(--dim)}
/* on phones, single-line cells that scroll beat columns squeezed to one word per line */
@media (max-width: 600px){.post table.data td{white-space:nowrap}}

@media (max-width: 900px){
  .hero{grid-template-columns:1fr;padding-top:48px}
  .plate{justify-self:center}
}
@media (max-width: 760px){
  .pillars{grid-template-columns:1fr;gap:26px}
  .model,.join{grid-template-columns:1fr}
}
@media (max-width: 640px){
  .hero h1{white-space:normal}
  .hero .sub{font-size:20px}
  .portrait{float:none;display:block;width:110px;margin:0 0 22px}
  .post h1{font-size:34px}
  .fig.trust .trust-h{display:none}
  .fig.trust .trust-v{display:block}
  .post-list a{font-size:21px}
}
