/* Homepage (MCP-first) styles. Scoped under .mhome; brand tokens come from style.css :root. */

.mhome {
    font-family: var(--font-body);
    color: var(--navy);
}

.mhome .mh-inner {
    max-width: 1060px;
    margin: 0 auto;
}

.mhome .mh-eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 14px;
}

.mhome .mh-serif {
    font-family: var(--font-heading);
    font-weight: 500;
}

.mhome .mh-mono {
    font-family: var(--font-data);
}

/* ---------- Hero ---------- */

.mh-hero {
    background: var(--navy);
    padding: 64px 40px 68px;
}

.mh-hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: 1060px;
    margin: 0 auto;
}

.mh-hero h2 {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: clamp(2.1rem, 4vw, 2.9rem);
    line-height: 1.18;
    color: #ffffff;
    margin: 0;
}

.mh-hero h2 .gold { color: var(--gold); }

.mh-lede {
    color: #A9ABC4;
    font-size: 0.95rem;
    line-height: 1.85;
    margin: 18px 0 26px;
    max-width: 30rem;
}

.mh-cta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.mh-btn-gold {
    display: inline-block;
    background: var(--gold);
    color: var(--navy);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    border-radius: 5px;
    padding: 12px 24px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.mh-btn-gold:hover { background: var(--accent-hover); color: var(--navy); }

.mh-link-ghost {
    color: #C9CADF;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 12px 6px;
}

.mh-link-ghost:hover { color: #ffffff; }

/* Connector panel */

.mh-panel {
    background: #22233A;
    border: 1px solid #34354E;
    border-radius: 10px;
    overflow: hidden;
}

.mh-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #34354E;
}

.mh-panel-head span {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6E7090;
}

.mh-copy-btn {
    background: none;
    border: none;
    color: #6E7090;
    cursor: pointer;
    font-size: 0.78rem;
    font-family: var(--font-body);
    padding: 2px 4px;
}

.mh-copy-btn:hover { color: #C9CADF; }

.mh-panel-body { padding: 18px 20px 8px; }

.mh-endpoint {
    font-family: var(--font-data);
    font-size: 0.92rem;
    color: #E8E0D1;
    margin: 0 0 16px;
    word-break: break-all;
}

.mh-panel-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid #2C2D45;
}

.mh-panel-row .k { font-size: 0.8rem; color: #6E7090; }
.mh-panel-row .v { font-family: var(--font-data); font-size: 0.8rem; color: #A9ABC4; text-align: right; }

.mh-panel-foot {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 20px;
    background: #1E1F33;
    border-top: 1px solid #34354E;
}

.mh-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5DCAA5;
    flex-shrink: 0;
}

.mh-panel-foot span { font-size: 0.8rem; color: #A9ABC4; }

/* ---------- Works-with strip ---------- */

.mh-works {
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 18px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.mh-works .lbl {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #B4B2A9;
}

.mh-works .names {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-soft);
    letter-spacing: 0.05em;
}

/* ---------- Sections ---------- */

.mh-section { padding: 64px 40px; }
.mh-section.paper { background: var(--paper); }
.mh-section.soft { background: var(--bg); }

.mh-section-head { text-align: center; max-width: 34rem; margin: 0 auto 32px; }

.mh-section-head h2,
.mh-section-head-row h2 {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.55rem;
    color: var(--navy);
    margin: 0;
}

.mh-section-head .sub {
    font-size: 0.88rem;
    color: var(--text-mute);
    line-height: 1.7;
    margin: 12px 0 0;
}

/* ---------- Trace player ---------- */

.mh-demo-wrap { max-width: 760px; margin: 0 auto; }

.mh-demo-tabs {
    display: flex;
    gap: 26px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 22px;
    overflow-x: auto;
}

.mh-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-mute);
    padding: 0 2px 12px;
    cursor: pointer;
    white-space: nowrap;
}

.mh-tab:hover { color: var(--navy); }
.mh-tab.act { color: var(--navy); border-bottom-color: var(--gold); }

.mh-player {
    background: var(--navy);
    border: 1px solid #34354E;
    border-radius: 10px;
    overflow: hidden;
}

.mh-player-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #34354E;
}

