/* Rojama components — load after tokens.css */
/* Fonts: you can instead put the <link> tags from SETUP.md in your <head> (faster). */

body { margin: 0; font-family: var(--font-sans); font-size: 14px; line-height: 20px; background: var(--canvas); color: var(--ink); -webkit-font-smoothing: antialiased; }
.rj-icon { width: var(--icon-sm); height: var(--icon-sm); flex: none; }
.rj-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-5); }
.rj-stack { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); }

/* focus — one rule for every control */
.rj-btn:focus-visible, .rj-input:focus-visible, .rj-check input:focus-visible + .rj-check-mark, .rj-switch:focus-visible .rj-switch-track, .rj-tab:focus-visible, .rj-tabpanel:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Button */
.rj-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font: inherit; font-size: 13px; line-height: 18px; font-weight: 500; height: var(--control-md); padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background-color .12s, border-color .12s; }
.rj-btn-sm { height: var(--control-sm); padding: 0 var(--space-3); }
.rj-btn-lg { height: var(--control-lg); padding: 0 var(--space-5); font-size: 14px; }
.rj-btn-primary { background: var(--accent); color: var(--on-accent); }
.rj-btn-primary:hover { background: var(--accent-hover); }
.rj-btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.rj-btn-secondary:hover { background: var(--surface-hover); }
.rj-btn-quiet { background: transparent; color: var(--ink); }
.rj-btn-quiet:hover { background: var(--surface-hover); }
.rj-btn-danger { background: var(--negative); color: var(--on-negative); }
.rj-btn-danger:hover { filter: brightness(.92); }
.rj-btn-highlight { background: var(--spark); color: var(--on-spark); font-weight: 600; }
.rj-btn-highlight:hover { filter: brightness(.94); }
.rj-btn:disabled { opacity: .45; cursor: not-allowed; }
.rj-btn:disabled:hover { filter: none; }
.rj-btn-primary:disabled:hover { background: var(--accent); }
.rj-btn-secondary:disabled:hover { background: var(--surface); }
.rj-btn-quiet:disabled:hover { background: transparent; }

/* TextField */
.rj-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rj-field-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink); }
.rj-input { font: inherit; font-size: 14px; height: var(--control-md); padding: 0 var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); box-sizing: border-box; width: 100%; }
.rj-input::placeholder { color: var(--ink-subtle); }
.rj-input:hover { border-color: var(--ink-muted); }
.rj-input:disabled { opacity: .45; cursor: not-allowed; }
.rj-field-help { display: flex; gap: var(--space-1); align-items: center; margin: 0; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.rj-field.is-invalid .rj-input { border-color: var(--negative); }
.rj-field.is-invalid .rj-field-help { color: var(--negative); }

/* Checkbox */
.rj-check { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; color: var(--ink); }
.rj-check.is-disabled { opacity: .45; cursor: not-allowed; }
.rj-check-box { position: relative; width: 18px; height: 18px; flex: none; }
.rj-check input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: inherit; }
.rj-check-mark { position: absolute; inset: 0; width: 18px; height: 18px; box-sizing: border-box; padding: 2px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: transparent; pointer-events: none; }
.rj-check input:checked + .rj-check-mark { background: var(--indicator); border-color: var(--indicator); color: var(--on-indicator); }

/* Switch */
.rj-switch { display: inline-flex; align-items: center; gap: var(--space-2); font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; }
.rj-switch:disabled { opacity: .45; cursor: not-allowed; }
.rj-switch-track { position: relative; width: 36px; height: 20px; border-radius: var(--radius-full); background: var(--surface-sunken); border: 1px solid var(--border-strong); box-sizing: border-box; transition: background-color .15s; }
.rj-switch-thumb { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: var(--radius-full); background: var(--ink-muted); transition: transform .15s, background-color .15s; }
.rj-switch[aria-checked="true"] .rj-switch-track { background: var(--indicator); border-color: var(--indicator); }
.rj-switch[aria-checked="true"] .rj-switch-thumb { transform: translateX(16px); background: var(--on-indicator); }

/* Badge */
.rj-badge { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 12px; line-height: 16px; font-weight: 500; padding: 2px var(--space-2); border-radius: var(--radius-sm); }
.rj-badge-neutral { background: var(--surface-sunken); color: var(--ink-muted); }
.rj-badge-accent { background: var(--accent-soft); color: var(--accent); }
.rj-badge-info { background: var(--info-soft); color: var(--info); }
.rj-badge-highlight { background: var(--spark); color: var(--on-spark); }
.rj-badge-positive { background: var(--positive-soft); color: var(--positive); }
.rj-badge-notice { background: var(--notice-soft); color: var(--notice); }
.rj-badge-negative { background: var(--negative-soft); color: var(--negative); }

