/* benmcp.toolforge.ai — Adobe automation report
   Palette: report = ink + teal. Chat widget = violet (deliberately different). */

:root {
  --paper: #faf7f2;
  --paper-2: #f2ede4;
  --card: #ffffff;
  --ink: #1c1b19;
  --ink-2: #4a4741;
  --ink-3: #7b766c;
  --rule: #ddd6c8;
  --rule-2: #e9e3d7;
  --accent: #0d6b66;
  --accent-2: #0a534f;
  --accent-wash: #e2f1ef;
  --warn: #a04a00;
  --warn-wash: #fdefe0;
  --bad: #a51f1f;
  --bad-wash: #fbe9e9;
  --good: #1e6b2f;
  --good-wash: #e6f3e8;
  --code-bg: #21201d;
  --code-fg: #ececea;
  --chat: #6d33d6;
  --chat-2: #5322ad;
  --chat-wash: #efe8fd;
  --shadow: 0 1px 2px rgba(28,27,25,.06), 0 8px 24px rgba(28,27,25,.07);
  --maxw: 78ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16171a;
    --paper-2: #1c1e22;
    --card: #1e2025;
    --ink: #e9e7e2;
    --ink-2: #b9b5ad;
    --ink-3: #8c877e;
    --rule: #33363c;
    --rule-2: #2a2d32;
    --accent: #52cfc6;
    --accent-2: #7fe0d8;
    --accent-wash: #14302f;
    --warn: #f0a761;
    --warn-wash: #33230f;
    --bad: #f08484;
    --bad-wash: #351717;
    --good: #7ed092;
    --good-wash: #142b1a;
    --code-bg: #0f1013;
    --code-fg: #dfe2e6;
    --chat: #a882ff;
    --chat-2: #c1a6ff;
    --chat-wash: #241a3d;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
  }
}

:root[data-theme="dark"] {
  --paper: #16171a; --paper-2: #1c1e22; --card: #1e2025;
  --ink: #e9e7e2; --ink-2: #b9b5ad; --ink-3: #8c877e;
  --rule: #33363c; --rule-2: #2a2d32;
  --accent: #52cfc6; --accent-2: #7fe0d8; --accent-wash: #14302f;
  --warn: #f0a761; --warn-wash: #33230f;
  --bad: #f08484; --bad-wash: #351717;
  --good: #7ed092; --good-wash: #142b1a;
  --code-bg: #0f1013; --code-fg: #dfe2e6;
  --chat: #a882ff; --chat-2: #c1a6ff; --chat-wash: #241a3d;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
}
:root[data-theme="light"] {
  --paper: #faf7f2; --paper-2: #f2ede4; --card: #ffffff;
  --ink: #1c1b19; --ink-2: #4a4741; --ink-3: #7b766c;
  --rule: #ddd6c8; --rule-2: #e9e3d7;
  --accent: #0d6b66; --accent-2: #0a534f; --accent-wash: #e2f1ef;
  --warn: #a04a00; --warn-wash: #fdefe0;
  --bad: #a51f1f; --bad-wash: #fbe9e9;
  --good: #1e6b2f; --good-wash: #e6f3e8;
  --code-bg: #21201d; --code-fg: #ececea;
  --chat: #6d33d6; --chat-2: #5322ad; --chat-wash: #efe8fd;
  --shadow: 0 1px 2px rgba(28,27,25,.06), 0 8px 24px rgba(28,27,25,.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.68 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.cols { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 980px) { .cols { grid-template-columns: 1fr; gap: 0; } }

main { min-width: 0; padding-bottom: 140px; }
main > section { max-width: var(--maxw); }
main > section > .wide { max-width: none; }

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 54px 0 40px;
  margin-bottom: 48px;
}
.eyebrow {
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 18px;
}
h1 {
  font: 700 clamp(30px, 5vw, 50px)/1.1 Georgia, "Iowan Old Style", "Times New Roman", serif;
  letter-spacing: -.015em; margin: 0 0 18px; max-width: 22ch;
}
.standfirst { font-size: 20px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; margin: 0 0 26px; }
.meta {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  font: 400 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink-3);
}
.meta b { color: var(--ink-2); font-weight: 600; }

