/*
 * Shared styling for the case / legislation popover and the links that open it.
 *
 * One file, two consumers: index.html (the SPA, which also serves the seven
 * generated route pages) and case-popover.js (cold static article pages, which
 * do not load content.js). It used to be declared twice, inline in each, which
 * meant the two could drift apart silently. scripts/lint-popover.js fails the
 * build if either consumer starts declaring these rules again.
 *
 * Cold pages define no design tokens, so every var() carries a real fallback.
 */

/* The popover shell */
.lg-pop { position: absolute; z-index: 9999; width: min(560px, calc(100vw - 32px));
          background: #fff; border: 1px solid #d8d8d8; border-radius: 6px;
          box-shadow: 0 8px 28px rgba(0,0,0,.18); font-size: .92rem; line-height: 1.5; }
.lg-pop-head { padding: 10px 14px; border-bottom: 1px solid #eee; background: #fafafa;
               border-radius: 6px 6px 0 0; display: flex; justify-content: space-between;
               align-items: baseline; gap: 12px; }
.lg-pop-title { font-weight: 600; color: #111; }
.lg-pop-close { border: 0; background: none; font-size: 1.15rem; line-height: 1; cursor: pointer;
                color: #888; padding: 0 2px; }
.lg-pop-close:hover { color: #111; }
.lg-pop-body { padding: 12px 16px; max-height: 46vh; overflow-y: auto; color: #222; }
.lg-pop-body .lg-t { margin: 0 0 .5em; }
.lg-pop-body .lg-p { margin: 0 0 .45em; }
.lg-pop-body .lg-n { font-weight: 600; color: #444; }
.lg-pop-foot { padding: 8px 14px; border-top: 1px solid #eee; background: #fafafa;
               border-radius: 0 0 6px 6px; font-size: .74rem; color: #777;
               display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.lg-pop-foot a { color: #1a73e8; text-decoration: none; white-space: nowrap; }
.lg-pop-msg { padding: 16px; color: #666; font-style: italic; }

/* Popover contents */
.lg-pop-sum { margin: 0; color: #333; }
.lg-pop-meta { margin: 0 0 .55em; font-family: var(--font-mono, ui-monospace, Menlo, monospace);
               font-size: .78rem; color: #777; }
.lg-pop-quote { font-family: var(--font-serif, Georgia, 'Times New Roman', serif);
                font-size: 1.02rem; line-height: 1.62; font-style: italic; color: #221c2b;
                margin: 0; padding-left: 0.85rem; border-left: 3px solid #a855f7; }
.lg-pop-strap { margin: 0.55rem 0 0 0.85rem;
                font-family: var(--font-mono, ui-monospace, Menlo, monospace);
                font-size: 0.74rem; letter-spacing: 0.02em; color: #6b5b7a; }
.lg-pop-licence { display: block; margin-top: 3px; font-size: 0.72rem; color: #8a8a8a; }
.lg-pop-licence a { color: #8a8a8a; text-decoration: underline; }

/* Any case in the dictionary: click for the entry, without leaving the page */
.case-ref { color: inherit; text-decoration: none; border-bottom: 1px dotted #9aa7b8;
            cursor: pointer; }
.case-ref:hover { background: #f2f6fb; border-bottom-color: #1a73e8; }

/* Cases carrying a curated passage are marked with it */
.case-quote { color: #6b21a8; text-decoration: none; border-bottom: 1px dotted #a855f7;
              cursor: pointer; }
.case-quote:hover { background: #faf5ff; }
.case-quote::after { content: '\201C\201D'; font-size: 0.7em; margin-left: 1px;
                     letter-spacing: -0.15em; vertical-align: super; opacity: 0.65; }
