/* ==========================================================================
   Quiet Ledger Gutenberg presentation layer

   Core blocks stay editable in WordPress. Block styles reproduce the legacy
   site.css primitives so old custom-HTML pages and newly composed pages can
   coexist during the migration.
   ========================================================================== */

/* ---------- Full-width section groups ---------- */
/* Keep specificity above the legacy `.hero` / `.section` padding shorthands.
   `:where()` would make this gutter declaration lose even when loaded later. */
.wp-block-group:is(
  .is-style-quiet-hero,
  .is-style-quiet-section,
  .is-style-quiet-section-surface,
  .is-style-quiet-section-tight,
  .is-style-quiet-cta-band
) {
  clear: both;
  width: 100%;
  max-width: none;
  margin-block: 0;
  margin-inline: 0;
  padding-inline: max(var(--gutter), calc(50% - var(--max-content-half)));
}

:where(.hero, .wp-block-group.is-style-quiet-hero) {
  padding-block: 112px 96px;
}

:where(.section, .wp-block-group.is-style-quiet-section, .wp-block-group.is-style-quiet-section-surface) {
  padding-block: 128px;
}

:where(.section--surface, .wp-block-group.is-style-quiet-section-surface) {
  background: var(--surface);
}

:where(.section--tight, .wp-block-group.is-style-quiet-section-tight) {
  padding-block: 96px;
}

:where(.band, .wp-block-group.is-style-quiet-cta-band) {
  background: var(--brand);
  color: var(--paper-on-dark);
  padding-block: 96px;
}

:where(.hero-inner, .quiet-hero-content) {
  width: 100%;
  max-width: 800px;
  margin-inline: 0;
}

.quiet-hero-content > *,
.quiet-section-intro > *,
.quiet-document-head > *,
.quiet-document-footnotes > *,
.quiet-step-content > *,
.wp-block-group.is-style-quiet-cta-band > * {
  margin-block-start: 0;
  margin-block-end: 0;
}

.wp-block-group.is-style-quiet-hero > *,
.wp-block-group.is-style-quiet-document > * {
  margin-block-start: 0;
  margin-block-end: 0;
}

.wp-block-group.is-style-quiet-hero .quiet-hero-content {
  margin-left: 0;
}

.wp-block-group.is-style-quiet-hero .is-style-quiet-kicker {
  margin-bottom: 24px;
}

.wp-block-group.is-style-quiet-hero h1 {
  margin-bottom: 28px;
}

.wp-block-group.is-style-quiet-hero .is-style-quiet-lead {
  max-width: 58ch;
  margin-bottom: 40px;
}

.wp-block-group.is-style-quiet-hero .wp-block-buttons {
  margin-bottom: 56px;
}

/* Landing template carries the founding-page hero rhythm that previously
   lived in page-local Custom HTML. */
.landing-page .hero .cta-row {
  margin-bottom: 24px;
}

.landing-page .hero .note {
  max-width: 62ch;
  margin-bottom: 56px;
}

.quiet-page-audit .wp-block-group.is-style-quiet-hero .cta-row {
  margin-bottom: 16px;
}

.quiet-page-audit .wp-block-group.is-style-quiet-hero .cta-row + .note {
  margin-bottom: 56px;
}

.quiet-page-audit :where(.step, .quiet-step) :is(ul, ol),
.quiet-page-sprint :where(.step, .quiet-step) :is(ul, ol) {
  max-width: 62ch;
  padding-left: 22px;
}

.quiet-page-audit :where(.step, .quiet-step) :is(ul, ol) {
  margin: 16px 0 0;
}

.quiet-page-audit :where(.step, .quiet-step) li + li,
.quiet-page-sprint :where(.step, .quiet-step) li + li {
  margin-top: 12px;
}

.quiet-page-audit :where(.step, .quiet-step) :is(ul, ol) + p {
  margin-top: 16px;
}

.quiet-page-sprint :where(.step-index, .quiet-step-marker) {
  white-space: normal;
}

