/* AutoNest: styles for the blog (listing and articles), the privacy policy and the thank-you page.
   Loaded right after css/site.css on those pages only, so the homepage does not download them. */

/* ---------- Privacy policy page ---------- */

.policy {
  padding: calc(var(--nav-h) + var(--s-8)) 0 var(--section);
}

.policy-lead {
  max-width: 46rem;
  padding-bottom: var(--s-7);
}

.policy-lead h1 {
  max-width: none;
  margin-bottom: var(--s-5);
}

.policy-lead p {
  color: var(--c-muted);
  font-size: var(--fs-lead);
}

.policy-section {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr);
  gap: var(--s-4) clamp(2rem, 5vw, 4rem);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--c-line);
}

.policy-section:first-child {
  border-top-color: var(--c-ink);
}

.policy-section h2 {
  font-size: var(--fs-h4);
  line-height: 1.3;
}

.policy-section p {
  max-width: 48rem;
}

.policy-section p + p,
.policy-section ul + p,
.policy-section p + ul {
  margin-top: var(--s-4);
}

.policy a {
  color: var(--c-accent);
}

.policy ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--s-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.policy li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-2) 0;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .policy-section,
  .policy ul {
    grid-template-columns: 1fr;
  }
}

/* ---------- Blog: article page ---------- */

.post-hero {
  padding: calc(var(--nav-h) + var(--s-7)) 0 calc(var(--s-9) + var(--s-7));
  background: var(--c-black);
  color: var(--c-white);
}

.blog-hero {
  padding-bottom: var(--s-8);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-2);
  margin: 0 0 var(--s-7);
  padding: 0;
  list-style: none;
  color: var(--c-silver);
  font-size: var(--fs-xs);
}

.crumbs li {
  flex: none;
  min-width: 0;
}

/* The current page stays on one line (ellipsis if needed), so the font swap never re-wraps the
   breadcrumb and pushes the article down. */
.crumbs ol {
  flex-wrap: nowrap;
}

.crumbs li:last-child {
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crumbs li + li::before {
  content: "/";
  margin-right: var(--s-2);
  color: rgba(255, 255, 255, 0.3);
}

.crumbs a {
  color: var(--c-silver);
  text-decoration: none;
  transition: color var(--t-fast) ease;
}

.crumbs a:hover,
.crumbs a:focus-visible {
  color: var(--c-white);
}

.crumbs [aria-current] {
  color: rgba(255, 255, 255, 0.82);
}

.post-hero .kicker {
  margin-bottom: var(--s-4);
}

.post-hero h1 {
  max-width: 21em;
  color: var(--c-white);
  font-size: clamp(2rem, 1.45rem + 2.2vw, 3.5rem);
  line-height: 1.08;
}

.post-lead {
  max-width: 46rem;
  margin-top: var(--s-5);
  color: var(--c-silver);
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-6);
  max-width: 46rem;
  margin: var(--s-6) 0 0;
  padding: var(--s-5) 0 0;
  border-top: 1px solid var(--c-line-dark);
  list-style: none;
  color: var(--c-silver);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.post-meta li {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

.post-meta svg {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: square;
}

.post-meta strong {
  color: var(--c-white);
  font-weight: 600;
}

/* The cover overlaps the dark band, like a car rolling out of the showroom. */
.post-cover {
  position: relative;
  margin-top: calc(-1 * var(--s-9));
  margin-bottom: 0;
}

.post-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--c-graphite);
}

@media (min-width: 960px) {
  .post-cover img {
    aspect-ratio: 21 / 9;
  }
}