/* Alert */
.rj-alert { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); color: var(--ink); }
.rj-alert > .rj-icon { margin-top: 2px; }
.rj-alert-body { flex: 1; min-width: 0; }
.rj-alert-title { margin: 0; font-weight: 600; }
.rj-alert-text { color: var(--ink); }
.rj-alert-title + .rj-alert-text { margin-top: 2px; }
.rj-alert-action { margin-top: var(--space-3); }
.rj-alert-info { background: var(--info-soft); } .rj-alert-info > .rj-icon { color: var(--info); }
.rj-alert-positive { background: var(--positive-soft); } .rj-alert-positive > .rj-icon { color: var(--positive); }
.rj-alert-notice { background: var(--notice-soft); } .rj-alert-notice > .rj-icon { color: var(--notice); }
.rj-alert-negative { background: var(--negative-soft); } .rj-alert-negative > .rj-icon { color: var(--negative); }

/* Card */
.rj-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.rj-card.is-elevated { border-color: transparent; box-shadow: var(--shadow-md); }
.rj-card-head { padding: var(--space-5) var(--space-6) 0; }
.rj-card-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; letter-spacing: -0.005em; }
.rj-card-desc { margin: var(--space-1) 0 0; color: var(--ink-muted); }
.rj-card-body { flex: 1; padding: var(--space-4) var(--space-6) var(--space-6); }
.rj-card-foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border); background: var(--canvas); }

/* Tabs */
.rj-tablist { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border); }
.rj-tab { position: relative; font: inherit; font-size: 13px; font-weight: 500; height: var(--control-md); padding: 0 var(--space-3); background: none; border: 0; border-radius: var(--radius-md) var(--radius-md) 0 0; color: var(--ink-muted); cursor: pointer; }
.rj-tab:hover { color: var(--ink); background: var(--surface-hover); }
.rj-tab[aria-selected="true"] { color: var(--ink); }
.rj-tab[aria-selected="true"]::after { content: ""; position: absolute; left: var(--space-2); right: var(--space-2); bottom: -1px; height: 2px; border-radius: 2px; background: var(--indicator); }
.rj-tabpanel { padding: var(--space-4) 0; color: var(--ink-muted); }
.rj-card-head:last-child { padding-bottom: var(--space-5); }

/* Utilities */
.rj-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Button — loading */
.rj-btn.is-loading { cursor: progress; }
.rj-btn.is-loading .rj-spinner { margin-left: calc(var(--space-1) * -1); }

/* Spinner */
.rj-spinner { display: inline-flex; flex: none; color: inherit; }
.rj-spinner svg { width: 100%; height: 100%; animation: rj-spin .8s linear infinite; }
.rj-spinner-sm { width: var(--icon-sm); height: var(--icon-sm); }
.rj-spinner-md { width: 24px; height: 24px; color: var(--indicator); }
.rj-spinner-lg { width: 32px; height: 32px; color: var(--indicator); }
.rj-spinner circle { fill: none; stroke-width: 2.5; }
.rj-spinner-track { stroke: currentColor; opacity: .2; }
.rj-spinner-arc { stroke: currentColor; stroke-linecap: round; stroke-dasharray: 60; stroke-dashoffset: 42; }
@keyframes rj-spin { to { transform: rotate(360deg); } }

/* ProgressBar */
.rj-progress { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.rj-progress-head { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 13px; line-height: 18px; }
.rj-progress-label { font-weight: 500; color: var(--ink); }
.rj-progress-value { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.rj-progress-track { position: relative; height: 8px; border-radius: var(--radius-full); background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.rj-progress-sm .rj-progress-track { height: 4px; }
.rj-progress-fill { height: 100%; border-radius: inherit; background: var(--indicator); transition: width .3s ease-out; }
.rj-progress-positive .rj-progress-fill { background: var(--positive); }
.rj-progress-negative .rj-progress-fill { background: var(--negative); }
.rj-progress.is-indeterminate .rj-progress-fill { position: absolute; top: 0; left: 0; width: 35%; animation: rj-indeterminate 1.4s ease-in-out infinite; }
@keyframes rj-indeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
.rj-progress-help { margin: 0; font-size: 12px; line-height: 16px; color: var(--ink-muted); }

/* Skeleton */
.rj-skeleton { display: block; background: var(--surface-sunken); border-radius: var(--radius-sm); position: relative; overflow: hidden; }
.rj-skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--surface-hover), transparent); transform: translateX(-100%); animation: rj-shimmer 1.6s ease-in-out infinite; }
.rj-skeleton-text { height: 12px; margin: 4px 0; }
.rj-skeleton-rect { height: 120px; border-radius: var(--radius-lg); }
.rj-skeleton-circle { width: 40px; height: 40px; border-radius: var(--radius-full); }
.rj-skeleton-lines { display: flex; flex-direction: column; gap: var(--space-2); }
@keyframes rj-shimmer { to { transform: translateX(100%); } }

/* Reduced motion: keep feedback, drop the movement */
@media (prefers-reduced-motion: reduce) {
  .rj-spinner svg { animation-duration: 2.4s; }
  .rj-progress.is-indeterminate .rj-progress-fill { animation: rj-pulse 2s ease-in-out infinite; width: 100%; transform: none; }
  .rj-skeleton::after { animation: none; display: none; }
  .rj-progress-fill { transition: none; }
}
@keyframes rj-pulse { 50% { opacity: .35; } }

