.relational-intro { margin: 0 0 28px; padding: clamp(14px, 2vw, 26px); border: 1px solid #d3d6d5; background: #fffefa; color: #252b30; font: 16px/1.55 "Segoe UI", Arial, sans-serif; min-width: 0; }
.ri-head p { margin: 0 0 6px; font-size: 13px; color: #646962; }
.ri-head h3 { margin: 0 0 18px; font: 400 clamp(23px, 3vw, 32px)/1.25 Georgia, serif; }
.ri-question { max-width: 760px; padding-block: 12px 24px; }
.ri-purpose { margin-bottom: 18px; }
.ri-table { min-width: 0; background: #fffefa; }
.ri-table h4 { margin: 12px 0 8px; font-size: 16px; }
.ri-scroll { overflow-x: auto; max-width: 100%; border: 1px solid #d3d6d5; }
.ri-table table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.4; }
.ri-table th, .ri-table td { padding: 10px 8px; border: 1px solid #dce0df; text-align: left; vertical-align: middle; }
.ri-table th { background: #f0f1ec; font-weight: 600; }
.ri-table td { min-width: 62px; }
.ri-empty { height: 110px; text-align: center !important; color: #646962; }
.ri-repeat-store, .ri-store-hit { background: #e8f1f5; }
.ri-repeat-supplier, .ri-supplier-hit { background: #f5ede2; }
.ri-store { color: #24566f; }
.ri-supplier { color: #845726; }
.ri-new { animation: ri-appear .4s ease-out; }
.ri-notes { border-left: 2px solid #929b9c; padding-left: 14px; margin-block: 18px; }
.ri-notes p { margin: 8px 0; }
.ri-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ri-controls button, .ri-key, .ri-date { font: inherit; cursor: pointer; border-radius: 3px; }
.ri-controls button { min-height: 44px; padding: 9px 15px; color: #244f66; border: 1px solid #aab5b9; background: #fffefa; }
.ri-controls button:disabled { opacity: .45; cursor: default; }
.ri-controls button:not(:disabled):hover { background: #edf2f1; }
.relational-intro button:focus-visible, .ri-scroll:focus-visible { outline: 2px solid #244f66; outline-offset: 3px; }
.ri-key, .ri-date { min-height: 36px; min-width: 40px; padding: 5px; border: 1px solid currentColor; background: transparent; }
.ri-date { border-color: transparent; color: inherit; text-decoration: underline; }
.ri-selected { background: #f1f3ed; }
.ri-selected td { border-block-color: #778686; }
.ri-relations { position: relative; padding: 0 14px; max-width: 980px; margin-inline: auto; }
.ri-relations .ri-table table { font-size: 12px; line-height: 1.35; }
.ri-relations .ri-table th, .ri-relations .ri-table td { padding: 7px 6px; }
.ri-relations .ri-table td { min-width: 54px; }
.ri-relations .ri-table h4 { font-size: 15px; margin: 10px 0 6px; }
.ri-relations .ri-key, .ri-relations .ri-date { min-height: 32px; min-width: 36px; padding: 4px; }
.ri-reference-tables { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-top: 28px; }
.ri-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ri-links path { fill: none; stroke-width: 1.5; stroke-dasharray: 5 3; }
.ri-link-store { stroke: #24566f; fill: #24566f; }
.ri-link-supplier { stroke: #845726; fill: #845726; }
.ri-connection { padding: 10px 0; border-bottom: 1px solid #d3d6d5; }
@media (max-width: 760px) { .ri-reference-tables { grid-template-columns: 1fr; gap: 20px; } .ri-table table { min-width: 450px; } .ri-relations { padding-inline: 6px; } }
@media (prefers-reduced-motion: reduce) { .ri-new { animation: none; } }
@keyframes ri-appear { from { opacity: .25; } to { opacity: 1; } }
