:root {
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif;
  color: #171716; background: #f4f3f0; font-synthesis: none;
  --ink: #171716; --muted: #54524d; --line: #d6d3cc; --paper: #fdfcfa;
  --primary: #22211f; --blue: #13577c; --blue-bg: #eaf3f8;
  --green: #195538; --green-bg: #e8f3eb; --danger: #922e3a; --danger-bg: #fff0f2;
  --radius: 12px; --shadow: 0 1px 1px #fff inset, 0 3px 10px #23211c0c;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-size: 1rem; line-height: 1.65; }
a { color: #164b76; text-underline-offset: .2em; }
a:hover { color: #103459; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #0758a2; outline-offset: 4px; }
[hidden] { display: none !important; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 5; transform: translateY(-160%); padding: .6rem 1rem; background: white; border-radius: 8px; }
.skip:focus { transform: translateY(0); }
.masthead { border-bottom: 1px solid var(--line); background: #f8f7f5; }
.masthead-inner { max-width: 85rem; min-height: 4.35rem; margin: auto; padding: .58rem clamp(1rem, 4vw, 3.4rem); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .35rem .9rem; }
.brand { display: inline-flex; gap: .65rem; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; line-height: 1.1; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; flex: none; width: 2.48rem; height: 2.48rem; border-radius: 50%; border: 1px solid #dddad2; background: #f8f7f5; }
.brand-mark img { display: block; width: 32px; height: 34px; object-fit: contain; mix-blend-mode: multiply; }
.brand-wordmark { font: 800 .92rem/1.15 Arial, sans-serif; letter-spacing: .10em; white-space: nowrap; }
.brand-caption { display: block; margin-top: .21rem; color: var(--muted); font-size: .57rem; letter-spacing: .22em; }
#site-nav { display: flex; gap: .25rem; flex-wrap: wrap; align-items: center; }
.nav-link, .btn { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: .48rem .82rem; border: 1px solid transparent; border-radius: .6rem; text-decoration: none; font-weight: 700; line-height: 1.35; text-align: center; }
.nav-link { color: var(--primary); background: transparent; }
.nav-account-actions { display: inline-flex; align-items: center; gap: .18rem; }
.nav-settings { width: 44px; padding-inline: 0; }
.nav-link:hover, .nav-link[aria-current='page'] { color: var(--ink); background: #ebe9e4; border-color: #dedbd4; }
#site-nav > a[href='/register'] { border-radius: 999px; border-color: #a29f96; padding-inline: 1rem; }
.btn { background: #fff; border-color: #aaa69d; color: var(--primary); box-shadow: 0 1px 2px #23211c13; }
.btn:hover { background: #eeece6; color: #141413; }
.btn.primary { background: #22211f; border-color: #22211f; color: #fff; }
.btn.primary:hover { background: #44413b; border-color: #44413b; }
.btn.danger { color: var(--danger); border-color: #be8990; background: #fff8f9; }
.btn.danger:hover { background: #fce6e9; }
button:disabled { opacity: .55; cursor: not-allowed; }
.shell { flex: 1; width: min(100%, 85rem); margin: auto; padding: clamp(1rem, 3vw, 2.6rem); }
.shell.app-shell { max-width: none; padding-top: 1.2rem; }
.shell:focus:not(:focus-visible) { outline: none; }
.notice-area { width: min(100%, 85rem); margin-inline: auto; padding-inline: clamp(1rem, 3vw, 2.6rem); }
.notice-area:empty { display: none; }
.notice-area .alert { margin-top: 1rem; }
.footer { border-top: 1px solid var(--line); color: var(--muted); background: #f8f7f5; }
.footer > div { max-width: 85rem; margin: auto; padding: 1.25rem clamp(1rem, 4vw, 3.4rem); display: flex; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; font-size: .81rem; }
.footer strong { color: var(--ink); font: 800 .82rem/1.55 Arial, sans-serif; letter-spacing: .12em; }
.footer-by { margin-left: .38rem; color: var(--muted); font-size: .68rem; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.3; letter-spacing: -.035em; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.65rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.52rem); }
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; }
p { margin: .55rem 0; }
.eyebrow { font-size: .76rem; font-weight: 800; letter-spacing: .13em; color: #5e5b53; margin: 0 0 .58rem; }
.page-head { margin-bottom: 1.35rem; }
.page-head p:last-child { margin-bottom: 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); min-width: 0; }
.card { padding: clamp(.9rem, 2.2vw, 1.45rem); }
.card h2 + p, .card h3 + p { margin-top: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card.subtle { background: #f1f3f6; }
.card.danger-zone { border-color: #d6adb3; }
.stack { display: grid; gap: 1rem; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; align-items: start; }
.grid.metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
.narrow { max-width: 33rem; margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.tag { display: inline-block; border: 1px solid #aeb7c5; border-radius: 99px; color: #33445c; background: #e9edf2; padding: .13rem .55rem; font-size: .83rem; font-weight: 700; overflow-wrap: anywhere; }
.tag.active { border-color: #9cbbab; color: var(--green); background: var(--green-bg); }
.tag.off { border-color: #c9979e; color: var(--danger); background: var(--danger-bg); }
.alert { background: var(--blue-bg); color: #194d68; border: 1px solid #99c1d4; border-radius: .64rem; padding: .65rem .8rem; margin-block: .1rem .6rem; }
.alert.error { background: var(--danger-bg); color: var(--danger); border-color: #d9a0a7; }
.alert.success { background: var(--green-bg); color: var(--green); border-color: #a7c6b2; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
form { display: grid; gap: .8rem; margin-top: .85rem; }
form.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; }
form.inline-form > .field { flex: 1 1 13rem; }
.field { display: grid; gap: .28rem; align-content: start; min-width: 0; }
.field > span:first-child, label.check { font-weight: 700; }
input:not([type='checkbox']), textarea, select { width: 100%; min-width: 0; min-height: 44px; padding: .50rem .65rem; border: 1px solid #a7b1bf; border-radius: .55rem; color: var(--ink); background: #fff; }
textarea { min-height: 6rem; resize: vertical; }
.check { display: flex; align-items: flex-start; gap: .52rem; min-height: 44px; padding-block: .48rem; }
.check input { width: 1.2rem; height: 1.2rem; accent-color: var(--primary); margin: .15rem 0 0; flex-shrink: 0; }
input[type='search'], input[type='email'] { direction: ltr; }
pre, .pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.data-list { display: grid; gap: .68rem; list-style: none; margin: .75rem 0 0; padding: 0; }
.data-list > li { padding: .72rem; border: 1px solid var(--line); border-radius: .62rem; background: #fff; min-width: 0; }
.data-list > li p { margin: .35rem 0; }
.defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .4rem .9rem; margin: .65rem 0; }
.defs > div { min-width: 0; }
.defs dt { font-size: .82rem; color: var(--muted); font-weight: 700; }
.defs dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.metric-value { font-weight: 850; font-size: 1.75rem; margin: .15rem 0 0; font-variant-numeric: tabular-nums; }
.table-wrap { width: 100%; overflow: auto; margin-top: .6rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .92rem; }
th, td { border-bottom: 1px solid var(--line); padding: .48rem .6rem; vertical-align: top; overflow-wrap: anywhere; }
th { background: #e8ecf1; color: #25364d; }
.finance-frame { display: block; width: 100%; border: 1px solid #aeb8c6; border-radius: var(--radius); background: #eceef1; height: 83vh; height: max(36rem, calc(100dvh - 11rem)); }
.finance-output { margin-top: .85rem; overflow-wrap: anywhere; }
.finance-output .data-list { gap: .45rem; }
.finance-output h4 { margin: .65rem 0 .25rem; }
.finance-output .table-wrap table { min-width: 29rem; }
.finance-output td { min-width: 7.5rem; white-space: pre-wrap; }
.empty { padding: .75rem 0; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
summary { cursor: pointer; font-weight: 700; color: var(--primary); padding: .35rem 0; min-height: 44px; }
.admin-label { color: #4d315b; background: #f0e9f2; border-color: #c5aacd; }
.admin-nav { display: flex; gap: .6rem; flex-wrap: wrap; }
.admin-detail { scroll-margin-top: 1rem; }
.qr { display: block; width: 12rem; height: 12rem; object-fit: contain; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: .4rem; }
.mfa-secret { display: block; font-family: ui-monospace, Menlo, monospace; font-size: 1rem; letter-spacing: .08em; word-break: break-all; padding: .6rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: .4rem; user-select: all; }
@media (max-width: 43rem) {
  .nav-link { padding-inline: .55rem; font-size: .9rem; }
  .shell.app-shell { padding-inline: .55rem; }
  .shell.app-shell .page-head { padding-inline: .45rem; }
  .finance-frame { height: max(32rem, calc(100dvh - 10rem)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

/* Public introduction: quiet monochrome, oversized masthead, with OWNARC branding. */
.landing-shell { width: 100%; padding: 0; }
.editorial-kicker { color: #535048; font: 700 .69rem/1.45 Arial, sans-serif; letter-spacing: .23em; margin: 0 0 .68rem; }
.brand-stage { isolation: isolate; position: relative; overflow: hidden; background: linear-gradient(158deg, #f7f6f3 6%, #eae9e5 57%, #f5f4f1 91%); border-bottom: 1px solid #dedbd4; }
.brand-stage::before, .brand-stage::after { content: ''; position: absolute; z-index: -1; pointer-events: none; }
.brand-stage::before { inset: 0; background: radial-gradient(ellipse at 50% 74%, #fff 0%, #fff0 54%), repeating-linear-gradient(148deg, #fff0 0% 10%, #fff7 14%, #fff0 28% 38%); }
.brand-stage::after { width: 118%; height: 91%; left: -22%; top: -43%; border-radius: 50%; transform: rotate(-16deg); border: 1px solid #fff9; box-shadow: 1rem 1.1rem 2.8rem #aca99e2a; background: linear-gradient(169deg, #fff0 28%, #fff9 100%); }
.stage-inner { max-width: 85rem; margin-inline: auto; padding: clamp(2.4rem, 5.2vw, 4.5rem) clamp(1rem, 4vw, 3.4rem) clamp(2.1rem, 5vw, 4rem); }
.stage-kicker { text-align: center; margin-bottom: .74rem; }
.stage-wordmark { font: 900 clamp(2.2rem, 13.1vw, 11.4rem)/.91 Arial, 'Helvetica Neue', sans-serif; letter-spacing: -.052em; white-space: nowrap; text-align: center; margin: 0 0 clamp(1.3rem, 3.1vw, 2.75rem); padding-right: .065em; }
.stage-body { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: clamp(.65rem, 3vw, 2.2rem); align-items: center; width: min(100%, 59rem); margin-inline: auto; }
.stage-intro { max-width: 15.2rem; color: #444239; font-size: .91rem; line-height: 1.7; }
.stage-intro .stage-intro-title { color: var(--ink); font-weight: 800; font-size: 1rem; margin-bottom: .12rem; word-break: keep-all; }
.stage-intro p { margin-top: 0; }
.stage-actions { justify-self: end; display: grid; gap: .24rem; justify-items: end; text-align: right; }
.editorial-action { border-radius: 999px; min-width: 8.25rem; padding-inline: 1.14rem; white-space: nowrap; font-size: .9rem; }
.editorial-link { color: #25231f; display: inline-flex; align-items: center; gap: .42rem; min-height: 44px; font-size: .86rem; font-weight: 750; text-underline-offset: .28em; }
.editorial-link:hover { color: #684d24; }
.stage-actions .editorial-link { padding-inline: .5rem; }
.landing-boundary { width: min(100% - clamp(2rem, 8vw, 7rem), 75rem); margin-inline: auto; }
.landing-about { text-align: center; scroll-margin-top: 1.5rem; padding-block: clamp(3.35rem, 6.5vw, 6rem); }
.landing-about h2, .landing-tools h2, .landing-privacy h2 { font-size: clamp(1.5rem, 4vw, 2.85rem); line-height: 1.17; letter-spacing: -.06em; word-break: keep-all; }
.about-columns { max-width: 47rem; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 6vw, 5.5rem); margin: clamp(1.65rem, 3.4vw, 3rem) auto 0; text-align: left; }
.about-columns h3 { font: 800 .88rem/1.55 Arial, sans-serif; letter-spacing: .12em; }
.about-columns p, .editorial-feature p, .landing-privacy p:not(.editorial-kicker) { color: var(--muted); word-break: keep-all; }
.landing-tools { padding-block: clamp(2.35rem, 5vw, 4.5rem); border-top: 1px solid var(--line); }
.tools-heading { margin-bottom: clamp(1.5rem, 3.5vw, 2.8rem); }
.editorial-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 2.6vw, 2rem); }
.editorial-feature { min-width: 0; }
.editorial-feature h3 { margin-top: 1.05rem; word-break: keep-all; }
.editorial-feature p { font-size: .92rem; }
.feature-art { height: clamp(7.7rem, 16vw, 13rem); display: grid; place-items: center; align-content: center; overflow: hidden; background: linear-gradient(145deg,#2d2c2a,#514f49); color: #f1eee5; }
.feature-art--journal { background: linear-gradient(145deg,#474541,#6b6760); }
.feature-art--plan { background: linear-gradient(145deg,#232323,#403f3b); }
.feature-art svg { display: block; width: min(73%, 13.5rem); max-height: 95%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feature-art path:first-child { opacity: .33; }
.landing-privacy { display: flex; justify-content: space-between; align-items: center; gap: 1.3rem; padding: clamp(1.2rem, 4vw, 3rem); border: 1px solid #d5d2c9; background: #eceae4; margin-bottom: clamp(2.3rem, 6vw, 5.2rem); }
.landing-privacy p:last-child { margin-bottom: 0; }
@media (max-width: 36rem) {
  .masthead-inner { gap: .05rem .2rem; }
  .nav-link { font-size: .83rem; }
  #site-nav { gap: .06rem; }
  #site-nav > a[href='/register'] { padding-inline: .6rem; }
  .stage-kicker { font-size: .61rem; }
  .stage-wordmark { font-size: clamp(1.4rem, 12.65vw, 11.4rem); }
  .landing-about { text-align: left; }
  .about-columns { grid-template-columns: 1fr; gap: .72rem; }
  .editorial-features { grid-template-columns: 1fr; gap: 1.1rem; }
  .editorial-feature { display: grid; grid-template-columns: 5.1rem minmax(0, 1fr); column-gap: .92rem; align-content: start; }
  .editorial-feature h3 { margin-top: 0; }
  .editorial-feature p { margin: .35rem 0 0; }
  .feature-art { grid-row: span 2; height: 5.1rem; }
  .feature-art svg { width: 93%; }
  .landing-privacy { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 24rem) {
  .brand { gap: .42rem; }
  .brand-wordmark { font-size: .8rem; }
  .brand-caption { font-size: .5rem; }
  .brand-mark { width: 2.15rem; height: 2.15rem; }
  .brand-mark img { width: 27px; height: 29px; }
  .nav-link { padding-inline: .4rem; }
  .nav-settings { padding-inline: 0; }
  .stage-body { column-gap: .65rem; }
  .stage-intro { font-size: .82rem; }
  .stage-intro .stage-intro-title { font-size: .92rem; }
  .editorial-action { min-width: 6.5rem; padding-inline: .7rem; }
}

/* moneyedit-trade-modal:start */
html.me-trade-scroll-lock { overflow: hidden; overscroll-behavior: none; }
html.me-trade-scroll-gutter { scrollbar-gutter: stable; }
.me-trade-dialog {
  position: fixed; inset: auto;
  left: var(--me-trade-x, 50%); top: var(--me-trade-y, 50%);
  transform: translate(-50%, -50%);
  margin: 0; width: max-content;
  max-width: min(840px, calc(var(--me-trade-w, 100vw) - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(var(--me-trade-h, 100dvh) - 24px);
  z-index: 1000; box-sizing: border-box;
  padding: clamp(12px, 3vw, 20px); border-radius: 14px; border: 1px solid #d2d2d2;
  background: #f4f4f4; color: #262626;
  box-shadow: 0 18px 48px #182c4b2e;
  overflow: auto; overscroll-behavior: contain;
  font: 1rem/1.5 system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.me-trade-dialog::backdrop { background: #1919197a; }
.me-trade-dialog h2 { margin: 0; font-size: 1.25rem; line-height: 1.35; }
.me-trade-dialog h2:focus { outline: none; }
.me-trade-dialog p { margin: .5rem 0; }
.me-trade-dialog .hint, .me-trade-dialog .status { color: #545454; font-size: .85rem; }
.me-trade-dialog .status.err { color: #8d2035; }
.me-trade-dialog .status:empty { display: none; }
.me-trade-dialog .fields { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; }
.me-trade-dialog label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 650; min-width: 0; }
.me-trade-dialog label[hidden] { display: none; }
.me-trade-dialog input, .me-trade-dialog select, .me-trade-dialog button {
  max-width: 100%; min-width: 0; border: 1px solid #cecece; border-radius: 8px;
  padding: 8px 10px; background: #fff; color: #262626; font: inherit;
}
.me-trade-dialog select { text-overflow: ellipsis; }
.me-trade-dialog button { cursor: pointer; font-size: .88rem; font-weight: 650; }
.me-trade-dialog button:hover { background: #ebebeb; }
.me-trade-dialog button.good { background: #343434; color: #fff; border-color: #343434; }
.me-trade-dialog :is(button, input, select):focus-visible { outline: 3px solid #5685bb; outline-offset: 1px; }
.me-trade-dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.me-trade-dialog .me-trade-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.me-trade-dialog .me-trade-heading button { flex: none; padding: 4px 9px; }
.me-trade-dialog #meMerchantBudgetRows { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(155px, 100%), 1fr)); }
.me-trade-dialog .scroll { overflow: auto; margin: 9px 0; border: 1px solid #d2d2d2; border-radius: 8px; }
.me-trade-dialog table { border-collapse: collapse; width: 100%; font-size: .86rem; }
.me-trade-dialog :is(td, th) { padding: 7px 9px; border-bottom: 1px solid #ddd; text-align: left; }
@media (max-width: 540px) {
  .me-trade-dialog { width: calc(var(--me-trade-w, 100vw) - 24px); }
  .me-trade-dialog .fields > label { flex-basis: 100%; }
  .me-trade-dialog input, .me-trade-dialog select { width: 100%; font-size: 16px; }
  .me-trade-dialog button { min-height: 40px; }
}
/* moneyedit-trade-modal:end */
