/* ═══════════════════════════════════════════════════════════
   Requests: cards, board, vote, detail, composer
   (loaded after roadmap.css; shares its tokens)
   ═══════════════════════════════════════════════════════════ */

/* ── Request card ────────────────────────────────────────────── */
.rm-card--request { padding: 0.85rem 0.9rem 0.8rem; gap: 0.45rem; cursor: pointer; }
.rm-rq__top { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.rm-rq__key { font-size: 0.72rem; font-weight: 600; color: var(--app-text-3); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.rm-rq__title { font-size: 0.95rem; font-weight: 600; color: var(--rm-ink); line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rm-rq__sol { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.76rem; color: var(--app-text-2); min-width: 0; }
.rm-rq__sol i { color: var(--sol-color, var(--rm-accent)); }
.rm-rq__sol span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-rq__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.15rem; }
.rm-rq__meta { display: flex; align-items: center; gap: 0.7rem; font-size: 0.76rem; color: var(--app-text-3); }
.rm-rq__meta i { margin-right: 0.2rem; }
.rm-rq__quarter { font-size: 0.72rem; font-weight: 600; color: var(--rm-status-planned); }
.rm-rq--compact { padding: 0.65rem 0.8rem; }
.rm-rq--compact .rm-rq__title { -webkit-line-clamp: 2; font-size: 0.9rem; }

.rm-type { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; font-size: 0.72rem; flex-shrink: 0; }
.rm-type--Bug { background: var(--rm-type-bug-soft); color: var(--rm-type-bug); }
.rm-type--Enhancement { background: var(--rm-type-enh-soft); color: var(--rm-type-enh); }
.rm-sev { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; padding: 0.1rem 0.4rem; border-radius: 4px; background: var(--rm-type-bug-soft); color: var(--rm-type-bug); }
.rm-sev--Low, .rm-sev--Medium { background: var(--app-surface-2); color: var(--app-text-2); }

/* ── Vote button ─────────────────────────────────────────────── */
.rm-vote {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 46px; padding: 0.3rem 0.45rem; border-radius: var(--app-r-sm);
  border: 1px solid var(--app-border); background: var(--app-white); color: var(--app-text-2);
  font: inherit; line-height: 1; cursor: pointer; flex-shrink: 0;
  transition: border-color var(--rm-fast) ease, background-color var(--rm-fast) ease, color var(--rm-fast) ease, transform var(--rm-mid) var(--rm-ease);
}
.rm-vote:hover:not(:disabled) { border-color: var(--rm-accent-deep); color: var(--rm-accent-deep); }
.rm-vote:focus-visible { outline: 2px solid var(--rm-focus); outline-offset: 2px; }
.rm-vote:disabled { opacity: .6; cursor: default; }
.rm-vote i { font-size: 0.85rem; }
.rm-vote__count { font-size: 0.86rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 0.15rem; }
.rm-vote--on { border-color: var(--rm-accent); background: var(--app-teal-50); color: var(--rm-accent-deep); }
.rm-vote--on i { animation: rm-vote-pop 260ms var(--rm-ease); }
.rm-vote--lg { flex-direction: row; gap: 0.5rem; padding: 0.6rem 1rem; min-width: 0; font-size: 0.95rem; }
.rm-vote--lg i { font-size: 1.1rem; }
.rm-vote--lg .rm-vote__count { font-size: 1.05rem; margin: 0; }
.rm-vote--sm { min-width: 40px; padding: 0.2rem 0.35rem; }
@keyframes rm-vote-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ── Board ───────────────────────────────────────────────────── */
.rm-board {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--rm-lane-w); gap: 1rem;
  overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x proximity; align-items: start; scrollbar-width: thin;
}
.rm-lane { scroll-snap-align: start; display: flex; flex-direction: column; background: var(--app-surface-2); border-radius: var(--rm-r-card); min-height: 12rem; max-height: calc(100vh - 230px); }
.rm-lane__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 0.9rem 0.6rem; border-radius: var(--rm-r-card) var(--rm-r-card) 0 0; background: var(--app-surface-2); }
.rm-lane__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lane-color); box-shadow: 0 0 0 3px color-mix(in oklab, var(--lane-color) 22%, transparent); }
.rm-lane__title { font-size: 0.86rem; font-weight: 600; color: var(--rm-ink); }
.rm-lane__count { margin-left: auto; font-size: 0.74rem; font-weight: 600; color: var(--app-text-2); background: var(--app-white); padding: 0.1rem 0.5rem; border-radius: var(--rm-r-pill); font-variant-numeric: tabular-nums; }
.rm-lane__body { overflow-y: auto; padding: 0 0.6rem 0.6rem; display: flex; flex-direction: column; gap: 0.55rem; scrollbar-width: thin; }
.rm-lane__body .rm-card--request { animation: rm-rise var(--rm-slow) var(--rm-ease) both; animation-delay: calc(min(var(--i, 0), 10) * 30ms); }
.rm-lane--drop { outline: 2px dashed var(--lane-color); outline-offset: -4px; background: color-mix(in oklab, var(--lane-color) 10%, var(--app-surface-2)); }
.rm-lane__empty { padding: 1.4rem 0.8rem; text-align: center; color: var(--app-text-3); font-size: 0.82rem; }
.rm-lane__more { margin: 0.2rem 0 0.3rem; font-size: 0.78rem; color: var(--app-text-2); text-align: center; }
@keyframes rm-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rm-card--request[draggable="true"] { cursor: grab; }
.rm-card--request.rm-dragging { opacity: .45; }

