.dtip { position: relative; border: 1px solid var(--border, #e2e8f0); border-radius: .5rem; overflow: hidden; background: #fff; }
.dtip svg { display: block; width: 100%; height: auto; }
.dtip .mono { font-family: Menlo, Consolas, monospace; }
.dtip .sans { font-family: Inter, "Helvetica Neue", Arial, sans-serif; }
.dtip [data-tip] { cursor: pointer; outline: none; }
.dtip [data-tip] .dtip-box { transition: fill .15s, stroke-width .15s, filter .15s; }
.dtip [data-tip]:hover .dtip-box,
.dtip [data-tip]:focus .dtip-box,
.dtip [data-tip].is-on .dtip-box { stroke-width: 5; filter: drop-shadow(0 2px 6px rgba(15, 23, 42, .18)); }
.dtip [data-tip] .dtip-fill { fill: transparent; transition: fill .15s; }
.dtip [data-tip]:hover .dtip-fill,
.dtip [data-tip]:focus .dtip-fill,
.dtip [data-tip].is-on .dtip-fill { fill: rgba(37, 99, 235, .12); }
.dtip .dtip-edge { transition: stroke .15s, stroke-width .15s; }
.dtip .dtip-edge.is-hl { stroke: #0f172a; stroke-width: 4; }
.dtip[hidden] { display: none; }
.dtip-tabs { display: inline-flex; gap: .25rem; padding: .25rem; border: 1px solid var(--border, #e2e8f0); border-radius: .5rem; background: #f8fafc; align-self: flex-start; }
.dtip-tabs button { font-size: .8125rem; font-weight: 500; padding: .35rem .75rem; border-radius: .375rem; color: #475569; background: transparent; cursor: pointer; }
.dtip-tabs button[aria-selected="true"] { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.dtip-hint { font-size: .75rem; color: var(--muted-foreground, #64748b); }

.dtip-tip { position: fixed; z-index: 1000; max-width: min(400px, calc(100vw - 16px)); background: #0f172a; color: #e2e8f0; border-radius: .5rem; padding: .6rem .75rem; font-size: 12px; line-height: 1.45; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); pointer-events: none; }
.dtip-tip-title { font-weight: 600; color: #fff; margin-bottom: .35rem; }
.dtip-tip-body { margin: 0; white-space: pre-wrap; font-family: Menlo, Consolas, monospace; font-size: 11px; color: #bfdbfe; }
.dtip-tip-note { margin-top: .4rem; color: #94a3b8; }
.dtip-tip-note:empty { display: none; }
.term-scale{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem .9rem;font-size:.75rem;color:var(--color-muted-foreground,#64748b)}
.term-scale .term-bar{display:inline-block;width:7rem;height:.45rem;border-radius:999px;background:linear-gradient(90deg,#334155,#2563eb,#0d9488,#16a34a)}
.term-groups{display:flex;flex-direction:column;gap:.45rem}
.term-row{display:flex;flex-wrap:wrap;gap:.35rem}
.term-tag{display:inline-flex;align-items:center;gap:.3rem;padding:.12rem .55rem;border-radius:999px;border:1px solid;font-size:.75rem;line-height:1.35;white-space:nowrap}
.term-tag::before{content:"";width:.4rem;height:.4rem;border-radius:999px;background:currentColor}
.term-eng{color:#334155;background:#f1f5f9;border-color:#cbd5e1}
.term-mt{color:#1d4ed8;background:#dbeafe;border-color:#93c5fd}
.term-lc{color:#0f766e;background:#ccfbf1;border-color:#5eead4}
.term-mkt{color:#15803d;background:#dcfce7;border-color:#86efac}
.dark .term-eng{color:#cbd5e1;background:#1e293b;border-color:#475569}
.dark .term-mt{color:#93c5fd;background:#172554;border-color:#1d4ed8}
.dark .term-lc{color:#5eead4;background:#042f2e;border-color:#0f766e}
.dark .term-mkt{color:#86efac;background:#052e16;border-color:#15803d}
.term-priv{color:#7e22ce;background:#f3e8ff;border-color:#d8b4fe}
.chg-ok{color:#15803d;background:#dcfce7;border-color:#86efac}
.chg-review{color:#b45309;background:#fef3c7;border-color:#fcd34d}
.chg-break{color:#b91c1c;background:#fee2e2;border-color:#fca5a5}
.dark .term-priv{color:#d8b4fe;background:#3b0764;border-color:#7e22ce}
.dark .chg-ok{color:#86efac;background:#052e16;border-color:#15803d}
.dark .chg-review{color:#fcd34d;background:#451a03;border-color:#b45309}
.dark .chg-break{color:#fca5a5;background:#450a0a;border-color:#b91c1c}
