/* Home(/) page dark overrides - additive layer only */
body.arx-body[data-theme="dark"] {
    --arx-dark-bg: #10100f;
    --arx-dark-surface: #171717;
    --arx-dark-surface-2: #1d1d1d;
    --arx-dark-border: #2a2a2a;
    --arx-dark-border-2: #323232;
    --arx-dark-text: #edf0f3;
    --arx-dark-muted: #c2c8d0;
    --arx-dark-subtle: #aeb6c1;
    --arx-dark-blue: #5f7fae;
    --arx-dark-blue-strong: #4f6f9e;

    --arx-catch-bg: transparent;

    background:
        radial-gradient(1200px 560px at 100% -8%, rgba(255, 255, 255, 0.03) 0%, transparent 62%),
        radial-gradient(980px 480px at -12% -12%, rgba(255, 255, 255, 0.025) 0%, transparent 58%),
        var(--arx-dark-bg);
    color: var(--arx-dark-text);
}

body.arx-body[data-theme="dark"] .arx-page {
    --c-text: var(--arx-dark-text);
    --c-muted: var(--arx-dark-muted);
    --c-line: rgba(255, 255, 255, 0.1);
    --c-blue: #8c929d;
    --c-blue-dark: #737a86;
}

body.arx-body[data-theme="dark"] .arx-catch-section {
    background: transparent;
}

body.arx-body[data-theme="dark"] .arx-body #site-header,
body.arx-body[data-theme="dark"] .arx-body #site-footer,
body.arx-body[data-theme="dark"] .arx-body .c-footer {
    background: transparent;
}

body.arx-body[data-theme="dark"] .arx-stars {
    opacity: 0.22;
}

body.arx-body[data-theme="dark"] .arx-stars-1:before {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.34) 1px, transparent 1px);
}

body.arx-body[data-theme="dark"] .arx-stars-2:before {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1.1px, transparent 1.1px);
}

body.arx-body[data-theme="dark"] .arx-stars-3:before {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0.8px, transparent 0.8px);
}

body.arx-body[data-theme="dark"] .arx-shell,
body.arx-body[data-theme="dark"] .arx-community-live,
body.arx-body[data-theme="dark"] .arx-catch-wrap {
    background: rgba(23, 23, 23, 0.8);
    border-color: var(--arx-dark-border);
    box-shadow: none;
}