.rm-lane-tabs { display: none; }
@media (max-width: 640.98px) {
  .rm-board { grid-auto-columns: 100%; scroll-snap-type: x mandatory; gap: 0.75rem; }
  .rm-lane { max-height: none; }
  .rm-lane-tabs { display: flex; gap: 0.35rem; overflow-x: auto; padding: 0 0 0.6rem; scrollbar-width: none; }
  .rm-lane-tabs button { flex: 0 0 auto; border: 1px solid var(--app-border); background: var(--app-white); color: var(--app-text-2); border-radius: var(--rm-r-pill); padding: 0.35rem 0.75rem; font: inherit; font-size: 0.8rem; font-weight: 500; display: inline-flex; gap: 0.35rem; align-items: center; min-height: 40px; }
  .rm-lane-tabs button[aria-current="true"] { border-color: var(--lane-color); color: var(--rm-ink); background: color-mix(in oklab, var(--lane-color) 12%, var(--app-white)); }
}

/* Timeline (quarters) */
.rm-quarters { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }
.rm-quarter { display: flex; flex-direction: column; gap: 0.55rem; }
.rm-quarter__head { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.2rem 0.2rem 0.5rem; border-bottom: 2px solid var(--app-border); margin-bottom: 0.2rem; }
.rm-quarter__label { font-size: 1.1rem; font-weight: 600; color: var(--rm-ink); letter-spacing: -0.01em; }
.rm-quarter__now { font-size: 0.7rem; font-weight: 600; color: var(--rm-accent-deep); background: var(--app-teal-50); padding: 0.1rem 0.5rem; border-radius: var(--rm-r-pill); }
.rm-quarter__count { margin-left: auto; font-size: 0.76rem; color: var(--app-text-3); }
.rm-quarter--now .rm-quarter__head { border-color: var(--rm-accent); }

/* ── Drawer ──────────────────────────────────────────────────── */
.rm-drawer__backdrop { position: fixed; inset: 0; background: rgba(9,26,54,.45); z-index: 1040; animation: rm-fade var(--rm-fast) ease both; }
.rm-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 1050; background: var(--app-white); box-shadow: var(--app-shadow-lift); display: flex; flex-direction: column; animation: rm-slide-in var(--rm-mid) var(--rm-ease) both; }
.rm-drawer__head { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--app-border); }
.rm-drawer__body { overflow-y: auto; padding: 1.1rem 1.25rem 1.5rem; }
.rm-drawer__close { margin-left: auto; border: 0; background: none; color: var(--app-text-2); font-size: 1.2rem; cursor: pointer; padding: 0.2rem 0.4rem; border-radius: var(--app-r-sm); }
.rm-drawer__close:hover { background: var(--app-surface-2); color: var(--rm-ink); }
@keyframes rm-slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rm-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Request detail ──────────────────────────────────────────── */
.rm-rq-hero { margin-bottom: 1.25rem; }
.rm-rq-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.65rem; margin-bottom: 0.5rem; }
.rm-rq-hero__title { font-size: clamp(1.35rem, 1rem + 1.2vw, 1.8rem); font-weight: 600; color: var(--rm-ink); line-height: 1.25; margin: 0 0 0.4rem; letter-spacing: -0.01em; }
.rm-rq-hero__by { font-size: 0.85rem; color: var(--app-text-2); }
.rm-rq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.75rem; align-items: start; }
@media (max-width: 1100px) { .rm-rq-layout { grid-template-columns: 1fr; } }
.rm-rq-rail { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 80px; }
.rm-rq-rail__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.rm-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 0.9rem; font-size: 0.85rem; margin: 0; }
.rm-facts dt { color: var(--app-text-3); margin: 0; font-weight: 500; }
.rm-facts dd { margin: 0; color: var(--app-text); }

