/* ═══════════════════════════════════════════════════════════════
   Roadmap Public — KB-style Design
   ═══════════════════════════════════════════════════════════════ */

:root {
    --rp-primary: var(--rm-primary, #6366f1);
    --rp-primary-h: var(--rm-primary-h, #4f46e5);
    --rp-text: var(--rm-text, #1e293b);
    --rp-muted: #64748b;
    --rp-bg: #f0f2f5;
    --rp-surface: #fff;
    --rp-border: #e2e8f0;
    --rp-border-light: #f1f5f9;
    --rp-r: 10px;
    --rp-r-sm: 8px;
    --rp-shadow: 0 1px 3px rgba(0,0,0,.05);
    --rp-shadow-md: 0 4px 12px rgba(0,0,0,.07);
    --rp-w: 1100px;
    --rp-t: .18s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0 }
html {
    overflow-y: scroll; scrollbar-gutter: stable;
    background: linear-gradient(
        var(--rp-surface) 56px,
        var(--rp-border) 56px, var(--rp-border) 57px,
        var(--rp-bg) 57px
    ) fixed;
}
@supports (scrollbar-gutter: stable) { html { overflow-y: auto } }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--rp-text); background: var(--rp-bg);
    line-height: 1.55; -webkit-font-smoothing: antialiased;
    min-height: 100vh; scroll-behavior: smooth;
}
a { color: var(--rp-primary); text-decoration: none }
a:hover { color: var(--rp-primary-h) }
img { max-width: 100%; height: auto }
button, input, textarea, select { font-family: inherit }
:focus-visible { outline: 2px solid var(--rp-primary); outline-offset: 2px }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none }

/* ── Container ──────────────────────────────────────────────── */
.rp-container { max-width: var(--rp-w); margin: 0 auto; padding-left: 1rem; padding-right: 1rem }

/* ── Header ─────────────────────────────────────────────────── */
.rp-header {
    background: var(--rp-surface); border-bottom: 1px solid var(--rp-border);
    position: sticky; top: 0; z-index: 100;
}
.rp-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px;
}
.rp-header__brand { display: flex; align-items: center; gap: .6rem; text-decoration: none }
.rp-header__brand:hover { text-decoration: none }
.rp-header__logo { height: 30px; width: auto; border-radius: 6px }
.rp-header__info { display: flex; align-items: baseline; gap: 0; line-height: 1.3 }
.rp-header__name { font-size: 1rem; font-weight: 700; color: var(--rp-text) }
.rp-header__tagline { font-size: 1rem; color: var(--rp-text); font-weight: 400; margin-left: 6px }
.rp-nav { display: flex; gap: .2rem }
.rp-nav__link {
    padding: .4rem .75rem; font-size: .85rem; font-weight: 500;
    color: var(--rp-muted); text-decoration: none; border-radius: 6px;
    transition: all var(--rp-t);
}
.rp-nav__link:hover { color: var(--rp-text); background: var(--rp-border-light); text-decoration: none }
.rp-nav__link.active { color: var(--rp-primary); background: rgba(99,102,241,.08); font-weight: 600 }

.rp-nav__link--soon { opacity: .55 }
.rp-nav__link--disabled { cursor: default; pointer-events: none; }
.rp-nav__soon {
    display: inline-block; padding: .1rem .35rem; margin-left: .2rem;
    font-size: .55rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    background: var(--rp-border); color: var(--rp-muted); border-radius: 4px;
    line-height: 1.4; vertical-align: middle; position: relative; top: -1px;
}

/* ── Coming Soon Page ──────────────────────────────────────── */
.rp-coming-soon {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 4rem 2rem;
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r); min-height: 340px;
}
.rp-coming-soon__icon { color: var(--rp-muted); opacity: .35; margin-bottom: 1.25rem }
.rp-coming-soon__title { font-size: 1.3rem; font-weight: 800; color: var(--rp-text); margin-bottom: .4rem }
.rp-coming-soon__desc {
    font-size: .9rem; color: var(--rp-muted); line-height: 1.6;
    max-width: 380px; margin-bottom: 1.5rem;
}

/* ── Main ───────────────────────────────────────────────────── */
.rp-main {
    padding: 1.25rem 1rem 5rem;
    min-height: calc(100vh - 120px);
    overflow-x: hidden;
}
body:has(.rp-kanban) { overflow: hidden; height: 100vh; min-height: 0 }
.rp-main:has(.rp-kanban) {
    padding-bottom: 0;
    min-height: 0;
    overflow: hidden;
}
.rp-main:has(.rp-kanban) + .rp-footer { display: none }
.rp-main__wrap {
    transition: opacity .2s ease;
}
.rp-main__wrap--fade-out { opacity: 0; pointer-events: none }
.rp-main__wrap--fade-in  { opacity: 0 }