/* Hero는 카드형 패널이 아니라 배경 위에 직접 놓이는 영역이다. */
body.arx-body[data-theme="dark"] .arx-hero .arx-shell {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* Motto 섹션은 별도 박스 톤을 제거해 배경 흐름에 자연스럽게 연결 */
body.arx-body[data-theme="dark"] .arx-catch-wrap {
    background: transparent;
    border-color: transparent;
}

body.arx-body[data-theme="dark"] .arx-wiki-center {
    background: rgba(23, 23, 23, 0.46);
    border-color: rgba(42, 42, 42, 0.68);
    box-shadow: none;
}

body.arx-body[data-theme="dark"] .arx-kicker,
body.arx-body[data-theme="dark"] .arx-section-tag,
body.arx-body[data-theme="dark"] .arx-brand-copy,
body.arx-body[data-theme="dark"] .arx-live-item span,
body.arx-body[data-theme="dark"] .arx-live-item strong,
body.arx-body[data-theme="dark"] .arx-stack-kicker {
    color: var(--arx-dark-subtle);
}

body.arx-body[data-theme="dark"] .arx-sub,
body.arx-body[data-theme="dark"] .arx-classic-copy p,
body.arx-body[data-theme="dark"] .arx-wiki-center p,
body.arx-body[data-theme="dark"] .arx-feature-sub,
body.arx-body[data-theme="dark"] .arx-stack-card p,
body.arx-body[data-theme="dark"] .arx-catch-wrap p,
body.arx-body[data-theme="dark"] .arx-prompt-status {
    color: var(--arx-dark-muted);
}

body.arx-body[data-theme="dark"] .arx-prompt-status.is-empty {
    color: #d2c29a;
}

body.arx-body[data-theme="dark"] .arx-prompt,
body.arx-body[data-theme="dark"] .arx-chips button,
body.arx-body[data-theme="dark"] .arx-catch-cta,
body.arx-body[data-theme="dark"] .arx-dot {
    background: var(--arx-dark-surface-2);
    border-color: var(--arx-dark-border-2);
    color: var(--arx-dark-text);
}

body.arx-body[data-theme="dark"] .arx-prompt input {
    color: var(--arx-dark-text);
}

body.arx-body[data-theme="dark"] .arx-prompt input::placeholder {
    color: var(--arx-dark-subtle);
}

body.arx-body[data-theme="dark"] .arx-prompt > i,
body.arx-body[data-theme="dark"] .arx-catch-cta i {
    color: var(--arx-dark-subtle);
}

body.arx-body[data-theme="dark"] .arx-prompt button {
    background: var(--arx-dark-blue);
    color: #ffffff;
}

body.arx-body[data-theme="dark"] .arx-prompt button:hover {
    background: var(--arx-dark-blue-strong);
}

body.arx-body[data-theme="dark"] .arx-hero-download {
    background: #4f7fbf;
    border: 1px solid rgba(147, 180, 226, 0.36);
    color: #ffffff;
    box-shadow: 0 10px 24px -18px rgba(95, 127, 174, 0.76);
}

body.arx-body[data-theme="dark"] .arx-hero-download:hover {
    background: #5d8dcc;
    border-color: rgba(170, 202, 242, 0.48);
}

body.arx-body[data-theme="dark"] .arx-book-stream::before {
    background: linear-gradient(to bottom, rgba(16, 16, 15, 0.95), rgba(16, 16, 15, 0));
}

body.arx-body[data-theme="dark"] .arx-book-stream::after {
    background: linear-gradient(to top, rgba(16, 16, 15, 0.95), rgba(16, 16, 15, 0));
}

body.arx-body[data-theme="dark"] .arx-stack-card {
    border-color: var(--arx-dark-border);
    background: linear-gradient(160deg, rgba(29, 29, 29, 0.9) 0%, rgba(24, 24, 24, 0.9) 100%);
    box-shadow: none;
}

body.arx-body[data-theme="dark"] .arx-stack-card h3,
body.arx-body[data-theme="dark"] .arx-feature-head h2,
body.arx-body[data-theme="dark"] .arx-wiki-center h2,
body.arx-body[data-theme="dark"] .arx-catch-wrap h2,
body.arx-body[data-theme="dark"] .arx-hero h1 {
    color: var(--arx-dark-text);
}

/* Classic bookshelf dark */
body.arx-body[data-theme="dark"] .mer-classic {
    background:
        radial-gradient(125% 78% at 50% 8%, #15181d 0%, #101216 56%, #0c0d10 100%);
}
body.arx-body[data-theme="dark"] .mer-classic-head h2 { color: #edf0f3; }
body.arx-body[data-theme="dark"] .mer-classic-head p  { color: #9aa6b5; }
body.arx-body[data-theme="dark"] .mer-plank {
    background: linear-gradient(180deg, #20242b 0%, #181b21 60%, #131519 100%);
}
body.arx-body[data-theme="dark"] .mer-plank::after {
    background: linear-gradient(180deg, #2a2f38, #1b1e24);
}
body.arx-body[data-theme="dark"] .mer-fade-l { background: linear-gradient(90deg,  #0e1014 12%, rgba(14,16,20,0)); }
body.arx-body[data-theme="dark"] .mer-fade-r { background: linear-gradient(270deg, #0e1014 12%, rgba(14,16,20,0)); }
body.arx-body[data-theme="dark"] .mer-readout { color: #9aa6b5; }
body.arx-body[data-theme="dark"] .mer-readout-hint { color: #5a6474; }
body.arx-body[data-theme="dark"] .mer-readout b { color: #b7c6e0; }
body.arx-body[data-theme="dark"] .mer-r-sep { color: #3a3f48; }
body.arx-body[data-theme="dark"] .mer-r-open { color: #8fa6cb; }

body.arx-body[data-theme="dark"] .arx-cta,
body.arx-body[data-theme="dark"] .arx-catch-cta {
    color: var(--arx-dark-text);
}

body.arx-body[data-theme="dark"] .arx-cta:hover,
body.arx-body[data-theme="dark"] .arx-catch-cta:hover {
    background: #232323;
    border-color: #3a3a3a;
}

body.arx-body[data-theme="dark"] .arx-catch-cta[data-ask-focus] {
    background: var(--arx-dark-blue);
    border-color: var(--arx-dark-blue-strong);
    color: #ffffff;
}

body.arx-body[data-theme="dark"] .arx-catch-cta[data-ask-focus] i {
    color: #ffffff;
}

/* Paper section dark */
body.arx-body[data-theme="dark"] .arx-paper-meta,
body.arx-body[data-theme="dark"] .arx-paper-date em {
    color: var(--arx-dark-subtle);
}

body.arx-body[data-theme="dark"] .arx-paper-card p,
body.arx-body[data-theme="dark"] .arx-paper-headline > p {
    color: var(--arx-dark-muted);
}

body.arx-body[data-theme="dark"] .arx-paper-card,
body.arx-body[data-theme="dark"] .arx-paper-date {
    border-color: var(--arx-dark-border);
    background: linear-gradient(160deg, rgba(29, 29, 29, 0.9) 0%, rgba(24, 24, 24, 0.9) 100%);
    box-shadow: none;
}

body.arx-body[data-theme="dark"] .arx-paper-headline h2,
body.arx-body[data-theme="dark"] .arx-paper-card h3,
body.arx-body[data-theme="dark"] .arx-paper-date strong {
    color: var(--arx-dark-text);
}

body.arx-body[data-theme="dark"] .arx-paper-dot { background: var(--arx-dark-blue); }

body.arx-body[data-theme="dark"] .arx-paper-tags span {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--arx-dark-border-2);
    color: var(--arx-dark-muted);
}

body.arx-body[data-theme="dark"] .arx-paper-nav {
    background: var(--arx-dark-surface-2);
    border-color: var(--arx-dark-border-2);
    color: var(--arx-dark-text);
}
body.arx-body[data-theme="dark"] .arx-paper-nav:hover {
    background: var(--arx-dark-blue);
    color: #fff;
}
body.arx-body[data-theme="dark"] .arx-paper-pip { background: rgba(255, 255, 255, 0.12); }
body.arx-body[data-theme="dark"] .arx-paper-pip.is-active { background: var(--arx-dark-blue); }
body.arx-body[data-theme="dark"] .arx-paper-badge {
    background: rgba(140, 146, 157, 0.16);
    color: var(--arx-dark-text);
}
body.arx-body[data-theme="dark"] .arx-paper-badge::before {
    background: var(--arx-dark-blue);
}
body.arx-body[data-theme="dark"] .arx-paper-stars i { color: rgba(255,255,255,0.14); }
body.arx-body[data-theme="dark"] .arx-paper-stars i.is-filled { color: #e8a830; }
body.arx-body[data-theme="dark"] .arx-paper-clinical {
    color: var(--arx-dark-muted);
    border-left-color: rgba(140,146,157,0.3);
}
