/* ==========================================================================
   基金组合再平衡计算器 · 拼图配比风（雾紫 + 薄荷 · 圆角卡 · 堆叠条）
   ========================================================================== */

.rb-page {
    --rb-bg: #f4f3fb;
    --rb-card: #ffffff;
    --rb-card-2: #f8f7fd;
    --rb-ink: #1c1b30;
    --rb-ink-2: #4b4a68;
    --rb-mut: #8685a0;
    --rb-line: #e7e6f2;
    --rb-line-2: #d6d5e8;
    --rb-violet: #5b53c8;
    --rb-violet-2: #453ea8;
    --rb-violet-soft: rgba(91, 83, 200, .1);
    --rb-mint: #0f9b8e;
    --rb-red: #c0392b;
    --rb-green: #12805f;
    --rb-amber: #b7791f;
    --rb-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --rb-mono: ui-monospace, "SFMono-Regular", "Consolas", "Roboto Mono", monospace;
    --rb-shadow: 0 16px 36px -28px rgba(30, 27, 70, .5);

    background: var(--rb-bg);
    color: var(--rb-ink);
    font-family: var(--rb-sans);
    line-height: 1.7;
    padding-bottom: 56px;
}

:root[data-theme="dark"] .rb-page {
    --rb-bg: #0f0f19;
    --rb-card: #171724;
    --rb-card-2: #1d1d2d;
    --rb-ink: #eceaf7;
    --rb-ink-2: #b3b1ca;
    --rb-mut: #8b89a6;
    --rb-line: #23233a;
    --rb-line-2: #33334d;
    --rb-violet: #9d95f0;
    --rb-violet-2: #b7b0ff;
    --rb-violet-soft: rgba(157, 149, 240, .14);
    --rb-mint: #45d3c2;
    --rb-red: #f0897e;
    --rb-green: #5fd0a5;
    --rb-amber: #e2b25c;
    --rb-shadow: 0 16px 36px -28px rgba(0, 0, 0, .9);
}

.rb-page * { box-sizing: border-box; }

.rb-wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Hero ---------- */
.rb-hero {
    position: relative;
    padding: 22px 0 34px;
    border-bottom: 1px solid var(--rb-line-2);
    background:
        radial-gradient(80% 120% at 88% 0%, rgba(15, 155, 142, .1), transparent 60%),
        radial-gradient(90% 120% at 6% 0%, rgba(91, 83, 200, .12), transparent 62%),
        linear-gradient(180deg, var(--rb-card-2), var(--rb-bg));
}

.rb-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.rb-crumb { font-size: 12.5px; color: var(--rb-mut); }
.rb-crumb a { color: var(--rb-ink-2); text-decoration: none; }
.rb-crumb a:hover { color: var(--rb-violet); text-decoration: underline; text-underline-offset: 3px; }
.rb-crumb i { margin: 0 7px; font-style: normal; color: var(--rb-line-2); }
.rb-crumb b { color: var(--rb-ink); font-weight: 600; }

.rb-theme {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--rb-line-2);
    border-radius: 999px;
    background: color-mix(in srgb, var(--rb-card) 82%, transparent);
}
.rb-theme button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--rb-mut);
    font-family: var(--rb-sans);
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .18s, color .18s;
}
.rb-theme button:hover { color: var(--rb-ink); }
.rb-theme button[aria-pressed="true"] {
    background: var(--rb-violet);
    color: #fff;
}
.rb-theme button:focus-visible { outline: 2px solid var(--rb-violet); outline-offset: 2px; }

.rb-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, .82fr);
    gap: 30px;
    align-items: start;
    margin-top: 26px;
}

.rb-kicker {
    margin: 0 0 10px;
    font-size: 11.5px;
    letter-spacing: .2em;
    font-weight: 700;
    color: var(--rb-violet);
    text-transform: uppercase;
}

.rb-h1 {
    margin: 0;
    font-size: 39px;
    line-height: 1.32;
    letter-spacing: -.02em;
    font-weight: 800;
    color: var(--rb-ink);
}