/* Stepper */
.rm-stepper { display: flex; list-style: none; margin: 0 0 1.5rem; padding: 0; gap: 0.35rem; }
.rm-stepper li { flex: 1; position: relative; padding: 0.35rem 0 0; font-size: 0.74rem; color: var(--app-text-3); }
.rm-stepper li::before { content: ''; display: block; height: 4px; border-radius: 2px; background: var(--app-border); margin-bottom: 0.45rem; }
.rm-stepper li[data-done="true"]::before { background: var(--rm-status-shipped); }
.rm-stepper li[aria-current="step"]::before { background: var(--step-color, var(--rm-accent)); }
.rm-stepper li[aria-current="step"] { color: var(--rm-ink); font-weight: 600; }
.rm-stepper li[data-done="true"] { color: var(--app-text-2); }
.rm-stepper small { display: block; font-weight: 400; color: var(--app-text-3); }

/* Team response */
.rm-response { position: relative; border-left: 4px solid var(--rm-accent); background: color-mix(in oklab, var(--rm-accent) 8%, var(--app-white)); border-radius: 0 var(--app-r) var(--app-r) 0; padding: 1rem 1.15rem 0.9rem 1.2rem; margin: 1.25rem 0; }
.rm-response__label { font-size: 0.78rem; font-weight: 600; color: var(--rm-accent-deep); margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.4rem; }
.rm-response__quote { font-size: 1.02rem; line-height: 1.55; color: var(--rm-ink); }
.rm-response__quote p:last-child { margin-bottom: 0; }
.rm-response__by { font-size: 0.78rem; color: var(--app-text-3); margin-top: 0.5rem; display: flex; gap: 0.6rem; align-items: center; }

/* Attachments */
.rm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; margin: 1rem 0; }
.rm-gallery__item { position: relative; border: 1px solid var(--app-border); border-radius: var(--app-r); overflow: hidden; background: var(--app-surface-2); aspect-ratio: 4 / 3; display: grid; place-items: center; }
.rm-gallery__item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.rm-gallery__file { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.5rem; font-size: 0.75rem; color: var(--app-text-2); text-align: center; text-decoration: none; word-break: break-all; }
.rm-gallery__file i { font-size: 1.5rem; color: var(--rm-ink); }
.rm-gallery__remove { position: absolute; top: 4px; right: 4px; border: 0; background: rgba(9,26,54,.7); color: #fff; width: 24px; height: 24px; border-radius: 50%; font-size: 0.75rem; cursor: pointer; opacity: 0; transition: opacity var(--rm-fast) ease; }
.rm-gallery__item:hover .rm-gallery__remove, .rm-gallery__item:focus-within .rm-gallery__remove { opacity: 1; }
.rm-lightbox { position: fixed; inset: 0; z-index: 1060; background: rgba(5,10,20,.88); display: grid; place-items: center; padding: 2rem; animation: rm-fade var(--rm-fast) ease both; }
.rm-lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--app-r); box-shadow: var(--app-shadow-lift); }
.rm-lightbox__close { position: absolute; top: 1rem; right: 1rem; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; }
.rm-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255,255,255,.12); color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; }
.rm-lightbox__nav--prev { left: 1rem; } .rm-lightbox__nav--next { right: 1rem; }

