:root {
    --ink: #16211d;
    --ink-soft: #3f4b45;
    --bg: #f7f6f1;
    --panel: #ffffff;
    --teal: #0e3f3b;
    --teal-deep: #082b28;
    --brass: #a9822c;
    --brass-soft: #cba24f;
    --line: #dad5c6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
    font-family: 'Zilla Slab', Georgia, serif;
    color: var(--teal-deep);
    line-height: 1.15;
    margin: 0 0 0.5em;
}
a { color: var(--teal); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; }

/* Header */
header.site {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
}
.site-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 24px;
}
.brand {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--teal-deep);
    text-decoration: none;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
}
.brand span { color: var(--brass); }
.brand img { height: 60px; width: auto; display: block; }
nav.primary { display: flex; gap: 28px; }
nav.primary a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}
nav.primary a:hover,
nav.primary a.active {
    color: var(--teal-deep);
    border-bottom-color: var(--brass);
}
#nav-toggle { display: none; }
.nav-toggle-label {
    display: none;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    border: 1px solid var(--line);
    padding: 8px 12px;
}

@media (max-width: 860px) {
    nav.primary {
        display: none;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--panel);
        border-bottom: 1px solid var(--line);
        padding: 8px 24px 16px;
    }
    nav.primary a {
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }
    #nav-toggle:checked ~ nav.primary { display: flex; }
    .nav-toggle-label { display: inline-block; }
}

/* Credential ribbon */
.ribbon {
    background: var(--teal-deep);
    color: #eef0ea;
}
.ribbon .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 28px;
    padding: 10px 24px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}
.ribbon b { color: var(--brass-soft); }
.ribbon-badge { display: inline-flex; align-items: center; gap: 8px; }
.ribbon-badge img { height: 32px; width: auto; display: block; }

section { padding: 64px 0; }
section.tight { padding: 40px 0; }
.rule-top { border-top: 1px solid var(--line); }

/* Plaque block - used instead of shadow cards */
.plaque {
    border-left: 3px solid var(--brass);
    padding: 4px 0 4px 22px;
}
.plaque h3 { margin-bottom: 0.35em; }

/* Trust-signal stat tiles */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 28px;
}
.stat-tile {
    border-left: 3px solid var(--brass);
    padding: 4px 0 4px 20px;
}
.stat-tile .num {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 2.3rem;
    color: var(--teal-deep);
    line-height: 1;
}
.stat-tile .label {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
@media (max-width: 760px) {
    .grid-2 { grid-template-columns: 1fr; }
}

.btn {
    display: inline-block;
    background: var(--teal);
    color: #fff;
    text-decoration: none;
    padding: 12px 26px;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid var(--teal);
}
.btn:hover { background: var(--teal-deep); }
.btn-outline {
    background: transparent;
    color: var(--teal-deep);
    border: 1px solid var(--teal-deep);
}
.btn-outline:hover { background: var(--teal-deep); color: #fff; }

input, textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--ink);
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--teal);
}
label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.field { margin-bottom: 18px; }

.status-banner {
    background: #eef3ee;
    border: 1px solid var(--teal);
    color: var(--teal-deep);
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 0.95rem;
}
.error-list {
    background: #fbeceb;
    border: 1px solid #b3413a;
    color: #7a2b26;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

footer.site {
    background: var(--teal-deep);
    color: #d7ddd4;
    margin-top: 40px;
}
footer.site a { color: #cfe0da; }
footer.site .wrap { padding: 48px 24px 28px; }
footer.site .grid-2 { gap: 40px; }
.foot-meta {
    border-top: 1px solid rgba(255,255,255,0.14);
    margin-top: 32px;
    padding-top: 18px;
    font-size: 0.8rem;
    font-family: 'IBM Plex Mono', monospace;
    color: #9fb1a9;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* Honeypot - hidden from real visitors */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* WhatsApp launcher */
#whatsapp-launcher {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 60;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--teal-deep);
    border: 1px solid var(--brass);
    text-decoration: none;
}
#whatsapp-launcher:hover { background: var(--teal); }
#whatsapp-launcher svg { width: 24px; height: 24px; fill: var(--brass-soft); }

/* Chat widget */
#chat-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    background: var(--teal-deep);
    color: #fff;
    border: 1px solid var(--brass);
    padding: 12px 20px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
}
#chat-launcher:hover { background: var(--teal); }
#chat-panel {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 61;
    width: min(360px, calc(100vw - 48px));
    height: min(480px, calc(100vh - 96px));
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 4px 24px rgba(8,43,40,0.18);
    display: none;
    flex-direction: column;
}
#chat-panel.open { display: flex; }
#chat-head {
    background: var(--teal-deep);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Zilla Slab', serif;
    font-weight: 600;
}
#chat-head button {
    background: none;
    border: none;
    color: #d7ddd4;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}
#chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg);
}
.chat-msg {
    max-width: 85%;
    padding: 9px 12px;
    font-size: 0.88rem;
    line-height: 1.45;
}
.chat-msg.user {
    align-self: flex-end;
    background: var(--teal);
    color: #fff;
}
.chat-msg.assistant {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 3px solid var(--brass);
    color: var(--ink);
}
.chat-msg.pending { opacity: 0.6; font-style: italic; }
#chat-form {
    display: flex;
    border-top: 1px solid var(--line);
}
#chat-input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 0.9rem;
}
#chat-input:focus { outline: none; }
#chat-send {
    border: none;
    background: var(--brass);
    color: var(--teal-deep);
    font-weight: 600;
    padding: 0 18px;
    cursor: pointer;
}
#chat-send:hover { background: var(--brass-soft); }
#chat-send:disabled { opacity: 0.5; cursor: default; }

/* Training page course-catalogue accordion */
.catalogue { margin-top: 32px; }
.cat-item {
    border-top: 1px solid var(--line);
}
.cat-item:last-child { border-bottom: 1px solid var(--line); }
.cat-item summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-family: 'Zilla Slab', serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--teal-deep);
}
.cat-item summary::-webkit-details-marker { display: none; }
.cat-item summary .count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--ink-soft);
    font-weight: 400;
}
.cat-item[open] summary { color: var(--brass); }
.course-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0 0 0 4px;
    border-left: 3px solid var(--brass);
}
.course-list li {
    padding: 9px 0 9px 18px;
    border-bottom: 1px dashed var(--line);
    font-size: 0.95rem;
}
.course-list li:last-child { border-bottom: none; }