.rb-lede {
    margin: 14px 0 0;
    max-width: 42em;
    font-size: 15px;
    line-height: 1.85;
    color: var(--rb-ink-2);
}
.rb-lede strong {
    color: var(--rb-violet-2);
    font-weight: 700;
    background: linear-gradient(180deg, transparent 64%, var(--rb-violet-soft) 64%);
    padding: 0 1px;
}

.rb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}
.rb-chips li {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 130px;
    padding: 9px 14px;
    border: 1px solid var(--rb-line-2);
    border-radius: 12px;
    background: color-mix(in srgb, var(--rb-card) 86%, transparent);
}
.rb-chips span { font-size: 11.5px; color: var(--rb-mut); }
.rb-chips b {
    font-family: var(--rb-mono);
    font-size: 17px;
    font-weight: 700;
    color: var(--rb-ink);
    font-variant-numeric: tabular-nums;
}

/* 体检卡 */
.rb-vitals {
    border: 1px solid var(--rb-line-2);
    border-radius: 16px;
    background: var(--rb-card);
    box-shadow: var(--rb-shadow);
    overflow: hidden;
}
.rb-vitals-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    border-bottom: 1px solid var(--rb-line);
    background: linear-gradient(180deg, var(--rb-violet-soft), transparent);
    font-size: 12px;
    color: var(--rb-ink-2);
    letter-spacing: .06em;
}
.rb-vitals-head em {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--rb-violet);
    color: #fff;
}
.rb-vitals-head em.is-ok { background: var(--rb-mint); }
.rb-vitals-head em.is-warn { background: var(--rb-amber); }
.rb-vitals-body { padding: 8px 16px 4px; }
.rb-vitals-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--rb-line);
    font-size: 12.5px;
}
.rb-vitals-row:last-child { border-bottom: 0; }
.rb-vitals-row span { color: var(--rb-mut); }
.rb-vitals-row b {
    font-family: var(--rb-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--rb-ink);
    font-variant-numeric: tabular-nums;
}
.rb-vitals-bar {
    padding: 6px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rb-vitals-bar span {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: var(--rb-line);
    overflow: hidden;
}
.rb-vitals-bar .seg-now { background: linear-gradient(90deg, var(--rb-violet), var(--rb-violet-2)); }
.rb-vitals-bar .seg-target { background: linear-gradient(90deg, var(--rb-mint), #0c857a); }
.rb-vitals-note {
    margin: 6px 0 0;
    padding: 0 16px 12px;
    font-size: 10.5px;
    color: var(--rb-mut);
}

/* ---------- 主体 ---------- */
.rb-body { padding-top: 24px; }

/* 编辑器 */
.rb-editor {
    border: 1px solid var(--rb-line-2);
    border-radius: 16px;
    background: var(--rb-card);
    box-shadow: var(--rb-shadow);
    overflow: hidden;
}
.rb-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 13px 18px;
    border-bottom: 1px solid var(--rb-line);
    background: linear-gradient(180deg, var(--rb-card-2), transparent);
}
.rb-editor-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.rb-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-tools button {
    appearance: none;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid var(--rb-line-2);
    border-radius: 999px;
    background: var(--rb-card);
    color: var(--rb-ink-2);
    font-family: var(--rb-sans);
    font-size: 12px;
    font-weight: 600;
    transition: border-color .16s, background .16s, color .16s;
}
.rb-tools button:hover {
    border-color: var(--rb-violet);
    background: var(--rb-violet-soft);
    color: var(--rb-violet-2);
}
.rb-tools button:focus-visible { outline: 2px solid var(--rb-violet); outline-offset: 2px; }
.rb-tools button[disabled] { opacity: .45; cursor: not-allowed; }

.rb-rows-head {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, .9fr) 38px;
    gap: 12px;
    padding: 9px 18px;
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--rb-mut);
    border-bottom: 1px solid var(--rb-line);
    background: var(--rb-card-2);
}
.rb-rows { padding: 4px 0; }

.rb-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, .9fr) 38px;
    gap: 12px;
    align-items: center;
    padding: 7px 18px;
    border-bottom: 1px dashed var(--rb-line);
}
.rb-row:last-child { border-bottom: 0; }
.rb-row:hover { background: color-mix(in srgb, var(--rb-violet) 4%, transparent); }

