html:not([data-theme="light"]) {
    --rp-bg: #0e0e0e;
    --rp-text: #f4f4f5;
    --rp-text-2: #e4e4e7;
    --rp-text-3: #c4c4cc;
    --rp-muted: #a1a1aa;
    --rp-faint: #71717a;
    --rp-faint-2: #52525b;
    --rp-line-soft: rgba(255, 255, 255, 0.05);
    --rp-line: rgba(255, 255, 255, 0.08);
    --rp-line-hi: rgba(255, 255, 255, 0.12);
    --rp-line-strong: rgba(255, 255, 255, 0.22);
    --rp-surface: rgba(255, 255, 255, 0.025);
    --rp-surface-hi: rgba(255, 255, 255, 0.05);
    --rp-surface-2: #161618;
    --rp-accent: #7ea7ba;
    --rp-accent-line: rgba(126, 167, 186, 0.35);
    --rp-accent-bg: rgba(126, 167, 186, 0.06);
    --rp-ok: #7eb993;
    --rp-ok-line: rgba(126, 185, 147, 0.4);
    --rp-warn: #b9aa7c;
    --rp-warn-line: rgba(185, 170, 124, 0.4);
    --rp-btn-bg: #ffffff;
    --rp-btn-fg: #0e0e0e;
    --rp-btn-hover: #e4e4e7;
    --rp-shadow: rgba(0, 0, 0, 0.55);
    --rp-mono-s: 22%; --rp-mono-l: 74%;
    --rp-mono-bg-s: 16%; --rp-mono-bg-l: 15%;
    --rp-mono-bd-s: 18%; --rp-mono-bd-l: 24%;
}

html[data-theme="light"] {
    --rp-bg: #ececee;
    --rp-text: #18181b;
    --rp-text-2: #27272a;
    --rp-text-3: #3f3f46;
    --rp-muted: #52525b;
    --rp-faint: #71717a;
    --rp-faint-2: #8b8b94;
    --rp-line-soft: rgba(0, 0, 0, 0.06);
    --rp-line: rgba(0, 0, 0, 0.1);
    --rp-line-hi: rgba(0, 0, 0, 0.14);
    --rp-line-strong: rgba(0, 0, 0, 0.28);
    --rp-surface: #ffffff;
    --rp-surface-hi: rgba(0, 0, 0, 0.045);
    --rp-surface-2: #ffffff;
    --rp-accent: #466e83;
    --rp-accent-line: rgba(70, 110, 131, 0.4);
    --rp-accent-bg: rgba(70, 110, 131, 0.07);
    --rp-ok: #3f7a52;
    --rp-ok-line: rgba(63, 122, 82, 0.4);
    --rp-warn: #8a7a3a;
    --rp-warn-line: rgba(138, 122, 58, 0.4);
    --rp-btn-bg: #18181b;
    --rp-btn-fg: #ffffff;
    --rp-btn-hover: #2f2f35;
    --rp-shadow: rgba(20, 30, 40, 0.18);
    --rp-mono-s: 30%; --rp-mono-l: 34%;
    --rp-mono-bg-s: 28%; --rp-mono-bg-l: 92%;
    --rp-mono-bd-s: 22%; --rp-mono-bd-l: 80%;
}

