/* ==========================================================================
   SMA Estimating — post.css
   Single article template. Depends on tokens from base.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reading progress — CSS scroll-driven, no JS, no scroll listener.
      Simply absent in browsers without animation-timeline.
   -------------------------------------------------------------------------- */
@supports (animation-timeline: scroll()) {
  .progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: 0 50%;
    background: var(--gold);
    z-index: 130;
    animation: progress linear both;
    animation-timeline: scroll(root block);
  }
  @keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
@media (prefers-reduced-motion: reduce) { .progress { display: none; } }

/* --------------------------------------------------------------------------
   2. Article head
   -------------------------------------------------------------------------- */
.art-hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.25rem, 4vw, 3.5rem);
}
.art-crumb {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted-2);
  margin-bottom: 1.1rem;
}
.art-crumb a { color: var(--muted-2); text-decoration: none; }
.art-crumb a:hover { color: var(--blue); }
.art-crumb span { color: var(--line-strong); margin-inline: 0.4rem; }

.art-cat {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-700);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 0.35rem 0.8rem;
  margin-bottom: 1.1rem;
}
.art-hero h1 {
  font-size: clamp(1.9rem, 1.35rem + 2.4vw, 3rem);
  max-width: 22ch;
}
.art-dek {
  font-size: var(--fs-lede);
  color: var(--muted);
  max-width: 62ch;
  margin-top: 1.15rem;
  line-height: 1.6;
}

/* Byline block — author, reviewer, dates. The trust furniture. */
.art-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: 1.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.art-meta__who { display: flex; align-items: center; gap: 0.7rem; }
.art-meta__badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.85rem;
  flex: none;
}
.art-meta__name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  line-height: 1.3;
}
.art-meta__role {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted-2);
  display: block;
  margin-top: 1px;
}
.art-meta__dates {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted-2);
  line-height: 1.5;
}
.art-meta__dates strong { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   3. Layout — sticky contents rail beside the prose
   -------------------------------------------------------------------------- */
.art-layout {
  /* Keeps the contents rail and the 72ch measure as one centred block
     instead of stranding whitespace on the right. */
  max-width: 1020px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
/* Grid children default to min-width:auto, which let the table's min-width
   force the whole column — and the page — wider than the viewport. */
.art-layout > * { min-width: 0; }
.prose { min-width: 0; }
.toc { position: sticky; top: 108px; }
.toc h2 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--muted-2);
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.85rem;
}
.toc li + li { margin-top: 0.15rem; }
.toc a {
  display: block;
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0 0.4rem 0.85rem;
  border-left: 2px solid var(--line);
}
.toc a:hover { color: var(--blue); border-left-color: var(--gold); }

@media (max-width: 940px) {
  .art-layout { grid-template-columns: 1fr; }
  .toc {
    position: static;
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.25rem 1.35rem;
  }
  .toc a { border-left: 0; padding-left: 0; }
}

/* --------------------------------------------------------------------------
   4. Prose
   -------------------------------------------------------------------------- */
.prose { max-width: 72ch; font-size: 1.09rem; line-height: 1.72; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
  margin-top: 2.4em;
  padding-top: 1.1rem;
  border-top: 2px solid var(--line);
  scroll-margin-top: 110px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.15rem;
  margin-top: 1.9em;
  scroll-margin-top: 110px;
}
.prose p { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--blue); text-decoration-thickness: 1px; }

.prose ul, .prose ol { color: var(--muted); padding-left: 1.4rem; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-top: 0.6rem;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 2px;
  background: var(--gold);
}
.prose ol { list-style: decimal; }
.prose ol li { margin-top: 0.6rem; padding-left: 0.35rem; }
.prose ol li::marker { font-family: var(--sans); font-weight: 700; color: var(--blue); font-size: 0.9rem; }

.prose blockquote {
  margin: 2rem 0;
  padding: 0.35rem 0 0.35rem 1.35rem;
  border-left: 3px solid var(--gold);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
}

/* Tables — the whole point of a pricing article */
.table-wrap {
  overflow-x: auto;
  margin: 1.85rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 480px;
}
.prose th {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted-2);
  text-align: left;
  background: var(--paper);
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
}
.prose td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td:first-child {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
}
.prose td .num, .prose td:nth-child(2) { font-variant-numeric: tabular-nums; }
.table-note {
  font-size: 0.82rem !important;
  color: var(--muted-2) !important;
  margin-top: -1.1rem !important;
}

