/* ── site.css — the stylesheet for every page on customers.riskmandate.ai ────
   The look is riskmandate.ai's: paper surfaces, the green, a dark canvas for
   the hero and the footer. This is the only file on the site where a colour is
   written; everything else uses the tokens below. Values are aligned per block. */

:root {
    --rm-bg:              #F7F6F2;
    --rm-bg-2:            #EFEDE7;
    --rm-card:            #FFFFFF;
    --rm-ink:             #0D0D0C;
    --rm-canvas:          #0A0A09;
    --rm-text:            #1A1917;
    --rm-muted:           #4A4845;
    --rm-faint:           #8A8780;
    --rm-border:          #E2DFD8;
    --rm-green:           #1A7F5A;
    --rm-green-hover:     #16704F;
    --rm-green-2:         #22C55E;
    --rm-green-bg:        #EBF5F0;
    --rm-gold:            #B45309;
    --rm-gold-bg:         #FBF1E6;
    --rm-red:             #C0392B;
    --rm-fg:              #F7F6F2;
    --rm-fg-2:            rgba(247, 246, 242, 0.55);
    --rm-fg-3:            rgba(247, 246, 242, 0.32);
    --rm-line:            rgba(247, 246, 242, 0.10);
    --rm-line-2:          rgba(247, 246, 242, 0.18);
    --rm-header:          rgba(255, 255, 255, 0.92);
    --rm-shadow:          0 10px 34px rgba(13, 13, 12, 0.14);
    --rm-on-status:       #FFFFFF;
    --rm-status-shipped:  #1A7F5A;
    --rm-status-proposed: #B45309;
    --rm-status-absent:   #8A8780;
    --rm-step-done:       #1A7F5A;
    --rm-step-progress:   #B45309;
    --rm-step-open:       #E2DFD8;

    --rm-sans:            ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --rm-mono:            ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
    --rm-wrap:            1000px;
    --rm-wrap-wide:       1100px;
    --rm-r:               10px;
    --rm-r-sm:            8px;
    --rm-fast:            150ms;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden]                { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    background:     var(--rm-bg);
    color:          var(--rm-text);
    display:        flex;
    flex-direction: column;
    font-family:    var(--rm-sans);
    font-size:      16px;
    line-height:    1.65;
    margin:         0;
    min-height:     100vh;
}
.wrap { margin: 0 auto; max-width: var(--rm-wrap); padding: 0 24px; width: 100%; }

a { color: var(--rm-green); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--rm-green-hover); }
:focus-visible { border-radius: 4px; outline: 2px solid var(--rm-green-2); outline-offset: 3px; }

h1, h2, h3 { color: var(--rm-text); letter-spacing: -0.02em; line-height: 1.15; margin: 40px 0 12px; }
h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; letter-spacing: -0.03em; margin-top: 36px; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
h1 .g, h2 .g { color: var(--rm-green); }
p  { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin: 0 0 8px; }
li strong, p strong { color: var(--rm-text); }

code, pre { font-family: var(--rm-mono); font-size: 0.9em; }
code { background: var(--rm-bg-2); border-radius: 5px; color: var(--rm-text); padding: 1px 6px; }
pre {
    background:    var(--rm-card);
    border:        1px solid var(--rm-border);
    border-radius: var(--rm-r);
    line-height:   1.45;
    overflow:      auto;
    padding:       16px;
}
pre code { background: transparent; padding: 0; }

/* ── the header, in riskmandate.ai's shape ─────────────────────────────────── */