.mh-player-head .src { font-family: var(--font-data); font-size: 0.78rem; color: #6E7090; }

.mh-replay {
    background: none;
    border: none;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    padding: 2px 4px;
}

.mh-replay:hover { color: #d4bd92; }

.mh-trace { padding: 20px 20px 22px; min-height: 330px; }

.mh-q {
    margin: 0 0 16px;
    font-size: 0.92rem;
    color: #ffffff;
    line-height: 1.6;
}

.mh-q .pr { color: var(--gold); font-weight: 500; margin-right: 8px; }

.mh-trow { padding: 7px 0; }

.mh-trow .line1 {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.mh-trow .tst { width: 14px; flex-shrink: 0; font-size: 0.8rem; }
.mh-trow .tname { font-family: var(--font-data); font-size: 0.84rem; color: #E8E0D1; }
.mh-trow .targs { font-family: var(--font-data); font-size: 0.84rem; color: #6E7090; word-break: break-word; }
.mh-trow .tms { font-family: var(--font-data); font-size: 0.76rem; color: #6E7090; margin-left: auto; flex-shrink: 0; }

.mh-tres {
    font-family: var(--font-data);
    font-size: 0.8rem;
    color: #9FE1CB;
    padding: 4px 0 0 24px;
    line-height: 1.55;
}

.mh-tres.hi { color: #D9BE8C; }
.mh-tres.warn { color: #F09595; }

.mh-check { color: #5DCAA5; }

.mh-spin {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 2px solid #34354E;
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: mh-rotate 0.7s linear infinite;
}

@keyframes mh-rotate { to { transform: rotate(360deg); } }

.mh-ans {
    margin-top: 16px;
    background: #FAFAF8;
    border-left: 3px solid var(--gold);
    padding: 18px 22px;
}

.mh-ans p {
    font-size: 0.9rem;
    color: var(--navy);
    line-height: 1.85;
    margin: 0;
}

.mh-flags {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    border-top: 1px solid var(--rule);
    margin-top: 14px;
    padding-top: 12px;
}

.mh-flag { font-size: 0.78rem; font-weight: 500; }
.mh-flag.good { color: var(--teal); }
.mh-flag.warn { color: var(--amber); }
.mh-flag.bad { color: var(--red); }
.mh-flag.mute { color: var(--text-soft); font-weight: 400; }

.mh-verify {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gold-dark);
    text-decoration: none;
}

.mh-verify:hover { text-decoration: underline; }

.mh-player-foot {
    padding: 11px 20px;
    background: #1E1F33;
    border-top: 1px solid #34354E;
}

.mh-player-foot span { font-size: 0.78rem; color: #6E7090; }

/* Animation states */

.mh-anim .mh-trow,
.mh-anim .mh-q {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mh-anim .mh-ans {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.mh-anim .mh-trow.on,
.mh-anim .mh-q.on,
.mh-anim .mh-ans.on {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .mh-anim .mh-trow,
    .mh-anim .mh-q,
    .mh-anim .mh-ans {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .mh-spin { animation: none; }
}

/* ---------- Setup steps ---------- */

.mh-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    max-width: 760px;
    margin: 0 auto;
}

.mh-step .n {
    font-family: var(--font-data);
    font-size: 0.8rem;
    color: var(--gold);
    margin: 0 0 10px;
}

.mh-step h3 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--navy);
    margin: 0 0 6px;
}

.mh-step p {
    font-size: 0.84rem;
    color: var(--text-soft);
    line-height: 1.7;
    margin: 0;
}

.mh-step .chip {
    font-family: var(--font-data);
    font-size: 0.78rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 1px 7px;
    color: var(--navy);
    white-space: nowrap;
}

.mh-setup-note {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-mute);
    margin: 30px auto 0;
    max-width: 36rem;
    line-height: 1.7;
}

/* ---------- Tool surface ---------- */

.mh-section-head-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    max-width: 1060px;
    margin: 0 auto 24px;
}

.mh-more-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gold-dark);
    text-decoration: none;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.mh-more-link:hover { text-decoration: underline; }

.mh-toolgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 48px;
    max-width: 1060px;
    margin: 0 auto;
}

.mh-toolrow {
    border-top: 1px solid var(--rule);
    padding: 13px 2px 14px;
}

.mh-toolrow .tn { font-family: var(--font-data); font-size: 0.88rem; color: var(--navy); }

.mh-toolrow p {
    font-size: 0.82rem;
    color: var(--text-mute);
    line-height: 1.55;
    margin: 4px 0 0;
}

/* ---------- Access ---------- */

.mh-access {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    max-width: 1060px;
    margin: 0 auto;
}

.mh-acc .n {
    font-family: var(--font-data);
    font-size: 0.8rem;
    color: var(--gold);
    margin: 0 0 12px;
}

.mh-acc .rule { height: 1px; background: var(--navy); margin-bottom: 16px; }

.mh-acc h3 {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--navy);
    margin: 0 0 8px;
}

.mh-acc p {
    font-size: 0.86rem;
    color: #5F5E5A;
    line-height: 1.75;
    margin: 0 0 14px;
}

.mh-acc a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gold-dark);
    text-decoration: none;
    letter-spacing: 0.04em;
}

.mh-acc a:hover { text-decoration: underline; }

/* ---------- Stats band ---------- */

.mh-stats {
    background: var(--navy);
    padding: 46px 40px;
}

.mh-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 1060px;
    margin: 0 auto;
}

.mh-stat {
    text-align: center;
    border-right: 1px solid #34354E;
    padding: 4px 12px;
}

.mh-stat:last-child { border-right: none; }

.mh-stat .num {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.8rem;
    color: #ffffff;
    margin: 0;
}

.mh-stat .num.gold { color: var(--gold); }

.mh-stat .lbl {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6E7090;
    margin: 10px 0 0;
}

/* ---------- Founder ---------- */

.mh-founder { text-align: center; }

.mh-founder .badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--navy);
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    color: var(--gold);
}

