/* Tripl-i Whitepaper — A4 portrait, light paper, navy chrome */
*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:#f1f5f9;color:#1e293b;font-size:11px;line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

/* Page — A4 portrait sheet with a thicker tinted frame */
.page{
  max-width:820px;margin:32px auto;background:#fff;
  padding:46px 56px 68px;page-break-after:always;
  box-shadow:0 1px 0 rgba(0,0,0,.04),0 24px 60px -28px rgba(15,23,42,.22);
  position:relative;min-height:1180px;
  border:3px solid #cbd5e1;
  border-radius:6px;
  /* Double-border outline using the off-paper tone — thicker for a stamped look */
  outline:14px solid #e2e8f0;
  outline-offset:0;
}
.page::before{
  /* Inner brand-tinted frame — sits just inside the page edge, thicker hairline */
  content:"";position:absolute;inset:18px;
  border:2px solid #cbd5e1;border-radius:3px;
  pointer-events:none;
}
.page::after{
  /* Brand-blue accent strip across the top of the inner frame */
  content:"";position:absolute;left:18px;right:18px;top:18px;height:5px;
  background:linear-gradient(90deg,#1e3a8a 0%,#2563eb 40%,#60a5fa 80%,transparent 100%);
  border-radius:3px 3px 0 0;pointer-events:none;
}

/* Header bar */
.hdr{
  display:flex;justify-content:space-between;align-items:flex-end;
  border-bottom:3px solid #2563eb;padding-bottom:14px;margin-bottom:22px;
  position:relative;z-index:1;
}
.logo{font-size:30px;font-weight:700;color:#1e3a8a;letter-spacing:-.02em}
.logo span{color:#2563eb}
.tagline{font-size:10.5px;color:#64748b;text-align:right;line-height:1.4}
.tagline b{color:#1e3a8a;font-weight:600}

/* Eyebrow / section heads */
.eyebrow{font-size:9.5px;letter-spacing:.2em;text-transform:uppercase;color:#2563eb;font-weight:600;margin-top:4px}
h1.page-title{font-size:22px;color:#0f172a;font-weight:700;line-height:1.2;margin:4px 0 14px;letter-spacing:-.01em}
h1.page-title em{font-style:italic;color:#2563eb;font-weight:700}
h2.section-title{
  font-size:13px;color:#1e3a8a;margin:18px 0 11px;
  padding:0 0 7px 10px;border-bottom:2px solid #e2e8f0;
  border-left:3px solid #93c5fd;
  font-weight:700;letter-spacing:.02em;
}

/* Exec summary box */
.exec{
  background:linear-gradient(135deg,#eff6ff 0%,#dbeafe 100%);
  border:1px solid #bfdbfe;border-left:4px solid #2563eb;
  padding:15px 20px;margin-bottom:16px;
  border-radius:0 8px 8px 0;
}
.exec h2{font-size:13px;color:#1e3a8a;margin-bottom:6px}
.exec p{font-size:10.5px;color:#334155;line-height:1.6;margin:0}
.exec strong{color:#1e3a8a}

/* Stats row */
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0 16px}
.stat{
  background:rgb(51,65,85);border:1px solid rgb(51,65,85);border-top:2px solid #60a5fa;
  border-radius:8px;padding:14px 10px;text-align:center;
}
.stat .v{font-size:24px;font-weight:700;color:rgb(210,217,233);line-height:1}
.stat .k{font-size:9px;color:rgb(210,217,233);text-transform:uppercase;letter-spacing:.05em;margin-top:5px;font-weight:500;opacity:.85}

/* Value cards */
.values{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:6px 0 6px}
.value{
  background:rgb(51,65,85);border:1px solid rgb(51,65,85);border-top:2px solid #60a5fa;
  border-radius:8px;padding:13px 14px;
}
.value .ic{font-size:18px;color:#60a5fa;margin-bottom:5px;font-weight:700;line-height:1}
.value h4{font-size:11px;font-weight:700;color:rgb(210,217,233);margin-bottom:4px}
.value p{font-size:10px;color:rgb(210,217,233);line-height:1.45;margin:0;opacity:.85}

/* Module cards (with colored left border) */
.modules{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:10px 0}
.mod{
  background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:11px 13px;
  border-left:3px solid #2563eb;
}
.mod:nth-child(8n+1){border-left-color:#2563eb}
.mod:nth-child(8n+2){border-left-color:#7c3aed}
.mod:nth-child(8n+3){border-left-color:#0891b2}
.mod:nth-child(8n+4){border-left-color:#059669}
.mod:nth-child(8n+5){border-left-color:#dc2626}
.mod:nth-child(8n+6){border-left-color:#d97706}
.mod:nth-child(8n+7){border-left-color:#7c3aed}
.mod:nth-child(8n+0){border-left-color:#0891b2}
.mod .ttl{font-size:10.5px;font-weight:700;color:#1e293b;margin-bottom:3px}
.mod .desc{font-size:9.5px;color:#64748b;line-height:1.45}

/* Grids */
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}

/* Flow / steps */
.flow{
  display:flex;justify-content:space-between;align-items:center;
  background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;padding:14px 18px;margin:14px 0;
}
.flow .st{text-align:center;flex:1}
.flow .st .n{
  width:26px;height:26px;background:#166534;color:#fff;border-radius:50%;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:11px;margin:0 auto 5px
}
.flow .st .t{font-size:10px;font-weight:700;color:#1e293b}
.flow .st .x{font-size:9px;color:#166534;margin-top:2px}
.flow .ar{color:#bbf7d0;font-size:18px;font-weight:700;padding:0 4px}

/* Comparison table — soft header (no dark band) */
.cmp{width:100%;border-collapse:collapse;font-size:10px;margin:10px 0;
  border:1px solid #e2e8f0;border-radius:6px;overflow:hidden}
.cmp th{
  background:#eff6ff;color:#1e3a8a;padding:8px 10px;text-align:left;
  font-weight:700;letter-spacing:.03em;
  border-bottom:2px solid #bfdbfe;
}
.cmp td{padding:7px 10px;border-bottom:1px solid #e2e8f0;color:#334155}
.cmp tr:last-child td{border-bottom:none}
.cmp tr:nth-child(even) td{background:#f8fafc}
.cmp .ok{color:#059669;font-weight:600}
.cmp .no{color:#dc2626}

/* Vulnerability severity visualization (page 3) */
.vuln-viz{
  background:#f8fafc;border:1px solid #e2e8f0;border-left:3px solid #dc2626;
  border-radius:8px;padding:10px 12px;
}
.vuln-viz-h{
  font-size:9px;color:#1e3a8a;font-weight:700;text-transform:uppercase;
  letter-spacing:.08em;margin-bottom:7px;
}
.vuln-bars{display:flex;flex-direction:column;gap:5px}
.vb{display:grid;grid-template-columns:62px 1fr 38px;gap:8px;align-items:center}
.vb-label{font-size:9.5px;color:#1e293b;font-weight:600;display:flex;align-items:center;gap:5px}
.vb-dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.vb-dot.crit{background:#dc2626}
.vb-dot.high{background:#ea580c}
.vb-dot.med{background:#d97706}
.vb-dot.low{background:#0891b2}
.vb-bar{height:8px;background:#e2e8f0;border-radius:4px;overflow:hidden}
.vb-bar>span{display:block;height:100%;background:#2563eb;border-radius:4px}
.vb-bar>span.crit{background:linear-gradient(90deg,#b91c1c,#ef4444)}
.vb-bar>span.high{background:linear-gradient(90deg,#c2410c,#fb923c)}
.vb-bar>span.med{background:linear-gradient(90deg,#b45309,#fbbf24)}
.vb-bar>span.low{background:linear-gradient(90deg,#0e7490,#22d3ee)}
.vb-val{font-size:11px;font-weight:700;color:#1e3a8a;text-align:right;font-family:"JetBrains Mono",monospace}
.vuln-viz-foot{
  display:flex;justify-content:space-between;align-items:center;
  margin-top:7px;padding-top:6px;border-top:1px dashed #e2e8f0;
  font-size:9px;color:#475569;
}
.vuln-viz-foot b{color:#1e3a8a;font-weight:700}
.vuln-viz-foot .ok{color:#059669;font-weight:600}

/* Risk meter */
.meter{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:8px 0}
.meter .m{background:#f8fafc;border:1px solid #e2e8f0;border-left:3px solid #2563eb;border-radius:6px;padding:10px 12px}
.meter .m .lbl{font-size:9px;color:#64748b;text-transform:uppercase;letter-spacing:.07em;font-weight:600}
.meter .m .v{font-size:22px;color:#1e3a8a;font-weight:700;line-height:1;margin-top:3px}
.meter .m .bar{height:3px;background:#e2e8f0;border-radius:2px;margin-top:6px;overflow:hidden}
.meter .m .bar>span{display:block;height:100%;background:#2563eb}

/* Chat trace — softer header instead of dark navy block */
.chat{border:1px solid #bfdbfe;border-radius:8px;background:#f8fafc;overflow:hidden;margin:6px 0 14px}
.chat-h{
  background:linear-gradient(135deg,#eff6ff 0%,#dbeafe 100%);
  color:#1e3a8a;padding:7px 12px;font-size:9.5px;letter-spacing:.06em;
  display:flex;justify-content:space-between;font-weight:600;
  border-bottom:1px solid #bfdbfe;
}
.chat-h .dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#22c55e;margin-right:6px;vertical-align:middle}
.chat-b{padding:10px 14px;background:#fff}
.msg{font-size:10.5px;line-height:1.5;margin:4px 0;color:#334155}
.msg b.who{color:#2563eb;font-weight:700;margin-right:5px;font-size:10px;font-family:"JetBrains Mono",monospace}
.msg.user b.who{color:#d97706}
.msg.ok b.who{color:#059669}
.msg.tool{
  font-family:"JetBrains Mono",monospace;font-size:9.5px;color:#334155;
  background:#eff6ff;border-left:2px solid #2563eb;padding:6px 10px;margin:4px 0;border-radius:0 6px 6px 0;
}
.msg.tool b{color:#1e3a8a}

/* Chips */
.chip{display:inline-block;font-size:8.5px;font-weight:700;padding:1px 6px;border-radius:999px;margin-left:5px;letter-spacing:.04em;text-transform:uppercase}
.chip.r{background:#fee2e2;color:#b91c1c}
.chip.a{background:#fef3c7;color:#a16207}
.chip.g{background:#dcfce7;color:#166534}

/* Lists */
ul.t{list-style:none;padding:0;margin:8px 0}
ul.t li{position:relative;padding-left:14px;font-size:10.5px;color:#334155;margin-bottom:4px;line-height:1.5}
ul.t li::before{content:"";position:absolute;left:0;top:8px;width:6px;height:1.5px;background:#2563eb}
ul.t li b{color:#1e293b;font-weight:600}

/* Pills */
.pills{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.pill{font-size:9px;color:#475569;background:#f1f5f9;border:1px solid #e2e8f0;padding:3px 8px;border-radius:999px;letter-spacing:.02em}
.pill b{color:#2563eb;font-weight:700}

/* Footer */
.foot{
  position:absolute;left:50px;right:50px;bottom:28px;
  display:flex;justify-content:center;align-items:center;
  font-size:9px;color:#94a3b8;border-top:1px solid #e2e8f0;padding-top:10px;letter-spacing:.04em;
  z-index:1;
}
.foot b{color:#1e3a8a;font-weight:600}

/* ─── Platform Architecture replica (tight — must fit one A4 page) ─── */
.pf-head{text-align:center;margin:8px 0 4px}
.pf-tagline{font-size:11px;letter-spacing:.18em;color:#1e3a8a;font-weight:700;text-transform:uppercase;margin:0 0 2px}
.pf-sub{font-size:8.5px;color:#64748b;letter-spacing:.12em;text-transform:uppercase;margin:0}

.pf-grid{display:grid;grid-template-columns:1fr 1.45fr 1fr;gap:6px;margin-top:4px}
.pf-col{display:flex;flex-direction:column;gap:5px}
.pf-block{
  background:#f8fafc;border:1px solid #e2e8f0;border-left:3px solid #2563eb;
  border-radius:6px;padding:6px 9px;
}
.pf-block.b1{border-left-color:#2563eb}
.pf-block.b2{border-left-color:#0891b2}
.pf-block.b3{border-left-color:#7c3aed}
.pf-block.b4{border-left-color:#d97706}
.pf-block.b5{border-left-color:#dc2626}
.pf-block.b6{border-left-color:#059669}
.pf-block.b7{border-left-color:#7c3aed}
.pf-block.b8{border-left-color:#0891b2}
.pf-block .pf-h{font-size:8.5px;letter-spacing:.1em;text-transform:uppercase;color:#1e3a8a;font-weight:700;margin-bottom:3px;line-height:1.25}
.pf-items{display:flex;flex-wrap:wrap;gap:2px}
.pf-item{font-size:8px;color:#475569;background:#fff;border:1px solid #e2e8f0;border-radius:999px;padding:1px 6px;line-height:1.45}
.pf-center{display:flex;flex-direction:column;gap:5px;justify-content:center}
.pf-band{
  background:linear-gradient(135deg,#eff6ff 0%,#dbeafe 100%);
  border:1.5px solid #93c5fd;border-radius:7px;padding:7px 10px;
}
.pf-band.green{background:linear-gradient(135deg,#f0fdf4 0%,#dcfce7 100%);border-color:#86efac}
.pf-band.amber{background:linear-gradient(135deg,#fffbeb 0%,#fef3c7 100%);border-color:#fcd34d}
.pf-band .pf-h{font-size:9.5px;letter-spacing:.08em;color:#0f172a;font-weight:700;margin-bottom:4px;display:flex;align-items:center;gap:5px}
.pf-band .ic{width:16px;height:16px;border-radius:4px;background:#2563eb;color:#fff;display:flex;align-items:center;justify-content:center;font-size:9px}
.pf-band.green .ic{background:#059669}
.pf-band.amber .ic{background:#d97706}
.pf-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:3px}
.pf-tile{text-align:center;font-size:8px;color:#1e293b;background:#fff;border:1px solid #e2e8f0;border-radius:4px;padding:4px 3px;font-weight:500;line-height:1.25}

/* ─── Agent flow cards (page 4) ─── */
.agent-row{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:6px 0 10px}
.agent-card{
  border:1.5px solid #bfdbfe;border-radius:7px;background:#f8fafc;
  overflow:hidden;display:flex;flex-direction:column;
}
.agent-hdr{
  background:linear-gradient(135deg,#eff6ff 0%,#dbeafe 100%);
  padding:6px 11px;border-bottom:1.5px solid #bfdbfe;
}
.agent-hdr .ag-ttl{
  font-size:10.5px;color:#1e3a8a;font-weight:700;letter-spacing:-.005em;line-height:1.25;
}
.agent-hdr .ag-meta{
  font-size:8px;color:#475569;margin-top:2px;line-height:1.35;
  font-family:"JetBrains Mono",monospace;
}
.agent-hdr .ag-meta b{color:#1e3a8a;font-weight:600}

.agent-flow{padding:8px 11px 9px;background:#fff;position:relative;flex:1}
.agent-flow::before{
  /* vertical line connecting the step nodes */
  content:"";position:absolute;left:21px;top:15px;bottom:15px;width:1.5px;background:#dbeafe;
}
.ag-step{display:flex;align-items:flex-start;gap:8px;margin-bottom:5px;position:relative}
.ag-step:last-child{margin-bottom:0}
.ag-n{
  flex:0 0 20px;width:20px;height:20px;border-radius:50%;
  background:#2563eb;color:#fff;display:flex;align-items:center;justify-content:center;
  font-size:9px;font-weight:700;z-index:1;
  border:1.5px solid #fff;box-shadow:0 0 0 1.2px #bfdbfe;
}
.ag-step.role-user .ag-n{background:#d97706;box-shadow:0 0 0 1.2px #fed7aa}
.ag-step.role-tool .ag-n{background:#7c3aed;box-shadow:0 0 0 1.2px #ddd6fe}
.ag-step.role-ai   .ag-n{background:#2563eb;box-shadow:0 0 0 1.2px #bfdbfe}
.ag-step.role-ok   .ag-n{background:#059669;box-shadow:0 0 0 1.2px #bbf7d0}
.ag-step.role-final .ag-n{background:#166534;box-shadow:0 0 0 1.2px #bbf7d0}

.ag-body{flex:1;padding-top:0}
.ag-role{
  font-size:7.5px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;
  color:#2563eb;margin-bottom:1px;line-height:1.2;
}
.ag-step.role-user .ag-role{color:#b45309}
.ag-step.role-tool .ag-role{color:#6d28d9}
.ag-step.role-ai   .ag-role{color:#1e3a8a}
.ag-step.role-ok   .ag-role{color:#047857}
.ag-step.role-final .ag-role{color:#166534}

.ag-text{font-size:9px;color:#334155;line-height:1.4}
.ag-text code,.ag-text .mono{
  font-family:"JetBrains Mono",monospace;font-size:8.5px;color:#1e3a8a;
}

@page{size:A4;margin:0}
@media print{
  html,body{
    background:#fff;margin:0;padding:0;
    -webkit-print-color-adjust:exact;print-color-adjust:exact;
  }
  /* Each .page becomes exactly one A4 sheet — no @page margin so we don't
     stack browser margin on top of .page padding and overflow the sheet. */
  .page{
    margin:0;max-width:none;
    width:210mm;height:297mm;min-height:297mm;
    padding:14mm 16mm 18mm;
    page-break-after:always;page-break-inside:avoid;
    box-shadow:none;outline:none;border:none;border-radius:0;
    overflow:hidden;
  }
  .page:last-child{page-break-after:auto}
  .page::before{
    /* Keep the inner frame in print — re-anchor in mm so it sits cleanly on A4 */
    content:"";position:absolute;inset:5mm;
    border:1.2mm solid #cbd5e1;border-radius:1mm;display:block;
  }
  .page::after{
    content:"";position:absolute;left:5mm;right:5mm;top:5mm;height:1.5mm;
    background:linear-gradient(90deg,#1e3a8a 0%,#2563eb 40%,#60a5fa 80%,transparent 100%);
    border-radius:1mm 1mm 0 0;display:block;
  }
  .foot{left:16mm;right:16mm;bottom:10mm}
}
