/* FFPR styles - the PDF review app (M17 P2), ONE file for both entrances: the website page (site/pdf) and the extension page
   (extension/pdf.html); placed by shared/sync_shared.py like the scripts. ASCII only. */
  :root { --bg:#07050f; --panel:#0e0a1c; --line:#2a2140; --txt:#e8e4f5; --dim:#9d93b8; --go:#39ff14; --ok:#8fffa8; --warn:#ffd23f; --bad:#ff6b6b; }
  * { box-sizing: border-box; }
  body { margin:0; background:var(--bg); color:var(--txt); font:14px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
  header { display:flex; align-items:center; gap:14px; padding:12px 18px; border-bottom:1px solid var(--line); }
  header a { color:var(--ok); text-decoration:none; }
  header b { font-size:16px; }
  header .sp { flex:1; }
  @media (max-width: 600px) { header { flex-wrap:wrap; gap:4px 14px; padding:10px 14px; } header a { white-space:nowrap; } header .sp { display:none; } header .ffpr-dim { flex-basis:100%; order:3; margin:0; } }   /* P6b: the phone header in two short rows, not a tall stack */
  #app { max-width:1500px; margin:0 auto; padding:14px 18px 40px; }
  .ffpr-top { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px; }
  @media (max-width: 980px) { .ffpr-top { grid-template-columns:1fr; } .ffpr-main { flex-direction:column; } .ffpr-cards { width:auto !important; position:static !important; max-height:none !important; } }
  .ffpr-card { background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:10px 12px; }
  .ffpr-drop.ffpr-over { border-color:var(--go); box-shadow:0 0 0 2px rgba(57,255,20,.25) inset; }
  .ffpr-h { font:bold 12px Consolas,monospace; color:#d9c3ff; margin-bottom:6px; letter-spacing:.3px; }
  .ffpr-dim { color:var(--dim); font-size:12px; margin:4px 0; }
  .ffpr-warn { color:var(--warn); font-size:12px; margin:4px 0; }
  .ffpr-meter { color:var(--ok); font:12px Consolas,monospace; margin:4px 0; }
  .ffpr-aiu { display:flex; align-items:center; gap:4px; flex-wrap:wrap; }   /* 0.1.68 (M25): the AI usage bar */
  .ffpr-aiu-track { display:inline-block; width:120px; height:8px; background:#0e2a18; border:1px solid var(--line); border-radius:5px; overflow:hidden; vertical-align:middle; }
  .ffpr-aiu-fill { display:block; height:100%; width:0; }
  .ffpr-est { color:var(--dim); font:11px Consolas,monospace; margin:0 8px 0 2px; }
  .ffpr-est[data-tone="warn"] { color:var(--warn); }
  .ffpr-link { color:var(--ok); }
  .ffpr-input { width:100%; margin:6px 0; background:#03140a; color:#cfffd6; border:1px solid var(--line); border-radius:5px; padding:7px; font:12px Consolas,monospace; }
  .ffpr-file { margin:6px 0; color:var(--dim); font-size:12px; }
  .ffpr-btn { cursor:pointer; background:#1b1430; color:var(--txt); border:1px solid #3a2a5c; border-radius:5px; padding:7px 12px; font:bold 12px Consolas,monospace; margin:4px 6px 4px 0; }
  .ffpr-btn:disabled { opacity:.45; cursor:default; }
  .ffpr-go { background:var(--go); color:#03140a; border-color:var(--go); }
  .ffpr-dl { background:var(--warn); color:#03140a; border-color:var(--warn); }
  .ffpr-small { padding:3px 8px; font-size:11px; background:transparent; }
  .ffpr-bar { margin:14px 0 4px; display:flex; flex-wrap:wrap; align-items:center; }
  .ffpr-status { min-height:22px; font:12px Consolas,monospace; color:var(--ok); margin:4px 0 10px; }
  .ffpr-status[data-tone="warn"] { color:var(--warn); }
  .ffpr-main { display:flex; gap:16px; align-items:flex-start; }
  .ffpr-pages { flex:1; min-width:0; }
  .ffpr-page { position:relative; margin:0 0 14px; background:#fff; border-radius:3px; box-shadow:0 2px 10px rgba(0,0,0,.5); }
  .ffpr-img { display:block; width:100%; height:auto; border-radius:3px; }
  .ffpr-nobox { background:transparent; box-shadow:none; padding:4px 0; }
  .ffpr-nobox .ffpr-img { display:none; }
  .ffpr-cards:empty, .ffpr-bar:empty { display:none; }
  .ffpr-box { position:absolute; border:2px solid #7d6bff; border-radius:2px; cursor:pointer; }
  .ffpr-box[data-state="filled"] { border-color:#15b845; background:rgba(21,184,69,.10); }
  .ffpr-box[data-state="decided"] { border-color:rgba(21,184,69,.55); border-width:1px; }
  .ffpr-box[data-state="unsure"] { border-color:#e0a800; background:rgba(255,210,63,.18); }
  .ffpr-box[data-state="open"] { border:2px dashed #e03131; background:rgba(224,49,49,.07); }
  .ffpr-box[data-state="others"] { border:1px solid rgba(120,120,120,.55); }
  .ffpr-box[data-state="check"] { border:2px solid #ff8c00; background:rgba(255,140,0,.22); }
  .ffpr-box.ffpr-hot { box-shadow:0 0 0 3px rgba(125,107,255,.55); }
  /* 0.1.107 (M29 R39): the planned answer drawn INSIDE its box - sized by the box (container units), dark ink like the filled PDF */
  .ffpr-box { container-type:size; overflow:hidden; }
  .ffpr-val { position:absolute; inset:0; display:flex; align-items:center; padding:0 3px; color:#0a0a0a; font:min(70cqh, 15px)/1.1 Helvetica, Arial, sans-serif; white-space:nowrap; overflow:hidden; pointer-events:none; }
  .ffpr-val-multi { align-items:flex-start; white-space:pre-wrap; word-break:break-word; font-size:min(11px, 40cqh); padding-top:2px; }
  .ffpr-val-tick { justify-content:center; padding:0; font-weight:bold; font-size:min(90cqh, 18px); }
  .ffpr-val-comb { padding:0; }
  /* 0.1.110: a drawn dropdown answer hides the page's own "Select" (the box's colour mixed over white); the in-place dropdown */
  .ffpr-val-cover { background:#fff; }
  .ffpr-box[data-state="filled"] .ffpr-val-cover { background:#e8f8ec; }
  .ffpr-box[data-state="unsure"] .ffpr-val-cover { background:#fff6d9; }
  .ffpr-box[data-state="check"] .ffpr-val-cover { background:#ffe8cc; }
  .ffpr-val-comb.ffpr-val-cover span { border-right:1px solid rgba(0,0,0,.35); }
  .ffpr-val-comb.ffpr-val-cover span:last-child { border-right:0; }
  .ffpr-pick { position:absolute; inset:0; width:100%; height:100%; box-sizing:border-box; z-index:5; font:13px Helvetica, Arial, sans-serif; border:0; background:#fff; color:#0a0a0a; cursor:pointer; }
  .ffpr-val-comb span { flex:1 1 0; text-align:center; }
  .ffpr-cards { width:380px; flex:none; position:sticky; top:10px; max-height:calc(100vh - 20px); overflow:auto; background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:10px; }
  .ffpr-cards .ffpr-flash { outline:2px solid var(--warn); }
  .ffpr-why { margin-top:3px; color:var(--warn); font:10px Consolas,monospace; }
  .ffpr-more summary { cursor:pointer; color:var(--dim); font:11px Consolas,monospace; margin:6px 0; }
  .ffpr-foot { margin-top:18px; color:var(--dim); font-size:12px; border-top:1px solid var(--line); padding-top:10px; }
  noscript { color:var(--warn); }
  /* 0.1.103 (M29 R33): the SAME profile row as the web panel (shared/profilerow.js, FFPP) - its parts carry ffpp-* classes here */
  .ffpp-head { display:flex; align-items:center; gap:6px; margin:2px 0 3px; font:bold 12px Consolas,monospace; color:var(--ok); }
  .ffpp-dot { display:inline-block; width:9px; height:9px; border-radius:50%; flex:none; }
  .ffpp-caption { min-height:14px; margin:0 0 6px; font:12px Consolas,monospace; color:var(--ok); word-break:break-word; }
  .ffpp-caption[data-state="unsaved"], .ffpp-caption[data-state="none"] { color:var(--warn); }
  .ffpp-caption[data-state="building"] { color:#7fd0ff; }
  .ffpp-caption[data-state="failed"] { color:var(--bad); }
  .ffpp-verrow, .ffpp-newrow { align-items:center; gap:6px; flex-wrap:wrap; margin:0 0 6px; font:12px Consolas,monospace; color:var(--txt); }
  .ffpp-label { color:var(--ok); }
  .ffpp-verwrap { position:relative; flex:1 1 140px; min-width:0; }
  .ffpp-pick { width:100%; text-align:left; cursor:pointer; background:#03140a; color:#cfffd6; border:1px solid var(--line); border-radius:5px; padding:5px 7px; font:12px Consolas,monospace; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ffpp-menu { position:absolute; left:0; right:0; top:100%; margin-top:2px; z-index:5; background:#03140a; border:1px solid var(--line); border-radius:5px; max-height:200px; overflow:auto; }
  .ffpp-menu-item { display:flex; align-items:center; gap:4px; padding:4px 7px; cursor:pointer; font:12px Consolas,monospace; color:#cfffd6; }
  .ffpp-menu-item:hover { background:#0e2a18; }
  .ffpp-menu-item.ffpp-on { color:var(--warn); }
  .ffpp-menu-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .ffpp-menu-empty { padding:4px 7px; color:var(--dim); font:12px Consolas,monospace; }
  .ffpp-clear { cursor:pointer; background:#3a1d0a; color:#ff9f1c; border:1px solid #ff9f1c; border-radius:5px; padding:5px 9px; font:bold 12px Consolas,monospace; }
  .ffpp-save { min-width:110px; cursor:pointer; background:var(--warn); color:#03140a; border:0; border-radius:5px; padding:5px 9px; font:bold 12px Consolas,monospace; }
  .ffpp-keep { min-width:110px; cursor:pointer; background:#1f5c33; color:#cfffd6; border:0; border-radius:5px; padding:5px 9px; font:bold 12px Consolas,monospace; }
  .ffpp-name { flex:1 1 140px; background:#03140a; color:#cfffd6; border:1px solid var(--line); border-radius:5px; padding:5px; font:12px Consolas,monospace; }
  .ffpp-hint { margin:0 0 6px; color:var(--warn); font:11px Consolas,monospace; word-break:break-word; }
  .ffpp-files { min-height:14px; margin:0 0 4px; color:var(--ok); font:11px Consolas,monospace; word-break:break-word; }
  .ffpp-waiting { color:var(--warn); }
  .ffpp-pend { display:inline-flex; align-items:center; gap:2px; margin-right:8px; color:#cfffd6; }
  .ffpp-cost { color:var(--ok); }
  .ffpp-x { display:inline-block; cursor:pointer; background:transparent; color:#ff9f1c; border:0; padding:0 4px; font:bold 15px Consolas,monospace; line-height:1; }
  .ffpp-filerow { display:flex; gap:6px; margin:0 0 6px; }
  .ffpp-pickfiles { flex:1; cursor:pointer; background:#1f5c33; color:#cfffd6; border:0; border-radius:5px; padding:7px; font:12px Consolas,monospace; }
  .ffpp-heavy { align-items:center; gap:6px; flex-wrap:wrap; margin:2px 0 6px; }
  .ffpp-heavytxt { flex:1 1 100%; color:var(--warn); font:11px Consolas,monospace; }
  .ffpp-sources { flex-wrap:wrap; align-items:center; gap:3px 10px; margin:0 0 6px; font:11px Consolas,monospace; color:#cfffd6; }
  .ffpp-src { display:inline-flex; align-items:center; gap:2px; }
  .ffpp-src.ffpp-dim { opacity:.45; }
  .ffpp-note { flex:1 1 100%; color:var(--ok); }
  .ffpp-pastelbl { margin:4px 0 3px; color:var(--txt); font:12px Consolas,monospace; }
  .ffpp-paste { width:100%; height:96px; margin:0 0 4px; background:#03140a; color:#cfffd6; border:1px solid var(--line); border-radius:5px; padding:7px; font:12px Consolas,monospace; resize:vertical; }
  .ffpp-repl { align-items:center; gap:6px; margin:0 0 6px; color:#cfffd6; font:11px Consolas,monospace; cursor:pointer; }
  .ffpp-again { width:100%; padding:6px; margin:0 0 6px; cursor:pointer; background:#ff9f1c; color:#03140a; font:bold 12px Consolas,monospace; border:0; border-radius:5px; }
  /* the bottom-right corner: the seconds while anything runs + "what it did" (the web panel's trace) */
  .ffpr-corner { display:none; position:fixed; right:12px; bottom:12px; z-index:50; width:340px; max-width:calc(100vw - 24px); background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:7px 9px; box-shadow:0 6px 24px rgba(0,0,0,.6); font:11px Consolas,monospace; color:var(--txt); }
  .ffpr-corner-meter { display:none; margin:0 0 5px; padding:4px 6px; border-radius:5px; background:#0e2a18; color:var(--go); font:bold 12px Consolas,monospace; }
  .ffpr-corner-head { cursor:pointer; color:#7fd0ff; text-decoration:underline; }
  .ffpr-corner-list { margin-top:5px; max-height:220px; overflow:auto; color:var(--dim); white-space:pre-wrap; word-break:break-word; }
  /* 0.1.105 (M29 R38): under the key - a moving bar + what runs now, while anything runs; the buttons and links dimmed meanwhile */
  .ffpr-work { margin-top:10px; padding:7px 8px; border:1px solid var(--line); border-radius:6px; background:#0e2a18; }
  .ffpr-work-bar { position:relative; height:6px; border-radius:3px; background:#13361f; overflow:hidden; }
  .ffpr-work-bar span { position:absolute; top:0; left:-40%; width:40%; height:100%; border-radius:3px; background:var(--go); animation:ffpr-slide 1.2s linear infinite; }
  @keyframes ffpr-slide { from { left:-40%; } to { left:100%; } }
  .ffpr-work-line { margin-top:5px; color:var(--go); font:bold 12px Consolas,monospace; word-break:break-word; }
  .ffpr-dim-busy { opacity:.45; }