.rp-page { background: var(--rp-bg); color: var(--rp-text); min-height: 100vh; }
.rp-container { max-width: 1400px; margin: 0 auto; padding: 7.5rem 2rem 5rem; }
.rp-back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--rp-muted); text-decoration: none; margin-bottom: 2rem; }
.rp-back:hover { color: var(--rp-text); }
.rp-head { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 2.75rem; }
.rp-logo { width: 72px; height: 72px; border-radius: 14px; border: 1px solid var(--rp-line); background: var(--rp-surface-2); object-fit: contain; flex: 0 0 auto; padding: 6px; }
.rp-logo-fallback { width: 72px; height: 72px; border-radius: 14px; border: 1px solid var(--rp-line); background: var(--rp-surface-2); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 600; color: var(--rp-accent); flex: 0 0 auto; }
.rp-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rp-faint); margin-bottom: 8px; }
.rp-title { font-size: 3rem; line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 14px; }
.rp-title small { font-size: 1.15rem; font-weight: 400; color: var(--rp-muted); margin-left: 10px; letter-spacing: 0; }
.rp-lede { font-size: 1.2rem; line-height: 1.6; color: var(--rp-text-3); max-width: 900px; margin: 0; }
.rp-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rp-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--rp-line-hi); font-size: 13.5px; color: var(--rp-muted); }
.rp-badge.active { color: var(--rp-ok); border-color: var(--rp-ok-line); }
.rp-badge.inactive { color: var(--rp-warn); border-color: var(--rp-warn-line); }
.rp-badge img.flag { width: 16px; height: 12px; border-radius: 2px; }
.rp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 2.75rem; }
.rp-stat { padding: 22px 24px; border: 1px solid var(--rp-line); border-radius: 14px; background: var(--rp-surface); }
.rp-stat b { display: block; font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1.05; }
.rp-stat span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--rp-faint); }
.rp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.rp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .rp-grid, .rp-grid-3 { grid-template-columns: minmax(0, 1fr); } .rp-head { flex-direction: column; } .rp-title { font-size: 1.8rem; } }
.rp-card { padding: 26px 28px; border: 1px solid var(--rp-line); border-radius: 16px; background: var(--rp-surface); min-width: 0; }
.rp-card h2 { margin: 0 0 18px; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.rp-card h2 small { font-weight: 400; color: var(--rp-faint); font-size: 13px; margin-left: 8px; }
.rp-section { margin: 3rem 0 0; }
.rp-section > h2 { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 8px; }
.rp-section > p.rp-sub { margin: 0 0 22px; color: var(--rp-muted); font-size: 15.5px; }
.rp-prose { color: var(--rp-text-3); line-height: 1.7; font-size: 16.5px; }
.rp-prose p { margin: 0 0 12px; }
.rp-bars { display: flex; flex-direction: column; gap: 12px; }
.rp-bar { display: grid; grid-template-columns: minmax(0, 1fr) 110px 48px; align-items: center; gap: 12px; font-size: 15px; }
.rp-bar .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 10px; min-width: 0; }
.rp-bar .l > span { overflow: hidden; text-overflow: ellipsis; }
.rp-bar .rp-ico { color: var(--rp-accent); flex: 0 0 auto; }
.rp-bar .l img.flag { width: 20px; height: 14px; border-radius: 2px; flex: 0 0 auto; }
.rp-bar .t { height: 8px; border-radius: 999px; background: var(--rp-surface-hi); overflow: hidden; }
.rp-bar .t i { display: block; height: 100%; background: var(--rp-accent); }
.rp-bar .n { text-align: right; color: var(--rp-muted); font-variant-numeric: tabular-nums; }
.rp-chart svg { display: block; width: 100%; height: auto; }
.rp-chart .lab { font-size: 10px; fill: var(--rp-faint); }
.rp-table-wrap { overflow-x: auto; border: 1px solid var(--rp-line); border-radius: 12px; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.rp-table th { text-align: left; padding: 10px 14px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rp-faint); background: var(--rp-surface-hi); border-bottom: 1px solid var(--rp-line); white-space: nowrap; }
.rp-table td { padding: 12px 16px; border-bottom: 1px solid var(--rp-line-soft); vertical-align: top; }
.rp-table tr:last-child td { border-bottom: 0; }
.rp-table td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--rp-muted); }
.rp-table .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; }
.rp-table .dim { color: var(--rp-faint); }
.rp-table .flag { width: 18px; height: 13px; border-radius: 2px; vertical-align: -1px; margin-right: 7px; }
.rp-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rp-line-hi); font-size: 11px; color: var(--rp-muted); white-space: nowrap; }
.rp-pill.ok { color: var(--rp-ok); border-color: var(--rp-ok-line); }
.rp-pill.warn { color: var(--rp-warn); border-color: var(--rp-warn-line); }
.rp-lock { position: relative; margin-top: 16px; padding: 22px 24px; border: 1px dashed var(--rp-accent-line); border-radius: 14px; background: var(--rp-accent-bg); display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.rp-lock h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.rp-lock p { margin: 0; font-size: 13.5px; color: var(--rp-muted); line-height: 1.5; }
.rp-lock .rp-lock-body { flex: 1; min-width: 240px; }
.rp-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 9px; background: var(--rp-btn-bg); color: var(--rp-btn-fg); font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.rp-btn:hover { background: var(--rp-btn-hover); }
.rp-btn.ghost { background: transparent; color: var(--rp-text); border: 1px solid var(--rp-line-hi); }
.rp-btn.ghost:hover { background: var(--rp-surface-hi); }
.rp-blur { filter: blur(5px); user-select: none; pointer-events: none; opacity: 0.7; }
.rp-faq details { border: 1px solid var(--rp-line); border-radius: 12px; padding: 0 18px; background: var(--rp-surface); margin-bottom: 8px; }
.rp-faq summary { cursor: pointer; padding: 16px 0; font-weight: 500; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.rp-faq summary::-webkit-details-marker { display: none; }
.rp-faq summary::after { content: '+'; color: var(--rp-faint); }
.rp-faq details[open] summary::after { content: '−'; }
.rp-faq .a { padding: 0 0 18px; color: var(--rp-text-3); font-size: 15.5px; line-height: 1.65; }
.rp-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rp-related a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--rp-line); border-radius: 12px; text-decoration: none; color: var(--rp-text); font-size: 15px; background: var(--rp-surface); }
.rp-related a:hover { border-color: var(--rp-line-strong); }
.rp-related a span { margin-left: auto; color: var(--rp-faint); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-related img { width: 26px; height: 26px; border-radius: 6px; object-fit: contain; background: var(--rp-surface-2); }
.rp-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rp-posts a { display: block; padding: 16px 18px; border: 1px solid var(--rp-line); border-radius: 12px; text-decoration: none; color: inherit; background: var(--rp-surface); }
.rp-posts a:hover { border-color: var(--rp-line-strong); }
.rp-posts b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.rp-posts span { font-size: 12.5px; color: var(--rp-muted); line-height: 1.5; display: block; }
.rp-note { margin-top: 2rem; font-size: 12px; color: var(--rp-faint); line-height: 1.6; }
.rp-note a { color: var(--rp-muted); }
.rp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--rp-line); font-size: 12.5px; color: var(--rp-text-2); background: var(--rp-surface); }
.rp-chip small { color: var(--rp-faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-index { max-width: 1400px; margin: 0 auto; padding: 0 2rem 6rem; }
.rp-index-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 2.5rem 0 14px; flex-wrap: wrap; }
.rp-index-head h2 { margin: 0; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.025em; }
.rp-index-head p { margin: 0; color: var(--rp-faint); font-size: 14.5px; }
.rp-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.rp-index-grid a { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--rp-line); border-radius: 14px; text-decoration: none; color: var(--rp-text); background: var(--rp-surface); min-width: 0; }
.rp-index-grid a:hover { border-color: var(--rp-line-strong); background: var(--rp-surface-hi); }
.rp-index-grid .nm { font-weight: 500; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-index-grid .meta { font-size: 13px; color: var(--rp-faint); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.rp-index-grid .meta img.flag { width: 16px; height: 11px; border-radius: 2px; }
.rp-index-grid .ct { margin-left: auto; text-align: right; font-size: 13.5px; color: var(--rp-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-index-grid .ct em { display: block; font-style: normal; color: var(--rp-ok); font-size: 12.5px; }
.rp-index-list { columns: 4; column-gap: 28px; font-size: 14.5px; }
.rp-index-list a { display: block; padding: 5px 0; color: var(--rp-text-3); text-decoration: none; border-bottom: 1px solid var(--rp-surface-hi); break-inside: avoid; }
.rp-index-list a:hover { color: var(--rp-text); }
.rp-index-list a span { color: var(--rp-faint-2); font-size: 12px; margin-left: 6px; }
@media (max-width: 1100px) { .rp-index-list { columns: 3; } }
@media (max-width: 900px) { .rp-index-list { columns: 2; } }
@media (max-width: 560px) { .rp-index-list { columns: 1; } }
.rp-hidden { display: none !important; }

.rp-mark { display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--rp-line); background: var(--rp-surface-2); object-fit: contain; flex: 0 0 auto; overflow: hidden; }
.rp-mark-lg { width: 88px; height: 88px; padding: 8px; border-radius: 16px; }
.rp-mark-md { width: 34px; height: 34px; padding: 3px; border-radius: 9px; }
.rp-mark-sm { width: 26px; height: 26px; padding: 2px; border-radius: 7px; }
.rp-mark-mono { font-weight: 600; letter-spacing: 0.02em; color: hsl(var(--h), var(--rp-mono-s), var(--rp-mono-l)); background: hsl(var(--h), var(--rp-mono-bg-s), var(--rp-mono-bg-l)); border-color: hsl(var(--h), var(--rp-mono-bd-s), var(--rp-mono-bd-l)); font-size: 12px; }
.rp-mark-lg.rp-mark-mono { font-size: 30px; }
.rp-mark-md.rp-mark-mono { font-size: 12.5px; }
.rp-mark-sm.rp-mark-mono { font-size: 10px; }
