/* Insights pages: same colours and font as the home page, made for reading. */
:root {
  --ink: #2b2838;
  --text: #34303f;
  --soft: #4b4660;
  --gold: #a07024;
  --paper: #fbf6ea;
  --line: rgba(43, 40, 56, 0.14);
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.wrap {
  width: min(680px, 100% - 40px);
  margin: 0 auto;
}

/* ---------- Top bar ---------- */
.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px clamp(20px, 4vw, 48px);
  font-size: 15px;
}

.top a {
  color: var(--ink);
  text-decoration: none;
}

.top .me {
  font-size: 17px;
}

.top .court {
  color: var(--soft);
  border-bottom: 1px solid rgba(75, 70, 96, 0.35);
}

.top a:hover {
  color: var(--ink);
  border-bottom-color: currentColor;
}

/* ---------- GAINS tiles ---------- */
.tile,
.filter button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(43, 40, 56, 0.35);
  border-radius: 5px;
  background: rgba(251, 246, 234, 0.6);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1;
}

/* ---------- Index hero ---------- */
.hero {
  position: relative;
  padding: 92px 0 150px;
  background: linear-gradient(#bfcde9, #e4d6e7 45%, #f6d8c4 80%, #f9e0b6);
  overflow: hidden;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(40px, 7vw, 58px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.lede {
  max-width: 34em;
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--soft);
}

.filter {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter button {
  cursor: pointer;
}

.filter button[data-f='all'] {
  width: auto;
  padding: 0 10px;
}

.filter button:hover,
.filter button:focus-visible {
  border-color: var(--ink);
  outline: none;
}

.filter button.on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.range {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 150px;
}

/* ---------- Post list ---------- */
.posts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.posts li a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.posts .tile {
  margin-top: 3px;
}

.posts .t {
  display: block;
  font-size: 22px;
  line-height: 1.25;
  color: var(--ink);
}

.posts a:hover .t {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.posts .s {
  display: block;
  margin-top: 5px;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--soft);
}

.posts .d,
.meta {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--soft);
}

.draft {
  font-weight: 500;
  color: #a2482c;
}

.empty {
  margin: 32px 0;
  font-size: 18px;
  font-style: italic;
  color: var(--soft);
}

/* ---------- One post ---------- */
.post-page {
  background: linear-gradient(#e4d6e7, #f6e2cf 180px, var(--paper) 360px) no-repeat;
}

.post {
  padding-top: 96px;
}

.back {
  font-size: 15px;
  color: var(--soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(75, 70, 96, 0.35);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 12px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.post h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.body {
  margin-top: 30px;
  font-size: 19px;
  line-height: 1.7;
}

.body p,
.body ul,
.body ol,
.body blockquote,
.body figure {
  margin: 0 0 1.15em;
}

.body h2 {
  margin: 1.8em 0 0.5em;
  font-size: 26px;
  font-weight: 450;
  line-height: 1.25;
  color: var(--ink);
}

.body h3 {
  margin: 1.5em 0 0.4em;
  font-size: 21px;
  font-weight: 500;
  color: var(--ink);
}

.body a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.body blockquote {
  padding-left: 18px;
  border-left: 2px solid var(--gold);
  font-style: italic;
  color: var(--soft);
}

.body ul,
.body ol {
  padding-left: 1.2em;
}

.body li {
  margin-bottom: 0.35em;
}

.body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.body figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--soft);
}

.body code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(43, 40, 56, 0.07);
  font-size: 0.85em;
}

.more {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.more h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.more ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.more a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}

.more a:hover span:last-child {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Footer ---------- */
.foot {
  width: min(680px, 100% - 40px);
  margin: 56px auto 0;
  padding: 22px 0 36px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--soft);
}

.foot p {
  margin: 0;
}

.social {
  display: flex;
  gap: 14px;
}

.social a {
  color: var(--soft);
}

.social a:hover {
  color: var(--ink);
}

@media (max-width: 560px) {
  .hero {
    padding: 80px 0 120px;
  }
  .range {
    height: 110px;
  }
  .lede {
    font-size: 17px;
  }
  .body {
    font-size: 18px;
  }
  .posts .t {
    font-size: 20px;
  }
}