/* ---------- toc ---------- */
.toc { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; padding: 8px 0 40px; }
@media (max-width: 980px) {
  .toc {
    position: static; max-height: none; border: 1px solid var(--rule);
    border-radius: 10px; background: var(--card); padding: 18px 20px; margin-bottom: 40px;
  }
}
.toc h2 {
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--rule);
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a {
  display: block; padding: 5px 0 5px 30px; position: relative;
  font-size: 14.5px; line-height: 1.35; color: var(--ink-2); text-decoration: none;
  border-left: 2px solid transparent; margin-left: -2px;
}
.toc a::before {
  counter-increment: toc; content: counter(toc);
  position: absolute; left: 10px; top: 5px;
  font: 500 11px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-3);
}
.toc a:hover { color: var(--accent); }
.toc a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc a.on::before { color: var(--accent); }

/* ---------- sections ---------- */
section { margin: 0 0 68px; scroll-margin-top: 20px; }
h2.sec {
  font: 700 clamp(23px, 3.2vw, 31px)/1.2 Georgia, "Iowan Old Style", serif;
  letter-spacing: -.01em; margin: 0 0 6px; padding-top: 14px;
  border-top: 3px solid var(--ink); display: block;
}
.secnum {
  display: block; font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .16em; color: var(--accent); margin-bottom: 12px; text-transform: uppercase;
}
h3 { font: 700 21px/1.3 Georgia, "Iowan Old Style", serif; margin: 40px 0 10px; }
h4 { font: 600 16px/1.4 inherit; margin: 28px 0 8px; letter-spacing: -.005em; }
p { margin: 0 0 16px; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }

/* ---------- the two-part device ---------- */
.plain {
  background: var(--accent-wash);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 22px 26px 8px;
  margin: 22px 0 34px;
}
.plain .tag {
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2);
  display: block; margin-bottom: 12px;
}
.plain p { font-size: 17.5px; }
.plain p:last-child { margin-bottom: 16px; }

.deep { border-top: 1px solid var(--rule); padding-top: 6px; }
.deep > .tag {
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
  display: block; margin: 12px 0 20px;
}

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; margin: 22px 0 26px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 520px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule-2); vertical-align: top; line-height: 1.5; }
thead th { background: var(--paper-2); font-weight: 700; font-size: 13.5px; letter-spacing: .01em; border-bottom: 2px solid var(--rule); position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: none; }
td code, th code { font-size: 13px; }