:where(.factline-rule, .quiet-hero-factline) {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ---------- Native section introductions ---------- */
:where(.section-head, .quiet-section-intro) {
  margin-bottom: 56px;
}

:where(.section-head, .quiet-section-intro) > .is-style-quiet-kicker {
  margin-bottom: 16px;
}

:where(.section-head, .quiet-section-intro) > :is(h2, h3, .wp-block-heading) {
  max-width: 30ch;
}

.quiet-section-intro > .is-style-quiet-lead {
  max-width: 62ch;
  margin-top: 20px;
}

.quiet-measure {
  width: 100%;
  max-width: 62ch;
  margin-left: 0;
}

.quiet-measure > * {
  margin-block-start: 0;
}

.quiet-measure > * + * {
  margin-top: 24px;
}

/* ---------- Paragraph and heading styles ---------- */
:where(.kicker, p.is-style-quiet-kicker) {
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

:where(.lead, p.is-style-quiet-lead) {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
}

:where(.factline, p.is-style-quiet-factline) {
  color: var(--ink-muted);
  font-family: var(--font-numeric);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1.55;
  text-transform: uppercase;
}

:where(.note, p.is-style-quiet-note) {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.55;
}

:where(.price-lockup .price, p.is-style-quiet-price) {
  color: var(--money);
  font-family: var(--font-numeric);
  font-size: 46px;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1;
}

:where(.price-lockup .term, p.is-style-quiet-term) {
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

:where(.stat-value, p.is-style-quiet-stat-value) {
  color: var(--money);
  font-family: var(--font-numeric);
  font-size: 52px;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.1;
}

:where(.stat-caption, p.is-style-quiet-stat-caption) {
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.45;
  margin-top: 8px;
  text-transform: uppercase;
}

:where(.display-page),
.wp-block-heading.is-style-quiet-display-page {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.8vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.1;
}

:where(.price-lockup, .quiet-price-lockup) {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
}

:where(.price-lockup, .quiet-price-lockup) > * {
  margin-block: 0;
}

/* ---------- Core buttons ---------- */
.wp-block-button.is-style-quiet-primary .wp-block-button__link,
.wp-block-button.is-style-quiet-outline .wp-block-button__link,
.wp-block-button.is-style-quiet-paper .wp-block-button__link {
  border: 1px solid transparent;
  border-radius: 3px;
  box-shadow: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  padding: 14px 28px;
  text-decoration: none;
  transition:
    background-color var(--dur-ui) ease-out,
    border-color var(--dur-ui) ease-out,
    color var(--dur-ui) ease-out;
}

.btn--primary,
.wp-block-button.is-style-quiet-primary .wp-block-button__link {
  background: var(--brand);
  color: var(--paper-on-dark);
}

.btn--primary:hover,
.wp-block-button.is-style-quiet-primary .wp-block-button__link:hover {
  background: var(--brand-hover);
  color: var(--paper-on-dark);
}

.btn--outline,
.wp-block-button.is-style-quiet-outline .wp-block-button__link {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--brand);
}

.btn--outline:hover,
.wp-block-button.is-style-quiet-outline .wp-block-button__link:hover {
  border-color: var(--brand);
  color: var(--brand-hover);
}

.btn--paper,
.wp-block-button.is-style-quiet-paper .wp-block-button__link {
  background: var(--paper-on-dark);
  color: var(--brand);
}

.btn--paper:hover,
.wp-block-button.is-style-quiet-paper .wp-block-button__link:hover {
  background: #fff;
  color: var(--brand-hover);
}

.wp-block-button.is-style-quiet-text-link .wp-block-button__link {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-color: var(--highlight-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--dur-ui) ease-out;
}

.wp-block-button.is-style-quiet-text-link .wp-block-button__link:hover {
  background: transparent;
  color: var(--brand);
  text-decoration-color: rgb(117, 201, 204);
}

/* ---------- Pull quotes ---------- */
:where(.quote, .wp-block-quote.is-style-quiet-pull-quote) {
  border: 0;
  border-left: 2px solid var(--border-strong);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  margin-block: 40px;
  padding: 0 0 0 24px;
}

.wp-block-quote.is-style-quiet-pull-quote p {
  font: inherit;
}

.wp-block-quote.is-style-quiet-pull-quote cite {
  display: block;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-style: normal;
  margin-top: 12px;
}

/* ---------- Documents and fee schedules ---------- */
:where(.doc, .wp-block-group.is-style-quiet-document) {
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 3px;
}

:where(.doc-head, .quiet-document-head) {
  border-bottom: 1px solid var(--border);
  padding: 28px 32px 24px;
}

:where(.doc-title, .quiet-document-head .wp-block-heading) {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

:where(.doc-subline, .quiet-document-head .is-style-quiet-note) {
  margin-top: 6px;
}

:where(.doc-footnotes, .quiet-document-footnotes) {
  border-top: 1px solid var(--border);
  padding: 20px 32px 24px;
}

:where(.doc-footnotes, .quiet-document-footnotes) p {
  max-width: none;
  color: var(--ink-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

:where(.doc-footnotes, .quiet-document-footnotes) p + p {
  margin-top: 8px;
}

.wp-block-table.is-style-quiet-fee-schedule {
  overflow-x: auto;
  margin: 0;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.wp-block-group.is-style-quiet-document > .wp-block-table.is-style-quiet-fee-schedule {
  border: 0;
  border-radius: 0;
}

:where(.doc table, .wp-block-table.is-style-quiet-fee-schedule table) {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
}

:where(.doc thead th, .wp-block-table.is-style-quiet-fee-schedule thead th) {
  background: var(--surface);
  border: 0;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.4;
  padding: 14px 32px;
  text-align: left;
  text-transform: uppercase;
}

:where(.doc tbody td, .wp-block-table.is-style-quiet-fee-schedule tbody td) {
  height: 60px;
  padding: 20px 32px;
  border: 0;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

:where(.doc tbody tr, .wp-block-table.is-style-quiet-fee-schedule tbody tr) {
  transition: background-color 180ms ease-out;
}

:where(.doc tbody tr, .wp-block-table.is-style-quiet-fee-schedule tbody tr):hover {
  background: var(--highlight);
}

.wp-block-table.is-style-quiet-fee-schedule tbody td:first-child {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
}

.wp-block-table.is-style-quiet-fee-schedule :is(th, td):last-child {
  text-align: right;
}

.wp-block-table.is-style-quiet-fee-schedule tbody td:last-child {
  color: var(--money);
  font-family: var(--font-numeric);
  font-size: 19px;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 500;
  white-space: nowrap;
}

.wp-block-table.is-style-quiet-fee-schedule figcaption {
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
  padding: 18px 32px 20px;
  text-align: left;
}

/* ---------- Guarantees ---------- */
:where(.guarantee, .wp-block-group.is-style-quiet-guarantee) {
  background: var(--guarantee-bg);
  border-left: 3px solid var(--money);
  border-radius: 3px;
  padding: 28px 32px;
}

:where(.guarantee-label, .quiet-guarantee-label) {
  color: var(--money);
  font-family: var(--font-numeric);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.4;
  margin-bottom: 12px;
  text-transform: uppercase;
}

:where(.guarantee-text, .quiet-guarantee-text) {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.45;
}

/* ---------- Step lists and Audit timeline ---------- */
:where(.steps, .wp-block-group.is-style-quiet-step-list) {
  border-top: 1px solid var(--border);
}

.wp-block-group.is-style-quiet-step-list > .quiet-step {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 32px;
  margin: 0;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

:where(.step-index, .quiet-step-marker) {
  padding-top: 6px;
  color: var(--ink-muted);
  font-family: var(--font-numeric);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1.4;
  white-space: nowrap;
}

.quiet-step-content > .wp-block-heading {
  margin-bottom: 12px;
}

.quiet-step-content > p {
  max-width: 62ch;
}

.quiet-step-content > p + p {
  margin-top: 16px;
}

:where(.steps--timeline, .wp-block-group.is-style-quiet-step-list.quiet-timeline) {
  border-top: 0;
}

.wp-block-group.is-style-quiet-step-list.quiet-timeline > .quiet-step {
  position: relative;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 32px;
  padding: 0 0 64px;
  border-bottom: 0;
}

.wp-block-group.is-style-quiet-step-list.quiet-timeline > .quiet-step:last-child {
  padding-bottom: 0;
}

.wp-block-group.is-style-quiet-step-list.quiet-timeline > .quiet-step::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: -6px;
  left: 164px;
  width: 1px;
  background: var(--border);
}

.wp-block-group.is-style-quiet-step-list.quiet-timeline > .quiet-step:last-child::before {
  bottom: auto;
  height: 28px;
}

.wp-block-group.is-style-quiet-step-list.quiet-timeline > .quiet-step::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 158px;
  width: 12px;
  height: 1px;
  background: var(--border-strong);
}

:where(.step-when, .quiet-timeline .quiet-step-marker) {
  padding-top: 7px;
  color: var(--brand);
  font-family: var(--font-numeric);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.4;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- FAQ details ---------- */
:where(.faq, .quiet-faq-set) {
  border-top: 1px solid var(--border);
}

:where(.faq details, details.wp-block-details.is-style-quiet-faq) {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

:where(.faq summary, details.wp-block-details.is-style-quiet-faq > summary) {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  list-style: none;
  transition: color var(--dur-ui) ease-out;
}

:where(.faq summary, details.wp-block-details.is-style-quiet-faq > summary)::-webkit-details-marker {
  display: none;
}

:where(.faq summary, details.wp-block-details.is-style-quiet-faq > summary):hover {
  color: var(--brand);
}

:where(.faq summary, details.wp-block-details.is-style-quiet-faq > summary)::after {
  content: "+";
  flex-shrink: 0;
  color: var(--ink-muted);
  font-family: var(--font-numeric);
  font-size: 18px;
}

:where(.faq details[open] summary, details.wp-block-details.is-style-quiet-faq[open] > summary)::after {
  content: "−";
}

:where(.faq .faq-body, details.wp-block-details.is-style-quiet-faq > :not(summary)) {
  max-width: 62ch;
}

details.wp-block-details.is-style-quiet-faq > :not(summary):last-child {
  margin-bottom: 28px;
}

@media (prefers-reduced-motion: no-preference) {
  details.wp-block-details.is-style-quiet-faq[open] > :not(summary) {
    animation: quiet-faq-open var(--dur-ui) ease-out;
  }
}

@keyframes quiet-faq-open {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Columns, stats, and contact routes ---------- */
:where(.cols-3, .wp-block-columns.is-style-quiet-feature-row) {
  display: flex;
  align-items: stretch;
  gap: 48px;
  margin-bottom: 0;
}

.wp-block-columns.is-style-quiet-feature-row {
  align-items: stretch !important;
  margin-bottom: 0;
}

.wp-block-columns.checkout-grid {
  align-items: start !important;
  margin-bottom: 0;
}

.wp-block-columns.is-style-quiet-feature-row > .wp-block-column {
  min-width: 0;
}

:where(.stat, .quiet-stat) {
  border-top: 1px solid var(--border-strong);
  padding-top: 16px;
}

.quiet-stat > * {
  margin-block: 0;
}

.quiet-evidence-grid {
  flex-wrap: wrap;
  padding: 32px;
}

.quiet-route-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  padding: 32px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.quiet-route-card > .wp-block-heading {
  font-size: 22px;
}

.quiet-route-card > * {
  margin-block-start: 0;
  margin-block-end: 0;
}

.quiet-route-card > p {
  flex-grow: 1;
}

.quiet-route-card > .wp-block-buttons {
  margin-top: auto;
}

/* ---------- Reading and legal groups ---------- */
:where(.reading, .wp-block-group.is-style-quiet-reading) {
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
}

.wp-block-group.is-style-quiet-reading > :is(p, ul, ol) {
  max-width: none;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0;
  line-height: 1.7;
}

.wp-block-group.is-style-quiet-reading > p + p {
  margin-top: 28px;
}

.wp-block-group.is-style-quiet-reading > .wp-block-heading {
  margin-top: 72px;
  margin-bottom: 24px;
}

/* How-i-think essay masthead. The essay body renders in the centered 780px
   reading column, but the hero title sat in the default left-aligned hero-inner,
   orphaning it at the gutter while everything below it was centered. Center the
   masthead over the reading column and frame it (title + standfirst + rule) so
   the lone title reads as an editorial opener, not an unfinished header. Degrades
   cleanly to title + rule if the standfirst paragraph is absent. */
.quiet-page-how-i-think .hero-inner {
  max-width: 780px;
  margin-inline: auto;
}

.quiet-page-how-i-think :where(.hero, .wp-block-group.is-style-quiet-hero) {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.quiet-page-how-i-think .hero-inner .display-page {
  margin-bottom: 20px;
}

.quiet-page-how-i-think .hero-inner .subhead {
  max-width: 62ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.quiet-page-how-i-think .quiet-reading-section {
  padding-top: 64px;
}

.quiet-page-how-i-think .quiet-reading-section .is-style-quiet-reading > .wp-block-heading:first-child {
  margin-top: 0;
}

/* Step the standfirst down on mobile like every other hero subhead. Restated
   here because the scoped rule above (0,3,0) outranks the base mobile rule. */
@media (max-width: 720px) {
  .quiet-page-how-i-think .hero-inner .subhead {
    font-size: 17px;
  }
}

.wp-block-group.is-style-quiet-reading .closing-rule {
  margin: 72px 0 48px;
}

.wp-block-group.is-style-quiet-reading p.closing-line {
  margin-top: 40px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.3;
}

.wp-block-group.is-style-quiet-reading .signature {
  margin-top: 40px;
  color: var(--ink-muted);
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
}

.wp-block-group.is-style-quiet-reading .route {
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.wp-block-group.is-style-quiet-legal {
  width: calc(100% - (2 * var(--gutter)));
  max-width: 720px;
  margin-inline: auto;
  padding-block: 80px 128px;
}

.wp-block-group.is-style-quiet-legal > .wp-block-heading:first-child {
  margin-bottom: 8px;
}

.wp-block-group.is-style-quiet-legal > .is-style-quiet-note:first-of-type {
  margin-bottom: 40px;
}

.wp-block-group.is-style-quiet-legal > h2 {
  margin: 48px 0 16px;
  font-size: 24px;
}

.wp-block-group.is-style-quiet-legal > p + p {
  margin-top: 16px;
}

/* ---------- Images: argument, evidence, and the one portrait ---------- */
:where(.diagram, .wp-block-image.is-style-quiet-diagram) {
  margin-block: 48px 0;
}

:where(.diagram img, .diagram svg, .wp-block-image.is-style-quiet-diagram img) {
  width: 100%;
  max-width: 680px;
  height: auto;
  background: transparent;
}

:where(.diagram figcaption, .wp-block-image.is-style-quiet-diagram figcaption) {
  max-width: 680px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 13.5px;
  line-height: 1.55;
  text-align: left;
}

:where(.exhibit, .wp-block-image.is-style-quiet-exhibit) {
  margin-block: 40px 44px;
}

:where(.exhibit img, .wp-block-image.is-style-quiet-exhibit img) {
  width: 100%;
  height: auto;
  padding: 12px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 3px;
}

:where(.exhibit figcaption, .wp-block-image.is-style-quiet-exhibit figcaption) {
  margin-top: 10px;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.55;
  text-align: left;
}

:where(.diagram--portrait, .wp-block-image.is-style-quiet-portrait) {
  width: 100%;
  max-width: 520px;
}

.wp-block-image.is-style-quiet-portrait img {
  width: 100%;
  height: auto;
  background: transparent;
  border-radius: 3px;
}

.wp-block-image.is-style-quiet-portrait figcaption {
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 13.5px;
  line-height: 1.55;
  text-align: left;
}

/* ---------- CTA-band content ---------- */
.wp-block-group.is-style-quiet-cta-band :is(h1, h2, h3, .wp-block-heading) {
  max-width: 26ch;
  color: var(--paper-on-dark);
}

.wp-block-group.is-style-quiet-cta-band > p {
  max-width: 58ch;
  margin-top: 20px;
  color: rgba(250, 251, 252, .82);
}

.wp-block-group.is-style-quiet-cta-band > .wp-block-buttons {
  margin-top: 36px;
}

.wp-block-group.is-style-quiet-cta-band a:not(.wp-block-button__link) {
  color: var(--paper-on-dark);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  :where(.cols-3, .wp-block-columns.is-style-quiet-feature-row) {
    gap: 36px;
  }

  .wp-block-columns.quiet-evidence-grid > .wp-block-column {
    flex: 1 1 calc(50% - 18px) !important;
  }
}

@media (max-width: 860px) {
  :where(
    .wp-block-group.is-style-quiet-section,
    .wp-block-group.is-style-quiet-section-surface
  ) {
    padding-block: 96px;
  }

  .wp-block-columns.is-style-quiet-feature-row {
    flex-wrap: wrap !important;
    gap: 40px;
  }

  .wp-block-columns.is-style-quiet-feature-row > .wp-block-column {
    flex-basis: 100% !important;
  }

  .wp-block-columns.quiet-evidence-grid > .wp-block-column {
    flex-basis: calc(50% - 20px) !important;
  }
}

@media (max-width: 720px) {
  :where(.hero, .wp-block-group.is-style-quiet-hero) {
    padding-block: 72px;
  }

  :where(
    .section,
    .wp-block-group.is-style-quiet-section,
    .wp-block-group.is-style-quiet-section-surface
  ) {
    padding-block: 80px;
  }

  :where(.section--band, .wp-block-group.is-style-quiet-cta-band) {
    padding-block: 72px;
  }

  .wp-block-group.is-style-quiet-section-tight {
    padding-block: 72px;
  }

  :where(.lead, p.is-style-quiet-lead) {
    font-size: 17px;
  }

  :where(.price-lockup .price, p.is-style-quiet-price) {
    font-size: 38px;
  }

  :where(.stat-value, p.is-style-quiet-stat-value) {
    font-size: 42px;
  }

  :where(.quote, .wp-block-quote.is-style-quiet-pull-quote) {
    padding-left: 18px;
    font-size: 19px;
  }

  :where(.doc-head, .quiet-document-head),
  :where(.doc-footnotes, .quiet-document-footnotes),
  .wp-block-table.is-style-quiet-fee-schedule :is(th, td),
  .wp-block-table.is-style-quiet-fee-schedule figcaption {
    padding-left: 20px;
    padding-right: 20px;
  }

  :where(.guarantee, .wp-block-group.is-style-quiet-guarantee) {
    padding: 24px 20px;
  }

  .wp-block-group.is-style-quiet-step-list > .quiet-step {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 32px 0;
  }

  .wp-block-group.is-style-quiet-step-list.quiet-timeline > .quiet-step {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 0 48px;
  }

  .wp-block-group.is-style-quiet-step-list.quiet-timeline > .quiet-step:last-child {
    padding-bottom: 0;
  }

  .wp-block-group.is-style-quiet-step-list.quiet-timeline > .quiet-step::before,
  .wp-block-group.is-style-quiet-step-list.quiet-timeline > .quiet-step::after {
    content: none;
  }

  :where(.step-index, .quiet-step-marker, .quiet-timeline .quiet-step-marker) {
    padding-top: 0;
    font-size: 12px;
    text-align: left;
  }

  :where(.faq summary, details.wp-block-details.is-style-quiet-faq > summary) {
    font-size: 18px;
  }

  .wp-block-group.is-style-quiet-reading > :is(p, ul, ol) {
    font-size: 18px;
  }

  .wp-block-group.is-style-quiet-legal {
    padding-block: 72px 96px;
  }

  .quiet-route-card {
    padding: 28px 24px;
  }

  .wp-block-columns.quiet-evidence-grid > .wp-block-column {
    flex-basis: 100% !important;
  }
}

@media (max-width: 600px) {
  .wp-block-table.is-style-quiet-fee-schedule table {
    min-width: 560px;
  }

  .doc .wp-block-table.is-style-quiet-fee-schedule table {
    min-width: 0;
  }

  .doc .wp-block-table.is-style-quiet-fee-schedule tbody td {
    height: auto;
  }

  .doc .wp-block-table.is-style-quiet-fee-schedule tbody td:last-child {
    padding-bottom: 20px;
    text-align: left;
  }
}

/* No motion on guarantees or exempt document registers. */
@media (prefers-reduced-motion: reduce) {
  details.wp-block-details.is-style-quiet-faq[open] > :not(summary) {
    animation: none;
  }
}

/* ==========================================================================
   Native-block parity overrides

   The Gutenberg rebuild wraps content in core block markup
   (.wp-block-columns.is-layout-flex, .wp-block-group.is-layout-flow) whose
   core layout and block-gap CSS outranks the theme's legacy class selectors
   (0,1,0) and :where() primitives (0,0,0). These rules restore visual parity
   with the pre-rebuild production site (ai.dominionequity.com) by matching or
   beating core specificity. Values verified against prod on 2026-07-30.
   ========================================================================== */

/* Quote wall — core flex collapses the four quotes into one row; prod is 2x2. */
.wp-block-columns.quote-wall.is-layout-flex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 64px;
}
.wp-block-columns.quote-wall.is-layout-flex > .wp-block-column { flex-basis: auto; }

/* Two-up card rows (contact) — prod renders the theme's .card-row grid (three
   tracks, two cards filling the left two-thirds), not core's full-width flex. */
.wp-block-columns.card-row.is-layout-flex {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
/* Two-equal-column variant (.card-row--2) — same specificity as the base rule,
   declared after it so it wins for --2 rows; the 860px rule below still wins on
   mobile by source order. */
.wp-block-columns.card-row--2.is-layout-flex {
  grid-template-columns: repeat(2, 1fr);
}
.wp-block-columns.card-row.is-layout-flex > .wp-block-column { flex-basis: auto; }

/* Fee-schedule table — strip core's per-cell borders; keep only the row rules. */
.wp-block-table.is-style-quiet-fee-schedule table { width: 100%; margin: 0; border-collapse: collapse; }
.wp-block-table.is-style-quiet-fee-schedule :is(thead th, tbody td) { border: 0; }
.wp-block-table.is-style-quiet-fee-schedule tbody td { border-top: 1px solid var(--border); }

/* Dark CTA band — text-link buttons kept the brand purple and disappeared on
   the purple field; the existing band rule (line ~910) excludes button links. */
.wp-block-group.is-style-quiet-cta-band .wp-block-button.is-style-quiet-text-link .wp-block-button__link,
.wp-block-group.is-style-quiet-cta-band .wp-block-button.is-style-quiet-text-link .wp-block-button__link:hover {
  color: var(--paper-on-dark);
  text-decoration-color: rgba(117, 201, 204, .55);
}

/* Step / stage / timeline list content columns — the native content wrapper is
   a plain .wp-block-group, so core block-gap adds ~24px between the heading and
   body that prod's tight rhythm (heading margin-bottom only) never had. The row
   itself is .is-layout-flow too, so block-gap also drops the content column
   (second grid child) below the index marker; zero both. */
.wp-block-group.is-style-quiet-step-list :where(.step, .quiet-step) > * {
  margin-block-start: 0;
}
.wp-block-group.is-style-quiet-step-list :where(.step, .quiet-step) > .wp-block-group:not(.step-index):not(.step-when) > * {
  margin-block-start: 0;
}
.wp-block-group.is-style-quiet-step-list :where(.step, .quiet-step) > .wp-block-group:not(.step-index):not(.step-when) > .wp-block-heading {
  margin-bottom: 12px;
}
.wp-block-group.is-style-quiet-step-list :where(.step, .quiet-step) > .wp-block-group:not(.step-index):not(.step-when) > p + p {
  margin-top: 16px;
}

/* Responsive parity — the grid overrides above outrank the legacy responsive
   rules in site.css, so restate the breakpoints for the native columns. */
@media (max-width: 1024px) {
  .wp-block-columns.quote-wall.is-layout-flex { gap: 40px 48px; }
}
@media (max-width: 860px) {
  .wp-block-columns.card-row.is-layout-flex { grid-template-columns: 1fr; }
  .wp-block-columns.quote-wall.is-layout-flex { grid-template-columns: 1fr; gap: 36px; }
}