/* Key takeaways — put the answer up top, which is also what gets cited */
.takeaways {
  background: var(--blue-900);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--gold);
  padding: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 2.5rem;
}
.takeaways h2 {
  color: #fff;
  font-size: 1.05rem !important;
  margin: 0 0 1rem !important;
  border-top: 0 !important;
  padding-top: 0 !important;
}
.takeaways ul { padding-left: 0; }
.takeaways li {
  position: relative;
  padding-left: 1.6rem;
  margin-top: 0.7rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--on-dark);
}
.takeaways li:first-child { margin-top: 0; }
.takeaways li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 9px;
  height: 2px;
  background: var(--gold);
}
.takeaways strong { color: #fff; font-weight: 600; }

/* Inline callout */
.callout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.4rem;
  margin: 1.85rem 0;
  font-size: 0.98rem;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 0.7rem; }
.callout__label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--blue);
  display: block;
  margin-bottom: 0.45rem;
}

/* Article FAQ */
.art-faq { border-top: 1px solid var(--line); margin-top: 1.5rem; }
.art-faq details { border-bottom: 1px solid var(--line); }
.art-faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--ink);
}
.art-faq summary::-webkit-details-marker { display: none; }
.art-faq summary:hover { color: var(--blue); }
.art-faq summary::after {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background:
    linear-gradient(var(--blue), var(--blue)) center/11px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) center/2px 11px no-repeat;
}
.art-faq details[open] summary::after {
  background: linear-gradient(var(--gold-700), var(--gold-700)) center/11px 2px no-repeat;
}
.art-faq__a { padding: 0 0 1.25rem; color: var(--muted); font-size: 1rem; }

/* --------------------------------------------------------------------------
   5. Author box
   -------------------------------------------------------------------------- */
.author-box {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-top: 3rem;
  padding: clamp(1.5rem, 2.5vw, 1.9rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.author-box__badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
}
.author-box h2 {
  /* The box lives inside .prose, so cancel the h2 section-rule treatment. */
  font-size: 1.05rem;
  margin: 0 0 0.15rem;
  padding-top: 0;
  border-top: 0;
}
.author-box__role {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted-2);
  display: block;
  margin-bottom: 0.75rem;
}
.author-box p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.62; }
.author-box a {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-block;
  margin-top: 0.75rem;
  text-decoration: none;
}
@media (max-width: 520px) {
  .author-box { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   6. Related posts
   -------------------------------------------------------------------------- */
.related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.related article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s var(--ease);
}
.related article:hover { border-color: var(--line-strong); }
.related__cat {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-700);
  margin-bottom: 0.6rem;
}
.related h3 { font-size: 1.02rem; line-height: 1.32; }
.related h3 a { color: inherit; text-decoration: none; }
.related h3 a:hover { color: var(--blue); }
.related__meta {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted-2);
}

/* ==========================================================================
   WordPress / block editor mapping

   The prose styles above were written against hand-authored HTML. Content from
   the editor arrives wrapped in .wp-block-* elements, so these rules point the
   same treatment at the markup Gutenberg actually produces. No design values
   change.
   ========================================================================== */

/* Core wraps tables in a <figure>; the design expected .table-wrap. */
.prose .wp-block-table {
  margin: 1.85rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.prose .wp-block-table table { margin: 0; border: 0; }
.prose .wp-block-table figcaption {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted-2);
  background: var(--paper);
}

/* Quote blocks wrap their text in <p>, which would otherwise inherit body size. */
.prose .wp-block-quote {
  margin: 2rem 0;
  padding: 0.35rem 0 0.35rem 1.35rem;
  border-left: 3px solid var(--gold);
}
.prose .wp-block-quote p {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}
.prose .wp-block-quote cite {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.8rem;
  color: var(--muted-2);
}

/* The core Details block gives the FAQ accordions for free. */
.prose .wp-block-details {
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.prose .wp-block-details:first-of-type { border-top: 1px solid var(--line); margin-top: 1.5rem; }
.prose .wp-block-details > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--ink);
}
.prose .wp-block-details > summary::-webkit-details-marker { display: none; }
.prose .wp-block-details > summary:hover { color: var(--blue); }
.prose .wp-block-details > summary::after {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background:
    linear-gradient(var(--blue), var(--blue)) center/11px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) center/2px 11px no-repeat;
}
.prose .wp-block-details[open] > summary::after {
  background: linear-gradient(var(--gold-700), var(--gold-700)) center/11px 2px no-repeat;
}
.prose .wp-block-details > *:not(summary) { color: var(--muted); }
.prose .wp-block-details > *:last-child { padding-bottom: 1.25rem; }

/* Images and embeds */
.prose .wp-block-image { margin: 1.85rem 0; }
.prose .wp-block-image img { border-radius: var(--radius); }
.prose .wp-block-image figcaption {
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted-2);
}
.prose .wp-block-embed { margin: 1.85rem 0; }

/* Separator */
.prose .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.25rem 0;
}

/* The takeaways and callout panels are Group blocks carrying an
   "Additional CSS class" of `takeaways` or `callout`. The block wrapper needs
   its default spacing cleared so the panel padding is the only padding. */
