/* Long-form guide / blog post template. */
.post-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: 0.5rem var(--gutter) clamp(4rem, 8vw, 6rem);
}
.post-toc {
  position: sticky;
  top: 100px;
  align-self: start;
}
.post-toc summary {
  list-style: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  cursor: default;
}
.post-toc summary::-webkit-details-marker {
  display: none;
}
.post-toc ol {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid rgb(12 21 34 / 0.12);
}
.post-toc a {
  display: block;
  margin-left: -1px;
  padding: 0.4rem 0 0.4rem 0.9rem;
  border-left: 2px solid transparent;
  font-size: 0.9rem;
  color: var(--navy-2);
  text-decoration: none;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.post-toc a:hover {
  color: var(--navy);
}
.post-toc a[aria-current="true"] {
  color: var(--navy);
  font-weight: 500;
  border-left-color: var(--navy);
}

/* body typography: ~68ch measure */
.post-body {
  max-width: 44rem;
  font-size: 1.125rem;
  line-height: 1.7;
}
.post-body > * + * {
  margin-top: 1.25rem;
}
.post-body h2 {
  margin-top: clamp(2.75rem, 5vw, 3.5rem);
  font-size: clamp(1.75rem, 2.8vw, 2.25rem);
  line-height: 1.15;
  scroll-margin-top: 100px;
}
.post-body h2:first-child {
  margin-top: 0;
}
.post-body h3 {
  margin-top: 2rem;
  font: 700 1.3rem/1.25 var(--display);
}
.post-body h2 + *,
.post-body h3 + * {
  margin-top: 0.85rem;
}
.post-body ul,
.post-body ol {
  display: grid;
  gap: 0.6rem;
  padding-left: 1.25rem;
}
.post-body li::marker {
  color: var(--navy-2);
}
.post-body a:not(.btn) {
  text-underline-offset: 3px;
}
.post-question {
  margin-inline: 0;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgb(12 21 34 / 0.08);
  font: 700 1.3rem/1.35 var(--display);
  text-align: center;
}
.post-formula {
  padding: 1.1rem 1.4rem;
  border-radius: 16px;
  background: var(--navy);
  color: var(--on-dark);
  font: 700 1.3rem/1.3 var(--display);
  text-align: center;
}
.post-table {
  overflow-x: auto;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgb(12 21 34 / 0.08);
}
.post-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.post-table th,
.post-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgb(12 21 34 / 0.08);
}
.post-table th {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-2);
}
.post-table tr:last-child td {
  border-bottom: 0;
}

/* inline tool link and product callout */
.post-callout {
  margin-block: 2.25rem !important;
  border-radius: 24px;
}
.post-callout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1rem;
  background: var(--surface);
  box-shadow: var(--ui-shadow);
  line-height: 1.55;
}
.post-callout-media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 1rem;
  border-radius: 16px;
  background: var(--tint, var(--stage-peach));
}
.post-callout-media .ui {
  width: min(100%, 260px);
}
/* no picture: the text takes the full width */
.post-callout:not(:has(.post-callout-media)) {
  grid-template-columns: minmax(0, 1fr);
  padding: 1.5rem 1.75rem;
}
.post-callout-media .brief {
  font-size: 0.75rem;
}
.post-callout > div:last-child {
  padding-right: 0.75rem;
  font-size: 1rem;
  color: var(--navy-2);
}
.post-callout-title {
  margin-bottom: 0.4rem;
  font: 700 1.25rem/1.25 var(--display);
  color: var(--navy);
}
.post-callout .link {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--navy);
}
.post-faq {
  max-width: none;
}
.post-faq summary {
  font-size: 1.1rem;
}
.post-faq details p {
  font-size: 1rem;
}
.post-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(12 21 34 / 0.1);
  font-size: 0.95rem;
  color: var(--navy-2);
}
.post-copy {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 960px) {
  .post-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .post-toc {
    position: static;
  }
  .post-toc details {
    padding: 0.9rem 1.1rem;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 0 0 1px rgb(12 21 34 / 0.08);
  }
  .post-toc summary {
    display: flex;
    justify-content: space-between;
    margin: 0;
    cursor: pointer;
  }
  .post-toc summary::after {
    content: "";
    width: 9px;
    height: 9px;
    margin-top: 0.2rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
  }
  .post-toc details[open] summary {
    margin-bottom: 0.75rem;
  }
  .post-toc details[open] summary::after {
    transform: rotate(-135deg);
  }
}
@media (max-width: 620px) {
  .post-body {
    font-size: 1.0625rem;
  }
  .post-callout {
    grid-template-columns: minmax(0, 1fr);
  }
  .post-callout > div:last-child {
    padding: 0 0.5rem 0.5rem;
  }
}
.post-faq { margin-top: 1.5rem; }