.rb-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.rb-dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--rb-c, var(--rb-violet));
}
.rb-name input {
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--rb-ink);
    font-family: var(--rb-sans);
    font-size: 13.5px;
    font-weight: 600;
    outline: none;
}
.rb-name input:hover { background: var(--rb-card-2); }
.rb-name input:focus { border-color: var(--rb-violet); background: var(--rb-card); }

.rb-cell { min-width: 0; }
.rb-cell input {
    width: 100%;
    min-width: 0;
    padding: 6px 9px;
    border: 1px solid var(--rb-line-2);
    border-radius: 8px;
    background: var(--rb-card-2);
    color: var(--rb-ink);
    font-family: var(--rb-mono);
    font-size: 13.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    outline: none;
    transition: border-color .16s, box-shadow .16s, background .16s;
}
.rb-cell input:focus {
    border-color: var(--rb-violet);
    background: var(--rb-card);
    box-shadow: 0 0 0 3px var(--rb-violet-soft);
}
.rb-cell input::-webkit-outer-spin-button,
.rb-cell input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rb-cell input[type="number"] { -moz-appearance: textfield; }

.rb-del {
    appearance: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border: 1px solid var(--rb-line-2);
    border-radius: 8px;
    background: var(--rb-card);
    color: var(--rb-mut);
    font-size: 14px;
    line-height: 1;
    transition: border-color .16s, color .16s, background .16s;
}
.rb-del:hover { border-color: var(--rb-red); color: var(--rb-red); background: color-mix(in srgb, var(--rb-red) 8%, transparent); }
.rb-del[disabled] { opacity: .35; cursor: not-allowed; }

/* 费率 */
.rb-fees {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-top: 1px dashed var(--rb-line-2);
    background: var(--rb-card-2);
}
.rb-fee {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 132px;
}
.rb-fee > span:first-child { font-size: 11.5px; color: var(--rb-ink-2); }
.rb-input {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 5px 9px;
    border: 1px solid var(--rb-line-2);
    border-radius: 8px;
    background: var(--rb-card);
}
.rb-input:focus-within { border-color: var(--rb-violet); box-shadow: 0 0 0 3px var(--rb-violet-soft); }
.rb-input input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--rb-ink);
    font-family: var(--rb-mono);
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    outline: none;
}
.rb-input input::-webkit-outer-spin-button,
.rb-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rb-input em { font-style: normal; font-size: 11px; color: var(--rb-mut); }
.rb-fee-note {
    margin: 0;
    flex: 1 1 200px;
    font-size: 11px;
    color: var(--rb-mut);
}

.rb-err {
    margin: 0;
    padding: 10px 18px;
    border-top: 1px solid color-mix(in srgb, var(--rb-red) 28%, transparent);
    background: color-mix(in srgb, var(--rb-red) 8%, transparent);
    color: var(--rb-red);
    font-size: 12.5px;
    font-weight: 600;
}
.rb-err[hidden] { display: none; }

.rb-samples {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 11px 18px;
    border-top: 1px solid var(--rb-line);
}
.rb-samples > span { font-size: 11.5px; color: var(--rb-mut); letter-spacing: .08em; }
.rb-samples button {
    appearance: none;
    cursor: pointer;
    padding: 5px 12px;
    border: 1px solid var(--rb-line-2);
    border-radius: 999px;
    background: var(--rb-card-2);
    color: var(--rb-ink-2);
    font-family: var(--rb-sans);
    font-size: 12px;
    transition: border-color .16s, background .16s, color .16s;
}
.rb-samples button:hover { border-color: var(--rb-mint); background: color-mix(in srgb, var(--rb-mint) 10%, transparent); color: var(--rb-mint); }
.rb-samples button:focus-visible { outline: 2px solid var(--rb-violet); outline-offset: 2px; }

