/*
 * PAELLADOC editorial system
 * Blog discovery, article orientation and long-form reading on top of the
 * existing serif / mono / warm-dark design language.
 */

body.page-family-editorial {
  --editorial-max: 1480px;
  --editorial-reading: 760px;
  --editorial-gutter: clamp(20px, 4vw, 64px);
  --editorial-section: clamp(76px, 9vw, 132px);
}

body.page-family-editorial .tp-blog,
body.page-family-editorial .tp-post {
  overflow: visible;
  background: transparent;
}

body.page-family-editorial .tp-grain {
  opacity: .55;
}

body.page-family-editorial [id] {
  scroll-margin-top: calc(var(--shell-header, 84px) + 58px);
}

body.page-family-editorial .breadcrumbs {
  width: min(100%, var(--editorial-max));
  max-width: var(--editorial-max);
  margin: 0 auto;
  padding: 13px var(--editorial-gutter);
  border-bottom: 1px solid var(--fp-rule);
  color: var(--fp-faint);
  font-family: var(--tp-font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.5;
  text-transform: uppercase;
}

body.page-family-editorial .breadcrumb-list {
  display: flex;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

body.page-family-editorial .breadcrumb-item {
  min-width: 0;
  white-space: nowrap;
}

body.page-family-editorial .breadcrumb-item:last-child {
  overflow: hidden;
  color: var(--fp-muted);
  text-overflow: ellipsis;
}

body.page-family-editorial .breadcrumb-item a {
  color: var(--fp-muted);
}

body.page-family-editorial .breadcrumb-item a:hover {
  color: var(--fp-orange);
  text-decoration: none;
}

body.page-family-editorial .breadcrumb-item:not(:last-child)::after {
  margin-inline: 10px;
  color: var(--fp-orange);
  content: "/";
}

/* --------------------------------------------------------------------------
   Blog front door
   -------------------------------------------------------------------------- */

body.layout-blog .tp-hero {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(440px, 1.14fr);
  grid-template-rows: auto auto auto auto auto auto auto auto;
  column-gap: clamp(44px, 6vw, 96px);
  width: min(100%, var(--editorial-max));
  min-height: 0;
  margin-inline: auto;
  padding: clamp(52px, 6vw, 86px) var(--editorial-gutter) clamp(74px, 8vw, 112px);
  border-bottom: 0;
}

body.layout-blog .tp-hero > .tp-eyebrow-row {
  grid-column: 1 / -1;
  grid-row: 1;
  margin: 0 0 clamp(42px, 5vw, 72px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--fp-rule);
}

body.layout-blog .tp-hero > .tp-eyebrow {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  margin: 0 0 18px;
}

body.layout-blog .tp-h1 {
  grid-column: 1;
  grid-row: 3;
  max-width: 8ch;
  margin: 0;
  font-size: clamp(58px, 7.4vw, 116px);
  line-height: .84;
  text-wrap: balance;
}

body.layout-blog .tp-lead {
  grid-column: 1;
  grid-row: 4;
  max-width: 46ch;
  margin: 30px 0 0;
  color: var(--fp-muted);
  font-family: var(--tp-font-mono);
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.68;
  opacity: 1;
}

body.layout-blog .fp-blog-hero-actions {
  display: flex;
  grid-column: 1;
  grid-row: 6;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 18px;
  border-top: 1px solid var(--fp-rule-strong);
  border-bottom: 1px solid var(--fp-rule-strong);
}

body.layout-blog .fp-blog-hero-actions a {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-width: 140px;
  padding: 14px 14px 14px 0;
  color: var(--fp-ink);
  font-family: var(--tp-font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

body.layout-blog .fp-blog-hero-actions a + a {
  padding-left: 14px;
  border-left: 1px solid var(--fp-rule);
}

body.layout-blog .fp-blog-hero-actions a:hover {
  color: var(--fp-orange);
}

body.layout-blog .fp-signal-chain {
  grid-column: 1;
  grid-row: 7;
  max-width: none;
  margin-top: 24px;
}

body.layout-blog .tp-hero-meta {
  grid-column: 1;
  grid-row: 8;
  margin-top: 22px;
  color: var(--fp-faint);
  font-size: 9px;
  opacity: 1;
}

body.layout-blog .fp-editorial-visual {
  grid-column: 2;
  grid-row: 2 / 9;
  min-height: 590px;
  margin: 0;
  border-color: var(--fp-rule-strong);
  box-shadow: 0 36px 84px rgba(0, 0, 0, .24);
}

body.layout-blog .fp-blog-global-search {
  display: grid;
  grid-column: 1;
  grid-row: 5;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 54px;
  margin-top: 30px;
  border: 1px solid var(--fp-rule-strong);
  background: var(--fp-bg-raised);
}

body.layout-blog .fp-blog-global-search > span {
  padding-inline: 17px;
  color: var(--fp-orange);
  font-family: var(--tp-font-mono);
}

body.layout-blog .fp-blog-global-search input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 12px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fp-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

body.layout-blog .fp-blog-global-search input::placeholder {
  color: var(--fp-faint);
  opacity: 1;
}

body.layout-blog .fp-blog-global-search:focus-within {
  border-color: var(--fp-orange);
  outline: 2px solid var(--fp-orange);
  outline-offset: 3px;
}

body.layout-blog .fp-blog-global-search button {
  align-self: stretch;
  min-width: 108px;
  padding-inline: 16px;
  border: 0;
  border-left: 1px solid var(--fp-rule-strong);
  background: var(--fp-orange);
  color: var(--fp-on-orange, var(--fp-bg));
  font-family: var(--tp-font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

body.layout-blog .fp-blog-global-search button:hover {
  background: transparent;
  color: var(--fp-orange);
}

body.layout-blog .fp-editorial-visual figcaption {
  padding: 26px;
}

body.layout-blog .fp-editorial-visual figcaption a {
  max-width: 34ch;
  font-size: clamp(26px, 2.5vw, 40px);
}

body.layout-blog .fp-blog-local-nav {
  position: sticky;
  top: var(--shell-header, 84px);
  z-index: 20;
  width: 100%;
  border-top: 1px solid var(--fp-rule);
  border-bottom: 1px solid var(--fp-rule);
  background: color-mix(in srgb, var(--fp-bg) 94%, transparent);
  backdrop-filter: blur(14px);
}

body.layout-blog .fp-blog-local-nav > div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(4, auto);
  gap: 0;
  width: min(100%, var(--editorial-max));
  margin-inline: auto;
  padding-inline: var(--editorial-gutter);
}

body.layout-blog .fp-blog-local-nav span,
body.layout-blog .fp-blog-local-nav a {
  display: flex;
  align-items: center;
  min-height: 46px;
  color: var(--fp-faint);
  font-family: var(--tp-font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}

body.layout-blog .fp-blog-local-nav a {
  padding-inline: clamp(14px, 2vw, 28px);
  border-left: 1px solid var(--fp-rule);
  color: var(--fp-muted);
}

body.layout-blog .fp-blog-local-nav a:hover {
  background: var(--fp-orange-soft);
  color: var(--fp-orange);
}

.fp-editorial-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .48fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: end;
  margin-bottom: clamp(42px, 5vw, 72px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--fp-rule-strong);
}

.fp-editorial-section-head h2 {
  max-width: 10ch;
  margin: 16px 0 0;
  color: var(--fp-ink);
  font-family: var(--tp-font-display);
  font-size: clamp(48px, 6.3vw, 88px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .9;
  text-wrap: balance;
}

.fp-editorial-section-head > p {
  max-width: 48ch;
  margin: 0;
  color: var(--fp-muted);
  font-family: var(--tp-font-mono);
  font-size: 12px;
  line-height: 1.7;
}

body.layout-blog .fp-blog-latest,
body.layout-blog .tp-guides,
body.layout-blog .fp-blog-library {
  width: min(100%, var(--editorial-max));
  margin-inline: auto;
  padding: var(--editorial-section) var(--editorial-gutter);
}

body.layout-blog .fp-blog-latest,
body.layout-blog .tp-guides {
  border-bottom: 1px solid var(--fp-rule);
}

.fp-latest-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(270px, auto));
  gap: 1px;
  background: var(--fp-rule);
}

.fp-latest-card {
  min-width: 0;
  background: var(--fp-bg);
}

.fp-latest-card--lead {
  grid-row: 1 / 3;
}

.fp-latest-card > a {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(24px, 3vw, 38px);
  color: var(--fp-ink);
  text-decoration: none;
  transition: background-color 260ms ease, transform 320ms cubic-bezier(.16, 1, .3, 1);
}

.fp-latest-card > a:hover {
  background: var(--fp-orange-soft);
}

.fp-latest-card--lead > a {
  position: relative;
  padding: clamp(34px, 4.5vw, 64px);
}

.fp-latest-card--lead > a::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--fp-orange);
  content: "";
}

.fp-latest-meta,
.fp-latest-card footer {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  color: var(--fp-faint);
  font-family: var(--tp-font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.fp-latest-meta span {
  color: var(--fp-orange);
}

.fp-latest-card h3 {
  max-width: 18ch;
  margin: auto 0 18px;
  color: var(--fp-ink);
  font-family: var(--tp-font-display);
  font-size: clamp(27px, 2.8vw, 42px);
  font-weight: 400;
  letter-spacing: -.032em;
  line-height: 1.02;
  text-wrap: balance;
}

.fp-latest-card--lead h3 {
  max-width: 13ch;
  font-size: clamp(48px, 5.3vw, 78px);
  line-height: .92;
}

.fp-latest-card p {
  display: -webkit-box;
  margin: 0 0 24px;
  overflow: hidden;
  color: var(--fp-muted);
  font-family: var(--tp-font-mono);
  font-size: 11px;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.fp-latest-card--lead p {
  max-width: 55ch;
  font-size: 13px;
  -webkit-line-clamp: 4;
}

.fp-latest-card footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--fp-rule);
}

.fp-latest-card footer span:last-child {
  color: var(--fp-orange);
}

body.layout-blog .tp-guides .fp-editorial-section-head {
  margin-bottom: 42px;
}

body.layout-blog .tp-guides-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--fp-rule);
}

body.layout-blog .tp-guide,
body.layout-blog .tp-guide--pillar {
  grid-column: span 3;
  min-height: 240px;
  padding: 28px;
  border: 0;
  background: var(--fp-bg);
  transform: none;
}

body.layout-blog .tp-guide--pillar {
  grid-column: span 6;
  min-height: 300px;
  background: var(--fp-orange-soft);
}

body.layout-blog .tp-guide:hover {
  border: 0;
  background: var(--fp-bg-raised);
  transform: none;
}

body.layout-blog .tp-guide-title,
body.layout-blog .tp-guide--pillar .tp-guide-title {
  max-width: 16ch;
  margin-block: auto 18px;
  color: var(--fp-ink);
  font-family: var(--tp-font-display);
  font-size: clamp(25px, 2.4vw, 38px);
  letter-spacing: -.025em;
  line-height: 1.03;
  text-wrap: balance;
}

body.layout-blog .tp-guide--pillar .tp-guide-title {
  max-width: 13ch;
  font-size: clamp(42px, 4.7vw, 66px);
  line-height: .94;
}

body.layout-blog .tp-guide-sub {
  max-width: 54ch;
  color: var(--fp-muted);
}

body.layout-blog .fp-blog-library {
  padding-bottom: calc(var(--editorial-section) * 1.15);
}

.fp-blog-search {
  position: sticky;
  top: calc(var(--shell-header, 84px) + 46px);
  z-index: 15;
  display: grid;
  grid-template-columns: 150px minmax(260px, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: clamp(64px, 8vw, 110px);
  padding: 16px 18px;
  border: 1px solid var(--fp-rule-strong);
  background: color-mix(in srgb, var(--fp-bg) 95%, transparent);
  backdrop-filter: blur(14px);
}

.fp-blog-search label,
.fp-blog-search output {
  color: var(--fp-faint);
  font-family: var(--tp-font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.fp-blog-search output {
  min-width: 110px;
  text-align: right;
}

.fp-blog-search output strong {
  color: var(--fp-orange);
}

.fp-blog-search-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.fp-blog-search-field > span {
  color: var(--fp-orange);
  font-family: var(--tp-font-mono);
  font-size: 18px;
}

.fp-blog-search input {
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--fp-ink);
  font-family: var(--tp-font-mono);
  font-size: 13px;
}

.fp-blog-search input::placeholder {
  color: var(--fp-faint);
  opacity: .72;
}

.fp-blog-search input:focus-visible {
  outline: 0;
}

.fp-blog-search:focus-within {
  border-color: var(--fp-orange);
}

.fp-blog-search button {
  padding: 8px 10px;
  border: 1px solid var(--fp-rule);
  background: transparent;
  color: var(--fp-muted);
  font-family: var(--tp-font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.fp-blog-search button:hover {
  border-color: var(--fp-orange);
  color: var(--fp-orange);
}

.fp-library-cluster {
  padding-block: clamp(54px, 7vw, 92px);
  border-top: 1px solid var(--fp-rule-strong);
}

.fp-library-cluster:first-child {
  padding-top: 0;
  border-top: 0;
}

.fp-library-cluster > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 34px;
}

.fp-library-cluster h3 {
  max-width: 12ch;
  margin: 12px 0 0;
  color: var(--fp-ink);
  font-family: var(--tp-font-display);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: .95;
}

.fp-library-cluster-meta {
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--fp-faint);
  font-family: var(--tp-font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.fp-library-cluster-meta a {
  padding: 10px 12px;
  border: 1px solid var(--fp-rule);
  color: var(--fp-orange);
  text-decoration: none;
}

.fp-library-cluster-meta a:hover {
  border-color: var(--fp-orange);
}

.fp-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--fp-rule);
}

.fp-library-card {
  min-width: 0;
  background: var(--fp-bg);
}

.fp-library-card > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr auto;
  gap: 15px 24px;
  min-height: 246px;
  padding: 26px 28px 28px;
  color: var(--fp-ink);
  text-decoration: none;
}

.fp-library-card > a:hover {
  background: var(--fp-orange-soft);
}

.fp-library-card-meta {
  display: flex;
  grid-column: 1 / -1;
  gap: 14px;
  justify-content: space-between;
  color: var(--fp-faint);
  font-family: var(--tp-font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.fp-library-card h3 {
  grid-column: 1 / -1;
  max-width: 27ch;
  margin: 0;
  color: var(--fp-ink);
  font-family: var(--tp-font-display);
  font-size: clamp(25px, 2.25vw, 34px);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.05;
  text-wrap: balance;
}

.fp-library-card p {
  display: -webkit-box;
  grid-column: 1 / -1;
  align-self: start;
  max-width: 65ch;
  margin: 0;
  overflow: hidden;
  color: var(--fp-muted);
  font-family: var(--tp-font-mono);
  font-size: 10px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.fp-library-card-open {
  grid-column: 1 / -1;
  align-self: end;
  color: var(--fp-orange);
  font-family: var(--tp-font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.fp-search-empty {
  margin: 0;
  padding: 58px 24px;
  border: 1px solid var(--fp-rule);
  color: var(--fp-muted);
  font-family: var(--tp-font-display);
  font-size: clamp(30px, 4vw, 48px);
  text-align: center;
}

[data-search-item][hidden],
[data-search-cluster][hidden],
.fp-search-empty[hidden],
.fp-blog-search button[hidden] {
  display: none !important;
}

/* Category and tag archives keep the same system, at a more useful density. */
body.layout-category .tp-hero,
body.layout-tag .tp-hero {
  width: min(100%, 1120px);
  margin-inline: auto;
  padding: clamp(58px, 7vw, 96px) var(--editorial-gutter) clamp(64px, 8vw, 110px);
  border-bottom: 1px solid var(--fp-rule);
}

body.layout-category .tp-h1,
body.layout-tag .tp-h1 {
  max-width: 12ch;
  font-size: clamp(56px, 9vw, 120px);
}

body.layout-category .tp-list,
body.layout-tag .tp-list {
  width: min(100%, var(--editorial-max));
}

/* --------------------------------------------------------------------------
   Article orientation and reading
   -------------------------------------------------------------------------- */

body.layout-post .tp-post-hero {
  display: block;
  width: min(100%, 1180px);
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(64px, 8vw, 112px) var(--editorial-gutter) clamp(52px, 6vw, 82px);
}

body.layout-post .fp-post-kicker {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  margin-bottom: clamp(34px, 5vw, 58px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--fp-rule-strong);
  color: var(--fp-faint);
  font-family: var(--tp-font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

body.layout-post .fp-post-kicker a {
  color: var(--fp-muted);
  text-decoration: none;
}

body.layout-post .fp-post-kicker a:first-child {
  color: var(--fp-orange);
}

body.layout-post .fp-post-kicker a:hover {
  color: var(--fp-orange);
}

body.layout-post .tp-post-title {
  max-width: 13.5ch;
  margin: 0;
  color: var(--fp-ink);
  font-family: var(--tp-font-display);
  font-size: clamp(54px, 7.1vw, 102px);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -.052em;
  line-height: .9;
  text-wrap: balance;
}

body.layout-post .tp-post-sub {
  max-width: 62ch;
  margin-top: clamp(28px, 4vw, 44px);
  color: var(--fp-muted);
  font-family: var(--tp-font-mono);
  font-size: clamp(16px, 1.55vw, 21px);
  line-height: 1.55;
  opacity: 1;
}

body.layout-post .tp-author-row {
  max-width: 720px;
  margin-top: 36px;
  padding-top: 20px;
  border-top-color: var(--fp-rule);
}

body.layout-post .tp-author-meta .tp-eyebrow {
  margin-top: 3px;
  font-size: 8px;
  letter-spacing: .11em;
}

body.layout-post .tp-post-featured {
  width: min(100%, calc(880px + (2 * var(--editorial-gutter))));
  max-width: calc(880px + (2 * var(--editorial-gutter)));
  margin: 0 auto;
  padding-inline: var(--editorial-gutter);
}

body.layout-post .tp-post > .tp-diagram {
  width: min(calc(100% - (2 * var(--editorial-gutter))), 1180px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 38px) clamp(20px, 3vw, 42px) clamp(18px, 2.4vw, 30px);
}

body.layout-post .tp-post-featured picture,
body.layout-post .tp-post > .tp-diagram {
  border-color: var(--fp-rule-strong);
  background: var(--fp-bg-raised);
}

body.layout-post .tp-diagram-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}

body.layout-post .tp-diagram-compare-panel {
  min-width: 0;
  padding: clamp(20px, 2.7vw, 32px);
  border: 1px solid var(--fp-rule-strong);
  background: var(--fp-bg);
}

body.layout-post .tp-diagram-compare-panel--accent {
  border-color: var(--fp-orange);
  background: var(--fp-orange-soft);
}

body.layout-post .tp-diagram-compare-title {
  margin: 0 0 18px;
  color: var(--fp-muted);
  font-family: var(--tp-font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1.35;
  text-transform: uppercase;
}

body.layout-post .tp-diagram-compare-panel--accent .tp-diagram-compare-title {
  color: var(--fp-orange);
}

body.layout-post .tp-diagram-compare ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.layout-post .tp-diagram-compare li {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--fp-rule);
  color: var(--fp-ink);
  font-family: var(--tp-sans);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.35;
}

body.layout-post .tp-diagram-compare li:last-child {
  padding-bottom: 0;
}

body.layout-post .fp-reading-layout {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, var(--editorial-reading));
  gap: clamp(48px, 7vw, 104px);
  justify-content: center;
  width: min(100%, 1180px);
  margin-inline: auto;
  padding: clamp(58px, 7vw, 90px) var(--editorial-gutter) 0;
}

body.layout-post .fp-article-rail {
  position: sticky;
  top: calc(var(--shell-header, 84px) + 62px);
  align-self: start;
  display: grid;
  gap: 30px;
  min-width: 0;
  color: var(--fp-muted);
  font-family: var(--tp-font-mono);
}

body.layout-post .fp-article-back {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--fp-rule-strong);
  color: var(--fp-orange);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.45;
  text-decoration: none;
  text-transform: uppercase;
}

body.layout-post .fp-article-back:hover {
  padding-left: 5px;
}

body.layout-post .fp-article-facts {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px 14px;
  color: var(--fp-faint);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

body.layout-post .fp-article-facts span:first-child {
  grid-column: 1 / -1;
  color: var(--fp-orange);
}

body.layout-post .fp-post-toc {
  min-width: 0;
}

body.layout-post .fp-post-toc details,
body.layout-post .fp-post-toc summary {
  margin: 0;
}

body.layout-post .fp-post-toc summary {
  list-style: none;
}

body.layout-post .fp-post-toc summary::-webkit-details-marker {
  display: none;
}

body.layout-post .fp-post-toc-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--fp-rule-strong);
  color: var(--fp-orange);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: default;
}

body.layout-post .fp-post-toc-toggle {
  display: none;
}

body.layout-post .fp-post-toc ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 10px 0 0;
  list-style: none;
}

body.layout-post .fp-post-toc li {
  margin: 0;
}

body.layout-post .fp-post-toc a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 7px 0;
  color: var(--fp-faint);
  font-size: 9px;
  line-height: 1.42;
  text-decoration: none;
}

body.layout-post .fp-post-toc a:hover,
body.layout-post .fp-post-toc a[aria-current="location"] {
  color: var(--fp-orange);
}

body.layout-post .fp-rail-share {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--fp-rule);
}

body.layout-post .fp-rail-label {
  color: var(--fp-faint);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

body.layout-post .fp-rail-share .tp-share {
  display: flex;
  gap: 6px;
  width: 100%;
  margin: 0;
}

body.layout-post .fp-rail-share .tp-share a,
body.layout-post .fp-rail-share .tp-share button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--fp-rule);
  border-radius: 0;
  background: transparent;
  color: var(--fp-muted);
  font-family: var(--tp-font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

body.layout-post .fp-rail-share .tp-share button {
  flex: 1;
}

body.layout-post .fp-rail-share .tp-share a:hover,
body.layout-post .fp-rail-share .tp-share button:hover {
  border-color: var(--fp-orange);
  color: var(--fp-orange);
}

body.layout-post .fp-reading-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(36px, 4vw, 48px);
  width: 100%;
  margin: 0;
  padding: 0;
}

body.layout-post .fp-reading-meta {
  width: 100%;
}

body.layout-post .fp-reading-shell .tp-prose {
  width: 100%;
  max-width: var(--editorial-reading);
  margin: 0;
  padding: 0 0 var(--editorial-section);
  color: var(--fp-ink);
  font-family: var(--tp-sans);
  font-size: clamp(17px, 1.2vw, 19px);
  line-height: 1.78;
}

body.layout-post .tp-prose > p:first-of-type {
  margin-bottom: clamp(46px, 6vw, 72px);
  padding-bottom: clamp(36px, 5vw, 54px);
  border-bottom: 1px solid var(--fp-rule-strong);
  color: var(--fp-muted);
  font-family: var(--tp-font-display);
  font-size: clamp(25px, 2.75vw, 37px);
  letter-spacing: -.02em;
  line-height: 1.3;
}

body.layout-post .tp-prose p,
body.layout-post .tp-prose li {
  text-wrap: pretty;
}

body.layout-post .tp-prose p {
  margin-bottom: 1.45em;
}

body.layout-post .tp-prose h2 {
  margin: clamp(70px, 8vw, 100px) 0 24px;
  color: var(--fp-ink);
  font-family: var(--tp-font-display);
  font-size: clamp(38px, 5vw, 62px);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1;
  text-wrap: balance;
}

body.layout-post .tp-prose h3 {
  margin: 52px 0 18px;
  color: var(--fp-ink);
  font-family: var(--tp-font-display);
  font-size: clamp(28px, 3.2vw, 40px);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.08;
}

body.layout-post .tp-prose h4 {
  margin-top: 38px;
  color: var(--fp-orange);
  font-family: var(--tp-font-mono);
  font-size: 11px;
}

body.layout-post .tp-prose a {
  color: var(--fp-orange);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

body.layout-post .tp-prose ul,
body.layout-post .tp-prose ol {
  padding-left: 1.35em;
}

body.layout-post .tp-prose li {
  margin-bottom: .7em;
  padding-left: .2em;
}

body.layout-post .tp-prose li::marker {
  color: var(--fp-orange);
}

body.layout-post .tp-prose blockquote {
  margin-block: 44px;
  padding: 25px 28px;
  border: 0;
  border-left: 2px solid var(--fp-orange);
  background: var(--fp-orange-soft);
  font-family: var(--tp-sans);
  font-size: 16px;
}

body.layout-post .tp-prose blockquote p:first-child::before {
  font-family: var(--tp-font-mono);
}

body.layout-post .tp-prose code,
body.layout-post .tp-prose pre,
body.layout-post .tp-prose table {
  font-family: var(--tp-font-mono);
}

body.layout-post .tp-prose code {
  font-size: .82em;
}

body.layout-post .tp-prose pre {
  border-color: var(--fp-rule-strong);
  font-size: 12px;
}

body.layout-post .fp-post-cta {
  width: min(calc(100% - (2 * var(--editorial-gutter))), 1180px);
  margin-top: 0;
}

body.layout-post .tp-post-tags {
  width: min(100%, var(--editorial-reading));
  max-width: var(--editorial-reading);
  margin-inline: auto;
  padding-inline: 0;
}

body.layout-post .tp-prevnext,
body.layout-post .tp-related {
  width: min(100%, 1180px);
  max-width: 1180px;
}

body.layout-post .fp-reading-progress {
  z-index: 80;
  animation: none;
  transform: scaleX(var(--reading-progress, 0));
  transition: transform 80ms linear;
}

/* --------------------------------------------------------------------------
   Responsive editorial system
   -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  body.layout-blog .tp-hero {
    grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr);
    column-gap: 40px;
  }

  body.layout-blog .fp-editorial-visual {
    min-height: 540px;
  }

  .fp-latest-grid {
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: repeat(4, minmax(220px, auto));
  }

  .fp-latest-card--lead {
    grid-row: 1 / 5;
  }

  body.layout-blog .tp-guide,
  body.layout-blog .tp-guide--pillar {
    grid-column: span 4;
  }

  body.layout-blog .tp-guide--pillar {
    grid-column: span 8;
  }

  body.layout-post .fp-reading-layout {
    grid-template-columns: minmax(170px, 200px) minmax(0, var(--editorial-reading));
    gap: 44px;
  }
}

@media (max-width: 960px) {
  body.layout-blog .tp-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    max-width: 760px;
  }

  body.layout-blog .tp-hero > .tp-eyebrow-row,
  body.layout-blog .tp-hero > .tp-eyebrow,
  body.layout-blog .tp-h1,
  body.layout-blog .tp-lead,
  body.layout-blog .fp-blog-global-search,
  body.layout-blog .fp-blog-hero-actions,
  body.layout-blog .fp-signal-chain,
  body.layout-blog .tp-hero-meta,
  body.layout-blog .fp-editorial-visual {
    grid-column: 1;
    grid-row: auto;
  }

  body.layout-blog .fp-editorial-visual {
    min-height: 500px;
    margin-top: 48px;
  }

  body.layout-blog .tp-guide,
  body.layout-blog .tp-guide--pillar {
    grid-column: span 6;
  }

  .fp-editorial-section-head {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }

  .fp-editorial-section-head > p {
    max-width: 56ch;
  }

  .fp-blog-search {
    grid-template-columns: 1fr auto;
  }

  .fp-blog-search label {
    grid-column: 1 / -1;
  }

  .fp-blog-search-field {
    grid-column: 1;
  }

  body.layout-post .fp-reading-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 42px;
    max-width: calc(var(--editorial-reading) + (2 * var(--editorial-gutter)));
  }

  body.layout-post .fp-article-rail {
    position: static;
    display: grid;
    grid-template-columns: minmax(150px, .6fr) minmax(0, 1.4fr);
    gap: 24px 36px;
    padding: 22px;
    border: 1px solid var(--fp-rule-strong);
    background: var(--fp-bg-raised);
  }

  body.layout-post .fp-article-back,
  body.layout-post .fp-article-facts {
    align-self: start;
  }

  body.layout-post .fp-post-toc {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body.layout-post .fp-post-toc-head {
    grid-template-columns: minmax(0, 1fr) auto auto;
    cursor: pointer;
  }

  body.layout-post .fp-post-toc-toggle {
    display: inline;
    color: var(--fp-orange);
  }

  body.layout-post .fp-post-toc details[open] .fp-post-toc-toggle {
    transform: rotate(45deg);
  }

  body.layout-post .fp-post-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }

  body.layout-post .fp-rail-share {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 760px) {
  body.page-family-editorial {
    --editorial-gutter: 20px;
    --editorial-section: 76px;
  }

  body.layout-post .breadcrumb-list {
    overflow: visible;
  }

  body.layout-post .breadcrumb-item {
    flex: 0 0 auto;
  }

  body.layout-post .breadcrumb-item:last-child {
    display: none;
  }

  body.layout-post .breadcrumb-item:nth-last-child(2)::after {
    display: none;
  }

  body.layout-blog .tp-hero {
    padding-top: 42px;
  }

  body.layout-blog .tp-hero > .tp-eyebrow-row {
    gap: 7px;
    margin-bottom: 34px;
  }

  body.layout-blog .tp-h1 {
    max-width: 8ch;
    font-size: clamp(50px, 16vw, 72px);
  }

  body.layout-blog .fp-blog-hero-actions a {
    flex: 1 1 50%;
    min-width: 0;
    font-size: 8px;
  }

  body.layout-blog .fp-editorial-visual {
    min-height: 390px;
    margin-top: 42px;
  }

  body.layout-blog .fp-blog-local-nav > div {
    grid-template-columns: repeat(4, 1fr);
    padding-inline: 0;
  }

  body.layout-blog .fp-blog-local-nav span {
    display: none;
  }

  body.layout-blog .fp-blog-local-nav a {
    justify-content: center;
    padding-inline: 8px;
    border-left: 0;
    border-right: 1px solid var(--fp-rule);
    text-align: center;
  }

  body.layout-blog .fp-blog-local-nav a:last-child {
    border-right: 0;
  }

  .fp-editorial-section-head {
    margin-bottom: 36px;
  }

  .fp-editorial-section-head h2 {
    font-size: clamp(43px, 13vw, 64px);
  }

  .fp-latest-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .fp-latest-card--lead {
    grid-row: auto;
  }

  .fp-latest-card,
  .fp-latest-card--lead {
    min-height: 280px;
  }

  .fp-latest-card--lead > a,
  .fp-latest-card > a {
    padding: 26px;
  }

  .fp-latest-card--lead h3,
  .fp-latest-card h3 {
    margin-top: 54px;
    font-size: clamp(32px, 10vw, 48px);
  }

  body.layout-blog .tp-guides-grid {
    grid-template-columns: 1fr;
  }

  body.layout-blog .tp-guide,
  body.layout-blog .tp-guide--pillar {
    grid-column: 1;
    min-height: 220px;
  }

  body.layout-blog .tp-guide--pillar .tp-guide-title,
  body.layout-blog .tp-guide .tp-guide-title {
    font-size: clamp(30px, 9vw, 44px);
  }

  .fp-blog-search {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-bottom: 64px;
  }

  .fp-blog-search label {
    grid-column: 1 / -1;
  }

  .fp-blog-search output {
    min-width: 82px;
    font-size: 7px;
  }

  .fp-library-cluster > header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .fp-library-cluster-meta {
    justify-content: space-between;
  }

  .fp-library-grid {
    grid-template-columns: 1fr;
  }

  .fp-library-card > a {
    min-height: 230px;
    padding: 24px;
  }

  .fp-library-card h3 {
    font-size: clamp(28px, 8.5vw, 38px);
  }

  body.layout-post .tp-post-hero {
    padding-top: 46px;
  }

  body.layout-post .fp-post-kicker {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  body.layout-post .fp-post-kicker > span:last-child {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: end;
  }

  body.layout-post .fp-post-kicker > a:first-child {
    grid-column: 1;
    grid-row: 2;
  }

  body.layout-post .fp-post-kicker > a:nth-child(2),
  body.layout-post .fp-post-kicker > span:nth-child(2) {
    grid-column: 2;
    grid-row: 2;
  }

  body.layout-post .tp-post-title {
    max-width: none;
    font-size: clamp(43px, 13vw, 66px);
    line-height: .94;
  }

  body.layout-post .tp-author-row {
    gap: 14px;
  }

  body.layout-post .tp-post-featured {
    padding-inline: 20px;
  }

  body.layout-post .tp-post > .tp-diagram {
    width: calc(100% - 32px);
    padding: 18px 16px 14px;
  }

  body.layout-post .tp-diagram-compare {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  body.layout-post .tp-diagram-compare-panel {
    padding: 16px;
  }

  body.layout-post .tp-diagram-compare-title {
    margin-bottom: 12px;
    font-size: 10px;
  }

  body.layout-post .tp-diagram-compare li {
    padding: 9px 0;
    font-size: 14px;
  }

  body.layout-post .fp-reading-layout {
    padding-top: 42px;
  }

  body.layout-post .fp-article-rail {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 20px;
  }

  body.layout-post .fp-article-back,
  body.layout-post .fp-article-facts,
  body.layout-post .fp-post-toc,
  body.layout-post .fp-rail-share {
    grid-column: 1;
    grid-row: auto;
  }

  body.layout-post .fp-post-toc ol {
    grid-template-columns: 1fr;
  }

  body.layout-post .fp-rail-share {
    padding-top: 18px;
    border-top: 1px solid var(--fp-rule);
  }

  body.layout-post .fp-reading-shell .tp-prose {
    font-size: 17px;
  }

  body.layout-post .tp-prose > p:first-of-type {
    font-size: clamp(23px, 7vw, 31px);
  }

  body.layout-post .tp-prose h2 {
    font-size: clamp(36px, 10vw, 50px);
  }

  body.layout-post .tp-post-tags {
    width: calc(100% - 40px);
  }
}

@media (max-width: 430px) {
  body.layout-blog .fp-blog-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.layout-blog .fp-blog-hero-actions a,
  body.layout-blog .fp-blog-hero-actions a + a {
    padding: 12px 0;
    border-left: 0;
    border-bottom: 1px solid var(--fp-rule);
  }

  body.layout-blog .fp-blog-hero-actions a:last-child {
    border-bottom: 0;
  }

  .fp-library-cluster-meta {
    display: grid;
    justify-items: start;
  }

  .fp-blog-search output {
    display: none;
  }

  .fp-blog-search {
    grid-template-columns: 1fr;
  }

  .fp-blog-search-field {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.layout-blog .fp-editorial-visual img,
  body.layout-post .tp-post-featured img,
  body.layout-post .fp-reading-progress {
    transition-duration: .01ms;
  }
}