.prose .wp-block-group.takeaways > *,
.prose .wp-block-group.callout > * { margin-block-start: 0; }
.prose .wp-block-group.takeaways > * + *,
.prose .wp-block-group.callout > * + * { margin-top: 0.7rem; }
.prose .wp-block-group.takeaways ul { margin-top: 0; }

/* Alignment classes must not break the 72ch measure. */
.prose .alignwide,
.prose .alignfull { max-width: 100%; margin-inline: 0; }
.prose .alignleft { float: left; margin: 0.3rem 1.5rem 1rem 0; max-width: 45%; }
.prose .alignright { float: right; margin: 0.3rem 0 1rem 1.5rem; max-width: 45%; }
.prose .aligncenter { margin-inline: auto; }


/* Listing cards can carry a real featured image instead of the drawn panel. */
.post .thumb { display: block; }
.post .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Comments

   Styles WordPress's own wp_list_comments() / comment_form() markup rather
   than replacing it with a custom walker, so core updates cannot break it.
   Scoped to .comments-area, which single.php renders inside .prose.
   ========================================================================== */

.comments-area {
  margin-top: 3.5rem;
  padding-top: 2.25rem;
  border-top: 2px solid var(--line);
}
.comments-title {
  font-family: var(--sans);
  font-size: 1.25rem;
  margin: 0 0 1.75rem;
  padding-top: 0;
  border-top: 0;
}

/* --- The list ------------------------------------------------------------ */
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { list-style: none; }
.comment-list > li + li { margin-top: 1rem; }

.comment-body {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.15rem, 2vw, 1.5rem);
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.85rem;
}
.comment-author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}
.comment-author .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
}
.comment-author .fn { font-style: normal; }
.comment-author a { color: inherit; text-decoration: none; }
.comment-author a:hover { color: var(--blue); }
/* "says:" adds nothing once the layout makes authorship obvious. */
.comment-author .says { display: none; }

.comment-metadata {
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--muted-2);
  margin-left: auto;
}
.comment-metadata a { color: var(--muted-2); text-decoration: none; }
.comment-metadata a:hover { color: var(--blue); }
.comment-metadata .edit-link { margin-left: 0.6rem; }

.comment-content { font-size: 1rem; line-height: 1.65; color: var(--muted); }
.comment-content p { margin: 0 0 0.8em; }
.comment-content p:last-child { margin-bottom: 0; }

.comment-awaiting-moderation {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--gold-700);
  margin: 0.5rem 0 0;
}

.reply { margin-top: 1rem; }
.comment-reply-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.45rem 0.9rem;
}
.comment-reply-link:hover { border-color: var(--blue); color: var(--blue); }

/* Nested replies: indented, with a rule showing the thread. */
.comment-list .children {
  list-style: none;
  margin: 1rem 0 0;
  padding-left: clamp(1rem, 3vw, 2rem);
  border-left: 2px solid var(--line);
}
.comment-list .children > li + li { margin-top: 1rem; }
.comment.bypostauthor > .comment-body { border-left: 3px solid var(--gold); }

.comments-area .navigation,
.comments-area .comment-navigation { margin: 1.5rem 0; }
.no-comments {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted-2);
  margin-top: 1.5rem;
}

/* --- The form ------------------------------------------------------------ */
.comment-respond {
  margin-top: 2.5rem;
  padding: clamp(1.35rem, 2.5vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius-lg);
}
.comment-reply-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
  padding-top: 0;
  border-top: 0;
}
.comment-reply-title small { font-size: 0.8rem; font-weight: 400; margin-left: 0.6rem; }
.comment-reply-title small a { color: var(--muted-2); }

.comment-notes {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted-2);
  margin: 0 0 1.35rem;
  line-height: 1.5;
}

.comment-form label {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.comment-form .required { color: var(--gold-700); }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  padding: 0.75rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}
.comment-form textarea { resize: vertical; min-height: 140px; }
.comment-form input:focus-visible,
.comment-form textarea:focus-visible { border-color: var(--blue); }

.comment-form p { margin: 0 0 1.1rem; }
/* Name and email share a row once there is space for both. */
@media (min-width: 620px) {
  .comment-form-author,
  .comment-form-email {
    display: inline-block;
    width: calc(50% - 0.5rem);
    vertical-align: top;
  }
  .comment-form-author { margin-right: 0.9rem; }
}

.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.comment-form-cookies-consent input { margin-top: 0.25rem; flex: none; }
.comment-form-cookies-consent label {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.comment-form .form-submit { margin-bottom: 0; }
.comment-form input[type="submit"] { width: auto; cursor: pointer; }
.comment-form .logged-in-as {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted-2);
  margin-bottom: 1.2rem;
}