/* Existing IDP query navigation and controls; country cards have one shared sheet. */
body[data-guide-structured] .frame,body[data-guide-structured] main.shell{width:100%;max-width:1040px;padding-inline:20px;margin-inline:auto;box-sizing:border-box}
body[data-guide-structured] .hero,body[data-guide-structured] .convention-main{padding-top:24px;padding-bottom:0}
body[data-guide-structured] .hero h1,body[data-guide-structured] .document-hero h1{font-family:inherit;font-size:clamp(26px,3vw,34px)!important;line-height:1.3;margin:0 0 16px;font-weight:650;letter-spacing:0}
body[data-guide-structured] .document-hero{padding:0 0 12px}
body[data-guide-structured] .lead{font-size:14px;line-height:1.65;color:var(--muted,#bdbbc4);margin:12px 0 0;max-width:80ch}
.idp-guide-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:4px;margin:0;border:1px solid var(--line,rgba(255,255,255,.18));border-radius:14px;background:var(--panel,#19191f)}
.idp-guide-tabs a{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:1px solid transparent;border-radius:10px;color:var(--ink,#fff);font-family:inherit;font-size:15px;line-height:1.5;text-align:center;text-decoration:none;box-sizing:border-box;overflow-wrap:anywhere}
.idp-guide-tabs a[aria-current]{background:var(--panel2,#292931);border-color:var(--brand,#ff5145);font-weight:650}
.idp-guide-tabs a:focus-visible,.guide-reading a:focus-visible{outline:2px solid var(--brand,#ff5145);outline-offset:3px}
.guide-reading{margin:0 0 16px;font-size:16px;line-height:1.6}
.guide-reading a{display:inline-flex;align-items:center;gap:10px;min-height:44px;color:var(--ink,#fff);text-decoration:underline;text-underline-offset:4px}
html[dir="rtl"] .guide-reading-arrow{transform:scaleX(-1)}
.guide-reading-bottom{padding-top:16px;border-top:1px solid var(--line,rgba(255,255,255,.18))}
body[data-guide-structured] .finder{position:relative;top:auto;z-index:1;background:transparent;border:0;padding:16px 0 0;scroll-margin-top:90px}
body[data-guide-structured] .finder-row{display:flex;flex-direction:column;align-items:stretch;gap:12px;margin-bottom:12px}
body[data-guide-structured] .search{width:100%;min-width:0;box-sizing:border-box;min-height:48px;padding:12px 16px;border:1px solid var(--line,rgba(255,255,255,.2));border-radius:12px;background:var(--panel,#19191f);color:var(--ink,#fff);font:inherit;font-size:16px}
body[data-guide-structured] .search::placeholder{color:var(--muted,#bdbbc4);opacity:1}
body[data-guide-structured] .filters,.convention-filter-buttons,body[data-guide-structured] .legend{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
body[data-guide-structured] .filter,.convention-filter,body[data-guide-structured] .status-filter{width:auto;min-height:44px;max-width:100%;padding:8px 12px;border:1px solid var(--line,rgba(255,255,255,.2));border-radius:999px;background:var(--panel,#19191f);color:var(--ink,#fff);font:inherit;font-size:13px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
body[data-guide-structured] .filter.active,.convention-filter.active,body[data-guide-structured] .status-filter.active{border-color:var(--brand,#ff5145);background:var(--panel2,#292931);box-shadow:inset 0 0 0 1px var(--brand,#ff5145)}
.convention-filter:disabled{opacity:.55;cursor:wait}
body[data-guide-structured] .filter:focus-visible,.convention-filter:focus-visible,.convention-reset:focus-visible,body[data-guide-structured] .status-filter:focus-visible{outline:2px solid var(--brand,#ff5145);outline-offset:3px}
.convention-main .convention-finder{padding:4px 0 0;scroll-margin-top:90px}
.convention-finder [hidden]{display:none!important}
.convention-finder p{font-size:14px;line-height:1.65;overflow-wrap:anywhere;margin:10px 0}
.convention-scope{color:var(--muted,#bdbbc4);max-width:90ch}
.convention-finder-meta{display:flex;justify-content:flex-end}
.convention-reset{background:none;border:0;color:var(--ink,#fff);font:inherit;font-size:13px;min-height:44px;padding:8px 0;text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.convention-finder a{color:inherit;text-underline-offset:4px}
.convention-finder [data-convention-message]:empty{display:none}
body[data-guide-structured] .region-section{margin:24px 0 32px;padding:0}
body[data-guide-structured] .region-header{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--line,rgba(255,255,255,.18))}
body[data-guide-structured] .region-header h2{font-family:inherit;font-size:22px!important;line-height:1.4;margin:0;letter-spacing:0}
body[data-guide-structured] .region-header p{display:none}
body[data-guide-structured] .region-header>b{font-size:12px;line-height:1.5;padding:0;color:var(--muted,#bdbbc4);font-weight:400}
body[data-guide-structured] .hub-reference{font-size:14px;line-height:1.7;padding-block:20px;color:var(--muted,#bdbbc4)}
body[data-guide-structured] .hub-reference .source-meta{font-size:13px;margin-top:12px}
body[data-guide-structured] .result-count,[data-convention-count]{font-size:13px;color:var(--muted,#bdbbc4)}
body[data-guide-structured] .guide-sr-only{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap;padding:0;margin:-1px}
@media(max-width:600px){body[data-guide-structured] .frame,body[data-guide-structured] main.shell{padding-inline:16px}.idp-guide-tabs a{font-size:14px;padding-inline:6px}body[data-guide-structured] .region-header h2{font-size:20px!important}body[data-guide-structured] .region-header>b{max-width:115px;text-align:end}}

.convention-finder .convention-format-warning{border-inline-start:3px solid var(--brand,#ff5145);padding-inline-start:12px;color:var(--ink,#fff)}

/* Original four qualification filters: icon, title and one short explanation. */
body[data-guide-structured] .legend{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0;align-items:stretch}
body[data-guide-structured] .legend .status-filter[data-status="valid"],body[data-guide-structured] .legend .status-filter[data-status="translation"]{--filter-color:#49d17d}
body[data-guide-structured] .legend .status-filter[data-status="invalid"]{--filter-color:#ff6b6b}
body[data-guide-structured] .legend .status-filter[data-status="unknown"]{--filter-color:#a4a4ae}
body[data-guide-structured] .legend .status-filter{width:100%;min-width:0;min-height:44px;padding:12px;border:1px solid var(--filter-color);border-radius:12px;display:block;text-align:start;background:var(--panel);font-family:inherit;overflow-wrap:anywhere}
body[data-guide-structured] .legend .status-filter b{display:flex;align-items:center;gap:8px;color:var(--filter-color);font-family:inherit;font-size:14px;font-weight:700;line-height:1.45;letter-spacing:0}
body[data-guide-structured] .legend .status-filter small{display:block;margin-top:5px;color:var(--muted);font-family:inherit;font-size:13px;font-weight:400;line-height:1.55}
body[data-guide-structured] .legend .legend-icon{display:block;flex:0 0 24px;width:24px;height:24px;color:inherit}
body[data-guide-structured] .legend .legend-title{display:block;flex:1;min-width:0;color:inherit;font:inherit;letter-spacing:inherit}
body[data-guide-structured] .legend .status-filter[aria-pressed="true"]{background:var(--panel2,#292931);outline:2px solid var(--filter-color);outline-offset:2px;box-shadow:none}
body[data-guide-structured] .legend .status-filter:focus-visible{outline:2px dashed var(--ink,#fff);outline-offset:3px}
@media(max-width:1000px){body[data-guide-structured] .legend{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Treaty selection is neutral; green/red/gray remain document qualifications. */
.convention-filter-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:1fr;align-items:stretch}
.convention-filter-buttons .convention-filter{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:52px;padding:10px 12px;border-radius:12px;text-align:center}
.convention-filter-buttons .convention-filter.active{border-color:var(--ink,#fff);background:var(--panel2,#292931);box-shadow:inset 0 0 0 1px var(--ink,#fff);font-weight:650}
.convention-filter-buttons .convention-filter:focus-visible{outline:2px dashed var(--ink,#fff);outline-offset:3px}
@media(max-width:600px){.convention-filter-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Treaty cards and their dialog only; the licence-country view stays unchanged. */
body[data-guide-structured] .convention-finder .country-list{align-items:stretch}
body[data-guide-structured] .convention-finder button.country-card{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:10px;width:100%;min-height:144px;padding:16px 10px;font:inherit;cursor:pointer;box-sizing:border-box}
body[data-guide-structured] .convention-finder button.country-card:hover{background:var(--panel2,#202027)}
body[data-guide-structured] .convention-finder button.country-card:focus-visible{outline:2px solid var(--ink,#fff);outline-offset:3px}
body[data-guide-structured] .convention-finder button.country-card .country-flag{width:56px;height:38px}
body[data-guide-structured] .convention-finder .country-label{font-size:15px}
.convention-finder .country-format-label{display:block;max-width:100%;margin-top:auto;color:var(--ink,#f7f4ed);font-size:12px;font-weight:500;line-height:1.45;text-align:center;overflow-wrap:anywhere}
.convention-dialog{width:min(520px,calc(100% - 32px));max-height:calc(100dvh - 48px);margin:auto;padding:0;border:1px solid var(--line,#45454e);border-radius:14px;background:#15151b;color:var(--ink,#f7f4ed);overflow:auto;overscroll-behavior:contain;color-scheme:dark;box-sizing:border-box}
.convention-dialog::backdrop{background:rgba(0,0,0,.72)}
body:has(.convention-dialog[open]){overflow:hidden}
.convention-dialog-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;background:#15151b;border-bottom:1px solid var(--line,#45454e)}
.convention-dialog-header h2{display:flex;align-items:center;gap:10px;margin:0;font-family:inherit;font-size:1.25rem;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
body[data-guide-structured] .convention-dialog-header .country-flag{width:36px;height:24px;flex:none;object-fit:cover;border-radius:3px}
.convention-dialog-header button{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:1px solid var(--line,#45454e);border-radius:8px;background:transparent;color:inherit;cursor:pointer}
.convention-dialog-body{padding:20px}
.convention-dialog-body p{margin:0 0 12px;font-size:.9rem;line-height:1.7;overflow-wrap:anywhere}
.convention-dialog-body .convention-format-result{margin-bottom:14px}
.convention-dialog-body .convention-format-result p{margin:0 0 8px;font-size:1.05rem;font-weight:600;line-height:1.5}
.convention-dialog-body a{display:inline-block;max-width:100%;padding:8px 0;color:inherit;font-size:.875rem;line-height:1.6;text-underline-offset:4px;overflow-wrap:anywhere}
.convention-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;margin-top:18px;padding-top:14px;border-top:1px solid var(--line,#45454e)}
.convention-dialog-actions a{display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box}
.convention-dialog-actions .convention-detail-link{padding:9px 12px;border:1px solid var(--line,#45454e);border-radius:8px;background:var(--panel2,#202027);font-weight:600;text-decoration:none}
.convention-dialog :is(a,button):focus-visible{outline:2px solid var(--brand,#ff5145);outline-offset:3px}
@media(max-width:560px){body[data-guide-structured] .convention-finder button.country-card{min-height:128px;padding:12px 7px;gap:8px}body[data-guide-structured] .convention-finder button.country-card .country-flag{width:48px;height:32px}body[data-guide-structured] .convention-finder .country-label{font-size:14px}.convention-dialog-header{padding:12px 16px}.convention-dialog-body{padding:16px}}
@media(max-width:360px){body[data-guide-structured] .convention-finder .country-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
