/* Loaded only on the 72-profile comparison. */
.article-layout > *, .article-body { min-width: 0; }
.article-copy .table-wrap:has(th:nth-child(12)) { overflow-x: auto; max-width: 100%; }
.article-copy .table-wrap:has(th:nth-child(12)) table { min-width: 75rem; }
.article-copy .table-wrap:has(th:nth-child(12)) :is(td,th):nth-child(11) { min-width: 17rem; }
.ranking-mobile-bar,
.ranking-mobile-groups { display: none; }

@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 1.3rem;
  }
  .article-body { width: 100%; max-width: 72ch; }
  .ranking-mobile-bar + .article-rail-inner { display: none; }
  .ranking-mobile-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    gap: .5rem 1rem;
    font: 600 1rem/1.45 Arial, sans-serif;
  }
  .ranking-mobile-bar summary, .ranking-mobile-bar > a {
    min-height: 44px;
    padding: .65rem .75rem;
    cursor: pointer;
  }
  .ranking-mobile-bar details {
    border: 1px solid var(--line);
    border-radius: 4px;
  }
  .ranking-mobile-bar details[open] { flex-basis: 100%; }
  .ranking-mobile-bar details nav { display: grid; gap: 0; }
  .ranking-mobile-bar details nav a {
    padding: .65rem .8rem;
    min-height: 44px;
    border-top: 1px solid var(--line);
    font: 400 1rem/1.45 Arial, sans-serif;
  }
  .ranking-mobile-bar > a, .article-body .ranking-mobile-groups a {
    display: inline-flex;
    align-items: center;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .ranking-mobile-groups {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-block: 1rem;
  }
  .ranking-mobile-groups a {
    min-height: 44px;
    padding: .45rem .75rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    font: 600 .95rem/1.35 Arial, sans-serif;
  }
  .article-body .article-copy a[href$=".xlsx"] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    padding: .75rem 1rem;
    border-radius: 4px;
    background: var(--ink, #142c30);
    color: white;
    font: 600 1rem/1.45 Arial, sans-serif;
    text-decoration: none;
  }
  .article-copy > p:first-child:first-letter { float: none; padding: 0; font: inherit; }
  .article-copy .table-wrap table { min-width: 0; font-size: 1rem; line-height: 1.55; }
}

@media (max-width: 700px) {
  .article-copy .table-wrap { overflow: visible; border: 0; margin-block: .75rem 2rem; }
  .article-copy .table-wrap table, .article-copy tbody { display: block; width: 100%; border: 0; }
  .article-copy thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .article-copy tbody tr {
    display: grid;
    gap: .4rem;
    padding: 1rem 0 1.15rem;
    border-top: 1px solid var(--line);
  }
  .article-copy tbody td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow-wrap: anywhere;
  }
  .article-copy td:first-child { color: var(--muted); font-weight: 600; }
  .article-copy td:first-child a {
    display: block;
    width: fit-content;
    max-width: 100%;
    padding-block: .35rem;
    font: 600 1.2rem/1.45 Georgia, serif;
    color: var(--ink);
  }
  .article-copy td strong { display: block; margin-top: .65rem; }
  .article-copy td:nth-child(2) a {
    display: inline-block;
    max-width: 100%;
    padding-block: .4rem;
    line-height: 1.45;
  }
  .article-copy td:nth-child(3) { color: var(--muted); font-size: .95rem; }
  .article-copy td:nth-child(3)::before { content: "Belegt bei "; }
  .article-header h1 { font-size: clamp(1.75rem, 7.5vw, 2.15rem); }
  .article-copy .table-wrap:has(th:nth-child(12)) table { min-width: 0; }
  .article-copy .table-wrap:has(th:nth-child(12)) :is(td,th):nth-child(11) { min-width: 0; }
  .article-copy .ranking-matrix tr { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .article-copy .ranking-matrix td:first-child,
  .article-copy .ranking-matrix td:nth-child(4),
  .article-copy .ranking-matrix td:nth-child(11) { grid-column: 1 / -1; }
  .article-copy .ranking-matrix td[data-label]:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font: 600 .82rem/1.4 Arial,sans-serif;
  }
  .article-copy .ranking-matrix td a { display: inline-block; padding: .3rem .2rem; }
  /* Keep column headers visible when the optional card layout cannot start. */
  .article-copy .table-wrap table:not(.ranking-matrix):has(th:nth-child(12)) {
    display: table;
    min-width: 75rem;
  }
  .article-copy table:not(.ranking-matrix):has(th:nth-child(12)) thead {
    display: table-header-group;
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
  }
  .article-copy table:not(.ranking-matrix):has(th:nth-child(12)) tbody { display: table-row-group; }
  .article-copy table:not(.ranking-matrix):has(th:nth-child(12)) tr { display: table-row; }
  .article-copy table:not(.ranking-matrix):has(th:nth-child(12)) td { display: table-cell; padding: .5rem; }
  .article-copy table:not(.ranking-matrix):has(th:nth-child(12)) td:nth-child(3)::before { content: none; }
}