.post-cover figcaption,
.post-figure figcaption {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-3);
  color: var(--c-muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.post-cover figcaption::before,
.post-figure figcaption::before {
  content: "";
  flex: none;
  width: 0.75rem;
  height: 1px;
  margin-top: 0.75em;
  background: currentColor;
}

.post-layout {
  display: grid;
  gap: var(--s-6);
  padding: var(--s-7) 0 var(--section);
}

@media (min-width: 1100px) {
  .post-layout {
    grid-template-columns: minmax(15rem, 19rem) minmax(0, 46rem);
    column-gap: clamp(3rem, 6vw, 7rem);
    align-items: start;
    padding-top: var(--s-8);
  }

  /* The agenda sticks beside the text; blog.js releases it when it would not fit the screen. */
  .post-layout {
    align-items: stretch;
  }

  .post-aside-inner {
    position: sticky;
    top: calc(var(--nav-h) + var(--s-5));
  }

  .post-aside-inner.is-static {
    position: static;
  }
}

/* Agenda */
.post-toc details {
  border-bottom: 1px solid var(--c-line);
}

.post-toc summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-1) var(--s-4);
  padding: var(--s-4) 0;
  cursor: pointer;
  list-style: none;
}

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

.post-toc-title {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.post-toc-meta {
  grid-row: 2;
  color: var(--c-muted);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}

.post-toc-mark {
  grid-row: 1 / 3;
  grid-column: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--c-line);
}

.post-toc details[open] .post-toc-mark svg {
  transform: rotate(180deg);
}

.post-toc-progress {
  height: 2px;
  background: var(--c-line);
}

.post-toc-progress span {
  display: block;
  height: 100%;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.post-toc ol {
  margin: 0;
  padding: var(--s-2) 0;
  list-style: none;
}

.post-toc a {
  position: relative;
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: var(--s-2);
  padding: var(--s-2) 0 var(--s-2) var(--s-4);
  color: var(--c-muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
  text-decoration: none;
  transition: color var(--t-fast) ease;
}

.post-toc a::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--s-2);
  bottom: var(--s-2);
  width: 2px;
  background: var(--c-accent);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform var(--t-base) var(--ease-out);
}

.post-toc a:hover,
.post-toc a:focus-visible,
.post-toc a.is-current {
  color: var(--c-ink);
}

.post-toc a.is-current::before {
  transform: scaleY(1);
}

.post-toc-num {
  color: var(--c-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.9;
}

.post-toc a.is-current .post-toc-num {
  color: var(--c-accent);
}

@media (min-width: 1100px) {
  .post-toc summary {
    cursor: default;
  }

  .post-toc-mark {
    display: none;
  }

  .post-toc a {
    padding-block: 0.4rem;
  }
}

/* Article text */
.post-body {
  min-width: 0;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.75;
}

.post-body a:not(.button) {
  color: var(--c-accent);
  text-decoration-thickness: 1px;
}

.post-body a:not(.button):hover {
  color: var(--c-accent-hover);
}

.post-body strong {
  color: var(--c-ink);
}

.post-summary {
  padding: var(--s-6);
  background: var(--c-mist);
  border-top: 2px solid var(--c-accent);
}

.post-summary .post-summary-title {
  margin-bottom: var(--s-3);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.post-summary ul,
.post-section > ul,
.post-sources ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Markers are positioned, so inline bold text inside an item keeps flowing as one paragraph. */
.post-summary li,
.post-section > ul li {
  position: relative;
  padding: var(--s-2) 0 var(--s-2) 1.75rem;
}

.post-summary li {
  font-size: var(--fs-body);
  line-height: 1.6;
}

.post-summary li::before,
.post-section > ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(var(--s-2) + 0.85em);
  width: 0.75rem;
  height: 1px;
  background: var(--c-ink);
}

.post-summary li::before {
  background: var(--c-accent);
}

.post-section {
  padding-top: var(--s-8);
  scroll-margin-top: calc(var(--nav-h) + var(--s-2));
}

.post-section > h2 {
  display: grid;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
  font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.5rem);
  line-height: 1.12;
}

.post-num {
  color: var(--c-accent);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.post-section > * + * {
  margin-top: var(--s-5);
}

.post-section > h2 + * {
  margin-top: 0;
}

.post-section > h3 {
  margin-top: var(--s-7);
  font-size: var(--fs-h4);
}

.post-section > h3 + p {
  margin-top: var(--s-3);
}

.post-section > ol {
  margin-bottom: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-top: 1px solid var(--c-line);
}

.post-section > ol li {
  position: relative;
  padding: var(--s-4) 0 var(--s-4) 2.5rem;
  border-bottom: 1px solid var(--c-line);
  counter-increment: step;
}

.post-section > ol li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: var(--s-4);
  color: var(--c-accent);
  font-size: var(--fs-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 2.3;
}

.post-figure {
  margin-block: var(--s-7) !important;
  margin-inline: 0;
}

.post-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--c-graphite);
}