.rm-dropzone { position: relative; border: 2px dashed var(--app-border-2); border-radius: var(--app-r); padding: 1rem; text-align: center; color: var(--app-text-2); font-size: 0.86rem; background: var(--app-white); transition: border-color var(--rm-fast) ease, background-color var(--rm-fast) ease; }
.rm-dropzone--active { border-color: var(--rm-accent); background: var(--app-teal-50); }
.rm-dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.rm-dropzone__btn { color: var(--rm-accent-deep); font-weight: 600; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.rm-dropzone__btn:hover { text-decoration: underline; }
.rm-dropzone__hint { font-size: 0.76rem; color: var(--app-text-3); margin-top: 0.25rem; }
.rm-dropzone__pending { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; justify-content: center; }

/* Comments */
.rm-thread { margin-top: 1.5rem; }
.rm-thread__title { font-size: 0.95rem; font-weight: 600; color: var(--rm-ink); margin: 0 0 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.rm-comment { display: grid; grid-template-columns: 32px 1fr; gap: 0.7rem; padding: 0.75rem 0; border-top: 1px solid var(--app-border); }
.rm-comment--internal { background: color-mix(in oklab, var(--rm-status-progress) 9%, transparent); margin: 0.25rem -0.6rem; padding: 0.75rem 0.6rem; border-radius: var(--app-r-sm); border-top: 0; }
.rm-comment--system { color: var(--app-text-2); font-size: 0.85rem; }
.rm-comment__head { display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.8rem; margin-bottom: 0.2rem; flex-wrap: wrap; }
.rm-comment__author { font-weight: 600; color: var(--rm-ink); }
.rm-comment__time { color: var(--app-text-3); }
.rm-comment__lock { font-size: 0.7rem; color: var(--rm-status-progress); font-weight: 600; }
.rm-comment__body { font-size: 0.92rem; line-height: 1.5; }
.rm-comment__body p:last-child { margin-bottom: 0; }
.rm-comment__actions { display: flex; gap: 0.6rem; margin-top: 0.25rem; }
.rm-comment__actions button { border: 0; background: none; color: var(--app-text-3); font-size: 0.76rem; padding: 0; cursor: pointer; }
.rm-comment__actions button:hover { color: var(--rm-ink); }
.rm-composer { margin-top: 1rem; }
.rm-composer__bar { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; flex-wrap: wrap; }
.rm-composer__internal { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: var(--app-text-2); cursor: pointer; }

/* Triage panel */
.rm-triage { border: 1px solid var(--app-border-2); border-radius: var(--rm-r-card); background: var(--app-white); }
.rm-triage__head { padding: 0.7rem 1rem; font-size: 0.82rem; font-weight: 600; color: var(--rm-ink); border-bottom: 1px solid var(--app-border); display: flex; align-items: center; gap: 0.4rem; background: var(--app-surface-2); border-radius: var(--rm-r-card) var(--rm-r-card) 0 0; }
.rm-triage__body { padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.rm-triage label { font-size: 0.76rem; color: var(--app-text-2); font-weight: 500; margin-bottom: 0.2rem; display: block; }
.rm-triage .form-select, .rm-triage .form-control { font-size: 0.85rem; }
.rm-status-buttons { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rm-status-buttons .rm-btn { padding: 0.35rem 0.65rem; font-size: 0.78rem; }

/* History */
.rm-history { list-style: none; margin: 0; padding: 0; font-size: 0.82rem; }
.rm-history li { display: grid; grid-template-columns: 10px 1fr; gap: 0.6rem; padding: 0.35rem 0; }
.rm-history li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--app-border-2); margin-top: 0.35rem; }
.rm-history li:first-child::before { background: var(--rm-accent); }
.rm-history__when { color: var(--app-text-3); font-size: 0.74rem; }

/* Similar requests rail */
.rm-similar { border: 1px solid var(--app-border); border-radius: var(--rm-r-card); background: var(--app-white); padding: 0.9rem 1rem; }
.rm-similar__title { font-size: 0.86rem; font-weight: 600; color: var(--rm-ink); margin: 0 0 0.2rem; display: flex; align-items: center; gap: 0.4rem; }
.rm-similar__hint { font-size: 0.78rem; color: var(--app-text-3); margin: 0 0 0.6rem; }
.rm-similar__row { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid var(--app-border); }
.rm-similar__row a { flex: 1; min-width: 0; font-size: 0.86rem; color: var(--rm-ink); text-decoration: none; }
.rm-similar__row a strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.rm-similar__row a small { color: var(--app-text-3); }

/* Composer layout */
.rm-compose { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.75rem; align-items: start; }
@media (max-width: 1100px) { .rm-compose { grid-template-columns: 1fr; } }
.rm-compose__rail { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 1rem; }
.rm-sol-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.rm-sol-chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.75rem 0.4rem 0.45rem; border: 1px solid var(--app-border); border-radius: var(--rm-r-pill); background: var(--app-white); font: inherit; font-size: 0.85rem; color: var(--rm-ink); cursor: pointer; transition: border-color var(--rm-fast) ease, background-color var(--rm-fast) ease; }
.rm-sol-chip[aria-pressed="true"] { border-color: var(--sol-color, var(--rm-accent)); background: color-mix(in oklab, var(--sol-color, var(--rm-accent)) 12%, var(--app-white)); font-weight: 600; }
.rm-sol-chip .rm-sol-icon { --sol-size: 24px; border-radius: 7px; }
.rm-success { text-align: center; padding: 2.5rem 1rem; max-width: 36rem; margin: 0 auto; }
.rm-success__title { font-size: 1.7rem; font-weight: 600; color: var(--rm-ink); margin: 0.5rem 0 0.4rem; letter-spacing: -0.015em; }
.rm-success__key { display: inline-block; font-weight: 700; color: var(--rm-accent-deep); background: var(--app-teal-50); padding: 0.2rem 0.7rem; border-radius: var(--rm-r-pill); font-variant-numeric: tabular-nums; }


@media (prefers-reduced-motion: reduce) {
  .rm-lane__body .rm-card--request, .rm-drawer, .rm-drawer__backdrop, .rm-lightbox { animation: none !important; }
  .rm-vote--on i { animation: none; }
}