/* ===== Shared ===== */
.rj-link { color: var(--link); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; border-radius: 2px; }
.rj-link:hover { text-decoration-thickness: 2px; }
.rj-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
[hidden].rj-dialog-layer, [hidden].rj-menu-list, [hidden].rj-site-mobile, [hidden].rj-tabpanel { display: none !important; }
.rj-container { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-10); box-sizing: border-box; }
@media (max-width: 640px) { .rj-container { padding: 0 var(--space-4); } }
.rj-icon-more { stroke-width: 3; }
.rj-icon-md { width: var(--icon-md); height: var(--icon-md); }
.rj-icon-btn { display: inline-grid; place-items: center; width: var(--control-md); height: var(--control-md); padding: 0; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-muted); cursor: pointer; }
.rj-icon-btn:hover { background: var(--surface-hover); color: var(--ink); }
.rj-icon-btn-sm { width: var(--control-sm); height: var(--control-sm); }
.rj-icon-btn:focus-visible, .rj-th-sort:focus-visible, .rj-menu-item:focus-visible, .rj-radio input:focus-visible + .rj-radio-dot, .rj-site-footer a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ===== Select / Textarea ===== */
.rj-select { position: relative; }
.rj-select-input { appearance: none; -webkit-appearance: none; padding-right: var(--space-10); cursor: pointer; }
.rj-select-chevron { position: absolute; right: var(--space-3); top: 50%; transform: translateY(-50%); color: var(--ink-muted); pointer-events: none; }
.rj-textarea { height: auto; min-height: 88px; padding: var(--space-2) var(--space-3); line-height: 20px; resize: vertical; }

/* ===== RadioGroup ===== */
.rj-radio-group { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.rj-radio-group > legend { padding: 0; margin-bottom: var(--space-2); }
.rj-radio-options { display: flex; flex-direction: column; gap: var(--space-3); }
.rj-radio-group.is-inline .rj-radio-options { flex-direction: row; flex-wrap: wrap; gap: var(--space-5); }
.rj-radio { position: relative; display: inline-flex; align-items: flex-start; gap: var(--space-2); cursor: pointer; color: var(--ink); }
.rj-radio.is-disabled { opacity: .45; cursor: not-allowed; }
.rj-radio input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; cursor: inherit; }
.rj-radio-dot { flex: none; width: 18px; height: 18px; margin-top: 1px; box-sizing: border-box; border-radius: var(--radius-full); border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; }
.rj-radio-dot::after { content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--on-indicator); transform: scale(0); transition: transform .12s; }
.rj-radio input:checked + .rj-radio-dot { background: var(--indicator); border-color: var(--indicator); }
.rj-radio input:checked + .rj-radio-dot::after { transform: scale(1); }
.rj-radio-text { display: flex; flex-direction: column; }
.rj-radio-desc { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.rj-radio-group.is-invalid .rj-field-help { color: var(--negative); }

/* ===== Table ===== */
.rj-table-wrap { box-sizing: border-box; width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.rj-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.rj-table th { position: sticky; top: 0; z-index: 1; background: var(--surface-sunken); text-align: left; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border); white-space: nowrap; }
.rj-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); color: var(--ink); vertical-align: middle; }
.rj-table.is-compact td { padding: 6px var(--space-3); }
.rj-table.is-compact th { padding: 6px var(--space-3); }
.rj-table tbody tr:last-child td { border-bottom: 0; }
.rj-table tbody tr:hover td { background: var(--surface-hover); }
.rj-table tbody tr.is-clickable { cursor: pointer; }
.rj-table .is-end { text-align: right; }
.rj-table td.rj-table-empty { padding: 0; }
.rj-table tbody tr:hover td.rj-table-empty { background: transparent; }
.rj-th-sort { display: inline-flex; align-items: center; gap: var(--space-1); font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; border-radius: var(--radius-sm); }
.rj-th-sort:hover, .rj-th-sort.is-active { color: var(--ink); }
.rj-th-arrow { opacity: 0; width: 14px; height: 14px; }
.rj-th-sort:hover .rj-th-arrow, .rj-th-sort.is-active .rj-th-arrow { opacity: 1; }

/* ===== EmptyState ===== */
.rj-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--space-12) var(--space-6); }
.rj-empty.is-compact { padding: var(--space-8) var(--space-4); }
.rj-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-full); background: var(--surface-sunken); color: var(--ink-muted); margin-bottom: var(--space-4); }
.rj-empty-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink); }
.rj-empty-desc { margin: var(--space-1) 0 0; max-width: 360px; color: var(--ink-muted); }
.rj-empty-actions { display: flex; gap: var(--space-2); margin-top: var(--space-5); flex-wrap: wrap; justify-content: center; }

/* ===== Dialog ===== */
.rj-dialog-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--space-4); }
.rj-scrim { position: absolute; inset: 0; background: var(--scrim); }
.rj-dialog { position: relative; width: 100%; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.rj-dialog-sm { max-width: 400px; } .rj-dialog-md { max-width: 520px; } .rj-dialog-lg { max-width: 720px; }
.rj-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) var(--space-6) 0; }
.rj-dialog-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; letter-spacing: -0.005em; }
.rj-dialog-head .rj-icon-btn { margin: -6px -8px 0 0; }
.rj-dialog-desc { margin: var(--space-1) var(--space-6) 0; color: var(--ink-muted); }
.rj-dialog-body { padding: var(--space-4) var(--space-6) 0; }
.rj-dialog-foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-6); }