/* ---------- code ---------- */
pre {
  background: var(--code-bg); color: var(--code-fg);
  padding: 16px 18px; border-radius: 8px; overflow-x: auto;
  font: 400 13.5px/1.62 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  margin: 18px 0 22px; border: 1px solid rgba(255,255,255,.07);
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; border: none; }
code {
  font: 400 .88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: var(--paper-2); border: 1px solid var(--rule-2);
  padding: .1em .35em; border-radius: 4px; word-break: break-word;
}
pre .c { color: #7f8c94; }
pre .s { color: #9ad4a0; }
pre .k { color: #c8a2f0; }
pre .n { color: #e8c98a; }

/* ---------- callouts ---------- */
.note { border-radius: 8px; padding: 16px 20px 4px; margin: 22px 0; border: 1px solid; font-size: 15.5px; }
.note .h { font-weight: 700; display: block; margin-bottom: 6px; font-size: 14px; letter-spacing: .01em; }
.note p { margin-bottom: 12px; }
.note.red { background: var(--bad-wash); border-color: var(--bad); }
.note.red .h { color: var(--bad); }
.note.amber { background: var(--warn-wash); border-color: var(--warn); }
.note.amber .h { color: var(--warn); }
.note.green { background: var(--good-wash); border-color: var(--good); }
.note.green .h { color: var(--good); }
.note.teal { background: var(--accent-wash); border-color: var(--accent); }
.note.teal .h { color: var(--accent-2); }

ul, ol { margin: 0 0 18px; padding-left: 24px; }
li { margin-bottom: 7px; }
li > ul, li > ol { margin-top: 7px; }

blockquote {
  margin: 20px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--rule);
  color: var(--ink-2); font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

/* ---------- figures ---------- */
figure { margin: 28px 0; }
figure svg { width: 100%; height: auto; display: block; }
.figframe {
  border: 1px solid var(--rule); border-radius: 10px; background: var(--card);
  padding: 24px; overflow-x: auto;
}
figcaption { font-size: 14px; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }
figcaption b { color: var(--ink-2); }

/* svg diagram tokens */
.d-box { fill: var(--card); stroke: var(--rule); stroke-width: 1.5; }
.d-box-a { fill: var(--accent-wash); stroke: var(--accent); stroke-width: 1.5; }
.d-box-m { fill: var(--paper-2); stroke: var(--rule); stroke-width: 1.5; }
.d-t { fill: var(--ink); font: 600 13px/1 -apple-system, "Segoe UI", Roboto, sans-serif; }
.d-t2 { fill: var(--ink-2); font: 400 11.5px/1 -apple-system, "Segoe UI", Roboto, sans-serif; }
.d-t3 { fill: var(--ink-3); font: 400 10.5px/1 ui-monospace, Menlo, Consolas, monospace; }
.d-ta { fill: var(--accent-2); font: 700 12px/1 -apple-system, "Segoe UI", Roboto, sans-serif; }
.d-line { stroke: var(--ink-3); stroke-width: 1.5; fill: none; }
.d-line-a { stroke: var(--accent); stroke-width: 2; fill: none; }
.d-dash { stroke: var(--ink-3); stroke-width: 1.4; fill: none; stroke-dasharray: 5 4; }

/* ---------- verdict chips ---------- */
.chip {
  display: inline-block; font: 700 11px/1.5 ui-monospace, Menlo, Consolas, monospace;
  padding: 2px 7px; border-radius: 4px; letter-spacing: .03em; white-space: nowrap;
}
.chip.yes { background: var(--good-wash); color: var(--good); border: 1px solid var(--good); }
.chip.no  { background: var(--bad-wash);  color: var(--bad);  border: 1px solid var(--bad); }
.chip.mid { background: var(--warn-wash); color: var(--warn); border: 1px solid var(--warn); }
.chip.new { background: var(--accent-wash); color: var(--accent-2); border: 1px solid var(--accent); }

/* ---------- link index ---------- */
.links h4 { margin-top: 26px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.links ul { list-style: none; padding: 0; }
.links li { margin-bottom: 9px; font-size: 15px; line-height: 1.45; }
.links li a { word-break: break-word; }
.links .d { color: var(--ink-3); }

footer {
  border-top: 1px solid var(--rule); margin-top: 20px; padding: 30px 0 90px;
  font-size: 14px; color: var(--ink-3);
}

/* ---------- theme toggle ---------- */
.themebtn {
  position: fixed; top: 16px; right: 16px; z-index: 40;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--card); color: var(--ink-2);
  cursor: pointer; font-size: 16px; line-height: 1; box-shadow: var(--shadow);
}
.themebtn:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 600px) { .themebtn { top: 10px; right: 10px; } }

/* =========================================================
   CHAT WIDGET — deliberately violet, not the report's teal
   ========================================================= */
#cw-launch {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px 13px 16px; border: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--chat) 0%, var(--chat-2) 100%);
  color: #fff; cursor: pointer;
  font: 600 15px/1 -apple-system, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 6px 22px rgba(109,51,214,.42), 0 2px 6px rgba(0,0,0,.2);
  transition: transform .14s ease, box-shadow .14s ease;
}
#cw-launch:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(109,51,214,.5); }
#cw-launch .dot {
  width: 9px; height: 9px; border-radius: 50%; background: #b9ff7a;
  box-shadow: 0 0 0 3px rgba(185,255,122,.28);
}
#cw-launch[hidden] { display: none; }

#cw {
  position: fixed; right: 22px; bottom: 22px; z-index: 61;
  width: min(430px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 44px));
  display: flex; flex-direction: column;
  background: var(--card);
  border: 2px solid var(--chat);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(109,51,214,.3), 0 4px 16px rgba(0,0,0,.25);
}
#cw[hidden] { display: none; }
@media (max-width: 520px) {
  #cw { right: 8px; left: 8px; bottom: 8px; width: auto; height: calc(100vh - 16px); border-radius: 14px; }
  #cw-launch { right: 12px; bottom: 12px; }
}

.cw-head {
  background: linear-gradient(135deg, var(--chat) 0%, var(--chat-2) 100%);
  color: #fff; padding: 13px 14px 13px 17px;
  display: flex; align-items: center; gap: 11px; flex-shrink: 0;
}
.cw-head .ttl { font: 700 15px/1.25 -apple-system, "Segoe UI", Roboto, sans-serif; }
.cw-head .sub { font: 400 11.5px/1.3 ui-monospace, Menlo, Consolas, monospace; opacity: .82; margin-top: 2px; }
.cw-head .grow { flex: 1; min-width: 0; }
.cw-head button {
  background: rgba(255,255,255,.16); border: none; color: #fff; cursor: pointer;
  width: 28px; height: 28px; border-radius: 7px; font-size: 15px; line-height: 1; flex-shrink: 0;
}
.cw-head button:hover { background: rgba(255,255,255,.3); }

