.allowances-layout {
  --subpage-max-width: var(--measure);
}

.section-heading p a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.toc {
  padding: 16px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
}

.toc-heading {
  margin: 0 0 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.04em;
}

.toc ol {
  margin: 0;
  padding: 0 0 0 1.1em;
  columns: 2;
  column-gap: 20px;
}

.toc li {
  break-inside: avoid;
  padding: 2px 0;
  font-size: 0.875rem;
}

/* 目次の各項目は独立した操作対象なので、WCAG 2.2 達成基準 2.5.8 の
   24pxを満たす高さを持たせる（文章中のインラインリンクではないため
   「インライン」の例外には当たらない）。 */
.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--color-primary-dark);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

.allowance-section {
  scroll-margin-top: 16px;
}

.allowance-section .eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.allowance-section h2 {
  color: var(--color-text);
}

.allowance-section p {
  margin: 0 0 12px;
  font-size: 1rem;
}

.allowance-section p:last-child {
  margin-bottom: 0;
}

.allowance-list {
  margin: 0 0 14px;
  padding-left: 1.2em;
  font-size: 1rem;
}

.allowance-list li {
  margin-bottom: 8px;
}

.allowance-list li:last-child {
  margin-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 14px;
}

.info-table {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
}

.info-table--compact {
  width: auto;
  min-width: 320px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.info-table--compact td:last-child,
.info-table--compact th:last-child {
  text-align: center;
}

.info-table th,
.info-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
  text-align: left;
  white-space: nowrap;
}

.info-table thead th {
  color: var(--color-muted);
  font-weight: 600;
  background: var(--color-subtle);
}

.info-table td {
  font-variant-numeric: tabular-nums;
}

.source-note {
  font-style: normal;
  opacity: 0.85;
}

.allowances-links .footer-heading {
  margin: 0 0 12px;
  font-size: 1.125rem;
  color: var(--color-text);
}

.allowances-links .footer-note {
  font-size: 0.875rem;
}

.allowances-links .footer-note a {
  color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }

  .info-table th,
  .info-table td {
    white-space: normal;
  }

}
