/* RARQEN 1.8.1 — approved visual baseline, current collector workflows.
   rarqen.css owns the established visual design. This file adds only the
   new Collection/AI/Scan controls and explicit responsive navigation modes. */
:root { --rv-shadow:0 8px 28px #281b3806; }
html { scroll-padding-top:88px; }
.rv-topbar.topbar { position:sticky; top:0; z-index:40; display:flex; align-items:center; justify-content:space-between; gap:20px; height:76px; padding:0 3.5%; background:#111410f5; backdrop-filter:blur(16px); }
.rv-topbar .brand { flex-shrink:0; }
.rv-topbar > .rv-main-nav.nav { display:flex; flex:1; justify-content:center; gap:3px; }
.rv-topbar .rv-main-nav a { padding:11px 12px; font-size:13px; }
.rv-topbar .nav-actions { gap:18px; flex-shrink:0; }
.rv-topbar .rv-compact-nav { display:none; }
.rv-mobile-nav.mobile-nav { display:none; }
.rv-compact-nav summary { min-height:42px; }
.rv-compact-nav .compact-nav-panel { max-height:calc(100dvh - 110px); overflow:auto; }
@media(min-width:981px) and (max-width:1200px) {
 .rv-topbar.topbar { gap:12px; padding:0 2%; }
 .rv-topbar .brand { font-size:20px; gap:9px; }
 .rv-topbar .brand img { width:32px; height:36px; }
 .rv-topbar .rv-main-nav a { padding:10px 8px; font-size:12px; }
 .rv-topbar .nav-actions { gap:12px; }
 .rv-topbar .nav-actions .docs-link { display:block; font-size:12px; }
 .rv-topbar .nav-actions .x-link { display:none; }
 .rv-topbar .wallet-btn,.rv-topbar .wallet-btn.is-connected { min-width:0; padding:10px; font-size:11px; }
}
@media(min-width:641px) and (max-width:980px) {
 .rv-topbar > .rv-main-nav.nav { display:none; }
 .rv-topbar .rv-compact-nav { display:block; }
 .rv-topbar .nav-actions .docs-link,.rv-topbar .nav-actions .x-link { display:none; }
 .rv-mobile-nav.mobile-nav { display:none; }
}
@media(min-width:641px) { body { padding-bottom:0; } }
@media(max-width:640px) {
 html { scroll-padding-top:76px; }
 body { padding-bottom:calc(69px + env(safe-area-inset-bottom,0px)); }
 .rv-topbar.topbar { height:66px; padding:0 18px; gap:12px; }
 .rv-topbar .brand { font-size:19px; gap:8px; }
 .rv-topbar .brand img { width:28px; height:32px; }
 .rv-topbar > .rv-main-nav.nav { display:none; }
 .rv-topbar .rv-compact-nav { display:block; }
 .rv-topbar .rv-compact-nav summary { min-width:35px; min-height:36px; padding:8px; }
 .rv-topbar .rv-compact-nav summary span { display:none; }
 .rv-topbar .nav-actions { gap:9px; }
 .rv-topbar .nav-actions .docs-link,.rv-topbar .nav-actions .x-link { display:none; }
 .rv-topbar .wallet-btn,.rv-topbar .wallet-btn.is-connected { font-size:10px; min-width:0; padding:9px; gap:6px; }
 .rv-topbar .wallet-btn svg { width:16px; }
 .rv-mobile-nav.mobile-nav { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); position:fixed; inset:auto 0 0; z-index:45; height:auto; min-height:65px; padding:6px 10px calc(6px + env(safe-area-inset-bottom,0px)); background:#111410f5; border-top:1px solid var(--line); backdrop-filter:blur(16px); }
 .rv-mobile-nav.mobile-nav a { width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-width:0; min-height:48px; padding:5px; border-radius:8px; }
 .rv-mobile-nav.mobile-nav a span { font-size:10px; line-height:1.3; }
 .rv-mobile-nav.mobile-nav a.active { background:#111410; }
 .rv-mobile-nav.mobile-nav a svg { width:20px; height:20px; }
 .rv-compact-nav .compact-nav-panel { width:min(280px,calc(100vw - 36px)); }
}

/* Collection hub and secondary navigation */
.rv-collection-tabs { display: flex; align-items: center; gap: 5px; padding: 7px; margin: 0 0 28px; background: #111410; border: 1px solid #30362C; border-radius: 13px; overflow-x: auto; scrollbar-width: thin; }
.rv-collection-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 39px; padding: 9px 15px; border-radius: 9px; white-space: nowrap; color: #A4AB9D; font-size: 12px; font-weight: 550; }
.rv-collection-tabs a.active { color: var(--plum); background: var(--paper); box-shadow: 0 2px 7px #00000009; }
.rv-collection-tabs a:hover { color: var(--plum); background: #111410; }
.rv-collection-tabs svg { width: 16px; height: 16px; }
.rv-collection-tabs .rv-secondary { margin-left: auto; }
.rv-collection-head { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; margin: 0 0 25px; }
.rv-collection-head h1 { margin: 8px 0 10px; }
.rv-collection-head p { font-size: 14px; max-width: 580px; }
.rv-collection-head .hero-actions { padding-top: 15px; }
.rv-collection-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 26px; }
.rv-collection-overview > * { border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 21px 23px; }
.rv-collection-overview small, .rv-collection-overview span { display: block; color: var(--muted); font-size: 12px; }
.rv-collection-overview strong { display: block; margin-top: 9px; font-family: var(--serif); font-size: 30px; letter-spacing: -.04em; line-height: 1.15; }
.rv-collection-overview p { font-size: 11px; margin-top: 7px; }
.rv-collection-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rv-collection-shortcuts a { position: relative; padding: 23px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); transition: transform .18s, border-color .18s; }
.rv-collection-shortcuts a:hover { transform: translateY(-3px); border-color: #30362C; }
.rv-collection-shortcuts a > svg { color: #F7F4ED; margin-bottom: 17px; width: 26px; height: 26px; }
.rv-collection-shortcuts h2, .rv-collection-shortcuts h3 { font-size: 18px; margin-bottom: 9px; }
.rv-collection-shortcuts p { font-size: 12px; }
.rv-collection-shortcuts .text-btn, .rv-collection-shortcuts small { display: inline-flex; margin-top: 18px; color: #A4AB9D; }
.rv-collection .collection-empty { margin-top: 22px; }

.rv-collection-tabs { margin:26px 40px 0; overflow:visible; justify-content:space-between; }
.rv-collection-tabs > div { display:flex; gap:3px; overflow:auto; }
.rv-collection-more { position:relative; flex-shrink:0; }
.rv-collection-more summary { display:flex; align-items:center; gap:9px; padding:12px; font-size:12px; cursor:pointer; }
.rv-collection-more > div { position:absolute; top:100%; right:0; width:210px; z-index:20; padding:8px; border:1px solid var(--line); border-radius:12px; background:var(--paper); box-shadow:0 10px 30px #00000015; }
.rv-collection-more a { display:flex; }
.rv-collection-main { display:grid; grid-template-columns:minmax(0,1fr) 290px; gap:28px; margin:30px 0; }
.rv-collection-shortcuts { display:flex; flex-direction:column; gap:8px; padding:23px; border:1px solid var(--line); border-radius:15px; background:#111410; }
.rv-collection-shortcuts a { display:flex; align-items:center; gap:12px; padding:16px 0; background:transparent; border:0; border-bottom:1px solid #30362C; border-radius:0; }
.rv-collection-shortcuts a span { flex:1; }
.rv-collection-shortcuts strong,.rv-collection-shortcuts small { display:block; }
.rv-collection-shortcuts strong { font-size:12px; line-height:1.5; }
.rv-collection-shortcuts small,.rv-collection-shortcuts p { font-size:11px; line-height:1.6; color:var(--muted); }
.rv-binder-covers { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.rv-binder-cover { min-width:0; display:grid; grid-template-columns:70px 1fr; gap:15px; padding:20px; text-align:left; background:var(--paper); border:1px solid var(--line); border-radius:14px; }
.rv-binder-cover-art { height:100px; display:grid; place-items:center; background:#111410; border-radius:8px; }
.rv-binder-cover-art img { max-width:100%; max-height:90px; object-fit:contain; }
.rv-binder-cover > span:nth-child(2) { display:flex; flex-direction:column; gap:9px; align-self:center; }
.rv-binder-cover small,.rv-binder-cover > span > span { color:var(--muted); font-size:11px; }
.rv-binder-cover strong { font-size:16px; line-height:1.4; }
.rv-binder-cover .progress { grid-column:1/-1; width:100%; }
.rv-saved-card-row { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.rv-saved-card-row button { display:flex; flex-direction:column; align-items:flex-start; gap:12px; padding:16px; background:var(--paper); border:1px solid var(--line); border-radius:12px; text-align:left; }
.rv-saved-card-row img { width:100%; height:140px; object-fit:contain; }
.rv-saved-card-row strong,.rv-saved-card-row small { display:block; font-size:11px; line-height:1.6; }
.rv-saved-card-row small { color:var(--muted); }
.rv-collection-empty { grid-column:1/-1; padding:35px; border:1px dashed #30362C; border-radius:14px; background:#111410; text-align:center; }
.rv-explore-layout { display:flex; flex-direction:column; gap:18px; }
.rv-explore-filters { width:100%; }
.rv-explore-filters > summary { display:flex; align-items:center; gap:12px; cursor:pointer; font-size:12px; padding:13px 16px; border:1px solid var(--line); border-radius:10px; background:var(--paper); width:fit-content; }
.rv-explore-filters .filter-panel { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; margin-top:12px; width:100%; }
.rv-explore-filters .filter-panel > .section-head { grid-column:1/-1; margin:0; }
.rv-explore-layout .explorer-content { width:100%; min-width:0; }
.rv-scan-workspace.is-empty { grid-template-columns:1fr; }
.rv-scan-explainer { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; padding:24px; border-radius:14px; background:#111410; }

/* Contextual AI and binder creation */
.rv-ai-workspace { display:grid; grid-template-columns:230px minmax(0,1fr); align-items:start; gap:22px; }
.rv-ai-main { min-width:0; display:grid; gap:16px; }
.rv-ai-context > summary { display:flex; align-items:center; justify-content:space-between; gap:14px; cursor:pointer; list-style:none; }
.rv-ai-context > summary::-webkit-details-marker { display:none; }
.rv-ai-context > summary > span { display:flex; align-items:center; gap:11px; flex-wrap:wrap; }
.rv-ai-context summary strong { font-size:12px; }
.rv-ai-context summary small { font-size:11px; color:var(--muted); }
.rv-ai-context-body { padding-top:23px; display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.rv-ai-context-body dl { display:flex; gap:28px; grid-column:1/-1; margin:0; }
.rv-ai-context-body > small { grid-column:1/-1; font-size:11px; color:var(--muted); }
.rv-ai-empty-mark { display:grid; place-items:center; width:65px; height:65px; background:#111410; color:#A4AB9D; border-radius:18px; margin:0 auto 20px; }
.rv-ai-empty { max-width:740px; }
.rv-ai-prompt-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:26px 0 18px; }
.rv-ai-prompt-grid button { padding:18px; background:#111410; border:1px solid #30362C; border-radius:12px; text-align:left; color:var(--plum); }
.rv-ai-prompt-grid strong,.rv-ai-prompt-grid small { display:block; line-height:1.6; }
.rv-ai-prompt-grid strong { margin:13px 0 8px; font-size:12px; }
.rv-ai-prompt-grid small { color:var(--muted); font-size:11px; }
.rv-ai-empty > small { font-size:10px; color:var(--muted); }
.rv-ai-draft-label { display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:11px; color:#A4AB9D; }
.rv-ai-draft-label > span { margin-left:auto; color:var(--muted); }
.rv-ai-session-list { margin-bottom:24px; }
.rv-binder-set-picker { margin:18px 0; padding:18px; border:1px solid var(--line); border-radius:12px; background:#111410; }
@media(max-width:980px) { .rv-ai-workspace { grid-template-columns:190px minmax(0,1fr); } .rv-ai-prompt-grid { grid-template-columns:1fr; } }
@media(max-width:760px) { .rv-ai-workspace { grid-template-columns:1fr; } .rv-ai-context-body { grid-template-columns:1fr; } .rv-ai-context-body dl { gap:18px; flex-wrap:wrap; } .rv-ai-empty { padding:20px 0; } }

/* Keep the new workflows in the established visual language. */
.rv-collection-head h1 { font-size:clamp(32px,3.8vw,52px); }
.rv-explore-layout { display:flex; flex-direction:column; gap:18px; }
.rv-explore-filters > summary { display:flex; align-items:center; gap:12px; width:fit-content; padding:12px 16px; background:var(--paper); border:1px solid var(--line); border-radius:8px; font-size:12px; cursor:pointer; }
.rv-explore-filters .filter-panel { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; margin-top:12px; width:100%; }
.rv-explore-filters .filter-panel > .section-head { grid-column:1/-1; margin:0; }
.rv-explore-layout .explorer-content { width:100%; min-width:0; }
.rv-scan-workspace.is-empty { grid-template-columns:1fr; }
.rv-scan-workspace.is-empty .scan-photo-stage { height:330px; background:transparent; }
.rv-scan-workspace.is-empty .upload-empty { min-height:0; background:transparent; }
.upload-empty .button { color:var(--plum); }
.rv-scan-explainer { display:grid; grid-template-columns:repeat(3,1fr); list-style:none; gap:24px; padding:24px; margin:20px 0 0; background:#111410; border-radius:10px; }
.rv-scan-explainer li { display:flex; align-items:flex-start; gap:12px; }
.rv-scan-explainer strong,.rv-scan-explainer small { display:block; line-height:1.7; }
.rv-scan-explainer small { color:var(--muted); font-size:12px; margin-top:8px; }
.rv-ai-context.panel { padding:18px 22px; }
.rv-ai-chat { padding:0; display:flex; flex-direction:column; min-width:0; }
.rv-ai-empty { text-align:center; padding:25px 14px; margin:auto; }
.rv-ai-empty h2 { font-size:28px; }
.rv-ai-empty p { margin:16px 0; font-size:14px; line-height:1.8; }
.rv-ai-context-body label { display:block; }
.rv-ai-workspace .ai-history { align-self:start; }
.rv-ai-workspace .messages { min-height:350px; max-height:600px; }
.rv-ai-workspace .ai-chat-head { margin:0; padding:20px; }
.rv-ai-workspace .ai-chat-bottom { padding:18px 22px; border-top:1px solid var(--line); }
.rv-ai-workspace .context-status { margin-left:auto; }
@media(max-width:980px) {
 .rv-collection-main { grid-template-columns:1fr; }
 .rv-saved-card-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .rv-explore-filters .filter-panel { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .rv-collection-tabs { margin:20px 3.5% 0; }
}
@media(max-width:760px) {
 .rv-collection-head { flex-direction:column; }
 .rv-collection-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .rv-collection-overview > a { padding:18px; }
 .rv-collection-overview strong { font-size:25px; }
 .rv-collection-tabs { margin:18px 5% 0; flex-wrap:wrap; }
 .rv-collection-tabs > div { width:100%; }
 .rv-collection-tabs a { padding:9px 11px; font-size:11px; }
 .rv-collection-more > div { left:0; right:auto; }
 .rv-binder-covers { grid-template-columns:1fr; }
 .rv-saved-card-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .rv-explore-filters .filter-panel { grid-template-columns:1fr; }
 .rv-scan-explainer { grid-template-columns:1fr; padding:20px; }
 .rv-scan-page h1,.rv-ai-page h1 { font-size:34px; }
 .rv-ai-workspace .ai-chat-bottom { padding:14px; }
}
@media(max-width:360px) {
 .rv-topbar.topbar { padding:0 12px; gap:8px; }
 .rv-topbar .brand { font-size:16px; gap:6px; }
 .rv-topbar .brand img { width:24px; height:28px; }
 .rv-topbar .nav-actions { gap:7px; }
 .rv-topbar .wallet-btn > span { max-width:94px; overflow:hidden; text-overflow:ellipsis; }
}
