.tool [hidden] { display: none !important; }
.rx-pattern { display: flex; align-items: center; gap: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.1rem; color: var(--muted); }
.rx-pattern .input { flex: 1; min-width: 0; font-family: inherit; font-size: 1rem; color: var(--text); }
.rx-flags-view { min-width: 2ch; }
.rx-flags { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.rx-flags small { color: var(--muted); }
.rx-count { font-weight: 400; color: var(--muted); }
.rx-editor { position: relative; }
.rx-backdrop, .rx-text {
    font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px 12px; border: 1px solid transparent;
    white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; letter-spacing: 0; tab-size: 4;
}
.rx-backdrop { position: absolute; inset: 0; overflow: hidden; color: transparent; border-radius: 8px; pointer-events: none; }
.rx-text { position: relative; display: block; background: transparent; border-color: var(--border); min-height: 200px; overflow: hidden; resize: none; }
.rx-editor { background: var(--bg); border-radius: 8px; }
.rx-backdrop mark { color: transparent; background: rgba(59, 91, 219, .25); border-radius: 3px; box-shadow: 0 0 0 1px rgba(59, 91, 219, .45); }
.rx-backdrop mark.alt { background: rgba(240, 140, 0, .28); box-shadow: 0 0 0 1px rgba(240, 140, 0, .5); }
.rx-backdrop mark.empty { box-shadow: 1px 0 0 0 #d6336c; background: none; }
.rx-section { margin: 12px 0; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.rx-section summary { cursor: pointer; font-weight: 600; }
.rx-table-wrap { overflow-x: auto; max-height: 420px; overflow-y: auto; margin-top: 8px; }
.rx-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rx-table th, .rx-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.rx-table td code { white-space: pre-wrap; word-break: break-all; }
.rx-group { display: block; color: var(--muted); }
.rx-group b { color: var(--text); font-weight: 600; }
.rx-cheat { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; margin-top: 8px; }
.rx-cheat h4 { grid-column: 1 / -1; margin: 10px 0 2px; font-size: .9rem; }
.rx-cheat button { display: flex; gap: 10px; align-items: baseline; text-align: left; background: none; border: 0; padding: 3px 4px; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; border-radius: 6px; }
.rx-cheat button:hover, .rx-cheat button:focus-visible { background: var(--bg); }
.rx-cheat code { min-width: 64px; color: var(--accent); font-weight: 600; }
#replaced { max-height: 300px; overflow: auto; }
.rx-table td:nth-child(3) { min-width: 140px; }
