/* TRPH BIR Library. Tokens come from the approved mockup. */
.trph-bir {
	--g: #0A7B3C;
	--n: #0B3A6B;
	--ink: #14202B;
	--mute: #4A5864;
	--line: #D7DEE3;
	--line2: #E3E9EC;
	--bg: #F6F8F7;
	--bg2: #EEF2F1;
	--field: #8C9AA5;
	font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: 17px;
	line-height: 1.5;
	color: var(--ink);
	background: var(--bg);
	/* Break out of the theme's content column so the layout can use the full width. */
	width: 100vw;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	box-sizing: border-box;
}
.trph-bir *, .trph-bir *::before, .trph-bir *::after { box-sizing: border-box; }
body.trph-bir-hub-page, body.trph-bir-single { overflow-x: clip; }
.trph-bir a { color: var(--n); }
.trph-bir a:hover { color: var(--g); }
.trph-bir :focus-visible { outline: 3px solid #1B6FD1; outline-offset: 2px; }
.trph-wrap { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.trph-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.trph-grow { flex-grow: 1; }

/* Single issuance pages: the theme title stays in the page for search engines and screen readers, but not on screen.
   The theme's date block is hidden because the date is already in the At a glance box. */
body.trph-bir-single .wp-block-post-title,
body.trph-bir-single .entry-title,
body.trph-bir-single .page-title {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0 !important; padding: 0 !important;
}
body.trph-bir-single main .wp-block-group:has(> .wp-block-post-date),
body.trph-bir-single .wp-block-post-date { display: none !important; }
/* Hub page: the hero heading is the page's H1, so any theme title is removed. */
body.trph-bir-hub-page .wp-block-post-title,
body.trph-bir-hub-page .entry-title,
body.trph-bir-hub-page .page-title { display: none !important; }

/* Hub hero */
.trph-hero { background: var(--n); color: #fff; }
.trph-hero .trph-wrap { padding-top: 48px; padding-bottom: 44px; display: flex; flex-direction: column; gap: 16px; }
.trph-hero-title { margin: 0; color: #fff; font-family: 'Source Serif 4', Georgia, serif; font-weight: 700; font-size: 52px; line-height: 1.1; }
.trph-hero-desc { margin: 0; max-width: 720px; font-size: 20px; color: #E3ECF5; }
.trph-search { display: flex; flex-wrap: wrap; gap: 12px; max-width: 760px; margin-top: 8px; }
.trph-search input { flex: 1 1 360px; min-width: 0; height: 56px; padding: 0 18px; font: inherit; font-size: 18px; border: 2px solid #fff; border-radius: 8px; color: var(--ink); background: #fff; }
.trph-search button { height: 56px; padding: 0 32px; font: inherit; font-size: 18px; font-weight: 700; color: var(--n); background: #fff; border: 2px solid #fff; border-radius: 8px; cursor: pointer; }
.trph-search button:hover { background: #E3ECF5; }

.trph-main { padding-top: 28px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 20px; }
.trph-form { display: none; }

/* Type tabs */
.trph-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.trph-bir .trph-tab { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; font-weight: 700; color: var(--n); background: #fff; border: 2px solid var(--n); border-radius: 8px; text-decoration: none; }
.trph-bir .trph-tab:hover { background: #E8EEF5; color: var(--n); }
.trph-bir .trph-tab.is-active { color: #fff; background: var(--g); border-color: var(--g); }
.trph-bir .trph-tab.is-disabled { color: #6B7680; background: #EEF0F2; border-color: #C9CFD4; cursor: not-allowed; }
.trph-bir .trph-tab.is-disabled:hover { background: #EEF0F2; color: #6B7680; }

/* Filters */
.trph-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.trph-field { display: flex; flex-direction: column; gap: 4px; flex: 0 1 200px; min-width: 150px; }
.trph-field label { font-size: 15px; font-weight: 700; }
.trph-bir select, .trph-bir input[type="number"] { height: 44px; font: inherit; padding: 0 10px; border: 1px solid var(--field); border-radius: 6px; background: #fff; color: var(--ink); }
.trph-clear { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.trph-count { margin: 0; font-weight: 600; }

/* Table */
.trph-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.trph-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 16px; margin: 0; border: 0; }
.trph-table th { padding: 14px 16px; text-align: left; font-weight: 700; color: #fff; background: var(--n); border: 0; }
.trph-table td { padding: 8px 16px; vertical-align: middle; border: 0; border-top: 1px solid var(--line2); }
.trph-table tbody tr:nth-child(even) { background: var(--bg); }
.trph-table .c-num { width: 190px; font-weight: 700; }
.trph-table .c-num a { text-decoration: none; }
.trph-table .c-date { width: 150px; white-space: nowrap; }
.trph-table .c-act { width: 120px; white-space: nowrap; }
.trph-view { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.trph-empty { padding: 28px 16px !important; text-align: center; color: var(--mute); }

/* Pager */
.trph-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.trph-per, .trph-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; }
.trph-per label, .trph-pages label { font-weight: 600; }
.trph-pbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-size: 16px; font-weight: 700; color: var(--n); background: #fff; border: 2px solid var(--n); border-radius: 6px; text-decoration: none; }
.trph-bir a.trph-pbtn:hover { background: #E8EEF5; color: var(--n); }
.trph-pbtn.is-disabled { color: #6B7882; background: #EEF2F1; border: 1px solid var(--line); }
#trph-page-no { width: 72px; text-align: center; }
.trph-of { margin-right: 8px; }
.trph-btn { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; padding: 0 20px; font: inherit; font-size: 16px; font-weight: 700; color: var(--n); background: #fff; border: 2px solid var(--n); border-radius: 8px; cursor: pointer; text-decoration: none; }
.trph-btn:hover { background: #E8EEF5; }

/* Browse by year */
.trph-years { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; padding-top: 8px; border-top: 1px solid var(--line); }
.trph-years a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; font-weight: 600; text-decoration: none; }
.trph-years details { flex-basis: 100%; }
.trph-years summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--n); }
.trph-years-old { display: flex; flex-wrap: wrap; gap: 0 18px; }

/* Issuance page */
.trph-head { background: #fff; border-bottom: 1px solid var(--line); }
.trph-head .trph-wrap { padding-top: 12px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 14px; }
.trph-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; font-size: 15px; color: var(--mute); }
.trph-crumbs a { padding: 10px 0; }
.trph-crumbs [aria-current] { font-weight: 600; color: var(--ink); }
.trph-h { max-width: 980px; display: flex; flex-direction: column; gap: 6px; font-family: 'Source Serif 4', Georgia, serif; }
.trph-h-num { font-weight: 700; font-size: 32px; line-height: 1.15; color: var(--g); }
.trph-h-title { font-weight: 600; font-size: 24px; line-height: 1.3; }

.trph-files { background: #E8EEF5; border-top: 1px solid #C5D2E0; border-bottom: 1px solid #C5D2E0; }
.trph-files-in { padding-top: 12px; padding-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.trph-files-label { font-weight: 700; margin-right: 4px; }
.trph-files-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.trph-fbtn { min-height: 44px; padding: 0 18px; font: inherit; font-size: 16px; font-weight: 700; color: var(--n); background: #fff; border: 2px solid var(--n); border-radius: 8px; cursor: pointer; }
.trph-fbtn:hover { background: #E8EEF5; }
.trph-fbtn[aria-pressed="true"] { color: #fff; background: var(--g); border-color: var(--g); }
.trph-bir a.trph-dl { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

.trph-cols { padding-top: 28px; padding-bottom: 24px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; }
.trph-primary { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.trph-side { flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; gap: 24px; }
.trph-viewer { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.trph-frame { display: block; width: 100%; height: 85vh; min-height: 720px; border: 0; background: #fff; }
.trph-imgview { padding: 16px; text-align: center; }
.trph-imgview img { max-width: 100%; height: auto; }
.trph-nopreview { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.trph-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px 28px; display: flex; flex-direction: column; gap: 12px; }
.trph-side .trph-card { padding: 20px 24px; }
.trph-card h2 { margin: 0; font-family: 'Source Serif 4', Georgia, serif; font-size: 26px; line-height: 1.25; color: var(--ink); }
.trph-side .trph-card h2 { font-size: 22px; }
.trph-summary > :not(h2) { margin-top: 0; margin-bottom: 0; }
.trph-summary .trph-lead { font-size: 19px; line-height: 1.5; }
.trph-summary h3 { margin: 8px 0 0; font-size: 20px; }
.trph-summary ol, .trph-summary ul { padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.trph-note { font-size: 14px; color: var(--mute); }
.trph-relrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; }
.trph-rellabel { min-width: 150px; font-weight: 700; }
.trph-bir a.trph-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.trph-prevnext { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.trph-prevnext a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border: 1px solid #B9C4CC; border-radius: 8px; background: #fff; text-decoration: none; font-weight: 600; }
.trph-glance { margin: 0; }
.trph-glance > div { padding: 10px 0; border-top: 1px solid var(--line2); }
.trph-glance dt { font-size: 14px; color: var(--mute); }
.trph-glance dd { margin: 0; font-weight: 600; }
.trph-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.trph-bir a.trph-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; font-size: 15px; color: var(--ink); background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.trph-bir a.trph-chip-law { color: var(--n); background: #E8EEF5; border-color: #C5D2E0; font-weight: 600; }
.trph-more { display: flex; flex-direction: column; margin-top: 4px; }
.trph-more a { display: flex; align-items: center; min-height: 44px; font-weight: 600; }
.trph-cite { margin: 0; font-size: 15px; color: #2E3C48; }
.trph-disclaimer { margin-top: 0; margin-bottom: 0; padding-bottom: 32px; font-size: 15px; color: var(--mute); }

@media (max-width: 700px) {
	.trph-wrap { padding-left: 16px; padding-right: 16px; }
	.trph-hero-title { font-size: 38px; }
	.trph-h-num { font-size: 28px; }
	.trph-h-title { font-size: 21px; }
	.trph-side { max-width: none; }
	.trph-frame { height: 75vh; min-height: 520px; }
}
@media (prefers-reduced-motion: reduce) {
	.trph-bir * { transition: none !important; scroll-behavior: auto !important; }
}

/* Collapsible Summary and Related issuances */
.trph-more > summary, .trph-relbox > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; color: var(--n); font-weight: 700; }
.trph-more > summary::-webkit-details-marker, .trph-relbox > summary::-webkit-details-marker { display: none; }
.trph-more > summary { display: inline-flex; justify-content: flex-start; gap: 10px; }
.trph-more > summary::after, .trph-relbox > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; flex: none; }
.trph-more[open] > summary::after, .trph-relbox[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.trph-more > summary:focus-visible, .trph-relbox > summary:focus-visible { outline: 3px solid var(--n); outline-offset: 3px; border-radius: 6px; }
.trph-more:not([open]) .trph-more-open, .trph-relbox:not([open]) .trph-more-open { display: none; }
.trph-more[open] .trph-more-closed, .trph-relbox[open] .trph-more-closed { display: none; }
.trph-more-body { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.trph-relbox > summary .trph-more-open, .trph-relbox > summary .trph-more-closed { margin-left: auto; }
.trph-sumtext { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
.trph-sumtext h2 { margin: 0; }
.trph-count { font-weight: 600; color: var(--mute); }
.trph-relgroups { font-size: 15px; font-weight: 400; color: var(--mute); }
.trph-relbox[open] .trph-relgroups { display: none; }
.trph-relbody { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }

/* Summary toggle: top right of the card, button style */
.trph-summary { position: relative; }
.trph-summary .trph-more > summary { position: absolute; top: 20px; right: 24px; min-height: 44px; padding: 0 16px; border: 2px solid var(--n); border-radius: 8px; background: #fff; font-size: 16px; }
.trph-summary .trph-more > summary:hover { background: #E8EEF5; }
.trph-summary h2 { padding-right: 190px; }
@media (max-width: 520px) { .trph-summary h2 { padding-right: 0; } .trph-summary .trph-more > summary { position: static; margin-top: 4px; } }
