/* Theme compatibility for the upstream interface (spec §6.1). The theme's Bootstrap shares class names with
   upstream (.toast .tooltip .mark .btn .table .badge); only properties Bootstrap changes and upstream does
   not set are put back here. Every selector stays inside the app and its portal. */
:is(#jill-deid-app, #jill-deid-portal) [hidden] { display: none !important; }
/* Bootstrap: .toast:not(.show) { display: none } */
:is(#jill-deid-app, #jill-deid-portal) .toast { display: block; width: auto; max-width: none; border: 0; }
/* Bootstrap: .tooltip { opacity: 0; display: block; margin; font-family } */
:is(#jill-deid-app, #jill-deid-portal) .tooltip { opacity: 1; margin: 0; font-family: inherit; text-align: start; }
/* Bootstrap: .mark { color: var(--bs-highlight-color); padding: .1875em } (upstream sets the padding) */
:is(#jill-deid-app, #jill-deid-portal) .mark { color: inherit; }
/* Module additions to the upstream interface (spec §6.1 新增 3, 7): the 🔗 after a link, its details, column batch. */
:is(#jill-deid-app, #jill-deid-portal) .link-flag { border: 0; background: none; padding: 0 .15em; margin: 0; cursor: pointer; font: inherit; line-height: 1; }
:is(#jill-deid-app, #jill-deid-portal) .link-flag:focus-visible { outline: 2px solid currentColor !important; outline-offset: 1px; }
:is(#jill-deid-app, #jill-deid-portal) .link-detail { display: grid; gap: .3rem; }
:is(#jill-deid-app, #jill-deid-portal) .link-uri { overflow-wrap: anywhere; }
:is(#jill-deid-app, #jill-deid-portal) .link-popup { max-width: min(36rem, calc(100vw - 16px)); }
:is(#jill-deid-app, #jill-deid-portal) .column-batch { display: grid; gap: .25rem; margin-bottom: .5rem; }
/* 測試網址 on the rules page (spec §6.1 新增 4) */
:is(#jill-deid-app, #jill-deid-portal) .url-test-input { flex: 1 1 18rem; min-width: 0; }
:is(#jill-deid-app, #jill-deid-portal) .url-test-table td { overflow-wrap: anywhere; vertical-align: top; }
:is(#jill-deid-app, #jill-deid-portal) .url-test-output { overflow-wrap: anywhere; }
/* 已知不涵蓋範圍 in the template (spec §6.1 新增 6, §10) */
:is(#jill-deid-app, #jill-deid-portal) .known-limits { margin: .5rem 0 1rem; padding: .5rem .8rem; border: 1px solid #e0b252; border-radius: 6px; background: #fff8e6; color: #3d2e00; font-size: .9em; }
:is(#jill-deid-app, #jill-deid-portal) .known-limits summary { cursor: pointer; font-weight: 600; }
:is(#jill-deid-app, #jill-deid-portal) .known-limits ul { margin: .5rem 0 0; padding-left: 1.2rem; }
/* Accessibility (spec §9.4). Text contrast ≥ 4.5:1 on the tinted backgrounds (#eef3ff, the IBAN mark). */
:is(#jill-deid-app, #jill-deid-portal) { --muted: #5b6271; --primary: #2459d1; }
:is(#jill-deid-app, #jill-deid-portal) .badge-IBAN { color: #1f2937; }
/* Targets ≥ 44×44 px; a checkbox or radio counts with its label. The 🔗 in running text is exempt (WCAG 2.5.8 inline). */
:is(#jill-deid-app, #jill-deid-portal) :is(.tab, .sheet-tab, .btn, .menu-item, .file-item-remove, .select, .input, summary, .rule-toggle, span[tabindex="0"]) { min-height: 44px; box-sizing: border-box; }
:is(#jill-deid-app, #jill-deid-portal) :is(.btn, .file-item-remove, .rule-toggle) { min-width: 44px; }
:is(#jill-deid-app, #jill-deid-portal) label:has(> input[type=checkbox], > input[type=radio]) { min-height: 44px; display: inline-flex; align-items: center; }
:is(#jill-deid-app, #jill-deid-portal) :is(.btn, summary.btn) { display: inline-flex; align-items: center; }
:is(#jill-deid-app, #jill-deid-portal) .known-limits summary { padding-block: 12px; }
/* P1-15: 全部啟用 sits after <summary>, laid over the head row */
:is(#jill-deid-app, #jill-deid-portal) .rule-group { position: relative; }
:is(#jill-deid-app, #jill-deid-portal) .rule-group > .rule-group-head { padding-right: 8rem; }
:is(#jill-deid-app, #jill-deid-portal) .rule-group > .group-toggle-label { position: absolute; top: 0; right: .9rem; }
/* workspace headings are h4 (P1-15); keep upstream's h5 look */
:is(#jill-deid-app, #jill-deid-portal) :is(.file-panel-head, .preview-head, .sidebar) > h4 { font-size: 1rem; }
:is(#jill-deid-app, #jill-deid-portal) .preview-head > h4 { margin: 0; }
/* Keyboard focus (spec §9.4): xbootstrap5 reset.css has * { outline: 0 !important } */
:is(#jill-deid-app, #jill-deid-portal) :focus-visible { outline: 2px solid var(--primary) !important; outline-offset: 2px; }
/* P1-16: the name of an icon-only button, read by screen readers, not shown (spec §9.4) */
:is(#jill-deid-app, #jill-deid-portal) .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* xswatch5 (Cerulean) colours h1–h6 #2fa4e7, 2.6:1 on white: headings in the app use upstream's text colour (spec §9.4) */
:is(#jill-deid-app, #jill-deid-portal) :is(h4, h5, h6) { color: var(--text); }