header.top {
    backdrop-filter: blur(14px);
    background:      var(--rm-header);
    border-bottom:   1px solid var(--rm-border);
    position:        sticky;
    top:             0;
    z-index:         60;
}
header.top .wrap { align-items: center; display: flex; gap: 18px; max-width: var(--rm-wrap-wide); min-height: 56px; position: relative; }
.brand {
    align-items:     center;
    color:           var(--rm-text);
    display:         flex;
    font-size:       15px;
    font-weight:     700;
    gap:             9px;
    text-decoration: none;
    white-space:     nowrap;
}
.brand .rm  { display: block; flex: none; height: 26px; width: 26px; }
.brand .sub { color: var(--rm-green); font-weight: 600; margin-left: 6px; }
.parent {
    border:          1px solid var(--rm-border);
    border-radius:   7px;
    color:           var(--rm-muted);
    font-family:     var(--rm-mono);
    font-size:       11.5px;
    padding:         4px 8px;
    text-decoration: none;
    white-space:     nowrap;
}
.parent:hover { border-color: var(--rm-green); color: var(--rm-green); }
.stage-pill {
    color:          var(--rm-gold);
    font-family:    var(--rm-mono);
    font-size:      10px;
    font-weight:    700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space:    nowrap;
}
.navlinks { align-items: center; display: flex; gap: 20px; margin-left: auto; }
.navlinks a.pagelink, .navgroup-btn {
    align-items:     center;
    color:           var(--rm-muted);
    display:         inline-flex;
    font-size:       13.5px;
    gap:             5px;
    padding:         6px 0;
    text-decoration: none;
    transition:      color var(--rm-fast);
    white-space:     nowrap;
}
.navlinks a.pagelink:hover, .navgroup-btn:hover, .navgroup:hover .navgroup-btn { color: var(--rm-text); }
.navlinks a.pagelink.active, .navgroup.active .navgroup-btn { color: var(--rm-text); font-weight: 600; }
.navgroup { align-items: center; display: inline-flex; position: relative; }
.navgroup::after { content: ""; height: 10px; left: 0; position: absolute; right: 0; top: 100%; }
.navgroup-car { font-size: 8px; line-height: 1; opacity: 0.6; transition: transform var(--rm-fast); }
.navgroup:hover .navgroup-car, .navgroup.open .navgroup-car { transform: rotate(180deg); }
.navmenu {
    background:     var(--rm-card);
    border:         1px solid var(--rm-border);
    border-radius:  var(--rm-r);
    box-shadow:     var(--rm-shadow);
    display:        none;
    flex-direction: column;
    gap:            2px;
    left:           50%;
    min-width:      220px;
    padding:        6px;
    position:       absolute;
    top:            calc(100% + 8px);
    transform:      translateX(-50%);
    z-index:        70;
}
.navgroup:hover .navmenu, .navgroup:focus-within .navmenu, .navgroup.open .navmenu { display: flex; }
.navmenu a.navchild { border-radius: 7px; justify-content: flex-start; padding: 8px 12px; text-align: left; width: 100%; }
.navmenu a.navchild:hover { background: var(--rm-bg-2); color: var(--rm-text); }
.navmenu a.navchild.active { background: var(--rm-green-bg); color: var(--rm-green); font-weight: 600; }
.version {
    background:      var(--rm-card);
    border:          1px solid var(--rm-border);
    border-radius:   7px;
    color:           var(--rm-muted);
    font-family:     var(--rm-mono);
    font-size:       12px;
    padding:         5px 8px;
    text-decoration: none;
    white-space:     nowrap;
}
.version:hover { border-color: var(--rm-faint); color: var(--rm-text); }
.navtoggle { display: none; }
.crumbs { color: var(--rm-faint); font-size: 12px; padding-bottom: 8px; }
.crumbs a   { color: var(--rm-faint); }
.crumbs .sep { opacity: 0.5; padding: 0 2px; }
.crumbs [aria-current] { color: var(--rm-text); }

@media (max-width: 1040px) {
    .stage-pill { display: none; }
    .navtoggle {
        background:      none;
        border:          0;
        cursor:          pointer;
        display:         flex;
        flex-direction:  column;
        gap:             5px;
        height:          40px;
        justify-content: center;
        margin-left:     auto;
        padding:         0;
        width:           40px;
    }
    .navtoggle span { background: var(--rm-text); border-radius: 2px; display: block; height: 2px; margin: 0 auto; transition: transform 200ms, opacity 200ms; width: 20px; }
    header.top.nav-open .navtoggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    header.top.nav-open .navtoggle span:nth-child(2) { opacity: 0; }
    header.top.nav-open .navtoggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .navlinks {
        align-items:    stretch;
        background:     var(--rm-card);
        border-bottom:  1px solid var(--rm-border);
        box-shadow:     var(--rm-shadow);
        display:        none;
        flex-direction: column;
        gap:            0;
        left:           0;
        margin:         0;
        max-height:     calc(100vh - 56px);
        overflow:       auto;
        padding:        8px;
        position:       absolute;
        right:          0;
        top:            100%;
    }
    header.top.nav-open .navlinks { display: flex; }
    .navlinks a.pagelink, .navgroup-btn { border-radius: 8px; font-size: 15px; justify-content: flex-start; padding: 12px 16px; text-align: left; width: 100%; }
    .navlinks a.pagelink:hover { background: var(--rm-bg-2); }
    .navgroup { display: block; position: static; width: 100%; }
    .navgroup::after { display: none; }
    .navgroup-btn { display: flex; }
    .navgroup-car { margin-left: auto; }
    .navmenu { background: transparent; border: 0; box-shadow: none; display: flex; min-width: 0; padding: 2px 0 8px 14px; position: static; transform: none; }
    .version { margin-left: 0; }
}
@media (max-width: 420px) {
    header.top .wrap { gap: 10px; padding: 0 16px; }
    .brand { font-size: 14px; gap: 7px; }
    .parent { display: none; }
}
@media print {
    header.top { backdrop-filter: none; background: none; position: static; }
    .navlinks, .navtoggle, .parent { display: none; }
}

