/* Only tariff comparison regulations use the wider reader. */
.regulation-detail-page--correlation [hidden] { display: none !important; }
.regulation-detail-page--correlation .regulation-reading-shell { max-width: var(--ab-container,1290px); }
.regulation-detail-page--correlation .regulation-heading { max-width: none; padding-bottom: 24px; margin-bottom: 24px; }
.regulation-detail-page--correlation .regulation-reader-grid { display: block; min-width: 0; }
.regulation-detail-page--correlation .regulation-sidebar { display: block; position: static; }
.regulation-detail-page--correlation .regulation-toolbar { position: static; display: grid; grid-template-columns: minmax(260px,540px) auto; align-items: end; gap: 8px 24px; margin-bottom: 16px; border: 0; padding: 0; }
.regulation-detail-page--correlation .regulation-toolbar-actions { justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.regulation-detail-page--correlation .regulation-search-feedback { min-height: 18px; }
.regulation-detail-page--correlation .regulation-detail-article { max-width: none; padding-top: 0; }
.correlation-clear,.correlation-expand { min-height: 42px; padding: 10px 14px; border: 1px solid var(--ab-border); border-radius: var(--ab-radius-control); color: var(--ab-brand); background: #fff; font: 500 12px/1.6 var(--ab-font); cursor: pointer; }
.correlation-clear { border-color: transparent; }
.correlation-clear:disabled { color: var(--ab-muted); opacity: .5; cursor: default; }
.correlation-reader-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 14px; }
.correlation-reader-meta p { margin: 0; font-size: 12px; color: var(--ab-muted); font-variant-numeric: tabular-nums; }
.correlation-reader-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 0; margin: 0; list-style: none; }
.correlation-reader-legend li { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--ab-muted); }
.correlation-reader-swatch { width: 7px; height: 7px; border-radius: 50%; background: #c44040; }
.correlation-reader-swatch--added { background: #3268b1; }
.correlation-reader-swatch--changed { background: #43834c; }
.reg-correlation-source { margin-bottom: 18px; border-block: 1px solid var(--ab-border); }
.reg-correlation-source summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; list-style: none; color: var(--ab-brand); font-size: 12px; font-weight: 500; cursor: pointer; }
.reg-correlation-source summary::-webkit-details-marker { display: none; }
.reg-correlation-source summary::after { content: '+'; font-size: 18px; font-weight: 400; }
.reg-correlation-source[open] summary::after { content: '−'; }
.reg-correlation-explanation { padding-bottom: 16px; font-size: 13px; line-height: 1.8; }
.reg-correlation-explanation :is(h1,h2,h3,h4,p) { text-align: left !important; }
.reg-correlation-explanation :is(h1,h2,h3,h4) { margin: 12px 0 !important; font-size: 15px !important; }
.reg-correlation-explanation p { margin-bottom: 12px !important; }
.reg-correlation-panel { min-width: 0; margin-block: 0 24px; border: 1px solid var(--ab-border); border-radius: 12px; overflow: hidden; background: #fff; }
.reg-correlation-tablebar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; padding: 10px 14px; border-bottom: 1px solid var(--ab-border); background: #faf8fc; }
.reg-correlation-tablebar p { margin: 0 !important; font-size: 11px; color: var(--ab-muted); }
.reg-correlation-year-buttons { display: flex; gap: 6px; }
.reg-correlation-year-buttons button { min-height: 36px; padding: 7px 12px; border: 1px solid var(--ab-border); border-radius: 6px; color: var(--ab-brand); background: #fff; font: 500 11px/1.6 var(--ab-font); white-space: nowrap; cursor: pointer; }
.reg-correlation-region { width: 100%; max-width: 100%; max-height: min(66svh,680px); overflow: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #b1a0c4 #f5f1f8; -webkit-overflow-scrolling: touch; }
.reg-correlation-region:focus-visible { outline: 2px solid var(--ab-brand); outline-offset: -2px; }
.regulation-detail-page--correlation #regulationDetailBody > table:not(.reg-correlation-table) { max-width: 100%; table-layout: fixed; }
/* Protect the page before enhancement, including with JavaScript disabled. */
.regulation-detail-page--correlation #regulationDetailBody { max-width: 100%; overflow-x: auto; }
.regulation-detail-page--correlation #regulationDetailBody table { max-width: none; }
.regulation-detail-page--correlation #regulationDetailBody .reg-correlation-table { width: 100% !important; min-width: var(--correlation-min-width,1180px); max-width: none !important; table-layout: fixed; border-collapse: separate; border-spacing: 0; margin: 0; font-size: 12px; line-height: 1.75; }
.reg-correlation-table > :is(thead,tbody,tfoot) > tr > :is(td,th) { min-width: 0; max-width: none; height: auto; padding: 12px 13px; border: 0 !important; border-bottom: 1px solid #e9e3ee !important; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.reg-correlation-table :is(td,th) :is(p,span,font,b,strong,a) { font-size: inherit !important; line-height: inherit !important; }
.reg-correlation-table :is(td,th) p { margin: 0 !important; }
.reg-correlation-table .reg-correlation-code { white-space: nowrap !important; font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.reg-correlation-table .reg-correlation-description { overflow-wrap: break-word; }
.reg-correlation-table .reg-correlation-year-start { border-left: 1px solid #dbcee8 !important; }
.reg-correlation-table .reg-correlation-gap { width: 8px; padding: 0 !important; border: 0 !important; background: #f5f1f8 !important; }
.reg-correlation-table > thead { position: sticky; top: 0; z-index: 2; }
.reg-correlation-table > thead th { color: #fff; background: #38156b; font-size: 13px; font-weight: 500; text-align: left; }
.reg-correlation-year-label { position: sticky; left: 13px; display: block; width: max-content; }
.reg-correlation-table > thead tr + tr th { padding-block: 8px; color: var(--ab-brand); background: #f4eff8; font-size: 11px; }
.reg-correlation-empty { padding: 24px 18px; margin: 0 !important; color: var(--ab-muted); font-size: 13px; }
@media (hover:hover) { .correlation-expand:hover,.correlation-clear:not(:disabled):hover,.reg-correlation-year-buttons button:hover { background: var(--ab-brand-soft); } .reg-correlation-table tbody tr:hover > td:not(.reg-correlation-gap) { box-shadow: inset 0 1px #c9b5df,inset 0 -1px #c9b5df; } }
.reg-correlation-dialog { width: calc(100% - 32px); max-width: 1600px; max-height: calc(100svh - 32px); margin: auto; padding: 24px; border: 1px solid var(--ab-border); border-radius: 14px; color: var(--ab-ink); background: #fff; overflow: auto; }
.reg-correlation-dialog::backdrop { background: rgb(25 13 38 / 55%); }
.reg-correlation-dialog .reg-correlation-region { max-height: calc(100svh - 240px); }
.regulation-detail-page--correlation:has(.reg-correlation-dialog[open]) { overflow: hidden; }
@media (max-width:760px) {
    .regulation-detail-page--correlation .regulation-toolbar { grid-template-columns: minmax(0,1fr); gap: 10px; }
    .regulation-detail-page--correlation .regulation-toolbar-actions { justify-content: flex-start; gap: 6px; }
    .regulation-detail-page--correlation .regulation-search-feedback { grid-row: 2; }
    .regulation-detail-page--correlation .regulation-heading { margin-bottom: 22px; padding-bottom: 0; }
    .reg-correlation-region { max-height: 62svh; }
    .reg-correlation-tablebar { padding: 10px 12px; }
    .reg-correlation-tablebar p { flex-basis: 100%; }
    .reg-correlation-dialog { padding: 16px; }
    .reg-correlation-dialog .reg-correlation-region { max-height: calc(100svh - 300px); }
}
@media print {
    .regulation-detail-page--correlation .regulation-sidebar,.reg-correlation-source summary { display: none; }
    .reg-correlation-region { max-height: none; overflow: visible; }
    .reg-correlation-panel { overflow: visible; border: 0; }
    .reg-correlation-table > thead { position: static; display: table-header-group; }
    .reg-correlation-table tr[hidden] { display: table-row !important; }
    .regulation-detail-page--correlation #regulationDetailBody .reg-correlation-table { min-width: 0; font-size: 7pt; }
}
