/* Treaty Library. Colours inherit from your theme; override --tl-accent to brand it. */
.tl-wrap {
	--tl-accent: currentColor;
	--tl-line: rgba(128, 128, 128, 0.3);
	--tl-soft: rgba(128, 128, 128, 0.08);
	max-width: 960px;
	margin: 0 auto;
}

.tl-breadcrumb { font-size: .875rem; opacity: .8; margin-bottom: 1rem; }
.tl-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 600; opacity: .7; margin: 0 0 .5rem; }
.tl-lede { font-size: 1.125rem; line-height: 1.6; margin: 0 0 1.5rem; }

/* Status strip */
.tl-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 0 0 1.5rem; padding: 1rem 1.25rem; border: 1px solid var(--tl-line); border-radius: 12px; background: var(--tl-soft); }
.tl-status dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.tl-status dd { margin: .15rem 0 0; font-weight: 600; }

/* Rate cards */
.tl-rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tl-rate { border: 1px solid var(--tl-line); border-radius: 12px; padding: 1.1rem 1rem; text-align: center; }
.tl-rate span { display: block; font-size: .85rem; opacity: .8; }
.tl-rate strong { display: block; font-size: 2rem; line-height: 1.2; margin-top: .25rem; color: var(--tl-accent); }

.tl-note { font-size: .925rem; line-height: 1.6; padding: .9rem 1.1rem; border-left: 3px solid var(--tl-accent); background: var(--tl-soft); border-radius: 0 8px 8px 0; margin: 1rem 0 1.5rem; }

/* Search + buttons */
.tl-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1.5rem 0 1rem; }
.tl-tools input[type="search"] { flex: 1 1 240px; padding: .7rem 1rem; border: 1px solid var(--tl-line); border-radius: 8px; background: transparent; color: inherit; font: inherit; }
.tl-tools button { padding: .6rem 1rem; border: 1px solid var(--tl-line); border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.tl-tools button:hover, .tl-tools button:focus-visible { border-color: currentColor; }
#tl-count { font-size: .875rem; opacity: .75; margin-left: auto; }

/* Article index chips */
.tl-index { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem; }
.tl-index a { font-size: .8rem; padding: .3rem .7rem; border: 1px solid var(--tl-line); border-radius: 999px; text-decoration: none; color: inherit; }
.tl-index a:hover, .tl-index a:focus-visible { border-color: currentColor; }

/* Accordion */
.tl-articles > details { border-bottom: 1px solid var(--tl-line); padding: 1rem 0; scroll-margin-top: 90px; }
.tl-articles > details > summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.tl-articles > details > summary::-webkit-details-marker { display: none; }
.tl-articles > details > summary::after { content: "+"; font-weight: 400; font-size: 1.3rem; line-height: 1; }
.tl-articles > details[open] > summary::after { content: "\2212"; }
.tl-body { padding-top: .75rem; line-height: 1.7; }
.tl-body p { margin: 0 0 .85em; }

/* Library table */
.tl-scroll { overflow-x: auto; }
.tl-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.tl-table th, .tl-table td { text-align: left; padding: .75rem .6rem; border-bottom: 1px solid var(--tl-line); }
.tl-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }

.tl-source { margin-top: 2.5rem; padding: 1.25rem; border: 1px solid var(--tl-line); border-radius: 12px; }
.tl-source h2 { margin-top: 0; font-size: 1.15rem; }

@media (max-width: 600px) {
	#tl-count { margin-left: 0; width: 100%; }
}

/* ---- Legislation ---- */
.tl-preamble { font-size: .95rem; opacity: .85; margin-bottom: 1.5rem; }
.tl-ref { font-size: .9rem; opacity: .75; margin: 0 0 1rem; font-style: italic; }
.tl-division { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; opacity: .75; margin: 1.5rem 0 .25rem; font-weight: 600; }
.tl-sec { padding: 1rem 0; border-bottom: 1px solid var(--tl-line); scroll-margin-top: 90px; }
.tl-sec-h { font-size: 1.05rem; margin: 0 0 .6rem; }
.tl-secnum { opacity: .65; margin-right: .25rem; }
.tl-p { margin: 0 0 .6em; line-height: 1.7; }
.tl-d0 { margin-left: 0; } .tl-d1 { margin-left: 1.5rem; } .tl-d2 { margin-left: 3rem; } .tl-d3 { margin-left: 4.5rem; }
.tl-label { font-weight: 600; margin-right: .25rem; }
.tl-deleted { font-style: italic; opacity: .75; }
#tl-jump, .tl-filter { padding: .65rem .8rem; border: 1px solid var(--tl-line); border-radius: 8px; background: transparent; color: inherit; font: inherit; max-width: 100%; }