/* ===== Menu ===== */
.rj-menu { position: relative; display: inline-block; }
.rj-menu-list { position: absolute; top: calc(100% + 4px); z-index: 50; min-width: 200px; padding: var(--space-1); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.rj-menu.is-end .rj-menu-list { right: 0; } .rj-menu.is-start .rj-menu-list { left: 0; }
.rj-menu-item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); width: 100%; font: inherit; font-size: 14px; text-align: left; padding: 0 var(--space-3); height: 32px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); cursor: pointer; }
.rj-menu-item:hover, .rj-menu-item:focus { background: var(--surface-hover); }
.rj-menu-item:focus-visible { outline-offset: -2px; }
.rj-menu-item.is-danger { color: var(--negative); }
.rj-menu-item[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.rj-menu-kbd { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.rj-menu-sep { height: 1px; margin: var(--space-1) 0; background: var(--border); }

/* ===== Tooltip ===== */
.rj-tooltip-wrap { position: relative; display: inline-flex; }
.rj-tooltip { position: absolute; z-index: 60; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); max-width: 240px; width: max-content; padding: 4px var(--space-2); border-radius: var(--radius-sm); background: var(--ink); color: var(--surface); font-size: 12px; line-height: 16px; pointer-events: none; display: none; }
.rj-tooltip-wrap.is-bottom .rj-tooltip { bottom: auto; top: calc(100% + 6px); }
.rj-tooltip.is-open { display: block; }

/* ===== Toast ===== */
.rj-toast-region { position: fixed; z-index: 120; right: var(--space-6); bottom: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); width: min(380px, calc(100vw - 32px)); }
@media (max-width: 640px) { .rj-toast-region { right: var(--space-4); bottom: var(--space-4); } }
.rj-toast { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.rj-toast > .rj-icon { margin-top: 2px; }
.rj-toast-info > .rj-icon { color: var(--info); } .rj-toast-positive > .rj-icon { color: var(--positive); }
.rj-toast-notice > .rj-icon { color: var(--notice); } .rj-toast-negative > .rj-icon { color: var(--negative); }
.rj-toast-body { flex: 1; min-width: 0; }
.rj-toast-title { margin: 0; font-weight: 600; }
.rj-toast-text { color: var(--ink-muted); }
.rj-toast-action { align-self: center; }
.rj-toast .rj-icon-btn { margin: -2px 0 0; }

/* ===== Site header ===== */
.rj-site-header { background: var(--brand); color: var(--on-brand); border-bottom: 2px solid var(--spark); }
.rj-site-header-row { display: flex; align-items: center; gap: var(--space-6); height: 64px; }
.rj-brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--on-brand); text-decoration: none; font-weight: 600; font-size: 18px; line-height: 24px; }
.rj-brand svg, .rj-brand img { height: 28px; width: auto; color: var(--spark); }
.rj-brand-ink { color: var(--ink); }
.rj-brand-ink svg { color: var(--ink); }
.rj-site-nav { display: flex; gap: var(--space-1); margin-left: auto; }
.rj-site-link { color: var(--on-brand-muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); }
.rj-site-link:hover { color: var(--on-brand); background: rgba(255, 255, 255, .08); }
.rj-site-link[aria-current="page"] { color: var(--on-brand); box-shadow: inset 0 -2px 0 var(--spark); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.rj-site-actions { display: flex; gap: var(--space-2); }
.rj-site-header .rj-icon-btn { color: var(--on-brand); }
.rj-site-header .rj-icon-btn:hover { background: rgba(255, 255, 255, .08); }
.rj-site-header :focus-visible, .rj-hero-brand :focus-visible, .rj-on-brand :focus-visible { outline: 2px solid var(--on-brand) !important; outline-offset: 2px; }
.rj-site-toggle { display: none; margin-left: auto; }
.rj-site-mobile { display: none; }
@media (max-width: 760px) {
  .rj-site-nav, .rj-site-actions { display: none; }
  .rj-site-toggle { display: inline-grid; }
  .rj-site-mobile { display: flex; flex-direction: column; gap: var(--space-1); padding: 0 var(--space-4) var(--space-4); }
  .rj-site-mobile .rj-site-link { padding: var(--space-3); }
  .rj-site-mobile-actions { display: flex; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid rgba(255, 255, 255, .12); margin-top: var(--space-2); }
}

/* On navy: secondary buttons become outline-on-navy; the highlight (lime) button is the one main action */
.rj-site-header .rj-btn-secondary, .rj-hero-brand .rj-btn-secondary, .rj-on-brand .rj-btn-secondary { background: transparent; color: var(--on-brand); border-color: var(--brand-line); }
.rj-site-header .rj-btn-secondary:hover, .rj-hero-brand .rj-btn-secondary:hover, .rj-on-brand .rj-btn-secondary:hover { background: rgba(255, 255, 255, .08); }
.rj-site-header .rj-btn-quiet, .rj-hero-brand .rj-btn-quiet, .rj-on-brand .rj-btn-quiet { color: var(--on-brand); }
.rj-site-header .rj-btn-quiet:hover, .rj-hero-brand .rj-btn-quiet:hover, .rj-on-brand .rj-btn-quiet:hover { background: rgba(255, 255, 255, .08); }

/* ===== Hero ===== */
.rj-hero { padding: var(--space-16) 0; }
.rj-hero-plain { background: var(--canvas); color: var(--ink); }
.rj-hero-brand { background: var(--brand); color: var(--on-brand); }

.rj-hero-grid { display: grid; gap: var(--space-10); align-items: center; }
.rj-hero.has-media .rj-hero-grid { grid-template-columns: 1.1fr 1fr; }
@media (max-width: 860px) { .rj-hero.has-media .rj-hero-grid { grid-template-columns: 1fr; } .rj-hero { padding: var(--space-12) 0; } }
.rj-hero-copy { max-width: 640px; }
.rj-hero-eyebrow { margin-bottom: var(--space-4); }
.rj-hero-title { margin: 0; font-size: 40px; line-height: 48px; font-weight: 700; letter-spacing: -0.025em; }
@media (max-width: 640px) { .rj-hero-title { font-size: 30px; line-height: 38px; } }
.rj-hero-desc { margin: var(--space-4) 0 0; font-size: 16px; line-height: 24px; color: var(--ink-muted); max-width: 560px; }
.rj-hero-brand .rj-hero-desc { color: var(--on-brand-muted); }
.rj-hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.rj-hero-media { min-width: 0; }
.rj-hero-media > img, .rj-hero-media > video { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }

/* ===== Site footer ===== */
.rj-site-footer { border-top: 2px solid var(--spark); background: var(--canvas); color: var(--ink-muted); padding: var(--space-12) 0 var(--space-8); font-size: 14px; }
.rj-footer-grid { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.rj-footer-brand { flex: 2 1 240px; }
.rj-footer-col { flex: 1 1 140px; }
.rj-footer-brand p { margin: var(--space-3) 0 0; max-width: 280px; }
.rj-footer-heading { margin: 0 0 var(--space-3); font-size: 13px; font-weight: 600; color: var(--ink); }
.rj-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.rj-site-footer a { color: var(--ink-muted); text-decoration: none; border-radius: var(--radius-sm); }
.rj-site-footer a:hover { color: var(--ink); text-decoration: underline; }
.rj-footer-legal { margin-top: var(--space-10); padding-top: var(--space-5); border-top: 1px solid var(--border); font-size: 12px; line-height: 16px; }

@media (prefers-reduced-motion: reduce) { .rj-radio-dot::after { transition: none; } }

/* ===== Brand touches ===== */
/* Eyebrow: small uppercase label above a heading or section ("01 · WHY IT MATTERS"). Spark-ink on light, lime on dark and on brand chrome. */
.rj-eyebrow { display: block; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--spark-ink); }
.rj-site-header .rj-eyebrow, .rj-hero-brand .rj-eyebrow, .rj-on-brand .rj-eyebrow { color: var(--spark); }
/* Spark text: one to three words of emphasis inside a heading on brand chrome or in dark mode. */
.rj-spark-text { color: var(--spark-ink); }
.rj-hero-brand .rj-spark-text, .rj-on-brand .rj-spark-text { color: var(--spark); }
/* Brand band: any section on brand chrome (title bar, call-to-action band, newsletter header). */
.rj-on-brand { background: var(--brand); color: var(--on-brand); }
.rj-on-brand .rj-muted { color: var(--on-brand-muted); }
/* Featured card: a spark rule across the top, like the column rules of a newsletter. */
.rj-card.is-featured { border-top: 3px solid var(--spark); }
/* Spark rule: a short divider that marks the start of a section. */
.rj-spark-rule { display: block; width: 40px; height: 3px; border: 0; margin: 0 0 var(--space-4); border-radius: 2px; background: var(--spark); }

/* ===== Plain language: HelpTip and Slider ===== */
/* Label row: the label plus its HelpTip "?" button. */
.rj-field-label-row { display: flex; align-items: center; gap: var(--space-1); min-width: 0; }

/* HelpTip: a "?" button that opens a short explanation on click, tap or Enter. Works on touch, unlike Tooltip. */
.rj-helptip { position: relative; display: inline-flex; vertical-align: middle; }
.rj-helptip-btn { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--ink-muted); cursor: pointer; }
.rj-helptip-btn::before { content: ""; position: absolute; inset: -6px; } /* 32px touch target */
.rj-helptip-btn:hover, .rj-helptip-btn[aria-expanded="true"] { color: var(--ink); background: var(--surface-hover); }
.rj-helptip-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.rj-helptip-panel { position: absolute; z-index: 60; top: calc(100% + 6px); left: -8px; width: max-content; max-width: min(320px, calc(100vw - 32px)); padding: var(--space-3) var(--space-4); background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); font-size: 13px; line-height: 18px; font-weight: 400; text-align: left; white-space: normal; }
.rj-helptip.is-end .rj-helptip-panel { left: auto; right: -8px; }
.rj-helptip-title { margin: 0 0 var(--space-1); font-weight: 600; }
.rj-helptip-panel p { margin: 0; }
.rj-helptip-panel p + p { margin-top: var(--space-2); }
.rj-helptip-example { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--border); color: var(--ink-muted); }
@media (max-width: 640px) { .rj-field, .rj-slider { position: relative; } .rj-field .rj-helptip, .rj-slider .rj-helptip { position: static; } .rj-field .rj-helptip-panel, .rj-slider .rj-helptip-panel { top: 30px; left: 0; right: 0; width: auto; max-width: none; } } /* phones: inside a field, span the field */
[hidden].rj-helptip-panel, [hidden].rj-slider-reset, [hidden].rj-slider-rec { display: none !important; }