.cw-log { flex: 1; overflow-y: auto; padding: 16px 15px 6px; background: var(--paper); }
.cw-msg { margin-bottom: 15px; font-size: 14.6px; line-height: 1.6; }
.cw-msg .who {
  font: 700 10.5px/1 ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: .13em; text-transform: uppercase; margin-bottom: 6px; display: block;
}
.cw-msg.u .who { color: var(--ink-3); }
.cw-msg.a .who { color: var(--chat); }
.cw-msg.u .body {
  background: var(--chat-wash); border: 1px solid var(--chat);
  border-radius: 10px; padding: 9px 12px; color: var(--ink);
}
.cw-msg.a .body { color: var(--ink); }
.cw-msg .body > *:first-child { margin-top: 0; }
.cw-msg .body > *:last-child { margin-bottom: 0; }
.cw-msg .body p { margin: 0 0 9px; }
.cw-msg .body ul, .cw-msg .body ol { margin: 0 0 9px; padding-left: 20px; }
.cw-msg .body li { margin-bottom: 3px; }
.cw-msg .body h1, .cw-msg .body h2, .cw-msg .body h3 { font: 700 15px/1.35 inherit; margin: 12px 0 6px; }
.cw-msg .body pre {
  margin: 9px 0; font-size: 12px; padding: 10px 12px; border-radius: 7px;
}
.cw-msg .body code { font-size: 12.5px; }
.cw-msg .body a { color: var(--chat); }
.cw-msg .body table { font-size: 12.5px; min-width: 0; }
.cw-msg .body .tablewrap { margin: 9px 0; }

.cw-think {
  border-left: 2px solid var(--chat); padding: 4px 0 4px 11px; margin: 0 0 9px;
  font: 400 12.5px/1.55 -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink-3);
  max-height: 108px; overflow: hidden; position: relative; white-space: pre-wrap;
}
.cw-tool {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 8px 0;
  font: 600 11px/1 ui-monospace, Menlo, Consolas, monospace;
  background: var(--chat-wash); color: var(--chat); border: 1px solid var(--chat);
  padding: 4px 9px; border-radius: 999px;
}
.cw-err {
  background: var(--bad-wash); border: 1px solid var(--bad); color: var(--bad);
  border-radius: 8px; padding: 9px 12px; font-size: 13.5px;
}

.cw-dots { display: inline-flex; gap: 4px; align-items: center; height: 16px; }
.cw-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--chat);
  animation: cwb 1.1s infinite ease-in-out;
}
.cw-dots i:nth-child(2) { animation-delay: .18s; }
.cw-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes cwb { 0%,80%,100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.cw-seed { padding: 0 15px 12px; background: var(--paper); display: flex; flex-wrap: wrap; gap: 7px; }
.cw-seed button {
  font: 500 12.5px/1.3 inherit; text-align: left;
  background: var(--card); border: 1px solid var(--chat); color: var(--chat);
  border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.cw-seed button:hover { background: var(--chat-wash); }

.cw-foot {
  border-top: 1px solid var(--rule); background: var(--card);
  padding: 10px 11px; flex-shrink: 0;
}
.cw-row { display: flex; gap: 8px; align-items: flex-end; }
.cw-foot textarea {
  flex: 1; resize: none; border: 1px solid var(--rule); border-radius: 10px;
  padding: 9px 11px; font: 400 14.5px/1.45 inherit; color: var(--ink);
  background: var(--paper); max-height: 130px; min-height: 40px;
}
.cw-foot textarea:focus { outline: 2px solid var(--chat); outline-offset: -1px; border-color: var(--chat); }
.cw-send {
  background: var(--chat); border: none; color: #fff; cursor: pointer;
  width: 40px; height: 40px; border-radius: 10px; font-size: 17px; line-height: 1; flex-shrink: 0;
}
.cw-send:hover { background: var(--chat-2); }
.cw-send:disabled { opacity: .45; cursor: default; }
.cw-fine {
  font: 400 10.5px/1.4 ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink-3); margin-top: 7px; text-align: center;
}