/* ── Footer ─────────────────────────────────────────────────── */
.rp-footer {
    text-align: center; padding: 1.5rem 0; font-size: .78rem; color: var(--rp-muted);
    border-top: 1px solid var(--rp-border); background: var(--rp-surface);
}

/* ── Board Card ─────────────────────────────────────────────── */
.rp-board-card {
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r); padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem; box-shadow: var(--rp-shadow);
}
.rp-board-card__title { font-size: 1.35rem; font-weight: 800; margin-bottom: .15rem; line-height: 1.3 }
.rp-board-card__sub { font-size: .9rem; color: var(--rp-muted); font-weight: 500 }
.rp-board-card__desc { font-size: .85rem; color: var(--rp-muted); line-height: 1.6; margin-top: .35rem }

/* ── Stat Cards (status filter) ────────────────────────────── */
.rp-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: .6rem; margin-bottom: 1.25rem;
}
.rp-stat-card {
    display: flex; flex-direction: column; align-items: center;
    padding: .85rem .5rem; background: var(--rp-surface);
    border: 1.5px solid var(--rp-border); border-radius: var(--rp-r);
    cursor: pointer; transition: all .2s ease; position: relative;
}
.rp-stat-card::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%) scaleX(0); width: 60%; height: 3px;
    border-radius: 3px 3px 0 0; transition: transform .2s ease;
}
.rp-stat-card:hover { border-color: var(--rp-muted) }
.rp-stat-card.active { border-color: var(--rp-primary); box-shadow: 0 2px 8px rgba(99,102,241,.12) }
.rp-stat-card.active::after { transform: translateX(-50%) scaleX(1) }
.rp-stat__value { font-size: 1.4rem; font-weight: 800; line-height: 1.2 }
.rp-stat__label {
    font-size: .7rem; font-weight: 500; color: var(--rp-muted);
    margin-top: .15rem; text-transform: uppercase; letter-spacing: .03em;
    text-align: center; line-height: 1.3; width: 100%;
}

