/* England-and-Rome / bishops registers (mu-plugin kemble-rome) */
.rm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 16px 0 12px; font-family: var(--font-ui); }
.rm-stats div { padding: 12px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: center; }
.rm-stats b { display: block; font-family: var(--font-serif); font-size: 24px; line-height: 1.1; color: var(--accent-strong); } .rm-stats span { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.5px; }
.rm-note, .rm-prov, .rm-nomatch, .rm-count, .rm-places { font-family: var(--font-ui); font-size: 13px; color: var(--ink-soft); max-width: none !important; }
.rm-prov { margin: 16px 0 0 !important; padding: 8px 12px; border-left: 3px solid var(--gold); background: #fbfaf6; }
.rm-places a { text-decoration: none; background-image: none; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; } .rm-places small { color: var(--ink-soft); font-weight: 400; }
.rm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 8px 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-family: var(--font-ui); }
.rm-filters label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); } .rm-filters .rm-q-in { flex: 1; min-width: 220px; } .rm-filters select, .rm-filters input[type=search] { font: inherit; font-size: 13.5px; font-weight: 400; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; } .rm-filters input[type=search] { flex: 1; }
.entry-content h3.rm-h { margin: 22px 0 10px; font-size: 18px; padding-left: 10px; border-left: 4px solid var(--gold); } .rm-h small { font-family: var(--font-ui); font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-left: 8px; }
.rm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; font-family: var(--font-ui); }
.rm-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-sm); opacity: 0; transform: translateY(12px); animation: rm-in 0.5s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 40ms); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s; }
@keyframes rm-in { to { opacity: 1; transform: none; } }
.rm-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.rm-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.rm-badge { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff; } .rm-n { font-size: 11.5px; color: var(--ink-soft); font-weight: 600; }
.rm-card h3, .rm-card h4 { margin: 0 0 4px !important; font-family: var(--font-serif); font-size: 16px; line-height: 1.3; }
.rm-ref { margin: 2px 0 0 !important; font-size: 12.5px; line-height: 1.45; color: var(--ink); max-width: none !important; } .rm-ref b { color: var(--ink-soft); font-weight: 600; margin-right: 4px; }
.entry-content .rm-s { display: inline-block; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff !important; font-size: 11px; font-weight: 700; text-decoration: none; background-image: none; line-height: 18px; vertical-align: middle; } .entry-content .rm-s:hover { background: var(--accent-strong); color: #fff !important; }
.rm-doubt { border-style: dashed; background: #fbfaf6; }
/* popes timeline */
.rm-axis { position: relative; height: 18px; margin: 10px 0 0; font-family: var(--font-ui); font-size: 11px; color: var(--ink-soft); } .rm-axis span { position: absolute; transform: translateX(-50%); }
.rm-tl { position: relative; height: 200px; margin: 0 0 16px; border-top: 1px solid var(--line); background: repeating-linear-gradient(90deg, transparent 0 calc(10.309% - 1px), var(--line) calc(10.309% - 1px) 10.309%); }
.rm-pope { position: absolute; min-width: 14px; height: 20px; border: 0; border-radius: 6px; padding: 0 4px; font: 700 10.5px/20px var(--font-ui); color: #fff; cursor: pointer; overflow: hidden; white-space: nowrap; opacity: 0; animation: rm-in 0.4s var(--ease) forwards; animation-delay: calc(var(--i) * 25ms); transition: transform 0.2s, filter 0.2s; } .rm-pope span { display: block; overflow: hidden; text-overflow: ellipsis; } .rm-pope:hover { transform: scaleY(1.15); filter: brightness(1.15); z-index: 2; }
.rm-c5, .rm-c6 { background: #1f3f5c; } .rm-c7 { background: #2f4d3a; } .rm-c8 { background: #8a6d1f; } .rm-c9 { background: #5c2a3c; } .rm-c10 { background: #4b6f8f; }
.rm-popecard.is-on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,0.35); }
.rm-popecard details summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--accent); } .rm-popecard ul { margin: 6px 0 0 !important; padding-left: 16px; font-size: 12.5px; line-height: 1.45; } .rm-popecard li { margin: 0 0 4px; } .rm-popecard li small { color: var(--ink-soft); }
/* visits */
.rm-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0 0 14px; font-family: var(--font-ui); }
.entry-content .rm-q { margin: 0; padding: 12px 16px; border: 0; border-left: 4px solid var(--gold); border-radius: 12px; background: var(--card); box-shadow: var(--shadow-sm); opacity: 0; animation: rm-in 0.6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 150ms); } .rm-q p { margin: 0 !important; font-family: var(--font-serif); font-style: italic; font-size: 15px; line-height: 1.45; max-width: none !important; }
.rm-timeline { position: relative; padding-left: 92px; font-family: var(--font-ui); } .rm-timeline::before { content: ""; position: absolute; left: 70px; top: 0; bottom: 0; width: 3px; background: var(--line); border-radius: 3px; }
.rm-visit { position: relative; margin: 0 0 12px; opacity: 0; transform: translateX(12px); animation: rm-slide 0.5s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 50ms); } @keyframes rm-slide { to { opacity: 1; transform: none; } }
.rm-year { position: absolute; left: -92px; top: 8px; width: 60px; text-align: right; } .rm-year b { font-family: var(--font-serif); font-size: 18px; color: var(--accent-strong); } .rm-visit::before { content: ""; position: absolute; left: -26px; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.rm-visit-body { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); transition: transform 0.3s var(--ease), box-shadow 0.3s; } .rm-visit:hover .rm-visit-body { transform: translateX(4px); box-shadow: var(--shadow-md); }
.rm-visit-text { margin: 0 0 6px !important; font-size: 14px; max-width: none !important; } .rm-chips { margin: 0 !important; display: flex; flex-wrap: wrap; gap: 5px; max-width: none !important; }
.rm-chip { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 11.5px; font-weight: 600; } .rm-chip-src { background: #eef2f6; color: var(--ink-soft); font-weight: 500; }
/* sees */
.rm-sees { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
details.rm-see { padding: 0; } details.rm-see[open] { grid-column: 1 / -1; }
.rm-see summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px; } .rm-see summary::-webkit-details-marker { display: none; }
.rm-see-n { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--font-serif); font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; flex: none; }
.rm-see-title { flex: 1; } .rm-see-title b { display: block; font-family: var(--font-serif); font-size: 17px; color: var(--accent-strong); } .rm-see-title small { font-size: 12px; color: var(--ink-soft); }
.rm-more { font-size: 12.5px; font-weight: 700; color: var(--accent); }
.rm-see-missing { border-style: dashed; background: #fbfaf6; } .rm-see-missing h4 { margin: 0 0 2px !important; }
.rm-see-body { padding: 0 14px 14px; animation: rm-open 0.4s var(--ease); } @keyframes rm-open { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0); } }
.rm-refs { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 10px !important; max-width: none !important; }
.rm-table-wrap { overflow-x: auto; } .rm-table { width: 100%; border-collapse: collapse; font-size: 13px; } .rm-table th { text-align: left; background: var(--ink); color: #fff; padding: 6px 9px; font-weight: 600; } .rm-table td { padding: 5px 9px; border-bottom: 1px solid var(--line); vertical-align: top; } .rm-bname { font-weight: 700; } .rm-noterow td { font-size: 12px; color: var(--ink-soft); background: #fbfaf6; font-style: italic; } .rm-table tr.is-hit td { background: #fff4d6; }
@media (prefers-reduced-motion: reduce) { .rm-card, .rm-visit, .rm-pope, .entry-content .rm-q { animation: none; opacity: 1; transform: none; } .rm-see-body { animation: none; } }

.rm-tip { position: absolute; z-index: 5; max-width: 220px; padding: 6px 10px; border-radius: 8px; background: #1e2732; color: #fff; font: 12px/1.4 var(--font-ui); box-shadow: var(--shadow-md); pointer-events: none; }

/* council drill-down */
.rm-gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 0 0 12px; font-family: var(--font-ui); }
.entry-content .rm-gcard { display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); text-decoration: none; background-image: none; color: var(--ink); position: relative; opacity: 0; transform: translateY(14px); animation: rm-in 0.5s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s; }
.entry-content .rm-gcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); color: var(--ink); }
.rm-gnum { position: absolute; right: 14px; top: 14px; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 20px; background: var(--accent); color: #fff; font-family: var(--font-serif); font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.rm-gtitle { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--accent-strong); line-height: 1.2; padding-right: 56px; }
.rm-gsub { font-size: 12.5px; color: var(--ink-soft); } .rm-gfacts { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; } .rm-gfacts b { color: var(--ink); }
.rm-gcta { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--accent); }
.rm-back { font-family: var(--font-ui); font-size: 13px; margin: 0 0 4px !important; max-width: none !important; } .rm-back a { font-weight: 700; text-decoration: none; }
.rm-panel.is-search .rm-back { display: none; }

/* visits as cards */
.rm-visit .rm-visit-text { margin: 4px 0 6px !important; font-size: 14px; line-height: 1.5; }
.rm-places a.is-on { background: var(--accent); color: #fff; } .rm-places a.is-on small { color: rgba(255,255,255,.8); }

.entry-content .rm-gcard-empty { border-style: dashed; background: #fbfaf6; } .rm-gcard-empty .rm-gnum { background: #d9d2bd; }
/* The hidden attribute must beat the display:grid/flex of these boxes (UA display:none loses to author rules). */
.rm-gcards[hidden], .rm-panel[hidden], .rm-gcard[hidden], .lk-card[hidden], .lk-grid[hidden], .rm-card[hidden], .rm-visit[hidden], .rm-council[hidden], .rm-see[hidden], .sw-card[hidden] { display: none !important; }
