/* Country register: the Brief, Sources and Compare tabs. Uses the --rg-* tokens of country-register-redesign.css. */

/* ---------- Brief ---------- */
.rgb { min-width: 0; }
.rgb-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin-bottom: 12px; }
.country-handbook-page .rg-page .rgb-head h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.country-handbook-page .rg-page .rgb-dateline { margin: 0; font-size: 13.5px; color: var(--rg-muted); max-width: 70ch; }
.rgb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rgb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.rgb-chip { display: inline-flex; flex-direction: column; padding: 6px 12px; border: 1px solid var(--rg-line-strong); border-radius: 10px; background: var(--rg-surface); line-height: 1.25; }
.rgb-chip span { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--rg-muted); }
.rgb-chip strong { font-size: 14px; }
.rgb-change { font-size: 13.5px; font-weight: 700; }
.rgb-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.rgb-stat { padding: 12px 14px; background: var(--rg-surface); border: 1px solid var(--rg-line); border-radius: var(--rg-radius); box-shadow: var(--rg-shadow); }
.rgb-stat strong { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rgb-stat span { font-size: 12.5px; color: var(--rg-muted); }
.rgb-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rgb-main, .rgb-side { display: grid; gap: 14px; min-width: 0; }
.country-handbook-page .rg-page .rgb-section h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.country-handbook-page .rg-page .rgb-block h4 { margin: 10px 0 2px; font-size: 14px; font-weight: 800; }
.country-handbook-page .rg-page .rgb-block p, .country-handbook-page .rg-page .rgb-computed { margin: 0; font-size: 14.5px; line-height: 1.6; }
.rgb-cite { font-size: 12px; font-weight: 700; white-space: nowrap; }
.rgb-impl, .rgb-inst, .rgb-sources, .rgt-list { list-style: none; margin: 0; padding: 0; }
.rgb-impl li, .rgb-inst li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rg-line); }
.rgb-impl li:first-child, .rgb-inst li:first-child { border-top: 0; }
.rgb-impl p { margin: 2px 0 0; font-size: 13.5px; color: var(--rg-muted); }
.rgb-impl li > a { flex: 0 0 auto; font-weight: 700; }
.rgb-inst li > div { min-width: 0; }
.rgb-inst strong { flex: 0 0 auto; font-size: 18px; font-variant-numeric: tabular-nums; }
.rgb-inst strong span { font-size: 12px; font-weight: 600; color: var(--rg-muted); }
.rgb-inst + .rg-btn { margin-top: 8px; }
.rgt-what { display: block; font-size: 12.5px; color: var(--rg-muted); }
.rgb-sources li { display: flex; gap: 8px; padding: 6px 0; font-size: 14px; scroll-margin-top: 80px; }
.rgb-sources li > span:first-child { flex: 0 0 auto; font-weight: 700; color: var(--rg-muted); }
.rgb-sources li:target { background: var(--rg-amber-bg); }
.rgt-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--rg-line); font-size: 14px; }
.rgt-list li:first-child { border-top: 0; }
.rgt-date { font-size: 12.5px; font-weight: 700; color: var(--rg-muted); }
.rgt-undated summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; font-size: 13.5px; font-weight: 700; }
.rgb-section .rg-btn { margin-top: 6px; }
@media (max-width: 1100px) { .rgb-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .rgb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rgb-stat:last-child { grid-column: 1 / -1; }
  .rgt-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rgb-actions .ch-button { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Sources ---------- */
.rgs-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin: 10px 0 12px; }
.rgs-filter .rgs-search { flex: 1 1 260px; }
.rgs-filter .ch-field { margin: 0; }
.rgs-filter .rgs-sort { flex: 0 1 220px; min-width: 0; }
.rgs-sort select { width: 100%; max-width: 100%; }
.rgs-filter .ch-button { min-height: 44px; }
.rgs-table th, .rgs-table td { vertical-align: top; }
.rgs-table th, .rgs-table td { overflow-wrap: normal; word-break: normal; hyphens: none; }
.rgs-name { min-width: 200px; max-width: 320px; font-weight: 700; }
.rgs-name a { display: block; }
.rgs-ref { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 12.5px; font-weight: 500; color: var(--rg-muted); }
.rgs-table td[data-label="Type"] { min-width: 112px; }
.rgs-table td[data-label="Publisher"] { min-width: 140px; max-width: 220px; font-size: 13px; }
.rgs-table td[data-label="Text policy"] { min-width: 96px; }
.rgs-table .rg-num, .rgs-table .rgs-col-provisions, .rgs-table .rgs-col-mapped { text-align: right; font-variant-numeric: tabular-nums; }
.rgs-table td[data-label="Date / version"] { min-width: 150px; max-width: 260px; font-size: 13px; overflow-wrap: anywhere; }
.rgs-check { min-width: 150px; max-width: 220px; font-size: 13px; }
.rgs-check time { color: var(--rg-muted); overflow-wrap: anywhere; }
.rgs-link { white-space: nowrap; font-size: 13px; }
.rgs-grid .rgw-main { container-type: normal; }
/* Full-width table; the instrument panel is a slide-over at every width. */
.rgs-grid.rgw-grid { display: block; }
.rgs-grid .rgw-panel-col { position: static; max-height: none; margin: 0; }
.rgs-grid .rgw-panel-col:has([data-rgw-state="empty"]) { display: none; }
.rg-js .rgs-grid .rgw-panel { position: fixed; z-index: 910; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); border-radius: 0; border-width: 0 0 0 1px; box-shadow: -8px 0 32px rgba(1, 21, 48, .22); }
.rg-js .rgs-grid .rgw-panel[data-rgw-state="empty"] { display: none; }
.rg-js .rgs-grid .rgw-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(1, 21, 48, .38); }
.rg-js .rgs-grid .rgw-panel:not([data-rgw-state="empty"]) + .rgw-backdrop { display: block; }
@media (max-width: 760px) { .rg-js .rgs-grid .rgw-panel { width: 100vw; border-width: 0; } }
@media (max-width: 760px) {
  .rg-table.rgs-table thead { display: none; }
  .rg-table.rgs-table td[data-label]::before { content: attr(data-label); display: block; margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--rg-muted); }
  .rg-table.rgs-table td.rgs-link::before { display: none; }
  .rg-table.rgs-table td.rg-num { text-align: left; }
  .rgs-name { min-width: 0; max-width: none; }
}

