/* 리치 브라더 노트 shared identity. Semantic P&L and provider colors remain separate. */
:root{--brand:#14232e;--brand-hover:#263f4d;--brand-panel:#1d323d;--brand-accent:#c7ac78;--brand-on-dark:#f2eee5;--brand-muted-on-dark:#b6c1c5;--surface:#fff;--surface-subtle:#f4f6f6;--border:#dce2e4;--text-muted:#63717a;--gain:#18745e;--loss:#b34f5c}

.control-minus{display:inline-grid;place-items:center;vertical-align:middle;width:1.35em;height:1.35em;border-radius:50%;background:color-mix(in srgb,currentColor 10%,transparent);font:600 1em/1 system-ui,sans-serif}
button:is(:hover,:focus-visible) .control-minus{background:color-mix(in srgb,currentColor 18%,transparent)}

.control-close{display:inline-grid;place-items:center;width:18px;height:18px;vertical-align:middle;color:inherit}
.control-close::before,.control-close::after{content:"";grid-area:1/1;width:13px;height:1.5px;border-radius:1px;background:currentColor}
.control-close::before{transform:rotate(45deg)}
.control-close::after{transform:rotate(-45deg)}

/* Apply the same hover treatment to controls and button-styled links. */
:where(a.brass, a.philosophy-primary, a.primary, a[role="button"]) {
  display: inline-block;
}

@media (hover: hover) {
  :is(button, input:is([type="button"], [type="submit"], [type="reset"]), a:is(.brass, .philosophy-primary, .primary, [role="button"])):not(:disabled, [aria-disabled="true"], .app-download-nav, .header-menu-items [data-purchase], :is(aside, .journal-sidebar, #book-toc, .workspace-tabs) *):hover {
    box-shadow: 0 0 14px var(--button-hover-glow, rgb(104 173 244 / 38%));
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :is(button, input:is([type="button"], [type="submit"], [type="reset"]), a:is(.brass, .philosophy-primary, .primary, [role="button"])):not(:disabled, [aria-disabled="true"], .app-download-nav, .header-menu-items [data-purchase], :is(aside, .journal-sidebar, #book-toc, .workspace-tabs) *):hover:not(:active) {
    scale: 1.035;
  }
}

.landing-home { --button-hover-glow: rgb(255 255 255 / 38%); }

/* Press feedback for native controls and links styled as buttons. */
:is(button, summary, input:is([type="button"], [type="submit"], [type="reset"]), a:is(.brass, .philosophy-primary, .primary, [role="button"])):not(:disabled, [aria-disabled="true"]):active {
  filter: brightness(.9);
}
@media (prefers-reduced-motion: no-preference) {
  :is(button, summary, input:is([type="button"], [type="submit"], [type="reset"]), a:is(.brass, .philosophy-primary, .primary, [role="button"])):not(:disabled, [aria-disabled="true"]):active {
    scale: .98;
  }
}

/* Inline links keep their position when pressed. */
a[href]:not(.brass, .philosophy-primary, .primary, [role="button"], [aria-disabled="true"]):active {
  opacity: .78;
}