.post-stats {
  display: grid;
  margin-block: var(--s-6) !important;
  border-top: 1px solid var(--c-ink);
}

.post-stats > div {
  display: grid;
  gap: var(--s-2);
  align-content: start;
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--c-line);
}

.post-stats dt {
  color: var(--c-muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.post-stats dd {
  order: -1;
  margin: 0;
  color: var(--c-ink);
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 1.5rem + 1.4vw, 2.75rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: var(--track-display);
  white-space: nowrap;
}

@media (min-width: 640px) {
  .post-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .post-stats > div {
    padding-right: var(--s-5);
  }

  .post-stats > div + div {
    padding-left: var(--s-5);
    border-left: 1px solid var(--c-line);
  }
}

.post-table-scroll {
  overflow-x: auto;
  margin-block: var(--s-6) !important;
}

.post-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.post-table caption {
  caption-side: bottom;
  padding-top: var(--s-3);
  color: var(--c-muted);
  font-size: var(--fs-xs);
  text-align: left;
}

.post-table th,
.post-table td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--c-line);
  font-weight: 400;
  text-align: left;
  vertical-align: top;
}

.post-table th:first-child,
.post-table td:first-child {
  padding-left: 0;
}

.post-table thead th {
  border-bottom-color: var(--c-ink);
  color: var(--c-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.post-table tbody th {
  color: var(--c-ink);
  font-weight: 500;
}

.post-note {
  padding: var(--s-6);
  background: var(--c-black);
  color: var(--c-silver);
  font-size: var(--fs-body);
  line-height: 1.65;
}

.post-note-label {
  margin-bottom: var(--s-3);
  padding-left: 1.75rem;
  background: url("../branding/mark/autonest-mark-white.png") left center / 1.125rem no-repeat;
  color: var(--c-white);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.post-body .post-note strong {
  color: var(--c-white);
}

.post-body .post-note a {
  color: var(--c-white);
}

.post-body .post-note a:hover {
  color: var(--c-silver);
}

.post-note :focus-visible {
  outline-color: var(--c-white);
}

.post-section .faq-list {
  margin-top: var(--s-5);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.post-section .faq-a-inner {
  padding-right: 0;
}

/* Author, sources, disclaimer */
.post-end {
  margin-top: var(--s-8);
}

.post-sources {
  padding-top: var(--s-6);
  border-top: 1px solid var(--c-ink);
  color: var(--c-muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.post-sources h2 {
  margin-bottom: var(--s-3);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.post-sources li {
  padding: var(--s-1) 0;
}

.post-disclaimer {
  margin-top: var(--s-5);
  padding-left: var(--s-5);
  border-left: 1px solid var(--c-ink);
  font-size: var(--fs-xs);
}

/* Closing call to action */
.post-cta-inner {
  display: grid;
  gap: var(--s-6);
}

.post-cta .kicker {
  margin-bottom: var(--s-4);
}

.section.post-cta h2 {
  max-width: 16em;
  font-size: clamp(1.875rem, 1.35rem + 1.8vw, 2.75rem);
  margin: 0;
  color: var(--c-white);
}

.post-cta-lead {
  max-width: 34rem;
  color: var(--c-silver);
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.post-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-6);
  margin-top: var(--s-6);
}

.post-cta-phone {
  position: relative;
  color: var(--c-silver);
  font-size: var(--fs-sm);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: color var(--t-fast) ease;
}

.post-cta-phone:hover,
.post-cta-phone:focus-visible {
  color: var(--c-white);
}

.post-cta :focus-visible {
  outline-color: var(--c-white);
}

@media (min-width: 960px) {
  .post-cta-inner {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(1.5rem, 3vw, 3rem);
    align-items: end;
  }

  .post-cta-inner > :first-child {
    grid-column: 1 / 7;
  }

  .post-cta-inner > :last-child {
    grid-column: 7 / 13;
  }
}

@media (max-width: 519px) {
  .post-cta-actions .button {
    width: 100%;
  }

  .post-summary,
  .post-note {
    padding: var(--s-5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-toc a::before,
  .post-toc-mark svg {
    transition: none;
  }
}


/* ---------- Blog: money-flow scheme (numbered boxes with arrows) ---------- */
.post-flow {
  margin-block: var(--s-6) !important;
}

.post-flow ol {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.post-flow li {
  position: relative;
  padding: var(--s-4) var(--s-4) var(--s-4) 3.25rem;
  background: var(--c-mist);
  border-left: 2px solid var(--c-accent);
  font-size: var(--fs-sm);
  line-height: 1.5;
  counter-increment: flow;
}

.post-flow li::before {
  content: counter(flow, decimal-leading-zero);
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  color: var(--c-accent);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.9;
}

.post-flow strong {
  display: block;
  margin-bottom: var(--s-1);
  color: var(--c-ink);
  font-size: var(--fs-body);
}

.post-flow figcaption {
  margin-top: var(--s-3);
  color: var(--c-muted);
  font-size: var(--fs-xs);
}

@media (min-width: 640px) {
  .post-flow ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-3) var(--s-5);
  }

  .post-flow li {
    padding: var(--s-6) var(--s-5) var(--s-5);
    border-left: 0;
    border-top: 2px solid var(--c-accent);
  }

  .post-flow li::before {
    left: var(--s-5);
    top: var(--s-2);
  }

  /* Arrow from each box to the next one in the same row. */
  .post-flow li:nth-child(even)::after {
    content: "";
    position: absolute;
    left: calc(-1 * var(--s-5) / 2 - 0.3rem);
    top: 50%;
    width: 0.6rem;
    height: 0.6rem;
    border-top: 1.5px solid var(--c-accent);
    border-right: 1.5px solid var(--c-accent);
    transform: translateY(-50%) rotate(45deg);
  }
}

/* ---------- Blog: rental calculator ---------- */
.post-calc {
  margin-block: var(--s-6) !important;
  padding: var(--s-6);
  border: 1px solid var(--c-line);
  border-top: 2px solid var(--c-ink);
}

.post-calc h3 {
  margin: 0 0 var(--s-2);
}

.post-calc-lead {
  margin: 0 0 var(--s-5) !important;
  color: var(--c-muted);
  font-size: var(--fs-sm);
}

.post-calc-fields {
  display: grid;
  gap: var(--s-4) var(--s-5);
  align-items: end;
}

.post-calc label {
  display: grid;
  gap: var(--s-1);
  color: var(--c-ink);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.post-calc label span {
  color: var(--c-muted);
  font-size: var(--fs-xs);
  font-weight: 400;
}

.post-calc input {
  width: 100%;
  min-height: 2.75rem;
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--c-field);
  border-radius: 0;
  background: var(--c-white);
  color: var(--c-ink);
  font: inherit;
  font-size: var(--fs-body);
  font-variant-numeric: tabular-nums;
}

.post-calc input:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 1px;
}

.post-calc-out {
  display: grid;
  gap: 0;
  margin: var(--s-6) 0 0;
  border-top: 1px solid var(--c-ink);
}

.post-calc-out > div {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--c-line);
}

.post-calc-out dt {
  color: var(--c-muted);
  font-size: var(--fs-sm);
}

.post-calc-out dd {
  margin: 0;
  color: var(--c-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.post-calc-out .is-total dd {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 400;
}

.post-calc-note {
  margin: var(--s-4) 0 0 !important;
  color: var(--c-muted);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

@media (min-width: 640px) {
  .post-calc-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Blog: author box ---------- */
.post-author {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: var(--s-4);
  align-items: center;
  margin-bottom: var(--s-6);
  padding: var(--s-5) 0;
  border-top: 1px solid var(--c-ink);
}

.post-author-mark {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.post-author p {
  margin: 0;
  color: var(--c-muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.post-author strong {
  display: block;
  color: var(--c-ink);
  font-size: var(--fs-body);
  font-weight: 600;
}

.post-author + .post-sources {
  border-top-color: var(--c-line);
}