/* ---------- 结果 ---------- */
.rb-results {
    margin-top: 20px;
    border: 1px solid var(--rb-line-2);
    border-radius: 16px;
    background: var(--rb-card);
    box-shadow: var(--rb-shadow);
    overflow: hidden;
}
.rb-results-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-bottom: 1px solid var(--rb-line);
    background: linear-gradient(180deg, var(--rb-card-2), transparent);
}
.rb-results-head h2 { margin: 0; font-size: 15.5px; font-weight: 800; }
.rb-results-head span { font-size: 11.5px; color: var(--rb-mut); }

.rb-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--rb-line);
}
.rb-stat {
    padding: 12px 16px;
    background: var(--rb-card);
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.rb-stat span { font-size: 11.5px; color: var(--rb-mut); }
.rb-stat b {
    font-family: var(--rb-mono);
    font-size: 20px;
    font-weight: 800;
    color: var(--rb-ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}
.rb-stat em {
    font-style: normal;
    font-size: 10.5px;
    color: var(--rb-mut);
    border-top: 1px dotted var(--rb-line);
    padding-top: 4px;
    margin-top: 3px;
}

/* 配比条 */
.rb-bars { padding: 14px 18px 4px; }
.rb-bar-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}
.rb-bar-label { font-size: 11.5px; color: var(--rb-mut); }
.rb-bar {
    display: flex;
    height: 16px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--rb-line);
}
.rb-bar i {
    display: block;
    height: 100%;
    background: var(--rb-c, var(--rb-violet));
    transition: width .25s ease;
}
.rb-bar i.is-zero { width: 0 !important; }
.rb-bars-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 6px 18px 12px;
    font-size: 11px;
    color: var(--rb-ink-2);
}
.rb-bars-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rb-bars-legend i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--rb-c, var(--rb-violet));
}

.rb-verdict {
    margin: 0 18px 14px;
    padding: 10px 13px;
    border-radius: 10px;
    background: var(--rb-violet-soft);
    border-left: 3px solid var(--rb-violet);
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--rb-ink-2);
}
.rb-verdict.is-warn {
    background: color-mix(in srgb, var(--rb-amber) 10%, transparent);
    border-left-color: var(--rb-amber);
    color: var(--rb-amber);
}

/* 表格 */
.rb-tablewrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--rb-line);
}
.rb-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rb-table th,
.rb-table td {
    padding: 9px 14px;
    text-align: right;
    white-space: nowrap;
    border-bottom: 1px solid var(--rb-line);
    font-family: var(--rb-mono);
    font-variant-numeric: tabular-nums;
    color: var(--rb-ink-2);
}
.rb-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    font-family: var(--rb-sans);
    font-size: 11px;
    font-weight: 700;
    color: var(--rb-mut);
    background: var(--rb-card-2);
}
.rb-table th:first-child,
.rb-table td:first-child { text-align: left; }
.rb-table td:first-child {
    font-family: var(--rb-sans);
    font-weight: 600;
    color: var(--rb-ink);
}
.rb-table tbody tr:last-child td { border-bottom: 0; }
.rb-table tbody tr:hover { background: color-mix(in srgb, var(--rb-violet) 5%, transparent); }
.rb-table td.is-neg { color: var(--rb-red); }
.rb-table td.is-pos { color: var(--rb-green); }
.rb-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-family: var(--rb-sans);
    font-size: 11px;
    font-weight: 700;
}
.rb-badge.buy { background: color-mix(in srgb, var(--rb-red) 12%, transparent); color: var(--rb-red); }
.rb-badge.sell { background: color-mix(in srgb, var(--rb-green) 14%, transparent); color: var(--rb-green); }
.rb-badge.hold { background: var(--rb-card-2); color: var(--rb-mut); }
.rb-empty { text-align: center !important; font-family: var(--rb-sans) !important; color: var(--rb-mut); }

.rb-swipe-hint {
    margin: 0;
    padding: 8px 18px;
    font-size: 11px;
    color: var(--rb-mut);
    border-top: 1px dashed var(--rb-line);
}
.rb-swipe-hint[hidden] { display: none; }