/* eNPS tool: a real card, so it reads as something to use */
.post-calc { margin-block: 2.5rem; padding: clamp(1.25rem, 3vw, 1.75rem); border: 1px solid rgb(12 21 34 / 0.1); border-radius: 24px; background: var(--surface); box-shadow: 0 24px 50px -32px rgb(12 21 34 / 0.45); line-height: 1.5; }
.post-calc-head { display: flex; align-items: center; gap: 0.9rem; }
.post-calc-ic { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 14px; background: var(--stage-peach); color: var(--orange); }
.post-calc-ic .i { width: 1.25rem; height: 1.25rem; }
.post-calc-head h3 { margin: 0 !important; font: 700 1.3rem/1.2 var(--display); }
.post-calc-head p { margin: 0.1rem 0 0 !important; font-size: 0.9rem; color: var(--navy-2); }
.post-calc-switch { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; margin: 1.25rem 0 1.25rem; padding: 0.3rem; border-radius: 999px; background: #f3eee8; }
.post-calc-switch button { min-height: 2.5rem; padding: 0.45rem 1rem; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 0.9rem; font-weight: 500; color: var(--navy-2); cursor: pointer; }
.post-calc-switch button { transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.post-calc-switch button:hover { color: var(--navy); }
.post-calc-switch button[aria-selected="true"] { background: var(--surface); color: var(--navy); box-shadow: var(--ui-shadow); }
.post-calc button:focus-visible, .post-calc textarea:focus-visible { outline: 3px solid #c25400; outline-offset: 2px; }
.post-calc-pill { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0.35rem 0.95rem; border: 1px solid rgb(12 21 34 / 0.15); border-radius: 999px; background: var(--surface); font: inherit; font-size: 0.875rem; font-weight: 500; color: var(--navy); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.post-calc-pill:hover { border-color: var(--navy); }
.post-calc-copy { --edge: #f0c49c; min-height: 2.75rem; background: var(--stage-peach); color: #9a4200; }
.post-calc-input { display: block; width: 100%; max-width: 22rem; min-height: 2.75rem; margin-top: 0.5rem; padding: 0.55rem 1rem; border: 1.5px solid rgb(12 21 34 / 0.2); border-radius: 12px; background: #fff; font: inherit; font-size: 0.95rem; color: var(--navy); transition: border-color 0.2s; }
.post-calc-input:hover { border-color: rgb(12 21 34 / 0.4); }
.post-calc-input:focus-visible { outline: 3px solid #c25400; outline-offset: 2px; }
.post-calc .post-calc-label--gap { margin-top: 1.25rem; }
.post-calc-input::placeholder,
.post-calc textarea::placeholder { color: rgb(12 21 34 / 0.4); }
.post-calc-panel p { margin: 0; }
.post-calc-label { display: block; font: 700 1.05rem/1.3 var(--display); color: var(--navy); }
.post-calc .post-calc-hint { margin-top: 0.2rem; font-size: 0.9rem; color: var(--navy-2); }
.post-calc textarea { display: block; width: 100%; min-height: 7rem; margin-top: 0.75rem; padding: 0.8rem 1rem; border: 1.5px solid rgb(12 21 34 / 0.2); border-radius: 14px; background: #fff; font: inherit; font-size: 0.95rem; color: var(--navy); resize: vertical; transition: border-color 0.2s; }
.post-calc textarea:hover { border-color: rgb(12 21 34 / 0.4); }
.post-calc-example { margin-top: 0.75rem; }
.post-calc-out { margin-top: 1.1rem; padding: 1rem 1.1rem; border-radius: 14px; background: var(--paper); }
.post-calc .post-calc-empty { color: var(--navy-2); font-size: 0.95rem; }
.post-calc .post-calc-score { display: flex; align-items: baseline; gap: 0.6rem; }
.post-calc-score b { font: 700 2.25rem/1 var(--display); color: var(--navy); }
.post-calc .ex-bar { display: flex; gap: 2px; height: 10px; margin-top: 0.8rem; }
.post-calc .ex-bar i { transition: width 0.3s var(--ease-out); }
.post-calc .ex-legend { margin-top: 0.5rem; font-size: 0.8rem; }
.post-calc .ex-legend span { white-space: nowrap; }
.post-calc-sheets { margin-top: 1rem; font-size: 0.95rem; }
.post-calc-sheets summary { cursor: pointer; font-weight: 500; color: var(--navy); }
.post-calc-sheets p { margin-top: 0.6rem !important; }
.post-calc-formula { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.post-calc-formula code { padding: 0.5rem 0.7rem; border-radius: 10px; background: var(--paper); font-size: 0.85rem; color: var(--navy); overflow-wrap: anywhere; }
.post-calc .post-calc-q { margin-top: 0.6rem; padding: 0.9rem 1rem; border-left: 3px solid var(--orange); border-radius: 0 14px 14px 0; background: var(--paper); color: var(--navy); font-weight: 500; }
.post-calc .post-calc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin: 1rem 0 0.75rem; }
.post-calc-actions .btn { padding: 0 1.2rem; font-size: 0.95rem; }
@media (max-width: 620px) { .post-calc .ex-legend { font-size: 0.72rem; } }

/* document pages (legal, gated downloads): the article layout without the blog trimmings */
.post-head--doc h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}
.post-layout--solo {
  grid-template-columns: minmax(0, 44rem);
  justify-content: center;
}
.doc-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  margin-block: 1.5rem;
}
.doc-body h4,
.doc-body h5 {
  margin-top: 1.5rem;
  font: 700 1.1rem/1.3 var(--display);
  color: var(--navy);
}
.doc-form {
  margin-block: 2rem;
  padding: 0.75rem;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--ui-shadow);
}
.doc-form iframe {
  display: block;
  width: 100% !important;
  border-radius: 16px;
}
@media (max-width: 960px) {
  .post-layout--solo {
    grid-template-columns: minmax(0, 1fr);
  }
}
.post-head--solo .post-head-copy {
  max-width: 44rem;
  margin-inline: auto;
}
.doc-download {
  margin-block: 1.5rem 2.5rem;
}
.doc-video {
  margin-block: 2rem;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--ui-shadow);
}
.doc-video iframe {
  display: block;
  width: 100%;
  height: 100%;
}
.doc-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--navy);
}
