body.chm-page {
    margin: 0;
    background: #0d0f12;
}

.chm {
    --surface: #171a20;
    --line: #343943;
    --text: #f3f5f7;
    --muted: #b2bac5;
    --accent: #e5e9ed;
    color: var(--text);
    font: 1rem/1.5 system-ui, sans-serif;
}

.chm, .chm * { box-sizing: border-box; }
.chm-shell { box-sizing: border-box; width: min(1440px, 100%); margin: auto; padding: 0 clamp(1rem, 4vw, 3.5rem) 3rem; }
.chm a { color: inherit; text-underline-offset: .25em; }
.chm h1, .chm h2, .chm h3 { margin: 0 0 .55rem; color: inherit; font-family: inherit; line-height: 1.12; letter-spacing: -.035em; }
.chm h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.chm h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.chm h3 { font-size: 1.25rem; }
.chm p { overflow-wrap: anywhere; }

.chm-header, .chm-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.chm-header { min-height: 4.5rem; justify-content: space-between; padding: .85rem 0; }
.chm-brand { font-weight: 850; letter-spacing: .13em; text-decoration: none; }
.chm-tag { color: var(--accent); background: #272b32; padding: .3rem .7rem; border-radius: .35rem; font-size: .875rem; }
.chm-nav { gap: .25rem; padding: .65rem 0; }
.chm-nav a { padding: .45rem .75rem; border-radius: .35rem; color: var(--muted); text-decoration: none; }
.chm-nav a:hover, .chm-nav [aria-current=page] { color: var(--text); background: var(--surface); }
.chm-nav [aria-current=page] { box-shadow: inset 0 -2px var(--accent); }
.chm-intro, .chm-detail { margin-top: clamp(1.5rem, 4vw, 3rem); }
.chm-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: .65rem; padding: clamp(1rem, 2.5vw, 1.6rem); }
.chm-auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: clamp(1.5rem, 8vw, 6rem); align-items: center; max-width: 72rem; margin: clamp(2rem, 10vw, 8rem) auto; }
.chm-auth-info p:not(.chm-kicker) { max-width: 36ch; color: var(--muted); }
.chm-auth { width: 100%; }
.chm-auth form { margin: 1.25rem 0; }
.chm-auth > a, .chm-detail > a { display: inline-block; margin: .65rem .8rem 0 0; }
.chm-grid { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(16rem, 1fr); gap: 1rem; align-items: start; }
.chm-muted { color: var(--muted); margin: 0 0 1rem; }
.chm-kicker { color: var(--accent); letter-spacing: .16em; font-size: .875rem; }
.chm-market-head { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; }
.chm-market-caption { display: flex; justify-content: space-between; gap: .5rem; color: var(--muted); margin: 0; font-size: .875rem; }
.chm-chart { display: block; width: 100%; height: clamp(220px, 38vw, 500px); }
.chm label { display: block; margin-bottom: .75rem; }
.chm input:not([type=hidden]), .chm select { display: block; width: 100%; background: #101217; color: var(--text); border: 1px solid #656e7d; border-radius: .35rem; padding: .65rem; font: inherit; margin-top: .25rem; }
.chm button, .chm #wp-submit { width: 100%; background: var(--accent); color: #15181d; border: 1px solid var(--accent); border-radius: .4rem; padding: .65rem; font: inherit; font-weight: 700; cursor: pointer; }
.chm button[value=Venda] { color: var(--text); background: #282c35; border-color: #656e7d; }
.chm-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.chm :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.chm label[for=chm-asset] { margin-bottom: 0; }
.chm select.chm-asset { margin-bottom: .75rem; }
.chm-notice { padding: .75rem 1rem; background: #292e36; border-radius: .4rem; }
.chm-table { overflow-x: auto; }
.chm table { width: 100%; border-collapse: collapse; }
.chm th, .chm td { text-align: left; border-bottom: 1px solid var(--line); padding: .75rem; white-space: nowrap; }
.chm th { color: var(--muted); font-weight: 600; }
.chm-profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem; padding: 0 0 1rem; margin: 1rem 0; border-bottom: 1px solid var(--line); }
.chm-profile dt { color: var(--muted); font-size: .875rem; }
.chm-profile dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.chm-detail > h3 { margin-top: 1.5rem; }

@media (max-width: 760px) {
    .chm-grid, .chm-auth-layout { grid-template-columns: minmax(0, 1fr); }
    .chm-nav a { padding-inline: .5rem; }
}

.chm-auth-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .3rem;
    margin-bottom: 1.4rem;
    padding: .25rem;
    background: #101217;
    border: 1px solid var(--line);
    border-radius: .45rem;
}

.chm-auth-nav a {
    padding: .55rem .4rem;
    border-radius: .3rem;
    text-align: center;
    text-decoration: none;
    color: var(--muted);
}

.chm-auth-nav a:hover,
.chm-auth-nav [aria-current=page] {
    background: #292e36;
    color: var(--text);
}

.chm-dashboard {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: start;
    gap: clamp(.75rem, 3vw, 2rem);
    margin-top: 1.25rem;
}
.chm-dashboard .chm-nav {
    flex-direction: column;
    align-items: stretch;
    border-bottom: 0;
}
.chm-dashboard .chm-nav a {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 2.75rem;
}
.chm-dashboard .chm-nav [aria-current=page] {
    box-shadow: inset 3px 0 var(--accent);
}
.chm-dashboard .chm-detail { margin-top: 0; }
.chm-chart-panel h1 { font-size: clamp(1.65rem, 4vw, 2.6rem); }
.chm-market-frame {
    display: block;
    width: 100%;
    height: clamp(26rem, 66vh, 48rem);
    margin: 1rem 0 .55rem;
    border: 1px solid var(--line);
    border-radius: .4rem;
    background: #131722;
}
@media (max-width: 640px) {
    .chm-dashboard { grid-template-columns: 2.75rem minmax(0, 1fr); }
    .chm-dashboard .chm-nav a { justify-content: center; padding: .4rem; }
    .chm-dashboard .chm-nav a span:not(.dashicons) {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .chm-chart-panel { padding: .55rem; }
}