/* ---------- 说明 ---------- */
.rb-panel {
    margin-top: 20px;
    border: 1px solid var(--rb-line-2);
    border-radius: 16px;
    background: var(--rb-card);
    box-shadow: var(--rb-shadow);
    overflow: hidden;
}
.rb-panel-head {
    padding: 12px 18px;
    border-bottom: 1px solid var(--rb-line);
    background: linear-gradient(180deg, var(--rb-card-2), transparent);
}
.rb-panel-head h2 { margin: 0; font-size: 15px; font-weight: 800; }

.rb-note-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 26px;
    padding: 16px 18px 6px;
}
.rb-note-grid > div {
    padding: 10px 0 12px;
    border-top: 1px solid var(--rb-line);
}
.rb-note-grid h3 { margin: 0 0 5px; font-size: 13.5px; font-weight: 800; color: var(--rb-ink); }
.rb-note-grid p { margin: 0; font-size: 13px; line-height: 1.85; color: var(--rb-ink-2); }
.rb-note-grid b { color: var(--rb-violet-2); }

.rb-faq { padding: 4px 18px 10px; }
.rb-faq details { border-top: 1px solid var(--rb-line); }
.rb-faq summary {
    position: relative;
    cursor: pointer;
    padding: 11px 26px 11px 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--rb-ink);
    list-style: none;
}
.rb-faq summary::-webkit-details-marker { display: none; }
.rb-faq summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--rb-mono);
    font-size: 16px;
    color: var(--rb-violet);
    transition: transform .2s;
}
.rb-faq details[open] summary::after { content: "−"; }
.rb-faq details > div { padding: 0 0 13px; font-size: 13px; line-height: 1.9; color: var(--rb-ink-2); }

.rb-disclaimer {
    margin: 0;
    padding: 12px 18px;
    border-top: 1px dashed var(--rb-line-2);
    background: var(--rb-card-2);
    font-size: 11.5px;
    line-height: 1.8;
    color: var(--rb-mut);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
    .rb-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .rb-vitals { max-width: 400px; }
    .rb-h1 { font-size: 33px; }
}

@media (max-width: 900px) {
    .rb-rows-head { display: none; }
    .rb-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 34px;
        grid-template-areas:
            "name name name del"
            "val weight nav del";
        row-gap: 6px;
        padding: 10px 16px;
    }
    .rb-row .rb-name { grid-area: name; }
    .rb-row .rb-c-val { grid-area: val; }
    .rb-row .rb-c-weight { grid-area: weight; }
    .rb-row .rb-c-nav { grid-area: nav; }
    .rb-row .rb-del { grid-area: del; align-self: start; }
    .rb-cell::before {
        display: block;
        font-size: 10px;
        color: var(--rb-mut);
        margin-bottom: 2px;
        font-family: var(--rb-sans);
    }
    .rb-c-val::before { content: "当前市值"; }
    .rb-c-weight::before { content: "目标权重 %"; }
    .rb-c-nav::before { content: "单位净值"; }
}

@media (max-width: 820px) {
    .rb-h1 { font-size: 29px; }
    .rb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rb-note-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .rb-wrap { padding: 0 15px; }
    .rb-hero { padding: 16px 0 26px; }
    .rb-h1 { font-size: 25px; line-height: 1.36; }
    .rb-lede { font-size: 13.5px; }
    .rb-chips li { flex: 1 1 auto; min-width: 104px; padding: 8px 11px; }
    .rb-chips b { font-size: 15px; }
    .rb-editor-head, .rb-results-head { flex-wrap: wrap; row-gap: 6px; }
    .rb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rb-stat b { font-size: 17px; }
    .rb-tools { width: 100%; }
    .rb-tools button { flex: 1 1 auto; text-align: center; }
    .rb-fees { gap: 10px; }
    .rb-fee { flex: 1 1 132px; }
    .rb-bars { padding: 12px 14px 2px; }
    .rb-bar-row { grid-template-columns: 38px minmax(0, 1fr); }
    .rb-verdict { margin: 0 14px 12px; }
    .rb-table th, .rb-table td { padding: 7px 10px; }
}

@media (max-width: 420px) {
    .rb-h1 { font-size: 22px; }
    .rb-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 30px; }
    .rb-cell input { font-size: 12.5px; padding: 6px 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .rb-page * { transition: none !important; }
}
