/*
 * The signed-out landing page at developer.moneysuite.co.uk.
 *
 * Everything here is scoped under .ms-home so it cannot reach the signed-in
 * portal, which keeps its own --dp-* tokens in devportal.css. The two differ on
 * purpose: the app uses the neutral developer blue, the landing page uses the
 * MoneySuite brand indigo from www.moneysuite.co.uk (--bs-primary #625dfa), so
 * a visitor arriving from the marketing site recognises where they are.
 */
.ms-home {
    --ms-ground: #f7f8fa;
    --ms-surface: #ffffff;
    --ms-sunken: #eef0f6;
    --ms-border: #e2e5ea;
    --ms-ink: #1c2128;
    --ms-muted: #5c6672;
    --ms-accent: #625dfa;          /* www.moneysuite.co.uk --bs-primary */
    --ms-accent-hover: #514dcf;    /* --bs-primary-dark */
    --ms-accent-soft: rgba(98, 93, 250, .10);
    --ms-good: #1a7f47;
    --ms-good-soft: rgba(26, 127, 71, .10);
    --ms-term-bg: #10151c;
    --ms-term-ink: #d7e2ee;
    --ms-term-muted: #7d8b9c;
    --ms-term-key: #a5a1ff;
    --ms-term-str: #8fd6a9;
    --ms-term-num: #e3b341;
    --ms-shadow: 0 1px 2px rgba(16, 21, 28, .05), 0 8px 24px rgba(16, 21, 28, .06);
    --ms-r: 8px;
    --ms-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --ms-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    background: var(--ms-ground);
    color: var(--ms-ink);
    font-family: var(--ms-sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
    .ms-home {
        --ms-ground: #0f1216;
        --ms-surface: #171b21;
        --ms-sunken: #1e242c;
        --ms-border: #2a313a;
        --ms-ink: #e6edf3;
        --ms-muted: #9aa4b1;
        --ms-accent: #8b87fb;      /* the brand indigo lifted to stay legible on dark */
        --ms-accent-hover: #a5a1ff;
        --ms-accent-soft: rgba(139, 135, 251, .14);
        --ms-good: #4ac07c;
        --ms-good-soft: rgba(74, 192, 124, .13);
        --ms-term-bg: #0a0e13;
        --ms-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    }
}

.ms-home *, .ms-home *::before, .ms-home *::after { box-sizing: border-box; }
.ms-home a { color: var(--ms-accent); }
.ms-home h1, .ms-home h2, .ms-home h3 { text-wrap: balance; margin: 0; }
.ms-home p { margin: 0; }
.ms-home code, .ms-home pre { font-family: var(--ms-mono); }

.ms-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.ms-eyebrow {
    font-family: var(--ms-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ms-muted);
}

/* ---- top bar ---- */
.ms-bar {
    border-bottom: 1px solid var(--ms-border);
    background: var(--ms-surface);
    position: sticky;
    top: 0;
    z-index: 10;
}
.ms-bar-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.ms-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.ms-brand img { height: 26px; width: auto; display: block; }
.ms-brand span { color: var(--ms-accent); }
.ms-bar nav { display: flex; gap: 20px; margin-left: 8px; flex-wrap: wrap; }
.ms-bar nav a { color: var(--ms-muted); text-decoration: none; font-size: 14px; }
.ms-bar nav a:hover { color: var(--ms-ink); }
.ms-bar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.ms-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--ms-r);
    padding: 9px 16px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.ms-home .ms-btn-primary { background: var(--ms-accent); color: #fff; }
.ms-home .ms-btn-primary:hover { background: var(--ms-accent-hover); color: #fff; }
.ms-home .ms-btn-quiet { background: transparent; color: var(--ms-ink); border-color: var(--ms-border); }
.ms-home .ms-btn-quiet:hover { background: var(--ms-sunken); color: var(--ms-ink); }
.ms-home .ms-btn-plain { background: none; color: var(--ms-ink); padding: 9px 4px; }
.ms-home .ms-btn-plain:hover { color: var(--ms-accent); }
.ms-home a:focus-visible, .ms-home button:focus-visible {
    outline: 2px solid var(--ms-accent);
    outline-offset: 2px;
}

/* ---- hero ---- */
.ms-hero { padding: 64px 0 56px; }
.ms-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
.ms-hero h1 {
    font-size: 42px;
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.12;
    margin: 14px 0 16px;
}
.ms-lede { font-size: 17px; color: var(--ms-muted); max-width: 46ch; }
.ms-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.ms-sandbox {
    margin-top: 26px;
    border-left: 2px solid var(--ms-good);
    background: var(--ms-good-soft);
    border-radius: 0 var(--ms-r) var(--ms-r) 0;
    padding: 12px 16px;
    font-size: 14px;
    max-width: 46ch;
}
.ms-sandbox strong { color: var(--ms-good); }

/* ---- terminal ---- */
.ms-term {
    background: var(--ms-term-bg);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-r);
    box-shadow: var(--ms-shadow);
    overflow: hidden;
}
.ms-term-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    font-family: var(--ms-mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ms-term-muted);
}
.ms-dot { width: 9px; height: 9px; border-radius: 50%; background: #313b47; }
.ms-term-body { padding: 16px; overflow-x: auto; }
.ms-term pre { margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--ms-term-ink); }
.ms-c-mut { color: var(--ms-term-muted); }
.ms-c-key { color: var(--ms-term-key); }
.ms-c-str { color: var(--ms-term-str); }
.ms-c-num { color: var(--ms-term-num); }
.ms-term-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    font-family: var(--ms-mono);
    font-size: 12px;
    color: var(--ms-term-muted);
}
.ms-pill-ok {
    background: rgba(74, 192, 124, .16);
    color: #4ac07c;
    border-radius: 999px;
    padding: 2px 9px;
    font-weight: 500;
}