/* Slider: a range that says what it does. Ends named in words, a live line that says the result, a recommended mark and a reset. */
.rj-slider { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rj-slider-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-3); min-height: 28px; }
.rj-slider-readout { display: inline-flex; align-items: center; gap: var(--space-2); }
.rj-slider-value { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.rj-slider-rail { position: relative; --rj-pos: .5; --rj-rec: .5; }
.rj-slider-mark { position: absolute; top: 50%; left: calc(9px + (100% - 18px) * var(--rj-rec)); width: 2px; height: 16px; margin: -8px 0 0 -1px; border-radius: 1px; background: var(--ink-muted); pointer-events: none; }
.rj-slider-input { position: relative; -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer; }
.rj-slider-input::-webkit-slider-runnable-track { height: 6px; border-radius: var(--radius-full); background: linear-gradient(to right, var(--indicator) calc(9px + (100% - 18px) * var(--rj-pos)), var(--surface-sunken) 0); box-shadow: inset 0 0 0 1px var(--border-strong); }
.rj-slider-input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; box-sizing: border-box; border-radius: var(--radius-full); background: var(--surface); border: 2px solid var(--indicator); box-shadow: var(--shadow-sm); }
.rj-slider-input::-moz-range-track { height: 6px; border-radius: var(--radius-full); background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--border-strong); }
.rj-slider-input::-moz-range-progress { height: 6px; border-radius: var(--radius-full); background: var(--indicator); }
.rj-slider-input::-moz-range-thumb { width: 18px; height: 18px; box-sizing: border-box; border-radius: var(--radius-full); background: var(--surface); border: 2px solid var(--indicator); }
.rj-slider-input:focus-visible { outline: none; }
.rj-slider-input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.rj-slider-input:focus-visible::-moz-range-thumb { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.rj-slider-input:disabled { opacity: .45; cursor: not-allowed; }
.rj-slider-ends { display: flex; justify-content: space-between; gap: var(--space-4); font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.rj-slider-ends span:last-child { text-align: right; }
.rj-slider-desc { margin: var(--space-1) 0 0; font-size: 13px; line-height: 18px; color: var(--ink); }

/* ===== SettingsLayout ===== */
/* Sizes to its container, not the screen, so it works in a page, a large panel or a drawer. */
.rj-settings { container-type: inline-size; display: block; min-height: 0; }
.rj-settings-frame { display: grid; grid-template-columns: minmax(200px, 240px) minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.rj-settings-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.rj-settings-group { margin: var(--space-4) 0 var(--space-1); padding: 0 var(--space-3); font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-subtle); }
.rj-settings-group:first-child { margin-top: 0; }
.rj-settings-item { display: grid; grid-template-columns: var(--icon-sm) minmax(0, 1fr); align-items: center; column-gap: var(--space-3); width: 100%; min-height: var(--control-md); padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-muted); font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; text-align: left; cursor: pointer; }
.rj-settings-item:hover { background: var(--surface-hover); color: var(--ink); }
.rj-settings-item[aria-current="true"] { background: var(--surface-sunken); color: var(--ink); box-shadow: inset 2px 0 0 var(--indicator); }
.rj-settings-item:focus-visible, .rj-settings-back:focus-visible, .rj-settings-heading:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.rj-settings-item .rj-icon { width: var(--icon-sm); height: var(--icon-sm); }
.rj-settings-item-desc { display: none; grid-column: 2; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-subtle); }
.rj-settings-section { min-width: 0; }
.rj-settings-section[hidden] { display: none !important; }
.rj-settings-head { margin-bottom: var(--space-6); }
.rj-settings-heading { margin: 0; color: var(--ink); }
.rj-settings-desc { margin: var(--space-1) 0 0; color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.rj-settings-back { display: none; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-4); padding: 0 var(--space-2); height: var(--control-sm); border: 0; border-radius: var(--radius-md); background: transparent; color: var(--link); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.rj-settings-back:hover { background: var(--surface-hover); }
@container (max-width: 639px) {
  .rj-settings-frame { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rj-settings-nav { position: static; }
  .rj-settings-item { min-height: var(--control-lg); padding: var(--space-3); border-bottom: 1px solid var(--border); border-radius: 0; }
  .rj-settings-item[aria-current="true"] { background: transparent; box-shadow: none; }
  .rj-settings-item-desc { display: block; }
  .rj-settings-back { display: inline-flex; }
  .rj-settings[data-rj-view="list"] .rj-settings-section { display: none !important; }
  .rj-settings[data-rj-view="section"] .rj-settings-nav { display: none; }
}

/* ===== ThemeToggle: Light | Auto | Dark, a three-way slider. Auto (follow the device) is the default. ===== */
.rj-theme-toggle { --rj-i: 1; position: relative; isolation: isolate; display: inline-grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-full); background: var(--surface-sunken); vertical-align: middle; width: max-content; max-width: 100%; align-self: flex-start; box-sizing: border-box; }
.rj-theme-toggle[data-rj-value="light"] { --rj-i: 0; }
.rj-theme-toggle[data-rj-value="dark"] { --rj-i: 2; }
.rj-theme-toggle::before { content: ""; position: absolute; z-index: -1; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / 3); border-radius: var(--radius-full); background: var(--indicator); box-shadow: var(--shadow-sm); transform: translateX(calc(var(--rj-i) * 100%)); transition: transform .2s ease; }
.rj-theme-option { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); height: calc(var(--control-md) - 6px); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-full); background: transparent; color: var(--ink-muted); font: inherit; font-size: 13px; line-height: 18px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color .2s; }
.rj-theme-option:hover { color: var(--ink); }
.rj-theme-option[aria-checked="true"] { color: var(--on-indicator); }
.rj-theme-option:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.rj-theme-option .rj-icon { flex: none; width: var(--icon-sm); height: var(--icon-sm); }
/* Compact (icons only, for headers and toolbars): the word becomes a tooltip on hover and focus, and stays the button's name */
.rj-theme-toggle.is-compact .rj-theme-option { width: calc(var(--control-md) - 6px); padding: 0; }
.rj-theme-toggle.is-compact .rj-theme-option-label { position: absolute; z-index: 60; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; padding: 4px var(--space-2); border-radius: var(--radius-sm); background: var(--ink); color: var(--surface); font-size: 12px; line-height: 16px; font-weight: 400; pointer-events: none; opacity: 0; transition: opacity .12s; }
.rj-theme-toggle.is-compact .rj-theme-option:hover .rj-theme-option-label, .rj-theme-toggle.is-compact .rj-theme-option:focus-visible .rj-theme-option-label { opacity: 1; }
/* On brand chrome: brand-line outline, on-brand thumb with brand-coloured icon */
.rj-site-header .rj-theme-toggle, .rj-hero-brand .rj-theme-toggle, .rj-on-brand .rj-theme-toggle { background: transparent; border-color: var(--brand-line); }
.rj-site-header .rj-theme-toggle::before, .rj-hero-brand .rj-theme-toggle::before, .rj-on-brand .rj-theme-toggle::before { background: var(--on-brand); box-shadow: none; }
.rj-site-header .rj-theme-option, .rj-hero-brand .rj-theme-option, .rj-on-brand .rj-theme-option { color: var(--on-brand-muted); }
.rj-site-header .rj-theme-option:hover, .rj-hero-brand .rj-theme-option:hover, .rj-on-brand .rj-theme-option:hover { color: var(--on-brand); }
.rj-site-header .rj-theme-option[aria-checked="true"], .rj-hero-brand .rj-theme-option[aria-checked="true"], .rj-on-brand .rj-theme-option[aria-checked="true"] { color: var(--brand); }
@media (prefers-reduced-motion: reduce) { .rj-theme-toggle::before, .rj-theme-option, .rj-theme-option-label { transition: none !important; } }