/* ── main ───────────────────────────────────────────────────────────────────── */

main { flex: 1; padding-bottom: 64px; }
main.document h1 { font-size: clamp(26px, 3.6vw, 36px); }
.lead { color: var(--rm-muted); font-size: 18px; line-height: 1.7; max-width: 68ch; }
.note {
    background:    var(--rm-green-bg);
    border-left:   3px solid var(--rm-green);
    border-radius: 0 var(--rm-r) var(--rm-r) 0;
    margin:        20px 0;
    padding:       14px 20px;
}
.note.warn { background: var(--rm-gold-bg); border-left-color: var(--rm-gold); }
.note p:last-child { margin-bottom: 0; }

table { border-collapse: collapse; font-size: 14px; margin: 16px 0 24px; width: 100%; }
th, td { border-bottom: 1px solid var(--rm-border); padding: 9px 12px; text-align: left; vertical-align: top; }
th { color: var(--rm-text); font-weight: 600; }
.status {
    border-radius: 999px;
    color:         var(--rm-on-status);
    font-family:   var(--rm-mono);
    font-size:     11.5px;
    padding:       2px 9px;
    white-space:   nowrap;
}
.status-shipped  { background: var(--rm-status-shipped);  }
.status-proposed { background: var(--rm-status-proposed); }
.status-absent   { background: var(--rm-status-absent);   }
.status-line {
    border-bottom: 1px solid var(--rm-border);
    color:         var(--rm-muted);
    font-size:     14px;
    line-height:   2.1;
    margin:        0 0 20px;
    padding:       0 0 12px;
}
.doc-source {
    background:    var(--rm-green-bg);
    border-radius: var(--rm-r);
    color:         var(--rm-muted);
    font-size:     14px;
    padding:       8px 12px;
}
.document blockquote { border-left: 3px solid var(--rm-border); color: var(--rm-muted); margin: 16px 0; padding: 0 16px; }
.document img { max-width: 100%; }

/* ── the dark hero on the home page ─────────────────────────────────────────── */