.mh-founder blockquote {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--navy);
    line-height: 1.7;
    max-width: 30rem;
    margin: 0 auto;
}

.mh-founder .who {
    font-size: 0.78rem;
    color: var(--text-mute);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 14px 0 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .mh-hero { padding: 44px 24px 48px; }
    .mh-hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .mh-section { padding: 48px 24px; }
    .mh-toolgrid { grid-template-columns: 1fr; }
    .mh-access { grid-template-columns: 1fr; gap: 30px; }
    .mh-steps { grid-template-columns: 1fr; gap: 24px; }
    .mh-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
    .mh-stat:nth-child(2) { border-right: none; }
}

@media (max-width: 560px) {
    .mh-stats-grid { grid-template-columns: 1fr; }
    .mh-stat { border-right: none; }
    .mh-flags { gap: 12px; }
    .mh-verify { margin-left: 0; }
}

/* ---------- Marketing subpages (/tools, /docs, /licensing, /pricing) ---------- */

.spage {
    max-width: 860px;
    margin: 0 auto;
    padding: 52px 24px 80px;
    font-family: var(--font-body);
    color: var(--navy);
}

.spage .sp-eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 14px;
}

.spage .sp-title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    line-height: 1.25;
    margin: 0 0 16px;
}

.spage .sp-lede {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.85;
    max-width: 42rem;
    margin: 0;
}

.spage .sp-block { margin-top: 52px; }

.spage .sp-block > h2 {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.3rem;
    margin: 0 0 14px;
}

.spage .sp-block > p,
.spage .sp-block li {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.85;
}

.spage .sp-block > p { margin: 0 0 14px; }

.spage a { color: var(--gold-dark); }

.spage .sp-note { font-size: 0.8rem; color: var(--text-mute); line-height: 1.7; }

.spage .sp-btn-gold {
    display: inline-block;
    background: var(--gold);
    color: var(--navy);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    border-radius: 5px;
    padding: 12px 24px;
    text-decoration: none;
}

.spage .sp-btn-gold:hover { background: var(--accent-hover); }

.spage .sp-panel {
    background: #22233A;
    border: 1px solid #34354E;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 18px 0;
    overflow-x: auto;
}

.spage .sp-panel pre,
.spage .sp-panel code {
    font-family: var(--font-data);
    font-size: 0.84rem;
    color: #E8E0D1;
    line-height: 1.7;
    margin: 0;
    white-space: pre;
}

.spage .sp-kv {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 2px;
    border-top: 1px solid var(--rule);
    font-size: 0.88rem;
}

.spage .sp-kv .k { color: var(--text-mute); flex-shrink: 0; }
.spage .sp-kv .v { font-family: var(--font-data); font-size: 0.84rem; text-align: right; word-break: break-all; }

.spage .sp-steps { counter-reset: spstep; list-style: none; margin: 0; padding: 0; }

.spage .sp-steps > li {
    counter-increment: spstep;
    position: relative;
    padding: 0 0 22px 44px;
}

.spage .sp-steps > li::before {
    content: counter(spstep);
    position: absolute;
    left: 0;
    top: 1px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold);
    font-family: var(--font-data);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spage .sp-steps h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 4px;
    color: var(--navy);
}

.spage .sp-steps p { margin: 0; }

.spage .sp-chip {
    font-family: var(--font-data);
    font-size: 0.8rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 1px 7px;
    color: var(--navy);
    white-space: nowrap;
}

.spage .sp-toolgroup { margin-top: 36px; }

.spage .sp-toolgroup > h3 {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--navy);
    margin: 0 0 6px;
}

.spage .sp-toolgroup > .g-sub { font-size: 0.84rem; color: var(--text-mute); margin: 0 0 10px; }

.spage .sp-toolrow {
    border-top: 1px solid var(--rule);
    padding: 12px 2px 13px;
}

.spage .sp-toolrow .tn { font-family: var(--font-data); font-size: 0.88rem; color: var(--navy); }

.spage .sp-toolrow p {
    font-size: 0.82rem;
    color: var(--text-mute);
    line-height: 1.55;
    margin: 4px 0 0;
}

.spage .sp-grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 48px;
}

@media (max-width: 760px) {
    .spage .sp-grid2 { grid-template-columns: 1fr; }
}