/* ===== Catalogue and media patterns (Chip, FilterPopover, MediaCard, Shelf, PinPad, PlayerOverlay) ===== */
/* Chip */
.rj-chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.rj-chip-row.is-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: var(--space-1); }
.rj-chip { display: inline-flex; align-items: center; gap: var(--space-1); height: var(--control-sm); padding: 0 var(--space-3); font: inherit; font-size: 13px; line-height: 18px; font-weight: 500; white-space: nowrap; color: var(--ink); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-full); cursor: pointer; }
.rj-chip:hover { background: var(--surface-hover); }
.rj-chip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.rj-chip .rj-icon { width: var(--icon-sm); height: var(--icon-sm); }
.rj-chip.is-selected, .rj-chip[aria-pressed="true"] { background: var(--indicator); border-color: var(--indicator); color: var(--on-indicator); }
.rj-chip-count { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.rj-chip.is-selected .rj-chip-count, .rj-chip[aria-pressed="true"] .rj-chip-count { color: inherit; }
.rj-chip-remove { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: calc(var(--space-1) * -1); padding: 0; border: 0; border-radius: var(--radius-full); background: transparent; color: inherit; cursor: pointer; }
.rj-chip-remove:hover { background: var(--surface-hover); }
.rj-chip-layer { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); padding-left: var(--space-1); border-left: 1px solid var(--border); margin-left: var(--space-1); }
.rj-chip[data-layer="base"] { background: var(--surface-sunken); border-style: dashed; cursor: default; }
@media (pointer: coarse) { .rj-chip { height: var(--control-md); } }

