/* Scoped directory: existing themes, navigation and learning tools remain shared. */
#robot-directory, .rd-invite {
  --rd-bg: #161a1e; --rd-raised: #1c2126; --rd-text: #f3f2ee;
  --rd-muted: #aeb6bc; --rd-line: #343c42; --rd-accent: #ffac70;
  color: var(--rd-text);
}
body[data-theme="light"] #robot-directory, body[data-theme="light"] .rd-invite {
  --rd-bg: #fff; --rd-raised: #f4f5f4; --rd-text: #20282c;
  --rd-muted: #58646c; --rd-line: #dce1e3; --rd-accent: #9d4100;
}
#robot-directory { padding: 48px 0 140px; font-size: 16px; line-height: 1.65; }
#robot-directory *, .rd-invite * { box-sizing: border-box; }
#robot-directory .rd-container { width: min(1280px, 92%); max-width: 1280px; }
#robot-directory button, #robot-directory input, #robot-directory select { font: inherit; }
#robot-directory button, #robot-directory a { -webkit-tap-highlight-color: transparent; }
#robot-directory a { color: inherit; text-decoration: none; }
#robot-directory button { cursor: pointer; }
#robot-directory button:disabled { opacity: .4; cursor: not-allowed; }
#robot-directory :is(a, button, input, select, [tabindex]):focus-visible, .rd-invite:focus-visible { outline: 3px solid var(--rd-accent); outline-offset: 4px; }
#robot-directory [hidden] { display: none !important; }
.rd-heading { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; margin-bottom: 36px; }
.rd-back { display: inline-block; color: var(--rd-muted) !important; font-size: 14px; margin-bottom: 24px; }
.rd-eyebrow { display: block; color: var(--rd-accent); font-size: 12px; font-weight: 700; letter-spacing: .1em; }
#robot-directory .rd-heading h1 { font-size: clamp(34px,4vw,56px); letter-spacing: -.035em; line-height: 1.23; color: var(--rd-text); margin: 14px 0 18px; }
.rd-heading p { color: var(--rd-muted); max-width: 600px; margin: 0; }
.rd-stat-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rd-line); border-radius: 20px; overflow: hidden; background: var(--rd-bg); }
.rd-stat-grid button { background: transparent; color: var(--rd-text); border: 0; padding: 24px 28px; text-align: left; }
.rd-stat-grid button:nth-child(odd) { border-right: 1px solid var(--rd-line); }
.rd-stat-grid button:nth-child(-n+2) { border-bottom: 1px solid var(--rd-line); }
.rd-stat-grid button:hover { background: var(--rd-raised); }
.rd-stat-grid span { display: block; color: var(--rd-muted); font-size: 14px; }
.rd-stat-grid i { color: var(--rd-accent); margin-right: 8px; }
.rd-stat-grid strong { display: block; font-size: 40px; line-height: 1.2; margin-top: 14px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.rd-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--rd-line); overflow-x: auto; margin-bottom: 28px; }
.rd-tabs a { flex-shrink: 0; padding: 12px 0 16px; border-bottom: 2px solid transparent; font-size: 15px; color: var(--rd-muted) !important; }
.rd-tabs a[aria-current] { border-color: var(--rd-accent); color: var(--rd-text) !important; }
.rd-tabs span { margin-left: 8px; font-size: 12px; padding: 3px 7px; background: var(--rd-raised); border-radius: 5px; }
.rd-toolbar { display: grid; grid-template-columns: 2fr 1fr 1.25fr 1fr; gap: 16px; padding: 22px; background: var(--rd-bg); border: 1px solid var(--rd-line); border-radius: 14px; }
#robot-directory label { display: block; font-size: 14px; color: var(--rd-muted); }
#robot-directory input, #robot-directory select { width: 100%; min-height: 46px; color: var(--rd-text); background: var(--rd-raised); border: 1px solid var(--rd-line); border-radius: 8px; padding: 10px 12px; margin-top: 7px; }
#robot-directory input::placeholder { color: var(--rd-muted); opacity: 1; }
.rd-search > div { position: relative; }
.rd-search i { position: absolute; left: 14px; top: 23px; color: var(--rd-accent); }
#robot-directory .rd-search i + input { padding-left: 40px; }
.rd-result-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 20px 0; }
.rd-result-bar > p, .rd-result-count { font-size: 14px; color: var(--rd-muted); margin: 0; }
.rd-result-bar > div { display: flex; align-items: center; gap: 18px; }
#robot-directory .rd-result-bar label { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
#robot-directory .rd-result-bar select { width: auto; margin: 0; padding: 7px 12px; min-height: 40px; font-size: 14px; }
.rd-text-button { border: 0; background: none; color: var(--rd-accent); padding: 8px 0; font-size: 14px !important; }
.rd-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.rd-card { padding: 24px; border: 1px solid var(--rd-line); background: var(--rd-bg); border-radius: 16px; display: flex; flex-direction: column; min-width: 0; transition: border-color .18s, transform .18s; }
.rd-card:hover { border-color: var(--rd-accent); transform: translateY(-3px); }
.rd-card-top { display: flex; justify-content: space-between; align-items: center; color: var(--rd-muted); font-size: 12px; gap: 12px; margin-bottom: 24px; }
.rd-symbol { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rd-line); border-radius: 12px; font-size: 20px; color: var(--rd-accent); background: var(--rd-raised); }
.rd-hand .rd-symbol, .rd-detail-icon.rd-hand { color: #83c6bf; }
.rd-model .rd-symbol, .rd-detail-icon.rd-model { color: #b6a8e8; }
.rd-training .rd-symbol, .rd-detail-icon.rd-training { color: #9bbbde; }
body[data-theme="light"] .rd-hand .rd-symbol { color: #27796d; }
body[data-theme="light"] .rd-model .rd-symbol { color: #7556a8; }
body[data-theme="light"] .rd-training .rd-symbol { color: #356b9f; }
.rd-maker { margin: 0 0 6px; color: var(--rd-muted); font-size: 14px; }
#robot-directory .rd-card h2 { margin: 0; padding: 0; font-size: 24px; line-height: 1.3; color: var(--rd-text); letter-spacing: -.025em; overflow-wrap: anywhere; }
#robot-directory .rd-card h2 a:hover { color: var(--rd-accent); }
.rd-country { color: var(--rd-muted); font-size: 13px; margin: 8px 0 24px; }
.rd-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 16px 0; border-top: 1px solid var(--rd-line); margin: auto 0 0; }
.rd-model .rd-metrics, .rd-training .rd-metrics { grid-template-columns: 1fr 1fr; }
.rd-metrics dt { font-size: 12px; color: var(--rd-muted); margin-bottom: 6px; }
.rd-metrics dd { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.rd-metrics small, .rd-spec-grid small, .rd-table small { display: block; color: var(--rd-accent); font-weight: 400; font-size: 12px; margin-top: 4px; }
.rd-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 16px; border-top: 1px solid var(--rd-line); font-size: 14px; }
.rd-card-actions > a { color: var(--rd-accent) !important; }
.rd-card-actions button { padding: 5px 10px; color: var(--rd-muted); background: transparent; border: 1px solid var(--rd-line); border-radius: 7px; font-size: 13px !important; }
.rd-card-actions button[aria-pressed="true"] { color: var(--rd-accent); border-color: var(--rd-accent); }
.rd-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--rd-line); border-radius: 9px; padding: 11px 18px; background: var(--rd-bg); color: var(--rd-text); font-size: 14px !important; min-height: 44px; }
.rd-button:hover { border-color: var(--rd-accent); }
#robot-directory .rd-primary { background: #ffac70; color: #231a13; border-color: #ffac70; font-weight: 600; }
.rd-more { text-align: center; margin: 28px 0; }
.rd-empty { grid-column: 1/-1; padding: 52px 24px; text-align: center; background: var(--rd-bg); border: 1px dashed var(--rd-line); border-radius: 14px; color: var(--rd-muted); }
.rd-empty h2 { font-size: 24px; }
.rd-source-note { margin: 36px 0 0; border-top: 1px solid var(--rd-line); padding-top: 20px; color: var(--rd-muted); font-size: 13px; }
#robot-directory .rd-source-note a { color: var(--rd-accent); text-decoration: underline; text-underline-offset: 3px; }
.rd-tray { position: fixed; z-index: 100; bottom: 18px; left: 50%; transform: translateX(-50%); width: min(1120px,92vw); border: 1px solid var(--rd-accent); border-radius: 14px; padding: 16px 20px; background: var(--rd-bg); box-shadow: 0 10px 50px #0005; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rd-tray strong { display: block; font-size: 13px; font-weight: 500; color: var(--rd-muted); margin-bottom: 6px; }
.rd-selected, .rd-tray-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rd-selected button { border: 1px solid var(--rd-line); border-radius: 6px; color: var(--rd-text); background: var(--rd-raised); font-size: 13px !important; padding: 5px 9px; }
.rd-tray-actions > span { font-size: 13px; color: var(--rd-muted); }
.rd-status { position: fixed; bottom: 130px; left: 50%; transform: translateX(-50%); background: var(--rd-bg); padding: 10px 18px; border: 1px solid var(--rd-line); border-radius: 8px; z-index: 101; }
.rd-status:empty { display: none; }
.rd-detail-heading { display: flex; gap: 28px; align-items: center; margin: 14px 0 28px; }
.rd-detail-icon { width: 120px; height: 140px; flex: 0 0 auto; display: grid; place-items: center; background: var(--rd-bg); border: 1px solid var(--rd-line); border-radius: 20px; font-size: 44px; color: var(--rd-accent); }
#robot-directory .rd-detail-heading h1 { font-size: clamp(32px,4vw,52px); line-height: 1.15; color: var(--rd-text); margin: 12px 0; letter-spacing: -.035em; }
.rd-detail-heading p { margin: 0 0 18px; color: var(--rd-muted); }
.rd-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rd-detail-note { font-size: 14px; color: var(--rd-muted); line-height: 1.8; max-width: 1050px; margin: 20px 0; }
.rd-section-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 28px 0 18px; }
#robot-directory .rd-section-bar h2, #robot-directory .rd-section-bar h3 { color: var(--rd-text); font-size: 24px; margin: 0; }
.rd-spec-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border: 1px solid var(--rd-line); border-radius: 14px; overflow: hidden; }
.rd-spec-grid > div { padding: 18px 24px; border-bottom: 1px solid var(--rd-line); background: var(--rd-bg); }
.rd-spec-grid > div:nth-child(odd) { border-right: 1px solid var(--rd-line); }
.rd-spec-grid dt { font-size: 13px; color: var(--rd-muted); margin-bottom: 7px; }
.rd-spec-grid dd { margin: 0; overflow-wrap: anywhere; }
.rd-subheading { margin: 40px 0 18px; font-size: 24px; color: var(--rd-text); }
.rd-table-wrap { overflow-x: auto; border: 1px solid var(--rd-line); border-radius: 14px; }
.rd-table { border-collapse: collapse; width: 100%; min-width: 700px; background: var(--rd-bg); text-align: left; table-layout: fixed; font-size: 14px; }
.rd-table caption { text-align: left; padding: 16px 22px; color: var(--rd-muted); font-size: 13px; background: var(--rd-bg); }
.rd-table th, .rd-table td { padding: 18px 22px; border-top: 1px solid var(--rd-line); border-right: 1px solid var(--rd-line); vertical-align: top; overflow-wrap: anywhere; }
.rd-table thead th { background: var(--rd-raised); }
.rd-table th:first-child { width: 22%; }
.rd-table tbody th { color: var(--rd-muted); font-weight: 400; }
.rd-table thead span { display: block; color: var(--rd-muted); font-size: 13px; font-weight: 400; }
.rd-table thead a { display: block; color: var(--rd-accent) !important; font-size: 20px; margin: 6px 0; }
.rd-table thead a[target] { font-size: 13px; font-weight: 400; }
.rd-reading-intro { margin: 32px 0 26px; max-width: 820px; }
#robot-directory .rd-reading-intro h2 { font-size: 28px; color: var(--rd-text); margin-bottom: 12px; }
.rd-reading-intro p { color: var(--rd-muted); }
.rd-reading-tools { display: grid; grid-template-columns: minmax(0,3fr) minmax(120px,1fr) auto; gap: 18px; align-items: end; margin-bottom: 20px; }
.rd-reading-tools button { margin-bottom: 10px; }
.rd-article-list { margin-top: 16px; }
.rd-article-row { display: grid; grid-template-columns: 110px 1fr 24px; gap: 24px; padding: 24px 0; border-top: 1px solid var(--rd-line); align-items: baseline; }
.rd-article-row time { color: var(--rd-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.rd-article-row div > span { font-size: 12px; letter-spacing: .08em; color: var(--rd-muted); }
#robot-directory .rd-article-row h3 { font-size: 19px; font-weight: 500; line-height: 1.5; margin: 4px 0 0; color: var(--rd-text); }
#robot-directory .rd-article-row a:hover { color: var(--rd-accent); }
.rd-article-row > span { color: var(--rd-accent); }
.rd-reference-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.rd-reference { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--rd-line); background: var(--rd-bg); border-radius: 14px; }
#robot-directory .rd-reference h3 { font-size: 21px; color: var(--rd-text); line-height: 1.4; margin: 16px 0 12px; }
.rd-reference p { color: var(--rd-muted); font-size: 14px; margin: 0 0 22px; }
.rd-reference > a { margin-top: auto; color: var(--rd-accent) !important; font-size: 14px; }
.rd-invite { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 30px; margin: 0 0 28px; border: 1px solid var(--rd-line); border-radius: 18px; background: var(--rd-bg); text-decoration: none; }
.rd-invite h3 { color: var(--rd-text); margin: 10px 0 8px; font-size: 25px; line-height: 1.4; }
.rd-invite p { color: var(--rd-muted); font-size: 14px; margin: 0; }
.rd-invite-arrow { color: var(--rd-accent); font-size: 44px; }
.rd-invite:hover { border-color: var(--rd-accent); }
@media(max-width: 1000px) {
  .rd-heading { gap: 28px; }.rd-toolbar { grid-template-columns: 1fr 1fr; }.rd-grid, .rd-reference-grid { grid-template-columns: 1fr 1fr; }
}
@media(max-width: 640px) {
  #robot-directory { padding-top: 28px; padding-bottom: 180px; }.rd-heading { grid-template-columns: 1fr; gap: 24px; margin-bottom: 22px; }
  .rd-heading h1 br { display: none; }.rd-stat-grid button { padding: 15px 18px; }.rd-stat-grid strong { font-size: 30px; margin-top: 6px; }
  .rd-tabs { gap: 22px; }.rd-tabs a { font-size: 14px; }.rd-toolbar { gap: 14px; padding: 16px; }.rd-toolbar .rd-search { grid-column: 1/-1; }
  .rd-result-bar { align-items: flex-start; flex-direction: column; }.rd-result-bar > div { width: 100%; justify-content: space-between; gap: 10px; }
  #robot-directory .rd-result-bar label { font-size: 12px; gap: 6px; }#robot-directory .rd-result-bar select { max-width: 160px; }
  .rd-grid, .rd-reference-grid { grid-template-columns: 1fr; }.rd-card { padding: 22px; }.rd-card-top { margin-bottom: 18px; }
  .rd-tray { bottom: 8px; padding: 12px 14px; flex-direction: column; align-items: stretch; gap: 10px; }.rd-tray-actions { justify-content: space-between; }
  .rd-status { bottom: 170px; width: 90vw; text-align: center; }.rd-detail-heading { align-items: flex-start; gap: 16px; }.rd-detail-icon { width: 64px; height: 80px; font-size: 26px; border-radius: 12px; }
  .rd-detail-heading .rd-button { font-size: 13px !important; padding: 9px 12px; }.rd-spec-grid { grid-template-columns: 1fr; }.rd-spec-grid > div:nth-child(odd) { border-right: 0; }
  .rd-section-bar { flex-wrap: wrap; }.rd-reading-tools { grid-template-columns: 1fr auto; }.rd-reading-tools .rd-search { grid-column: 1/-1; }
  .rd-article-row { grid-template-columns: 1fr 20px; gap: 6px 14px; padding: 20px 0; }.rd-article-row time { grid-column: 1/-1; }#robot-directory .rd-article-row h3 { font-size: 18px; }
  .rd-invite { padding: 24px; gap: 16px; }.rd-invite h3 { font-size: 21px; }.rd-invite-arrow { font-size: 30px; }
}
@media(prefers-reduced-motion: reduce) { .rd-card { transition: none; }.rd-card:hover { transform: none; } }

/* Image-first directory: keep the entire body in frame on a neutral photo stage. */
.rd-lightbox, .rd-home-grid {
  --rd-bg: #161a1e; --rd-raised: #1c2126; --rd-text: #f3f2ee;
  --rd-muted: #aeb6bc; --rd-line: #343c42; --rd-accent: #ffac70;
}
body[data-theme="light"] .rd-lightbox, body[data-theme="light"] .rd-home-grid {
  --rd-bg: #fff; --rd-raised: #f4f5f4; --rd-text: #20282c;
  --rd-muted: #58646c; --rd-line: #dce1e3; --rd-accent: #9d4100;
}
#robot-directory { padding-top: 26px; }
.rd-heading { gap: 24px; margin-bottom: 24px; grid-template-columns: 1fr 1fr; }
.rd-heading .rd-back { margin-bottom: 12px; }
#robot-directory .rd-heading h1 { font-size: clamp(28px,2.6vw,38px); margin: 8px 0; line-height: 1.25; }
.rd-heading p { font-size: 15px; }
.rd-stat-grid { grid-template-columns: repeat(4,1fr); border-radius: 12px; }
.rd-stat-grid button { padding: 16px 14px; border-right: 1px solid var(--rd-line); }
.rd-stat-grid button:nth-child(-n+2) { border-bottom: 0; }
.rd-stat-grid button:last-child { border-right: 0; }
.rd-stat-grid button[aria-pressed="true"] { background: var(--rd-raised); box-shadow: inset 0 -3px 0 var(--rd-accent); }
.rd-stat-grid span { font-size: 13px; }.rd-stat-grid i { display: block; margin: 0 0 6px; }
.rd-stat-grid strong { font-size: 26px; margin-top: 4px; }
.rd-tabs { margin-bottom: 18px; }
.rd-photo-toolbar { display: block; padding: 18px 20px 0; }
.rd-primary-controls { display: grid; grid-template-columns: 3fr 1fr; gap: 18px; }
.rd-filter-panel { border-top: 1px solid var(--rd-line); margin-top: 16px; }
.rd-filter-panel summary { cursor: pointer; padding: 12px 0; font-size: 14px; color: var(--rd-muted); }
.rd-filter-panel summary i { margin-right: 6px; color: var(--rd-accent); }
.rd-advanced { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; padding: 8px 0 20px; }
#robot-directory .rd-check { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 46px; }
#robot-directory .rd-check input { width: 18px; min-height: 18px; height: 18px; margin: 0; accent-color: #ffac70; }
.rd-advanced > p { grid-column: 1/-1; margin: 0; color: var(--rd-muted); font-size: 13px; }
.rd-view-switch { display: flex; padding: 3px; border: 1px solid var(--rd-line); border-radius: 9px; }
.rd-view-switch button { background: transparent; color: var(--rd-muted); border: 0; padding: 8px 11px; border-radius: 6px; }
.rd-view-switch button[aria-pressed="true"] { color: var(--rd-accent); background: var(--rd-raised); }
.rd-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.rd-photo-card { padding: 0; overflow: hidden; border-radius: 14px; }
.rd-card-visual { position: relative; flex-shrink: 0; }
.rd-photo { display: block; width: 100%; height: 290px; border: 0; padding: 20px; position: relative; background: #f9f9f8; color: #1d282f; overflow: hidden; }
.rd-photo img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
.rd-photo:hover img { transform: scale(1.035); }
.rd-photo-expand { position: absolute; bottom: 10px; right: 10px; padding: 5px 9px; border-radius: 6px; color: #33404a; background: #ffffffec; border: 1px solid #dce1e3; font-size: 12px; }
.rd-photo-category { position: absolute; top: 12px; left: 12px; background: #ffffffec; border: 1px solid #dce1e3; color: #46545e; border-radius: 6px; padding: 3px 8px; font-size: 12px; pointer-events: none; }
.rd-photo-error { position: absolute; inset: 25%; display: grid; place-items: center; text-align: center; font-size: 14px; color: #58646c; }
.rd-photo-error[hidden] { display: none; }
.rd-photo-unavailable { display: grid; place-items: center; text-align: center; color: #58646c; }
.rd-card-info { display: flex; flex-direction: column; padding: 20px; flex: 1; }
#robot-directory .rd-photo-card h2 { font-size: 23px; }
.rd-photo-card .rd-country { margin-bottom: 18px; }
.rd-photo-card .rd-metrics { margin-top: auto; }
.rd-photo-card .rd-metrics dd { font-size: 15px; }
.rd-photo-credit { display: block; margin-top: 12px; font-size: 12px; font-weight: 400; color: var(--rd-muted); }
.rd-photo-credit a { text-decoration: underline !important; text-decoration-color: var(--rd-line) !important; text-underline-offset: 3px; }
.rd-list { grid-template-columns: 1fr; }
.rd-list .rd-photo-card { display: grid; grid-template-columns: 220px minmax(0,1fr); }
.rd-list .rd-photo { height: 235px; }
.rd-list .rd-card-info { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; padding: 22px 26px; }
.rd-list .rd-maker, .rd-list h2, .rd-list .rd-country { grid-column: 1; }
.rd-list .rd-metrics { grid-column: 2; grid-row: 1/4; border-top: 0; margin: 0; align-self: center; }
.rd-list .rd-card-actions { grid-column: 1/-1; }
.rd-list .rd-photo-credit { grid-column: 1/-1; margin-top: 8px; }
.rd-detail-with-gallery { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 38px; align-items: start; }
.rd-gallery { min-width: 0; }
.rd-gallery .rd-photo { border-radius: 16px; border: 1px solid var(--rd-line); height: 480px; padding: 28px; }
.rd-gallery > .rd-photo-credit { margin-bottom: 14px; }
.rd-thumbnails { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 7px; }
.rd-thumbnails button { flex: 0 0 74px; height: 74px; border: 2px solid transparent; border-radius: 9px; padding: 5px; background: #f9f9f8; }
.rd-thumbnails button[aria-pressed="true"] { border-color: var(--rd-accent); }
.rd-thumbnails img { width: 100%; height: 100%; object-fit: contain; }
.rd-detail-with-gallery > div:last-child { padding-top: 14px; }
.rd-compare-photo { margin: -4px -8px 16px; }
.rd-compare-photo .rd-photo { height: 210px; padding: 12px; border-radius: 8px; }
.rd-compare-photo .rd-photo-expand { font-size: 12px; padding: 3px 5px; }
.rd-selected button { display: inline-flex; align-items: center; gap: 8px; }
.rd-selected img { width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 4px; }
.rd-lightbox { padding: 0; width: min(1180px,96vw); max-width: 96vw; max-height: 94dvh; overflow: hidden; border: 1px solid var(--rd-line); border-radius: 16px; background: var(--rd-bg); color: var(--rd-text); box-shadow: 0 24px 100px #0008; }
.rd-lightbox::backdrop { background: #06090ddd; backdrop-filter: blur(6px); }
.rd-lightbox button { cursor: pointer; font: inherit; }
.rd-lightbox [hidden] { display: none; }
.rd-lightbox :is(button,a):focus-visible { outline: 3px solid var(--rd-accent); outline-offset: 3px; }
.rd-lightbox-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 22px; }
.rd-lightbox-head strong { font-size: 20px; display: block; }
.rd-lightbox-head span { font-size: 13px; color: var(--rd-muted); }
.rd-lightbox-head > div:last-child { display: flex; gap: 10px; }
.rd-lightbox-head button, .rd-lightbox-foot > button { color: var(--rd-text); background: var(--rd-raised); border: 1px solid var(--rd-line); border-radius: 8px; min-width: 44px; min-height: 44px; font-size: 20px; }
.rd-lightbox-head button[aria-pressed="true"] { border-color: var(--rd-accent); color: var(--rd-accent); }
.rd-lightbox-stage { height: min(68dvh,760px); position: relative; overflow: auto; background: #f9f9f8; display: grid; place-items: center; padding: 20px; }
.rd-lightbox-stage > img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.rd-lightbox-stage.rd-zoomed { display: block; padding: 0; }
.rd-lightbox-stage.rd-zoomed > img { width: 175%; height: 175%; max-width: none; max-height: none; object-fit: contain; }
.rd-lightbox-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; }
.rd-lightbox-foot > div { text-align: center; display: grid; gap: 5px; }
.rd-lightbox-foot a { color: var(--rd-accent); text-decoration: none; font-size: 13px; }
.rd-lightbox-foot .rd-photo-credit { margin: 0; }
.rd-lightbox-foot button:disabled { opacity: .35; cursor: default; }
.rd-home-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.rd-home-card { display: block; background: var(--rd-bg); border: 1px solid var(--rd-line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--rd-text); }
.rd-home-card > div { height: 240px; padding: 18px; background: #f9f9f8; }
.rd-home-card img { display: block; width: 100%; height: 100%; object-fit: contain; }
.rd-home-card > span { display: block; padding: 0 20px; margin-top: 16px; color: var(--rd-muted); font-size: 13px; }
.rd-home-card h3 { margin: 5px 20px 16px; font-size: 24px; color: var(--rd-text); }
.rd-home-card > .rd-home-cta { color: var(--rd-accent); font-size: 14px; margin: 0 0 20px; }
.rd-home-card:hover { border-color: var(--rd-accent); }
@media(max-width: 1100px) {
  .rd-heading { grid-template-columns: 1fr; gap: 18px; }.rd-stat-grid i { display: inline; margin-right: 8px; }.rd-stat-grid button { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .rd-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }.rd-list { grid-template-columns: 1fr; }.rd-detail-with-gallery { gap: 24px; }.rd-gallery .rd-photo { height: 400px; }
}
@media(max-width: 760px) {
  .rd-grid, .rd-home-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.rd-home-card > div { height: 230px; }
  .rd-list { grid-template-columns: 1fr; }.rd-list .rd-photo-card { grid-template-columns: 170px minmax(0,1fr); }.rd-list .rd-card-info { display: flex; padding: 18px; }.rd-list .rd-photo { height: 100%; min-height: 250px; }.rd-list .rd-metrics { margin-bottom: 14px; }
  .rd-primary-controls { grid-template-columns: minmax(0,2fr) minmax(100px,1fr); }.rd-advanced { grid-template-columns: 1fr 1fr; }
  .rd-detail-with-gallery { grid-template-columns: 1fr; }.rd-gallery .rd-photo { height: 440px; }.rd-detail-with-gallery > div:last-child { padding-top: 0; }
  .rd-stat-grid { grid-template-columns: repeat(2,1fr); }.rd-stat-grid button:nth-child(-n+2) { border-bottom: 1px solid var(--rd-line); }.rd-stat-grid button:nth-child(2) { border-right: 0; }
  .rd-stat-grid button { padding: 10px 14px; }.rd-stat-grid strong { font-size: 23px; }.rd-heading .rd-back { margin-bottom: 8px; }
  .rd-photo { height: 260px; padding: 16px; }.rd-card-info { padding: 17px; }.rd-metrics { gap: 9px; }
  .rd-photo-card .rd-card-actions { flex-wrap: wrap; }.rd-photo-card .rd-metrics dt { font-size: 12px; }#robot-directory .rd-photo-card h2 { font-size: 22px; }
  .rd-lightbox { border-radius: 12px; }.rd-lightbox-head, .rd-lightbox-foot { padding: 12px 14px; }.rd-lightbox-stage { height: 64dvh; padding: 12px; }
}
@media(max-width: 480px) {
  .rd-grid { grid-template-columns: 1fr; }.rd-photo { height: 330px; }.rd-home-grid { gap: 12px; }.rd-home-card > div { height: 190px; padding: 10px; }.rd-home-card h3 { font-size: 21px; margin-left: 14px; }.rd-home-card > span { padding: 0 14px; }
  .rd-primary-controls { grid-template-columns: 1fr; gap: 8px; }.rd-primary-controls > label:last-child { display: flex !important; align-items: center; gap: 12px; }.rd-primary-controls select { margin-top: 0 !important; }.rd-filter-panel { margin-top: 12px; }
  .rd-advanced { gap: 14px; }.rd-photo-toolbar { padding: 14px 16px 0; }.rd-list .rd-photo-card { grid-template-columns: 115px minmax(0,1fr); }.rd-list .rd-photo { padding: 9px; min-height: 250px; }
  .rd-list .rd-photo-category { top: 8px; left: 6px; font-size: 12px; }.rd-list .rd-photo-expand { bottom: 8px; left: 6px; right: 6px; font-size: 12px; }.rd-list .rd-card-info { padding: 14px; }
  .rd-gallery .rd-photo { height: 380px; }.rd-lightbox-stage { height: 59dvh; }.rd-lightbox-head strong { font-size: 18px; }
}
@media(prefers-reduced-motion: reduce) { .rd-photo img { transition: none; }.rd-photo:hover img { transform: none; } }