/* amended provisions: current text prominent, earlier text quieter and collapsed */
.tl-amended { margin: .25rem 0 .9rem; }
.tl-badge { display: inline-block; font-size: .75rem; padding: .15rem .65rem; border: 1px solid var(--tl-line); border-radius: 999px; margin-bottom: .35rem; opacity: .9; }
.tl-badge-action { font-weight: 600; }
.tl-badge-date { opacity: .8; }
.tl-prev { margin-top: .35rem; font-size: .9rem; }
.tl-prev > summary { cursor: pointer; opacity: .8; list-style: none; }
.tl-prev > summary::-webkit-details-marker { display: none; }
.tl-prev > summary::before { content: "\25B8\00a0"; }
.tl-prev[open] > summary::before { content: "\25BE\00a0"; }
.tl-prev-item { margin: .5rem 0; padding: .6rem .9rem; border-left: 3px solid var(--tl-line); background: var(--tl-soft); opacity: .88; }
.tl-prev-item p { margin: 0 0 .5em; }
.tl-prev-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; opacity: .8; margin-bottom: .35rem; }
.tl-unverified { border-left-color: #c77700; }

/* amendment history */
.tl-history { border: 1px solid var(--tl-line); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 1.5rem; }
.tl-history > summary { cursor: pointer; font-weight: 600; }
.tl-history ol { margin: .9rem 0 0; padding-left: 1.25rem; }
.tl-history li { margin-bottom: .8rem; }
.tl-hist-meta { font-size: .85rem; opacity: .8; }
.tl-hist-locs { font-size: .85rem; }
.tl-hist-locs a { white-space: nowrap; }

/* ---- cross-references, PDF links ---- */
.tl-xref { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.tl-act-link { text-decoration: underline; text-underline-offset: 2px; }
.tl-pdf { display: inline-block; font-size: .65rem; font-weight: 700; letter-spacing: .04em; margin-left: .35rem; padding: 0 .35rem; border: 1px solid currentColor; border-radius: 4px; vertical-align: .1em; text-decoration: none; opacity: .85; }

/* ---- case + commentary flags and panels ---- */
.tl-flags { display: inline-flex; gap: .35rem; margin-left: .6rem; vertical-align: .1em; }
.tl-flag { font-size: .68rem; font-weight: 600; letter-spacing: .03em; padding: .1rem .55rem; border: 1px solid currentColor; border-radius: 999px; text-decoration: none; opacity: .85; white-space: nowrap; }
.tl-flag:hover, .tl-flag:focus-visible { opacity: 1; }
.tl-notebox { margin: .75rem 0 0; border: 1px solid var(--tl-line); border-radius: 10px; padding: .6rem .9rem; font-size: .92rem; scroll-margin-top: 90px; }
.tl-notebox > summary { cursor: pointer; font-weight: 600; list-style: none; }
.tl-notebox > summary::-webkit-details-marker { display: none; }
.tl-notebox > summary::before { content: "\25B8\00a0"; }
.tl-notebox[open] > summary::before { content: "\25BE\00a0"; }
.tl-count { font-weight: 400; opacity: .7; margin-left: .25rem; }
.tl-comm { border-left: 4px solid var(--tl-accent); }
.tl-note-item { margin-top: .6rem; line-height: 1.65; }
.tl-note-meta { font-size: .78rem; opacity: .75; margin-bottom: .25rem; }
.tl-case-list { list-style: none; margin: .7rem 0 0; padding: 0; }
.tl-case-list li { margin: 0 0 .85rem; line-height: 1.5; }
.tl-case-meta { font-size: .82rem; opacity: .8; }
.tl-case-note { font-size: .9rem; margin-top: .15rem; }
.tl-treat { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .5rem; border: 1px solid var(--tl-line); border-radius: 4px; margin-right: .35rem; }
.tl-treat-interpreted, .tl-treat-applied, .tl-treat-followed { border-color: currentColor; }

/* ---- Typography ----------------------------------------------------------
 * Many themes force their own fonts onto every heading, button and input, which
 * makes the reader look inconsistent. These rules keep one family, size and
 * line height across the whole reader. Change the four variables below, for
 * example in Appearance > Customize > Additional CSS:
 *
 *   .tl-wrap { --tl-font: Georgia, "Times New Roman", serif; --tl-size: 1.05rem; }
 * ------------------------------------------------------------------------ */
.tl-wrap {
	--tl-font: inherit;                      /* inherit = use the theme's body font */
	--tl-heading-font: var(--tl-font);       /* headings, section titles, panel titles */
	--tl-size: 1rem;                         /* base text size */
	--tl-leading: 1.7;                       /* line height */
	font-family: var(--tl-font);
	font-size: var(--tl-size);
	line-height: var(--tl-leading);
	font-weight: 400;
	letter-spacing: normal;
}
.tl-wrap h1, .tl-wrap h2, .tl-wrap h3, .tl-wrap h4, .tl-wrap h5, .tl-wrap h6 {
	font-family: var(--tl-heading-font);
	letter-spacing: normal;
}
.tl-wrap p, .tl-wrap li, .tl-wrap dt, .tl-wrap dd, .tl-wrap summary, .tl-wrap a,
.tl-wrap table, .tl-wrap th, .tl-wrap td, .tl-wrap label,
.tl-wrap button, .tl-wrap input, .tl-wrap select, .tl-wrap textarea {
	font-family: inherit;
	letter-spacing: normal;
}
.tl-wrap .tl-p { line-height: var(--tl-leading); }
@media (max-width: 600px) {
	.tl-wrap { --tl-size: .95rem; }
}

/* ---- Forms in Schedules ---- */
.tl-blank { display: inline-block; min-width: 14em; border-bottom: 1px dotted currentColor; margin: 0 .15em; height: 1em; vertical-align: baseline; }
.tl-formbox { border: 1px solid var(--tl-line); border-radius: 8px; padding: .75rem 1rem; margin: 1rem 0 1.5rem; }
.tl-formbox .tl-p { margin-bottom: .35em; }

/* ---- Compare treaties ---- */
.tl-wrap.tl-compare { max-width: 1200px; }
.tl-cmp-intro { margin: 0 0 1rem; }
.tl-cmp-btn, .tl-cmp-link a { font-size: .9rem; text-decoration: none; }
.tl-cmp-btn { display: inline-block; padding: .55rem 1rem; border: 1px solid var(--tl-line); border-radius: 8px; color: inherit; }
.tl-cmp-btn:hover, .tl-cmp-btn:focus-visible { border-color: currentColor; }
.tl-cmp-link { margin: 1rem 0 0; font-size: .9rem; }
.tl-cmp-link a { text-decoration: underline; text-underline-offset: 2px; }

.tl-cmp-pickers { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: end; margin-bottom: .5rem; }
.tl-cmp-col { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.tl-cmp-col label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; opacity: .75; margin-top: .5rem; }
.tl-cmp-col label:first-child { margin-top: 0; }
.tl-cmp-select { padding: .65rem .8rem; border: 1px solid var(--tl-line); border-radius: 8px; background: transparent; color: inherit; font: inherit; width: 100%; max-width: 100%; }
.tl-cmp-select:disabled { opacity: .55; }
.tl-cmp-swap { padding: .6rem .9rem; border: 1px solid var(--tl-line); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 1.1rem; cursor: pointer; align-self: center; }
.tl-cmp-swap:hover, .tl-cmp-swap:focus-visible { border-color: currentColor; }

.tl-cmp-opts { margin-top: 1rem; }
.tl-cmp-opts button:disabled { opacity: .45; cursor: default; }
.tl-cmp-check { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; cursor: pointer; }
.tl-cmp-status { min-height: 1.4em; margin: 0 0 1rem; font-size: .9rem; opacity: .85; }
.tl-cmp-status[data-kind="note"] { padding: .7rem 1rem; border-left: 3px solid #c77700; background: var(--tl-soft); border-radius: 0 8px 8px 0; opacity: 1; }

.tl-cmp-summary { border: 1px solid var(--tl-line); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 1.5rem; }
.tl-cmp-summary > summary { cursor: pointer; font-weight: 600; }
.tl-cmp-summary .tl-table { min-width: 0; margin-top: .6rem; }
.tl-cmp-summary th[scope="row"] { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; opacity: .75; font-weight: 600; }
.tl-cmp-diffrow td { font-weight: 600; }

.tl-cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.tl-cmp-panel { border: 1px solid var(--tl-line); border-radius: 12px; padding: 1rem 1.25rem 1.25rem; min-width: 0; overflow-wrap: anywhere; }
.tl-cmp-head { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; flex-wrap: wrap; font-size: .875rem; }
.tl-cmp-treaty { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; opacity: .8; }
.tl-cmp-title { margin: .5rem 0 0; font-size: 1.15rem; }
.tl-cmp-empty { opacity: .75; margin: .5rem 0 0; }
mark.tl-diff { background: rgba(255, 190, 0, .35); color: inherit; padding: 0 .1em; border-radius: 2px; }

@media (max-width: 760px) {
	.tl-cmp-pickers { grid-template-columns: 1fr; }
	.tl-cmp-swap { justify-self: start; }
	.tl-cmp-grid { grid-template-columns: 1fr; }
}

/* ---- Compare: optional third column ---- */
.tl-wrap.tl-compare { max-width: 1320px; }
.tl-cmp-pickers { grid-template-columns: 1fr auto 1fr 1fr; }
.tl-cmp-grid.tl-cmp-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tl-cmp-panel[hidden] { display: none; }
@media (max-width: 980px) {
	.tl-cmp-pickers { grid-template-columns: 1fr; }
	.tl-cmp-grid.tl-cmp-three { grid-template-columns: 1fr; }
}