/* FilterPopover */
.rj-filter-popover { z-index: 50; min-width: 240px; max-width: min(360px, calc(100vw - 32px)); max-height: min(70vh, 480px); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.rj-filter-popover-head { padding: var(--space-3) var(--space-3) var(--space-2); border-bottom: 1px solid var(--border); }
.rj-filter-popover-list { flex: 1; overflow: auto; padding: var(--space-2) var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.rj-filter-popover-group + .rj-filter-popover-group { margin-top: var(--space-3); }
.rj-filter-popover-group > .label { margin: 0 0 var(--space-2); color: var(--ink-muted); }
.rj-filter-popover-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-top: 1px solid var(--border); }
@media (max-width: 640px) { .rj-filter-popover { position: fixed; inset: auto 0 0 0; max-width: none; border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-lg); } }

/* MediaCard */
.rj-media-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.rj-media-card-open { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-2) var(--space-2) var(--space-3); border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rj-media-card-open:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; border-radius: var(--radius-lg); }
.rj-media-card-art { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-sunken); }
.rj-media-card.is-logo .rj-media-card-art { aspect-ratio: 16 / 9; }
.rj-media-card-art > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rj-media-card.is-logo .rj-media-card-art > img { object-fit: contain; padding: var(--space-4); }
.rj-media-card-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; line-height: 30px; font-weight: 700; color: var(--ink-muted); background: var(--surface-sunken); }
.rj-media-card-title { margin: var(--space-1) 0 0; font-size: 13px; line-height: 18px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rj-media-card-meta { font-size: 12px; line-height: 16px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rj-media-card-row { display: flex; align-items: flex-start; gap: var(--space-1); padding-right: var(--space-2); }
.rj-media-card-row > .rj-media-card-open { flex: 1; min-width: 0; }
.rj-media-card-fav { position: absolute; top: var(--space-3); right: var(--space-3); z-index: 1; }
.rj-media-card-play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .12s; pointer-events: none; }
.rj-media-card-play > span { display: grid; place-items: center; width: var(--control-lg); height: var(--control-lg); border-radius: var(--radius-full); background: var(--scrim); color: var(--on-brand); }
.rj-media-card:hover .rj-media-card-play, .rj-media-card-open:focus-visible .rj-media-card-play { opacity: 1; }
@media (hover: hover) { .rj-media-card .rj-media-card-more { opacity: 0; } .rj-media-card:hover .rj-media-card-more, .rj-media-card:focus-within .rj-media-card-more { opacity: 1; } }
.rj-media-card.is-leaving { opacity: 0; transform: scale(.96); transition: opacity .2s, transform .2s; }

/* Shelf */
.rj-shelf + .rj-shelf { margin-top: var(--space-8); }
.rj-shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-3); }
.rj-shelf-head > h2 { margin: 0; }
.rj-shelf-track { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: var(--space-3); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-2); }
.rj-shelf-track > * { scroll-snap-align: start; }

