/* Phone and small-tablet reading layouts; desktop presentation is unchanged. */
@media (max-width: 900px) {
  :is(.blog-page, .article-page) .breadcrumbs {
    padding-block: .75rem .25rem;
    font-size: .8125rem;
  }
  .article-page .breadcrumbs li:last-child { display: none; }
  .article-heading { padding-block: .75rem 1.5rem; }
  .article-heading h1 {
    max-width: none;
    font-size: clamp(1.9rem, 7.5vw, 2.25rem);
    line-height: 1.15;
    letter-spacing: -.035em;
  }
  .article-intro { margin-top: 1.125rem; font-size: 1rem; line-height: 1.7; }
  .article-meta { margin-top: 1.25rem; gap: .25rem 1rem; font-size: .8125rem; line-height: 1.6; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-bottom: 1rem; }
  .article-toc { position: static; border: 0; padding-block: 0; }
  .article-toc .article-contents {
    border: 1px solid var(--line);
    border-radius: .5rem;
    background: var(--paper);
    overflow: visible;
  }
  .article-contents summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 56px;
    padding: .875rem 1rem;
    cursor: pointer;
    list-style: none;
  }
  .article-contents summary::-webkit-details-marker { display: none; }
  .article-toc .article-contents h2 { margin: 0; font-size: 1rem; line-height: 1.5; }
  .article-contents summary::after {
    content: "";
    flex-shrink: 0;
    width: .5rem;
    height: .5rem;
    margin-right: .2rem;
    border-right: 1.5px solid var(--teal);
    border-bottom: 1.5px solid var(--teal);
    transform: rotate(45deg);
  }
  .article-contents[open] summary::after { transform: rotate(225deg); }
  .article-contents[open] summary { border-bottom: 1px solid var(--line); }
  .article-toc .article-contents > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: .75rem 1rem;
    line-height: 1.5;
  }
  .article-contents summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
  .article-body section { margin-bottom: 2.5rem; scroll-margin-top: 1rem; }
  .article-body { max-width: 70ch; }
  .article-body a:not(.button) { text-decoration: underline; text-underline-offset: .18em; }
  .article-body h2 { font-size: clamp(1.375rem, 5.5vw, 1.625rem); line-height: 1.3; margin-bottom: 1rem; }
  .article-body h3 { font-size: 1.0625rem; line-height: 1.45; }
  .article-body p, .article-body li { line-height: 1.75; }
  .article-page .article-next { padding-block: 1.5rem; }
  .article-page .article-next h2 { text-wrap: balance; }
  .article-page :is(.article-next .button, .budget-download .button, .article-body a[download]) {
    display: flex;
    width: 100%;
    padding-inline: 1rem;
    text-align: center;
  }
  .budget-article .budget-download { margin-top: 1.25rem; }
  .article-faq details { padding-block: 0; }
  .article-faq summary { min-height: 48px; padding-block: 1rem; line-height: 1.5; }
  .article-faq details[open] p { margin-top: 0; padding-bottom: 1rem; }
  .article-page .article-related { gap: .75rem; padding-block: 1.5rem 3rem; }
  .article-page .article-related h2 { font-size: 1.375rem; }
  .article-page .article-related .article-related-link { max-width: none; padding: 1rem; gap: .875rem; }
  .blog-page .blog-masthead { padding-block: .75rem 1.75rem; }
  .blog-page .blog-masthead h1 { max-width: 18ch; font-size: clamp(2.125rem, 8vw, 2.75rem); line-height: 1.1; }
  .blog-page .blog-masthead > p { margin-top: 1.25rem; font-size: 1rem; line-height: 1.65; }
  .blog-page .blog-articles { display: grid; gap: .875rem; padding-bottom: 1rem; }
  .blog-page .blog-articles article { min-width: 0; }
  .blog-page .editorial-link {
    height: 100%;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.125rem;
    border: 1px solid var(--line);
    border-radius: .625rem;
    background: var(--paper);
  }
  .blog-page .editorial-link > span { min-width: 0; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .blog-page .editorial-link strong { font-size: 1.25rem; line-height: 1.3; }
  .blog-page .editorial-link span span { font-size: .9375rem; line-height: 1.65; }
  .blog-page .editorial-link .ui-icon { width: 20px; height: 20px; margin-top: .2rem; }
  .blog-page .blog-articles article:last-child { border: 0; }
  .blog-page .blog-contact { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding-block: 2rem 3rem; }
  .blog-page .blog-contact .button { width: 100%; }
  .blog-page .blog-contact h2 { font-size: 1.75rem; line-height: 1.2; }
  :is(.blog-page, .article-page) ~ .site-footer :is(.footer-links a, .footer-grid h2) { max-width: 100%; overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
  .article-table tbody { display: grid; gap: .75rem; }
  .article-table tr { padding: 1rem; border: 1px solid var(--line); border-radius: .5rem; }
  .article-table td { line-height: 1.65; }
  .article-table td::before { font-weight: 500; line-height: 1.4; }
  .article-page:not(.budget-article) .article-table tr { grid-template-columns: minmax(0, 1fr); }
  .article-page:not(.budget-article) .article-table td { grid-column: 1 / -1; }
}