.hero { background: var(--rm-canvas); border-bottom: 1px solid var(--rm-line); color: var(--rm-fg); padding: 72px 0 60px; }
.hero h1 { color: var(--rm-fg); font-size: clamp(34px, 5.2vw, 56px); line-height: 1.02; margin: 26px 0 0; max-width: 20ch; }
.hero h1 .it { color: var(--rm-green); font-style: italic; }
.hero .sub { color: var(--rm-fg-2); font-size: 17px; line-height: 1.7; margin-top: 22px; max-width: 62ch; }
.hero .sub strong { color: var(--rm-fg); font-weight: 600; }
.eyebrow {
    align-items:   center;
    background:    rgba(26, 127, 90, 0.18);
    border:        1px solid rgba(26, 127, 90, 0.4);
    border-radius: 999px;
    color:         var(--rm-green);
    display:       inline-flex;
    font-family:   var(--rm-mono);
    font-size:     11px;
    font-weight:   700;
    gap:           8px;
    padding:       5px 12px;
}
.eyebrow .d { background: var(--rm-green-2); border-radius: 50%; height: 6px; width: 6px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.btn {
    align-items:     center;
    border:          1px solid transparent;
    border-radius:   var(--rm-r-sm);
    display:         inline-flex;
    font-size:       14px;
    font-weight:     600;
    gap:             8px;
    padding:         12px 22px;
    text-decoration: none;
}
.btn-green { background: var(--rm-green); color: var(--rm-fg); }
.btn-green:hover { background: var(--rm-green-hover); color: var(--rm-fg); }
.btn-ghost { background: transparent; border-color: var(--rm-line-2); color: var(--rm-fg); }
.btn-ghost:hover { border-color: var(--rm-fg-2); color: var(--rm-fg); }
.btn-ghost-dark { background: transparent; border-color: var(--rm-border); color: var(--rm-text); }
.btn-ghost-dark:hover { border-color: var(--rm-green); color: var(--rm-green); }

/* ── sections, cards, the steps ─────────────────────────────────────────────── */

.section { border-bottom: 1px solid var(--rm-border); padding: 48px 0; }
.section.alt { background: var(--rm-bg-2); }
.section h2 { margin-top: 0; }
.section p { color: var(--rm-muted); max-width: 68ch; }
.section p strong { color: var(--rm-text); }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 24px; }
.card { background: var(--rm-card); border: 1px solid var(--rm-border); border-radius: var(--rm-r); padding: 18px 20px; }
.card .n { color: var(--rm-green); font-family: var(--rm-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.card b  { color: var(--rm-text); display: block; font-size: 15.5px; margin-top: 8px; }
.card p  { color: var(--rm-muted); font-size: 13.5px; line-height: 1.6; margin: 6px 0 0; }
.card.step { border-left: 4px solid var(--rm-step-open); }
.card.step.done        { border-left-color: var(--rm-step-done); }
.card.step.in-progress { border-left-color: var(--rm-step-progress); }
.plist { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 20px 0 0; max-width: 72ch; padding: 0; }
.plist li { color: var(--rm-muted); padding-left: 22px; position: relative; }
.plist li::before { background: var(--rm-green); border-radius: 50%; content: ""; height: 6px; left: 2px; position: absolute; top: 11px; width: 6px; }
.plist strong { color: var(--rm-text); }
.steps { counter-reset: step; list-style: none; margin: 20px 0 0; padding: 0; }
.steps > li {
    background:    var(--rm-card);
    border:        1px solid var(--rm-border);
    border-radius: var(--rm-r);
    margin:        0 0 12px;
    padding:       16px 20px 16px 64px;
    position:      relative;
}
.steps > li::before {
    background:      var(--rm-green);
    border-radius:   50%;
    color:           var(--rm-fg);
    content:         counter(step);
    counter-increment: step;
    font-family:     var(--rm-mono);
    font-size:       13px;
    font-weight:     700;
    height:          30px;
    left:            18px;
    line-height:     30px;
    position:        absolute;
    text-align:      center;
    top:             16px;
    width:           30px;
}
.steps > li b { color: var(--rm-text); display: block; font-size: 16px; }
.steps > li p { color: var(--rm-muted); font-size: 14.5px; margin: 6px 0 0; }
.steps > li p:last-child { margin-bottom: 0; }
.step-state { font-family: var(--rm-mono); font-size: 11.5px; white-space: nowrap; }
.step-state.done        { color: var(--rm-step-done); }
.step-state.in-progress { color: var(--rm-step-progress); }
.step-state.open        { color: var(--rm-faint); }
.kv { display: grid; gap: 6px 16px; grid-template-columns: max-content 1fr; margin: 16px 0; }
.kv dt { color: var(--rm-muted); font-size: 14px; }
.kv dd { margin: 0; }
.counts { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.counts .c { background: var(--rm-card); border: 1px solid var(--rm-border); border-radius: var(--rm-r); min-width: 140px; padding: 12px 16px; }
.counts .c b { color: var(--rm-text); display: block; font-size: 24px; letter-spacing: -0.02em; }
.counts .c span { color: var(--rm-muted); font-size: 12.5px; }

/* ── the footer, on the canvas ──────────────────────────────────────────────── */

.foot { background: var(--rm-canvas); border-top: 1px solid var(--rm-line); color: var(--rm-fg-3); font-family: var(--rm-mono); font-size: 11px; line-height: 1.8; padding: 28px 0; }
.foot .wrap { max-width: var(--rm-wrap-wide); }
.foot a { color: var(--rm-fg-2); }
.foot a:hover { color: var(--rm-fg); }
.foot .version { background: transparent; border-color: var(--rm-line-2); color: var(--rm-fg-2); }
.foot p { margin: 0 0 6px; }