/* PinPad */
.rj-pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.rj-pinpad .rj-btn { height: var(--control-lg); font-size: 17px; font-variant-numeric: tabular-nums; }
.rj-pin-cells { display: flex; gap: var(--space-2); justify-content: center; }
.rj-pin-cell { width: var(--control-md); height: var(--control-lg); display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); }
.rj-pin-cell.is-filled::before { content: ""; width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--ink); }

/* PlayerOverlay. The video sits on --media-backdrop (black in both themes); overlay text, icons and focus use on-brand tokens, and the seek bar uses --spark because the light-theme --indicator (navy) disappears on black. */
.rj-player { position: relative; aspect-ratio: 16 / 9; background: var(--media-backdrop); border-radius: var(--radius-lg); overflow: hidden; color: var(--on-brand); }
.rj-player > video { width: 100%; height: 100%; display: block; }
.rj-player-overlay { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; background: linear-gradient(to bottom, var(--scrim), transparent 25%, transparent 70%, var(--scrim)); transition: opacity .2s; }
.rj-player-overlay.is-hidden { opacity: 0; pointer-events: none; }
.rj-player-top, .rj-player-bottom { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); }
.rj-player-center { display: grid; place-items: center; align-content: center; text-align: center; gap: var(--space-2); padding: var(--space-4); }
.rj-player .rj-icon-btn, .rj-player .rj-btn-quiet { color: var(--on-brand); }
.rj-player :focus-visible { outline-color: var(--on-brand); }
.rj-player-time { font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.rj-player-seek { flex: 1; accent-color: var(--spark); }
@media (prefers-reduced-motion: reduce) { .rj-media-card.is-leaving, .rj-media-card-play, .rj-player-overlay { transition: none; } }

/* Live indicator: a state, not a status, so no status colours */
.rj-live { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 12px; line-height: 16px; font-weight: 600; padding: 2px var(--space-2); border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink); }
.rj-live-dot { width: var(--space-2); height: var(--space-2); flex: none; border-radius: var(--radius-full); background: var(--indicator); }
.rj-live.is-on-media { background: var(--scrim); color: var(--on-brand); }
.rj-live.is-on-media .rj-live-dot { background: var(--spark); }
@media (prefers-reduced-motion: no-preference) { .rj-live-dot.is-pulsing { animation: rj-live-pulse 2s ease-in-out infinite; } @keyframes rj-live-pulse { 50% { opacity: .45; } } }