/* ---- stat strip ---- */
.ms-strip { border-top: 1px solid var(--ms-border); border-bottom: 1px solid var(--ms-border); background: var(--ms-surface); }
.ms-strip-in { display: flex; flex-wrap: wrap; gap: 40px; padding: 22px 0; }
.ms-stat-n { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ms-stat-l { font-size: 13px; color: var(--ms-muted); }

/* ---- sections ---- */
.ms-band { padding: 64px 0; }
.ms-band-flush { padding-top: 0; }
.ms-sec-head { max-width: 60ch; margin-bottom: 32px; }
.ms-sec-head h2 { font-size: 27px; font-weight: 600; letter-spacing: -.02em; margin: 10px 0; }
.ms-sec-head p { color: var(--ms-muted); }

/* ---- steps ---- */
.ms-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ms-step { background: var(--ms-surface); border: 1px solid var(--ms-border); border-radius: var(--ms-r); padding: 20px; }
.ms-step-n {
    font-family: var(--ms-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--ms-accent);
    background: var(--ms-accent-soft);
    border-radius: 999px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
}
.ms-step h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.ms-step p { font-size: 14px; color: var(--ms-muted); }
.ms-step code { font-size: 12.5px; background: var(--ms-sunken); border-radius: 4px; padding: 1px 5px; }

/* ---- API surface ---- */
.ms-scroll-x { overflow-x: auto; }
.ms-surface { width: 100%; border-collapse: collapse; font-size: 14px; }
.ms-surface th {
    text-align: left;
    font-family: var(--ms-mono);
    font-size: 11px;
    letter-spacing: .09em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--ms-muted);
    padding: 0 16px 10px 0;
    border-bottom: 1px solid var(--ms-border);
}
.ms-surface td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--ms-border); vertical-align: top; }
.ms-surface tr:last-child td { border-bottom: 0; }
.ms-surface td:first-child { font-weight: 600; white-space: nowrap; }
.ms-surface td:nth-child(2) { color: var(--ms-muted); }
.ms-surface code { font-size: 12.5px; color: var(--ms-ink); background: var(--ms-sunken); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }

