    /* ============================================================
       craigdonkin — "Security Assessment Report" CV
       + docked "CraigGPT" chat widget + EN/QC (French) toggle.

       Bilingual: every translatable text run carries its French in
       a data-fr="…" attribute; the language toggle swaps textContent
       between the cached English and the French. Widget answers are
       bilingual objects in the script near the end.

       Placeholders are marked with EDIT: comments and a dashed amber
       outline (class="todo").
       ============================================================ */

    :root {
      --paper: #f7f5f0;
      --card: #fffdf8;
      --ink: #1c2430;
      --muted: #5d6675;
      --rule: #d9d3c6;
      --rule-dark: #1c2430;
      --accent: #b3382e;           /* report red */
      --sev-critical: #b3382e;
      --sev-high: #d97706;
      --sev-medium: #c9a227;
      --sev-info: #2f6db3;
      --serif: Charter, Georgia, Cambria, "Times New Roman", serif;
      --sans: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
      --mono: Consolas, "Cascadia Code", "SF Mono", Menlo, monospace;
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

    body {
      background: var(--paper);
      color: var(--ink);
      font-family: var(--sans);
      font-size: 1.02rem;
      line-height: 1.6;
    }

    ::selection { background: var(--ink); color: var(--paper); }

    .wrap { max-width: 820px; margin: 0 auto; padding: 0 24px; }

    a { color: var(--sev-info); text-decoration: none; }
    a:hover { text-decoration: underline; }

    /* ---------- classification banner ---------- */
    .classification {
      background: var(--ink); color: var(--paper);
      font-family: var(--mono); font-size: 0.72rem;
      letter-spacing: 0.18em; text-transform: uppercase;
      text-align: center; padding: 6px 12px;
    }
    .classification b { color: #7fd1a7; font-weight: 400; }

    /* ---------- slim sticky nav ---------- */
    nav {
      position: sticky; top: 0; z-index: 10;
      background: rgba(247, 245, 240, 0.92);
      backdrop-filter: blur(6px);
      border-bottom: 1px solid var(--rule);
    }
    nav .wrap {
      display: flex; align-items: center; justify-content: space-between;
      padding-top: 10px; padding-bottom: 10px;
    }
    .nav-ref { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
    .nav-right { display: flex; align-items: center; gap: 16px; }
    .nav-links { display: flex; gap: 18px; font-family: var(--sans); font-size: 0.82rem; }
    .nav-links a { color: var(--ink); }
    .nav-links a:hover { color: var(--accent); text-decoration: none; }

    /* language toggle */
    .lang-toggle { display: inline-flex; gap: 8px; align-items: center; flex-shrink: 0; }
    .lang-toggle button {
      padding: 1px; border: none; background: transparent; cursor: pointer;
      line-height: 0; border-radius: 4px; opacity: 0.4;
      transition: opacity 0.15s, box-shadow 0.15s;
    }
    .lang-toggle button:hover { opacity: 0.85; }
    .lang-toggle button.active { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
    .lang-toggle .flag { display: block; height: 15px; width: auto; border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.18); }

    /* ---------- report cover ---------- */
    .cover { padding: 72px 0 48px; border-bottom: 3px double var(--rule-dark); }
    .cover-kicker {
      font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.22em;
      text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
    }
    .cover h1 {
      font-family: var(--sans); font-weight: 800;
      font-size: clamp(2.3rem, 6vw, 3.4rem);
      line-height: 1.1; letter-spacing: -0.025em;
      margin-bottom: 10px;
    }
    .cover-sub { font-size: 1.15rem; color: var(--muted); font-style: italic; max-width: 52ch; }

    .meta-table {
      margin-top: 36px; width: 100%;
      border-collapse: collapse; font-size: 0.92rem;
    }
    .meta-table td { padding: 8px 0; border-top: 1px solid var(--rule); vertical-align: top; }
    .meta-table td:first-child {
      font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase;
      letter-spacing: 0.1em; color: var(--muted); width: 200px; padding-right: 18px;
    }

    /* ---------- sections ---------- */
    section { padding: 52px 0 8px; }

    h2 {
      font-family: var(--sans); font-weight: 700;
      font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase;
      border-bottom: 2px solid var(--rule-dark);
      padding-bottom: 8px; margin-bottom: 24px;
      display: flex; gap: 14px; align-items: baseline;
    }
    h2 .secnum { font-family: var(--mono); color: var(--accent); font-weight: 400; }

    p + p { margin-top: 14px; }

    /* ---------- contents ---------- */
    .toc { list-style: none; font-size: 0.98rem; max-width: 560px; }
    .toc li { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; }
    .toc .secnum { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); min-width: 34px; }
    .toc a { color: var(--ink); }
    .toc .leader { flex: 1; border-bottom: 1px dotted var(--rule-dark); opacity: 0.4; transform: translateY(-4px); }
    .toc .pg { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }

    /* ---------- document control (career version history) ---------- */
    .doc-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 6px; }
    .doc-table th {
      font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
      letter-spacing: 0.1em; color: var(--muted); text-align: left;
      border-bottom: 2px solid var(--rule-dark); padding: 6px 14px 6px 0;
    }
    .doc-table td { border-bottom: 1px solid var(--rule); padding: 9px 14px 9px 0; vertical-align: top; }
    .doc-table td:first-child { font-family: var(--mono); font-size: 0.85rem; white-space: nowrap; }

    /* ---------- findings ---------- */
    .finding {
      background: var(--card);
      border: 1px solid var(--rule);
      border-left: 5px solid var(--sev-critical);
      border-radius: 4px;
      padding: 20px 24px;
      margin-bottom: 20px;
      box-shadow: 0 1px 3px rgba(28, 36, 48, 0.06);
    }
    .finding.sev-high { border-left-color: var(--sev-high); }
    .finding.sev-medium { border-left-color: var(--sev-medium); }
    .finding.sev-info { border-left-color: var(--sev-info); }

    .finding-head {
      display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
      margin-bottom: 10px;
    }
    .finding-id { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
    .finding-title { font-family: var(--sans); font-weight: 700; font-size: 1.08rem; flex: 1 1 auto; }
    .sev {
      font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
      text-transform: uppercase; padding: 2px 10px; border-radius: 3px;
      color: #fff; white-space: nowrap;
    }
    .sev.critical { background: var(--sev-critical); }
    .sev.high { background: var(--sev-high); }
    .sev.medium { background: var(--sev-medium); color: var(--ink); }
    .sev.info { background: var(--sev-info); }

    .finding dl { margin-top: 10px; font-size: 0.95rem; }
    .finding dt {
      font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
      letter-spacing: 0.1em; color: var(--muted); margin-top: 10px;
    }
    .finding dd { margin: 2px 0 0; }

    /* ---------- engagement history ---------- */
    .eng-group { margin-bottom: 8px; }
    .eng-company {
      font-family: var(--sans); font-weight: 700; font-size: 1rem;
      display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline;
      padding-bottom: 6px; margin-top: 22px; border-bottom: 1px solid var(--rule);
    }
    .eng-company:first-child { margin-top: 0; }
    .eng-company-meta {
      font-family: var(--mono); font-size: 0.72rem; font-weight: 400;
      text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
    }
    .engagement { padding: 18px 0; border-bottom: 1px solid var(--rule); }
    .eng-group .engagement:last-child { border-bottom: none; }
    .eng-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
    .eng-dates { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); min-width: 175px; }
    .eng-role { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; }
    .eng-loc { color: var(--muted); font-style: italic; font-size: 0.9rem; }
    .engagement p { margin-top: 8px; font-size: 0.97rem; color: #38414f; max-width: 68ch; }

    /* ---------- scope (skills) ---------- */
    .scope-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
    .scope-card { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 18px 20px; }
    .scope-card h3 {
      font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase;
      letter-spacing: 0.12em; color: var(--accent); margin-bottom: 10px;
    }
    .scope-card ul { list-style: none; font-size: 0.95rem; }
    .scope-card li { padding: 4px 0 4px 20px; position: relative; }
    .scope-card li::before {
      content: "☑"; position: absolute; left: 0; color: var(--muted);
    }

    /* ---------- credentials ---------- */
    .cred-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
    .cred { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 16px 20px; }
    .cred-name { font-family: var(--sans); font-weight: 700; }
    .cred-meta { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

    /* ---------- contact ---------- */
    .contact-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
    .btn {
      font-family: var(--sans); font-size: 0.92rem; font-weight: 600;
      padding: 10px 22px; border-radius: 4px;
      border: 1.5px solid var(--ink); color: var(--ink);
      transition: background 0.15s, color 0.15s;
    }
    .btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
    .btn.solid { background: var(--accent); border-color: var(--accent); color: #fff; }
    .btn.solid:hover { background: #96271e; border-color: #96271e; }

    /* ---------- placeholders ---------- */
    .todo { outline: 1.5px dashed #d97706; outline-offset: 3px; border-radius: 2px; }

    /* ---------- footer ---------- */
    footer {
      margin-top: 48px; border-top: 3px double var(--rule-dark);
      padding: 26px 0 44px; text-align: center;
      font-family: var(--mono); font-size: 0.76rem; color: var(--muted);
    }
    footer .eor { letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 8px; }
    footer .hint { margin-top: 10px; }

    @media (max-width: 680px) {
      .nav-links a:nth-child(n+4) { display: none; }
      .cover { padding: 48px 0 36px; }
      .meta-table td:first-child { width: 130px; }
      .eng-dates { min-width: 100%; }
    }

    /* ============================================================
       CraigGPT chat widget (docked bottom-right)
       ============================================================ */
    .cg-launcher {
      position: fixed; right: 24px; bottom: 24px; z-index: 1000;
      display: flex; align-items: center; gap: 10px;
      padding: 12px 18px 12px 14px; border: none; border-radius: 999px;
      background: var(--accent); color: #fff; cursor: pointer;
      font-family: var(--sans); font-size: 0.92rem; font-weight: 600;
      box-shadow: 0 8px 24px rgba(28, 36, 48, 0.28);
      transition: transform 0.15s, background 0.15s;
    }
    .cg-launcher:hover { background: #96271e; transform: translateY(-2px); }
    .cg-launcher svg { width: 22px; height: 22px; display: block; }
    .cg-launcher .cg-badge {
      position: absolute; top: -4px; right: -2px;
      width: 18px; height: 18px; border-radius: 50%;
      background: var(--ink); color: #fff; font-size: 0.68rem;
      display: grid; place-items: center; font-family: var(--mono);
      border: 2px solid var(--paper);
    }
    .cg-launcher .cg-ping {
      position: absolute; top: 2px; right: 4px;
      width: 10px; height: 10px; border-radius: 50%;
      background: #7fd1a7; box-shadow: 0 0 0 rgba(127, 209, 167, 0.6);
      animation: cg-ping 2s ease-out infinite;
    }
    @keyframes cg-ping {
      0% { box-shadow: 0 0 0 0 rgba(127, 209, 167, 0.5); }
      70% { box-shadow: 0 0 0 10px rgba(127, 209, 167, 0); }
      100% { box-shadow: 0 0 0 0 rgba(127, 209, 167, 0); }
    }

    .cg-panel {
      position: fixed; right: 24px; bottom: 90px; z-index: 1000;
      width: min(380px, calc(100vw - 32px));
      height: min(560px, calc(100vh - 130px));
      display: flex; flex-direction: column;
      background: var(--paper); border: 1px solid var(--rule);
      border-radius: 16px; overflow: hidden;
      box-shadow: 0 18px 50px rgba(28, 36, 48, 0.32);
      transform-origin: bottom right;
      animation: cg-open 0.2s ease both;
    }
    .cg-panel[hidden] { display: none; }
    @keyframes cg-open { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }

    .cg-header {
      display: flex; align-items: center; gap: 10px;
      padding: 12px 14px; background: var(--card);
      border-bottom: 1px solid var(--rule);
    }
    .cg-avatar {
      width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
      background: var(--paper); border: 1.5px solid var(--ink);
      display: grid; place-items: center;
      font-family: var(--serif); font-weight: 700; color: var(--accent); font-size: 0.8rem;
    }
    .cg-id { flex: 1; }
    .cg-name { font-family: var(--sans); font-weight: 700; font-size: 0.95rem; }
    .cg-status { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
    .cg-status .cg-dot { width: 6px; height: 6px; border-radius: 50%; background: #4c9c74; display: inline-block; }
    .cg-close {
      border: none; background: transparent; color: var(--muted);
      font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px;
    }
    .cg-close:hover { background: var(--paper); color: var(--ink); }

    .cg-messages { flex: 1; overflow-y: auto; padding: 16px 14px 6px; display: flex; flex-direction: column; gap: 12px; }

    .cg-msg { display: flex; gap: 8px; max-width: 94%; animation: cg-pop 0.22s ease both; }
    .cg-msg.bot { align-self: flex-start; }
    .cg-msg.user { align-self: flex-end; flex-direction: row-reverse; }
    .cg-msg .cg-av { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 0.66rem; margin-top: 2px; }
    .cg-msg.bot .cg-av { background: var(--paper); border: 1.5px solid var(--ink); color: var(--accent); }
    .cg-msg.user .cg-av { background: var(--ink); color: var(--paper); font-family: var(--sans); }

    .cg-bubble { padding: 10px 13px; border-radius: 13px; font-family: var(--sans); font-size: 0.88rem; line-height: 1.55; overflow-wrap: anywhere; }
    .cg-msg.bot .cg-bubble { background: var(--card); border: 1px solid var(--rule); border-top-left-radius: 3px; color: var(--ink); }
    .cg-msg.user .cg-bubble { background: var(--ink); color: var(--paper); border-top-right-radius: 3px; }
    .cg-bubble p + p { margin-top: 8px; }
    .cg-bubble a { color: var(--accent); font-weight: 600; }
    .cg-bubble h4 { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin: 10px 0 5px; }
    .cg-bubble h4:first-child { margin-top: 0; }
    .cg-bubble ul { margin: 4px 0 0 16px; }
    .cg-bubble .cg-small { font-size: 0.76rem; color: var(--muted); }
    .cg-bubble .cg-err {
      font-family: var(--mono); font-size: 0.71rem; line-height: 1.45;
      background: rgba(179, 56, 46, 0.07); border-left: 3px solid var(--accent);
      padding: 7px 9px; border-radius: 4px; color: #8c2a20;
      overflow-wrap: anywhere; margin-bottom: 8px;
    }

    .cg-role { border: 1px solid var(--rule); border-radius: 8px; padding: 8px 11px; margin-top: 8px; background: var(--paper); }
    .cg-role .cg-role-dates { font-family: var(--mono); font-size: 0.66rem; color: var(--accent); }
    .cg-role .cg-role-title { font-weight: 700; font-size: 0.86rem; }
    .cg-role .cg-role-org { color: var(--muted); font-size: 0.78rem; }

    .cg-chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
    .cg-chip { font-family: var(--mono); font-size: 0.68rem; padding: 3px 9px; border-radius: 999px; background: rgba(179, 56, 46, 0.07); border: 1px solid rgba(179, 56, 46, 0.28); color: var(--ink); }

    .cg-contact-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
    .cg-contact-btn { display: inline-block; padding: 7px 14px; border-radius: 7px; background: var(--accent); color: #fff !important; text-decoration: none; font-size: 0.82rem; font-weight: 600; }
    .cg-contact-btn.ghost { background: transparent; border: 1.5px solid var(--ink); color: var(--ink) !important; }

    .cg-thinking .cg-bubble { display: flex; align-items: center; gap: 9px; color: var(--muted); font-style: italic; font-size: 0.82rem; }
    .cg-dots { display: inline-flex; gap: 4px; }
    .cg-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: cg-bounce 1.2s infinite ease-in-out; }
    .cg-dots span:nth-child(2) { animation-delay: 0.15s; }
    .cg-dots span:nth-child(3) { animation-delay: 0.3s; }

    @keyframes cg-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }
    @keyframes cg-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

    .cg-foot { padding: 8px 12px 12px; }
    .cg-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
    .cg-suggest {
      font-family: var(--sans); font-size: 0.76rem; padding: 6px 11px; border-radius: 999px;
      background: var(--card); color: var(--ink); border: 1px solid var(--rule); cursor: pointer;
      transition: border-color 0.15s, background 0.15s;
    }
    .cg-suggest:hover { border-color: var(--accent); background: var(--paper); }
    .cg-composer { display: flex; gap: 7px; }
    .cg-composer input {
      flex: 1; padding: 9px 13px; border-radius: 10px; background: var(--card);
      border: 1px solid var(--rule); color: var(--ink); font-family: var(--sans); font-size: 0.85rem; outline: none;
    }
    .cg-composer input:focus { border-color: var(--accent); }
    .cg-composer button {
      padding: 0 15px; border-radius: 10px; border: none; background: var(--accent);
      color: #fff; font-family: var(--sans); font-size: 0.85rem; font-weight: 600; cursor: pointer;
    }
    .cg-composer button:disabled { opacity: 0.5; cursor: default; }
    .cg-composer button:not(:disabled):hover { background: #96271e; }
    .cg-disclaimer { text-align: center; font-family: var(--mono); font-size: 0.62rem; color: var(--muted); margin-top: 8px; }

    @media (max-width: 480px) {
      .cg-panel { right: 8px; left: 8px; width: auto; bottom: 84px; height: calc(100vh - 104px); }
      .cg-launcher { right: 16px; bottom: 16px; padding: 14px; }
      .cg-launcher .cg-label { display: none; }
    }

    @media (prefers-reduced-motion: reduce) {
      .cg-panel, .cg-msg { animation: none; }
      .cg-dots span, .cg-ping { animation: none; }
    }

    /* ---------- print: the page doubles as a paper CV ---------- */
    @media print {
      nav, .classification, .cg-launcher, .cg-panel { display: none !important; }
      body { background: #fff; font-size: 11pt; }
      .finding, .scope-card, .cred { box-shadow: none; break-inside: avoid; }
      section { padding: 24px 0 0; }
      a { color: var(--ink); }
      .todo { outline: none; }
    }