.rp-stat--new .rp-stat__value { color: #0d9488 }
.rp-stat--new.active { border-color: #0d9488; box-shadow: 0 2px 8px rgba(13,148,136,.12) }
.rp-stat--new::after { background: #0d9488 }
.rp-stat--all .rp-stat__value { color: var(--rp-primary) }
.rp-stat--all::after { background: var(--rp-primary) }
.rp-stat--under_review .rp-stat__value { color: #475569 }
.rp-stat--under_review.active { border-color: #475569; box-shadow: 0 2px 8px rgba(71,85,105,.12) }
.rp-stat--under_review::after { background: #475569 }
.rp-stat--planned .rp-stat__value { color: #2563eb }
.rp-stat--planned.active { border-color: #2563eb; box-shadow: 0 2px 8px rgba(37,99,235,.12) }
.rp-stat--planned::after { background: #2563eb }
.rp-stat--in_progress .rp-stat__value { color: #c2410c }
.rp-stat--in_progress.active { border-color: #c2410c; box-shadow: 0 2px 8px rgba(194,65,12,.12) }
.rp-stat--in_progress::after { background: #c2410c }
.rp-stat--released .rp-stat__value,
.rp-stat--done .rp-stat__value,
.rp-stat--completed .rp-stat__value { color: #059669 }
.rp-stat--released.active,
.rp-stat--done.active,
.rp-stat--completed.active { border-color: #059669; box-shadow: 0 2px 8px rgba(5,150,105,.12) }
.rp-stat--released::after,
.rp-stat--done::after,
.rp-stat--completed::after { background: #059669 }
.rp-stat--rejected .rp-stat__value,
.rp-stat--not_planned .rp-stat__value { color: #be185d }
.rp-stat--rejected.active,
.rp-stat--not_planned.active { border-color: #be185d; box-shadow: 0 2px 8px rgba(190,24,93,.12) }
.rp-stat--rejected::after,
.rp-stat--not_planned::after { background: #be185d }

/* ── Toolbar (label + search + sort + button) ────────────────── */
.rp-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: .75rem; margin-bottom: 1rem; flex-wrap: nowrap;
}
.rp-toolbar__left { display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 0; flex-wrap: nowrap }
.rp-toolbar__label { font-size: .9rem; font-weight: 600; color: var(--rp-text); white-space: nowrap }

.rp-search-bar {
    position: relative; display: flex; align-items: center;
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r-sm); transition: border-color var(--rp-t);
    height: 36px;
}
.rp-search-bar:focus-within { border-color: var(--rp-primary) }
.rp-search-bar__icon {
    position: absolute; left: .65rem; top: 50%; transform: translateY(-50%);
    width: 14px; height: 14px; stroke: var(--rp-muted); pointer-events: none;
}
.rp-search-bar__input {
    width: 100%; padding: 0 .6rem 0 2rem; height: 100%;
    border: none; border-radius: var(--rp-r-sm); font-size: .82rem;
    color: var(--rp-text); background: transparent; outline: none;
    min-width: 140px;
}
.rp-search-bar__input::placeholder { color: #94a3b8 }

/* Custom sort dropdown */
.rp-sort-dropdown {
    position: relative; user-select: none;
}
.rp-sort-dropdown__trigger {
    display: flex; align-items: center; gap: .4rem;
    height: 36px; padding: 0 .7rem;
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r-sm); cursor: pointer;
    font-size: .82rem; font-weight: 500; color: var(--rp-text);
    transition: border-color var(--rp-t), box-shadow var(--rp-t);
    white-space: nowrap;
}
.rp-sort-dropdown__trigger:hover { border-color: #cbd5e1 }
.rp-sort-dropdown.open .rp-sort-dropdown__trigger {
    border-color: var(--rp-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.rp-sort-dropdown__chevron {
    width: 14px; height: 14px; stroke: var(--rp-muted); flex-shrink: 0;
    transition: transform .2s ease;
}
.rp-sort-dropdown.open .rp-sort-dropdown__chevron { transform: rotate(180deg) }
.rp-sort-dropdown__menu {
    position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%;
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r-sm); box-shadow: 0 8px 24px rgba(0,0,0,.1);
    z-index: 50; opacity: 0; transform: translateY(-4px);
    pointer-events: none; transition: opacity .15s ease, transform .15s ease;
    padding: 4px; overflow: hidden;
}
.rp-sort-dropdown.open .rp-sort-dropdown__menu {
    opacity: 1; transform: none; pointer-events: auto;
}
.rp-sort-dropdown__option {
    display: flex; align-items: center; gap: .5rem;
    padding: .45rem .65rem; border-radius: 6px; cursor: pointer;
    font-size: .82rem; color: var(--rp-text); white-space: nowrap;
    transition: background .12s ease;
}
.rp-sort-dropdown__option:hover { background: var(--rp-border-light) }
.rp-sort-dropdown__option.active {
    background: rgba(99,102,241,.08); color: var(--rp-primary); font-weight: 600;
}
.rp-sort-dropdown__option-check {
    width: 14px; height: 14px; stroke: var(--rp-primary);
    opacity: 0; flex-shrink: 0;
}
.rp-sort-dropdown__option.active .rp-sort-dropdown__option-check { opacity: 1 }

/* ── Buttons ────────────────────────────────────────────────── */
.rp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    padding: .55rem 1.1rem; border-radius: var(--rp-r-sm);
    font-size: .85rem; font-weight: 600; cursor: pointer; border: none;
    transition: all var(--rp-t); text-decoration: none; line-height: 1.4;
    white-space: nowrap;
}
.rp-btn:hover { text-decoration: none }
.rp-btn:disabled { opacity: .5; cursor: default }
.rp-btn--sm { padding: 0 .75rem; font-size: .8rem; height: 36px }
.rp-btn--primary { background: var(--rp-primary); color: #fff }
.rp-btn--primary:hover { background: var(--rp-primary-h) }
.rp-btn--ghost { background: transparent; color: var(--rp-muted); border: 1px solid var(--rp-border) }
.rp-btn--ghost:hover { background: var(--rp-border-light); color: var(--rp-text) }
/* ── Upvote Button (minimal text-column style) ───────────── */
.rp-upvote {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .1rem; flex-shrink: 0;
    min-width: 52px; padding: .4rem .5rem;
    background: var(--rp-surface); color: var(--rp-muted);
    border: 1.5px solid var(--rp-border); border-radius: 10px;
    cursor: pointer; transition: all .2s ease;
    font-family: inherit; position: relative;
}
.rp-upvote:hover {
    border-color: color-mix(in srgb, var(--rp-primary) 40%, #d1d5db);
    color: var(--rp-primary);
    background: color-mix(in srgb, var(--rp-primary) 6%, #fff);
    box-shadow: 0 2px 6px color-mix(in srgb, var(--rp-primary) 12%, transparent);
}
.rp-upvote:hover .rp-upvote__ico-up { stroke: var(--rp-primary) }
.rp-upvote:hover .rp-upvote__count { color: var(--rp-primary) }
.rp-upvote:hover .rp-upvote__label { color: var(--rp-primary) }

.rp-upvote.voted {
    background: #0d9488; border-color: #0d9488; color: #fff;
}
.rp-upvote.voted .rp-upvote__ico-check { stroke: #fff }
.rp-upvote.voted .rp-upvote__count { color: #fff }
.rp-upvote.voted .rp-upvote__label { color: rgba(255,255,255,.8) }
.rp-upvote.voted:hover {
    background: #0f766e; border-color: #0f766e;
}

.rp-upvote--locked {
    cursor: default; opacity: .55;
    border-style: dashed;
}
.rp-upvote--locked:hover {
    border-color: var(--rp-border); color: var(--rp-muted);
    background: var(--rp-surface); box-shadow: none;
}
.rp-upvote--locked .rp-upvote__count { color: var(--rp-muted) }

.rp-upvote.voting { pointer-events: none; opacity: .6 }

@keyframes rp-vote-pop {
    0%   { transform: scale(1) }
    30%  { transform: scale(1.15) }
    60%  { transform: scale(.95) }
    100% { transform: scale(1) }
}
.rp-upvote--flash { animation: rp-vote-pop .45s cubic-bezier(.36,.07,.19,.97) }

.rp-upvote__ico { display: flex; align-items: center; line-height: 0 }
.rp-upvote__ico-up { stroke: var(--rp-muted); transition: stroke .2s }
.rp-upvote__ico-check { display: none; stroke: var(--rp-primary); transition: stroke .2s }
.rp-upvote.voted .rp-upvote__ico-up { display: none }
.rp-upvote.voted .rp-upvote__ico-check { display: block }

.rp-upvote__count {
    font-size: 1.1rem; font-weight: 800; line-height: 1.1;
    color: var(--rp-text); transition: color .2s;
}
.rp-upvote__label {
    font-size: .6rem; font-weight: 600; text-transform: uppercase;
    color: var(--rp-muted); line-height: 1; letter-spacing: .03em;
    transition: color .2s;
}
.rp-upvote--lg {
    min-width: 64px; padding: .5rem .6rem; border-radius: 12px;
}
.rp-upvote--lg .rp-upvote__count { font-size: 1.35rem }

/* ── Item Cards (connected list) ──────────────────────────── */
.rp-items { display: flex; flex-direction: column; gap: 0 }

.rp-card {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.1rem 1.25rem;
    background: var(--rp-surface);
    border: 1px solid var(--rp-border); border-bottom: none;
    transition: background .15s ease;
}
.rp-card:first-child { border-radius: var(--rp-r) var(--rp-r) 0 0 }
.rp-card:last-child { border-bottom: 1px solid var(--rp-border); border-radius: 0 0 var(--rp-r) var(--rp-r) }
.rp-card:only-child { border-radius: var(--rp-r); border-bottom: 1px solid var(--rp-border) }
.rp-card:hover { background: color-mix(in srgb, var(--rp-primary) 5%, #fff) }

/* (old .rp-vote removed — replaced by .rp-upvote above) */

/* ── Card Body ──────────────────────────────────────────────── */
.rp-card__body { flex: 1; min-width: 0 }
.rp-card__header {
    display: flex; align-items: flex-start; gap: .6rem;
    justify-content: space-between;
}
.rp-card__title {
    font-size: .95rem; font-weight: 600; color: var(--rp-text);
    line-height: 1.45; word-break: break-word; text-decoration: none;
}
.rp-card__title:hover { color: var(--rp-primary) }
.rp-card__desc {
    margin: .35rem 0 0; font-size: .84rem; color: var(--rp-muted); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    word-break: break-word; white-space: pre-line;
}
.rp-card__meta {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    margin-top: .6rem; font-size: .78rem; color: var(--rp-muted);
}
.rp-card__sep { opacity: .35 }
.rp-card__author {
    display: inline-flex; align-items: center; gap: .3rem;
    font-weight: 500; color: var(--rp-text);
}
.rp-card__avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    font-size: .58rem; font-weight: 700; color: #fff;
    background: var(--rp-primary); flex-shrink: 0;
}
.rp-card__comments { display: inline-flex; align-items: center; gap: .2rem }
.rp-card__comments svg { stroke: currentColor }

/* ── Badges ─────────────────────────────────────────────────── */
.rp-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 6px;
    font-size: .72rem; font-weight: 600; line-height: 1.5;
    white-space: nowrap; flex-shrink: 0;
}
.rp-badge--new { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4 }
.rp-badge--pinned { background: #fef3c7; color: #92400e; border: 1px solid #fde68a }
.rp-badge--cat { background: var(--rp-border-light); color: var(--rp-muted) }
.rp-badge--released,
.rp-badge--done,
.rp-badge--completed { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0 }
.rp-badge--under_review { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0 }
.rp-badge--planned { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe }
.rp-badge--in_progress { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa }
.rp-badge--rejected,
.rp-badge--not_planned { background: #fce7f3; color: #be185d; border: 1px solid #fbcfe8 }

/* ── FAB ────────────────────────────────────────────────────── */
.rp-fab {
    position: fixed; bottom: 1.25rem; right: 1.25rem;
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--rp-primary); color: #fff; border: none; cursor: pointer;
    box-shadow: 0 4px 14px rgba(99,102,241,.35);
    z-index: 50; transition: all .25s ease;
    opacity: 0; transform: translateY(12px); pointer-events: none;
}
.rp-fab.visible { opacity: 1; transform: none; pointer-events: auto }
.rp-fab svg { stroke: #fff }
.rp-fab:hover { background: var(--rp-primary-h); transform: scale(1.05) }

/* ── Detail Page ────────────────────────────────────────────── */
.rp-detail__back {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .85rem; color: var(--rp-muted); margin-bottom: 1rem;
    text-decoration: none; font-weight: 500; transition: color var(--rp-t);
}
.rp-detail__back:hover { color: var(--rp-primary); text-decoration: none }
.rp-detail__back svg { stroke: currentColor }

.rp-detail__grid {
    display: grid; grid-template-columns: 1fr 260px; gap: 1.25rem; align-items: start;
}
.rp-detail__main { display: flex; flex-direction: column; gap: 1rem; min-width: 0 }

.rp-detail__card {
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r); padding: 1.5rem 1.75rem;
    box-shadow: var(--rp-shadow);
}
.rp-detail__top { display: flex; align-items: flex-start; gap: 1rem; justify-content: space-between }
.rp-detail__heading { flex: 1; min-width: 0 }
.rp-detail__title { font-size: 1.35rem; font-weight: 800; line-height: 1.3; margin-bottom: .5rem }
.rp-detail__meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center }
.rp-detail__vote { flex-shrink: 0 }
.rp-detail__desc {
    font-size: .9rem; line-height: 1.75; color: #475569;
    padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--rp-border-light);
}
.rp-detail__author {
    display: flex; align-items: center; gap: .4rem;
    padding-top: .85rem; margin-top: .85rem; border-top: 1px solid var(--rp-border-light);
    font-size: .8rem; color: var(--rp-muted);
}
.rp-detail__author-name { font-weight: 600; color: var(--rp-text) }
.rp-detail__author-sep { opacity: .35 }

.rp-detail__response {
    background: rgba(99,102,241,.03); border: 1px solid rgba(99,102,241,.12);
    border-radius: var(--rp-r); padding: 1.25rem 1.5rem;
}
.rp-detail__response-label {
    display: flex; align-items: center; gap: .35rem;
    font-size: .78rem; font-weight: 700; color: var(--rp-primary);
    margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .03em;
}
.rp-detail__response-label svg { stroke: var(--rp-primary) }
.rp-detail__response-body { font-size: .88rem; line-height: 1.7; color: #475569 }

/* Detail section */
.rp-detail__section {
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r); box-shadow: var(--rp-shadow);
    overflow: hidden;
}
.rp-detail__section-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--rp-border-light);
    background: var(--rp-border-light);
}
.rp-detail__section-title { font-size: .95rem; font-weight: 700; color: var(--rp-text); margin: 0 }
.rp-detail__section .rp-comment-form { margin: 0; border: none; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--rp-border-light) }
.rp-detail__section .rp-comments__list { padding: 0 }
.rp-detail__section .rp-comment {
    border: none; border-radius: 0; border-bottom: 1px solid var(--rp-border-light);
    box-shadow: none;
}
.rp-detail__section .rp-comment:last-child { border-bottom: none }
.rp-detail__section .rp-comments__empty { padding: 1.5rem; text-align: center }

/* Sidebar */
.rp-detail__sidebar-card {
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r); box-shadow: var(--rp-shadow);
    padding: 1rem 1.25rem; position: sticky; top: 72px;
}
.rp-detail__sidebar-title {
    font-size: .78rem; font-weight: 700; color: var(--rp-muted);
    text-transform: uppercase; letter-spacing: .04em;
    margin-bottom: .75rem; padding-bottom: .6rem;
    border-bottom: 1px solid var(--rp-border-light);
}
.rp-detail__sidebar-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: .4rem 0; font-size: .82rem;
}
.rp-detail__sidebar-label { color: var(--rp-muted); font-weight: 500 }
.rp-detail__sidebar-value { color: var(--rp-text); font-weight: 600 }

/* ── Comments ───────────────────────────────────────────────── */
.rp-comments { margin-top: .5rem }
.rp-comments__header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .85rem;
}
.rp-comments__title { font-size: 1rem; font-weight: 700; color: var(--rp-text) }
.rp-comments__sort { display: flex; gap: .2rem }
.rp-sort__btn {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .35rem .6rem; border: none; border-radius: 6px;
    background: transparent; font-size: .8rem; font-weight: 500;
    color: var(--rp-muted); cursor: pointer; transition: all var(--rp-t);
    white-space: nowrap;
}
.rp-sort__btn:hover { color: var(--rp-text); background: var(--rp-border-light) }
.rp-sort__btn.active { color: var(--rp-primary); background: rgba(99,102,241,.08) }
.rp-comments__empty { font-size: .85rem; color: var(--rp-muted); padding: 1rem 0 }

.rp-comment-form {
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r); padding: 1rem; margin-bottom: 1rem;
    box-shadow: var(--rp-shadow);
}
.rp-comment-form textarea {
    width: 100%; padding: .6rem .85rem;
    border: 1px solid var(--rp-border); border-radius: var(--rp-r-sm);
    font-size: .85rem; resize: vertical; min-height: 60px; font-family: inherit;
    transition: border-color var(--rp-t); color: var(--rp-text);
}
.rp-comment-form textarea:focus { outline: none; border-color: var(--rp-primary) }
.rp-comment-form__row { display: flex; gap: .5rem; align-items: center; margin-top: .6rem }
.rp-comment-form__row input {
    flex: 1; padding: .45rem .65rem;
    border: 1px solid var(--rp-border); border-radius: var(--rp-r-sm);
    font-size: .8rem; transition: border-color var(--rp-t); color: var(--rp-text);
    background: var(--rp-surface);
}
.rp-comment-form__row input:focus { outline: none; border-color: var(--rp-primary) }

.rp-comments__list { display: flex; flex-direction: column; gap: .5rem }
.rp-comment {
    display: flex; gap: .75rem; align-items: flex-start;
    padding: 1rem 1.15rem;
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r);
}
.rp-comment__avatar {
    width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
    background: var(--rp-border-light);
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700; color: var(--rp-muted);
}
.rp-comment__avatar--official { background: rgba(99,102,241,.1); color: var(--rp-primary) }
.rp-comment__avatar--official svg { stroke: var(--rp-primary) }
.rp-comment__content { flex: 1; min-width: 0 }
.rp-comment__header { display: flex; gap: .4rem; align-items: center; margin-bottom: .2rem; flex-wrap: wrap }
.rp-comment__author { font-size: .82rem; font-weight: 600; color: var(--rp-text) }
.rp-comment__author--official { color: var(--rp-primary) }
.rp-comment__badge {
    font-size: .58rem; font-weight: 700; padding: .1rem .35rem;
    background: var(--rp-primary); color: #fff; border-radius: 4px;
    text-transform: uppercase; letter-spacing: .03em;
}
.rp-comment__date { font-size: .72rem; color: var(--rp-muted) }
.rp-comment__body { font-size: .85rem; line-height: 1.6; color: #475569 }

/* ── Modal ──────────────────────────────────────────────────── */
.rp-modal-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,.4);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 1000; display: none; align-items: center; justify-content: center;
    padding: 1rem;
}
.rp-modal-overlay.open { display: flex }
.rp-modal {
    background: var(--rp-surface); border-radius: 14px;
    max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,.15);
    animation: rpModalIn .2s ease-out;
}
@keyframes rpModalIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
.rp-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem .75rem;
}
.rp-modal__title { font-size: 1.1rem; font-weight: 700 }
.rp-modal__close {
    width: 30px; height: 30px; border: none; background: var(--rp-border-light);
    border-radius: 8px; font-size: 1.15rem; color: var(--rp-muted);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all var(--rp-t); line-height: 1;
}
.rp-modal__close:hover { background: var(--rp-border); color: var(--rp-text) }
.rp-modal form { padding: 1rem 1.5rem 1.5rem }
.rp-form-group { margin-bottom: .85rem }
.rp-form-group label { display: block; font-size: .78rem; font-weight: 600; color: var(--rp-muted); margin-bottom: .25rem }
.rp-form-hint { display: block; font-size: .72rem; color: #a0aec0; margin-top: .3rem; padding-left: .75rem; line-height: 1.3 }
.rp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem }
.rp-modal input[type=text], .rp-modal input[type=email], .rp-modal textarea, .rp-modal select {
    width: 100%; padding: .5rem .75rem;
    border: 1px solid var(--rp-border); border-radius: var(--rp-r-sm);
    font-size: .85rem; font-family: inherit;
    transition: border-color var(--rp-t); background: var(--rp-surface); color: var(--rp-text);
}
.rp-modal input:focus, .rp-modal textarea:focus, .rp-modal select:focus { outline: none; border-color: var(--rp-primary) }
.rp-modal__actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rp-border-light) }

/* ── Kanban (MeisterTask-style) ─────────────────────────────── */
.rp-kanban {
    display: flex; gap: .75rem; margin-top: 1.25rem;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; padding-bottom: .5rem;
    height: calc(100vh - 170px);
}
.rp-kanban__col {
    background: #fff; border: 1px solid var(--rp-border); border-radius: 6px;
    display: flex; flex-direction: column;
    min-width: 140px; flex: 1; min-height: 0;
    overflow: hidden;
}
.rp-kanban__col-header {
    display: flex; align-items: center; gap: .5rem;
    padding: .55rem 1rem; border-radius: 6px 6px 0 0;
    color: #fff; font-weight: 600; font-size: .88rem;
    flex-shrink: 0;
}
.rp-kanban__col-label { flex: 1 }
.rp-kanban__col-count {
    background: rgba(255,255,255,.25); padding: .1rem .45rem;
    border-radius: 10px; font-size: .72rem; font-weight: 600;
}
.rp-kanban__col-body {
    padding: .5rem; flex: 1; overflow-y: auto;
    display: flex; flex-direction: column; gap: .4rem;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.rp-kanban__col-body::-webkit-scrollbar { width: 5px }
.rp-kanban__col-body::-webkit-scrollbar-track { background: transparent }
.rp-kanban__col-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px }
.rp-kanban__col-body::-webkit-scrollbar-thumb:hover { background: #94a3b8 }
.rp-kanban__card {
    display: block;
    text-decoration: none; color: inherit;
    background: #f8fafc; border: 1px solid var(--rp-border);
    border-radius: 8px; padding: .6rem .75rem;
    transition: box-shadow .15s, border-color .15s, background .15s;
}
.rp-kanban__card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); border-color: #d1d5db; background: #fff; text-decoration: none }
.rp-kanban__card-title {
    font-weight: 500; font-size: .82rem; color: var(--rp-text);
    line-height: 1.4;
    display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rp-kanban__card-meta {
    display: none;
}
.rp-kanban__card-votes, .rp-kanban__card-comments {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .72rem; color: var(--rp-muted); white-space: nowrap;
}
.rp-kanban__card-votes svg, .rp-kanban__card-comments svg { stroke: var(--rp-muted); flex-shrink: 0 }

/* ── Changelog Timeline ─────────────────────────────────────── */
.rp-timeline { position: relative; padding-left: 1.75rem }
.rp-timeline::before {
    content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px;
    width: 2px; background: var(--rp-border); border-radius: 1px;
}
.rp-timeline__entry { position: relative; margin-bottom: 1.25rem }
.rp-timeline__entry:last-child { margin-bottom: 0 }
.rp-timeline__dot {
    position: absolute; left: -1.75rem; top: 1.4rem;
    width: 14px; height: 14px;
    background: var(--rp-primary); border: 3px solid var(--rp-bg); border-radius: 50%;
}
.rp-timeline__card {
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r); padding: 1.25rem 1.5rem;
    box-shadow: var(--rp-shadow); transition: all var(--rp-t);
}
.rp-timeline__card:hover { box-shadow: var(--rp-shadow-md); transform: translateY(-1px) }
.rp-timeline__header { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem }
.rp-timeline__version {
    padding: .15rem .5rem; background: var(--rp-primary); color: #fff;
    border-radius: 5px; font-size: .7rem; font-weight: 700;
}
.rp-timeline__date { font-size: .78rem; color: var(--rp-muted) }
.rp-timeline__title { font-size: 1rem; font-weight: 700; margin-bottom: .25rem }
.rp-timeline__body { font-size: .85rem; line-height: 1.7; color: #475569 }
.rp-timeline__related {
    margin-top: .65rem; font-size: .78rem; color: var(--rp-muted);
    display: flex; align-items: center; gap: .3rem;
}
.rp-timeline__related svg { stroke: var(--rp-muted) }

/* ── Section Header ─────────────────────────────────────────── */
.rp-section-header { margin-bottom: 1.25rem }
.rp-section-header h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: .2rem }
.rp-section-header p { color: var(--rp-muted); font-size: .88rem }

/* ── Empty State ────────────────────────────────────────────── */
.rp-empty {
    text-align: center; padding: 2.5rem 1.5rem; color: var(--rp-muted);
    background: var(--rp-surface); border: 1px solid var(--rp-border);
    border-radius: var(--rp-r);
}
.rp-empty--sm {
    padding: 3rem 1.5rem; font-size: .9rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 180px;
}
.rp-empty__icon { font-size: 2rem; margin-bottom: .5rem; opacity: .5 }
.rp-empty__title { font-size: 1rem; font-weight: 700; color: var(--rp-text); margin-bottom: .2rem }
.rp-empty__desc { font-size: .85rem; margin-bottom: .75rem }
.rp-empty__btn { margin-top: .25rem }

/* ── Card highlight (post-submit) ──────────────────────────── */
@keyframes rp-highlight-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(99, 102, 241, .45) }
    40%  { box-shadow: 0 0 0 8px rgba(99, 102, 241, .15) }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0) }
}
.rp-card--highlight {
    outline: 2px solid var(--rp-primary);
    outline-offset: -2px;
    background: rgba(99, 102, 241, .06) !important;
    animation: rp-highlight-pulse 1.4s ease 5;
    position: relative;
    z-index: 1;
}

/* ── Honeypot ───────────────────────────────────────────────── */
.rp-hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root { --rp-w: 100% }
    .rp-main { padding: 1rem .75rem 5rem }
    .rp-board-card { padding: 1rem 1.25rem }
    .rp-board-card__title { font-size: 1.15rem }
    .rp-stats { grid-template-columns: repeat(3, 1fr) }
    .rp-toolbar { flex-wrap: wrap }
    .rp-toolbar__left { flex-wrap: wrap; width: 100% }
    .rp-search-bar { flex: 1 }
    .rp-search-bar__input { min-width: 0 }
    .rp-card { padding: .85rem 1rem; gap: .75rem }
    .rp-upvote { min-width: 44px; padding: .3rem .35rem }
    .rp-upvote__count { font-size: .95rem }
    .rp-card__title { font-size: .88rem }
    .rp-kanban { flex-direction: column; height: auto }
    .rp-kanban__col { min-width: auto; min-height: auto; max-height: 400px }
    .rp-detail__grid { grid-template-columns: 1fr }
    .rp-detail__card { padding: 1.15rem 1.35rem }
    .rp-detail__title { font-size: 1.15rem }
    .rp-detail__top { flex-direction: column; gap: .75rem }
    .rp-detail__vote { align-self: flex-start }
    .rp-detail__sidebar-card { position: static }
    .rp-modal { border-radius: var(--rp-r) }
    .rp-form-row { grid-template-columns: 1fr }
    .rp-timeline { padding-left: 1.25rem }
    .rp-timeline__dot { left: -1.25rem; width: 10px; height: 10px }
    .rp-timeline::before { left: 4px }
}

@media (max-width: 480px) {
    .rp-header__inner { flex-direction: column; height: auto; padding: .5rem 1rem; gap: .25rem }
    .rp-nav { gap: .1rem; flex-wrap: wrap; justify-content: center }
    .rp-nav__link { padding: .3rem .5rem; font-size: .78rem }
    .rp-stats { grid-template-columns: repeat(2, 1fr) }
    .rp-stat__value { font-size: 1.15rem }
    .rp-stat__label { font-size: .62rem }
    .rp-stat-card { padding: .6rem .35rem }
    .rp-toolbar { flex-direction: column; align-items: stretch }
    .rp-toolbar__left { flex-direction: column }
    .rp-card__meta { font-size: .7rem }
    .rp-comment-form__row { flex-direction: column }
    .rp-comment-form__row input { width: 100% }
    .rp-comment { padding: .75rem .85rem }
}