/* ---- intelligence ---- */
.ms-ai { background: var(--ms-surface); border-top: 1px solid var(--ms-border); border-bottom: 1px solid var(--ms-border); }
.ms-verbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
.ms-verb { border: 1px solid var(--ms-border); border-radius: var(--ms-r); padding: 20px; background: var(--ms-ground); }
.ms-verb h3 { font-family: var(--ms-mono); font-size: 15px; font-weight: 600; color: var(--ms-accent); margin-bottom: 8px; }
.ms-verb p { font-size: 14px; color: var(--ms-muted); }
.ms-when { display: block; margin-top: 10px; font-size: 13px; color: var(--ms-ink); }
.ms-flow {
    background: var(--ms-sunken);
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-r);
    padding: 20px;
    overflow-x: auto;
}
.ms-flow pre { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--ms-ink); }
.ms-feeds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.ms-feed { border: 1px solid var(--ms-border); border-radius: var(--ms-r); padding: 18px; background: var(--ms-ground); }
.ms-feed h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ms-feed p { font-size: 14px; color: var(--ms-muted); }
.ms-caps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ms-cap {
    font-family: var(--ms-mono);
    font-size: 12px;
    border: 1px solid var(--ms-border);
    border-radius: 999px;
    padding: 5px 12px;
    color: var(--ms-muted);
    background: var(--ms-ground);
}
.ms-note { margin-top: 18px; font-size: 14px; color: var(--ms-muted); max-width: 70ch; }

/* ---- portal figures ---- */
.ms-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ms-shots figure { margin: 0; }
.ms-shots img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-r);
    box-shadow: var(--ms-shadow);
}
.ms-shots figcaption { font-size: 13px; color: var(--ms-muted); margin-top: 10px; }
.ms-portal-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; }
.ms-portal-list li { font-size: 14px; color: var(--ms-muted); padding-left: 16px; position: relative; }
.ms-portal-list li::before { content: "\2014"; position: absolute; left: 0; color: var(--ms-accent); }
.ms-portal-list strong { color: var(--ms-ink); font-weight: 600; }

/* ---- contact ---- */
.ms-contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ms-contact-card { background: var(--ms-surface); border: 1px solid var(--ms-border); border-radius: var(--ms-r); padding: 22px; }
.ms-contact-card h3 { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ms-muted); margin-bottom: 10px; }
.ms-contact-card p { font-size: 15px; }
.ms-contact-card a { text-decoration: none; font-weight: 500; }
.ms-contact-card a:hover { text-decoration: underline; }
.ms-contact-card .ms-sub { font-size: 13px; color: var(--ms-muted); margin-top: 6px; }

/* ---- closing cta ---- */
.ms-close { text-align: center; padding: 72px 0; }
.ms-close h2 { font-size: 27px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 12px; }
.ms-close p { color: var(--ms-muted); max-width: 52ch; margin: 0 auto 26px; }
.ms-close .ms-cta { justify-content: center; }

/* ---- footer ---- */
.ms-foot { border-top: 1px solid var(--ms-border); background: var(--ms-surface); padding: 36px 0 44px; }
.ms-foot-in { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.ms-foot-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.ms-foot-links a { color: var(--ms-muted); text-decoration: none; font-size: 14px; }
.ms-foot-links a:hover { color: var(--ms-ink); }
.ms-legal { font-size: 12.5px; color: var(--ms-muted); max-width: 64ch; margin-top: 12px; }

@media (max-width: 900px) {
    .ms-hero-grid,
    .ms-steps,
    .ms-verbs,
    .ms-feeds,
    .ms-shots,
    .ms-portal-list,
    .ms-contact-grid { grid-template-columns: minmax(0, 1fr); }
    .ms-hero { padding: 44px 0 40px; }
    .ms-hero h1 { font-size: 33px; }
    .ms-bar nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ms-home * { animation: none !important; transition: none !important; }
}