/* ---------- Compare ---------- */
.rgc-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; margin: 10px 0 16px; padding: 12px 14px; background: var(--rg-surface); border: 1px solid var(--rg-line); border-radius: var(--rg-radius); }
.rg-page .rgc-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.rgc-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 14px; border: 1px solid var(--rg-line-strong); border-radius: 999px; background: var(--rg-wash); font-weight: 700; font-size: 14px; }
.rgc-current { font-size: 11.5px; font-weight: 600; color: var(--rg-muted); padding-right: 10px; }
.rgc-remove { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; text-decoration: none !important; color: var(--rg-ink) !important; }
.rgc-remove:hover { background: var(--rg-amber-bg); }
.rgc-add, .rgc-topic { display: flex; align-items: flex-end; gap: 8px; }
.rgc-add .ch-field, .rgc-topic .ch-field { margin: 0; }
.rgc-add .ch-button, .rgc-topic .ch-button { min-height: 44px; }
.rgc-full { margin: 0; font-size: 13px; color: var(--rg-muted); }
.rgc-take ul { margin: 0 0 8px; padding-left: 18px; }
.rgc-take li { margin: 4px 0; font-size: 14.5px; line-height: 1.5; }
.rgc-cols { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.rgc-cols-1 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .rgc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rgc-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 761px) and (max-width: 1099px) { .rgc-cols-3, .rgc-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rgc-col { min-width: 0; padding: 14px; background: var(--rg-surface); border: 1px solid var(--rg-line); border-radius: var(--rg-radius); box-shadow: var(--rg-shadow); }
.country-handbook-page .rg-page .rgc-col h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.country-handbook-page .rg-page .rgc-col h4 { margin: 12px 0 4px; font-size: 13px; font-weight: 800; color: var(--rg-muted); }
.rgc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 10px 12px; background: var(--rg-wash); border-radius: 8px; }
.rgc-stats dt { font-size: 11.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--rg-muted); }
.rgc-stats dd { margin: 0; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rgc-rows { list-style: none; margin: 0 0 10px; padding: 0; }
.rgc-rows li { padding: 8px 0; border-top: 1px solid var(--rg-line); }
.rgc-rows li:first-child { border-top: 0; }
.rgc-rows a { font-weight: 700; font-size: 14px; overflow-wrap: break-word; }
.rgc-rows p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--rg-muted); }
.rgc-empty { margin: 12px 0; padding: 10px 12px; border-left: 3px solid var(--rg-gold, #e8b923); background: var(--rg-wash); font-size: 13.5px; line-height: 1.5; }
@media (max-width: 760px) {
  .rgc-cols { grid-template-columns: minmax(0, 1fr); }
  .rgc-add, .rgc-topic { flex-wrap: wrap; width: 100%; }
  .rgc-add .ch-field, .rgc-topic .ch-field { flex: 1 1 160px; }
}

/* Signed-out visitors: the sign-in prompt above the tabs, and the lock on tabs that need an account. */
.rg-signin-banner { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin: 16px 0 8px; padding: 12px 16px; border: 1px solid var(--rg-line-strong, #d9cfb4); border-left: 4px solid var(--rg-gold, #e8b923); border-radius: 8px; background: var(--rg-surface, #fff); color: var(--rg-ink, #011530); }
.rg-signin-banner p { margin: 0; flex: 1 1 280px; font-size: 14.5px; line-height: 1.5; }
.rg-signin-banner .rg-btn { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; text-decoration: none; }
.rg-signin-mark { display: inline-flex; color: var(--rg-muted, #5b6472); }
.rg-tab-lock { position: relative; display: inline-flex; align-items: center; margin-left: 6px; color: var(--rg-muted, #5b6472); }
.rg-tabs a[data-rg-signin] { opacity: .85; }
.rgs-table tbody tr[hidden] { display: none; }
.rgs-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0; }
.rgs-attrib-all > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.rgs-attrib-all > summary h3 { margin: 0; display: inline; }

/* Hosts that forbid linking: the citation is plain text */
.rg-nolink { display: inline-flex; flex-direction: column; gap: 2px; max-width: 100%; font-size: 13.5px; }
.rg-nolink-name { font-weight: 600; }
.rg-nolink-address { overflow-wrap: anywhere; color: var(--rg-muted, #55606e); user-select: all; }
.rg-nolink-note { color: var(--rg-muted, #55606e); font-size: 12px; line-height: 1.4; }
/* Downloads for firm members only */
.rg-exports-locked, .ch-exports-locked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.rg-exports-locked p { margin: 0; font-size: 14px; }
/* Compare link and country brief on the Overview */
.rg-compare-link { font-size: 14px; font-weight: 600; margin-left: 4px; white-space: nowrap; }
.rg-compare-end { margin: 18px 0 4px; }
.rg-brief-section { margin-top: 18px; scroll-margin-top: 12px; }
.rg-brief-details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.rgc-back { margin: 0 0 10px; }
@media (max-width: 640px) { .rg-compare-link { display: block; margin: 6px 0 0; } }
