.pc-root {
  --pc-bg: #f6f7f9; --pc-panel: #fff; --pc-ink: #1c2024; --pc-muted: #6b7280;
  --pc-line: #e6e8eb; --pc-brand: #0a6b3b; --pc-chip: #eef2f0;
  --pc-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  color: var(--pc-ink);
  font: 15px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex; flex-direction: column; height: 100%;
}
.pc-root * { box-sizing: border-box; }
.pc-feed { flex: 1; overflow-y: auto; padding: 20px 18px 24px; background: var(--pc-bg); }
.pc-feed-inner { max-width: 760px; margin: 0 auto; }
.pc-empty { color: var(--pc-muted); text-align: center; margin-top: 40px; }
.pc-turn { margin-bottom: 26px; }
.pc-q { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; margin: 4px 0 12px; }
.pc-phase { display: inline-flex; align-items: center; gap: 8px; color: var(--pc-muted); font-size: 13px; margin-bottom: 10px; }
.pc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pc-brand); animation: pc-pulse 1s infinite ease-in-out; }
@keyframes pc-pulse { 0%,100%{opacity:.3;transform:scale(.8)} 50%{opacity:1;transform:scale(1)} }
.pc-answer { font-size: 15.5px; }
.pc-answer p { margin: 0 0 12px; }
.pc-answer ul { margin: 0 0 12px; padding-left: 20px; }
.pc-answer a { color: var(--pc-brand); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--pc-brand) 35%, transparent); }
.pc-answer a:hover { border-bottom-color: var(--pc-brand); }
.pc-caret { display:inline-block; width:7px; height:1.05em; background: var(--pc-brand); vertical-align:-2px; margin-left:1px; animation: pc-blink 1s steps(2) infinite; border-radius:1px; }
@keyframes pc-blink { 0%,50%{opacity:1} 51%,100%{opacity:0} }
.pc-sources { margin: 16px 0 4px; }
.pc-sources h3, .pc-followups h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--pc-muted); margin: 0 0 8px; }
.pc-src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.pc-src { display: block; padding: 10px 12px; background: var(--pc-panel); border: 1px solid var(--pc-line); border-radius: 10px; text-decoration: none; color: inherit; box-shadow: var(--pc-shadow); transition: transform .08s ease; }
.pc-src:hover { transform: translateY(-1px); }
.pc-src .pc-t { font-size: 13px; font-weight: 600; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-src .pc-u { font-size: 11.5px; color: var(--pc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-src .pc-n { display:inline-block; width:16px; height:16px; border-radius:4px; background: var(--pc-brand); color:#fff; font-size:10px; font-weight:700; text-align:center; line-height:16px; margin-right:6px; vertical-align:-3px; }
.pc-followups { margin: 18px 0 4px; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-chip { border: 1px solid var(--pc-line); background: var(--pc-chip); color: var(--pc-ink); border-radius: 999px; padding: 8px 14px; font-size: 13.5px; cursor: pointer; transition: border-color .1s; }
.pc-chip:hover { border-color: var(--pc-brand); }
.pc-actions { display: flex; gap: 6px; margin-top: 14px; }
.pc-actions button { border: 1px solid var(--pc-line); background: var(--pc-panel); color: var(--pc-muted); border-radius: 8px; width: 34px; height: 32px; cursor: pointer; font-size: 15px; display: grid; place-items: center; transition: all .1s; }
.pc-actions button:hover { color: var(--pc-ink); border-color: var(--pc-brand); }
.pc-actions button.pc-on { color: var(--pc-brand); border-color: var(--pc-brand); }
.pc-composer { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 18px 16px; background: linear-gradient(to top, var(--pc-bg) 72%, transparent); }
.pc-box { width: 100%; max-width: 760px; display: flex; gap: 8px; background: var(--pc-panel); border: 1px solid var(--pc-line); border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--pc-shadow); }
.pc-box input { flex: 1; border: none; background: transparent; color: var(--pc-ink); font-size: 15px; outline: none; }
.pc-box button { border: none; background: var(--pc-brand); color: #fff; border-radius: 999px; width: 42px; height: 42px; cursor: pointer; font-size: 18px; flex: 0 0 auto; }
.pc-box button:disabled { opacity: .5; cursor: default; }
.pc-err { color: #c0392b; }
/* reCAPTCHA: hide Google's floating badge; we show the required attribution text instead (Google ToS). */
.grecaptcha-badge { visibility: hidden; }
.pc-attribution { width: 100%; max-width: 760px; margin-top: 8px; font-size: 10px; line-height: 1.35; color: #9aa0a6; text-align: center; }
.pc-attribution a { color: inherit; text-decoration: underline; }

/* ── Floating bubble ───────────────────────────────────────────────── */
.pc-bubble-root { position: fixed; z-index: 2147483000; }
.pc-bubble-root.pc-pos-bottom-right { right: 20px; bottom: 20px; }
.pc-bubble-root.pc-pos-bottom-left  { left: 20px;  bottom: 20px; }
.pc-bubble-root.pc-pos-top-right    { right: 20px; top: 20px; }
.pc-bubble-root.pc-pos-top-left     { left: 20px;  top: 20px; }

.pc-launcher {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; overflow: hidden;
  background: var(--pc-brand, #0a6b3b); color: #fff; font-size: 24px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  display: grid; place-items: center; transition: transform .1s; position: relative; padding: 0;
}
.pc-launcher:hover { transform: scale(1.05); }
.pc-launcher svg { width: 26px; height: 26px; fill: currentColor; }
.pc-launcher-img { width: 30px; height: 30px; object-fit: contain; display: block; border-radius: 4px; }

/* Image with no colour: the picture fills the whole circle (no background). */
.pc-launcher-fill { background: transparent; }
.pc-launcher-fill .pc-launcher-open { display: block; width: 100%; height: 100%; }
.pc-launcher-fill .pc-launcher-img { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
/* Keep the close (✕) legible when the fill-bubble is open. */
.pc-open .pc-launcher-fill { background: rgba(0,0,0,.55); }
.pc-launcher-close { text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.pc-launcher .pc-launcher-close { display: none; }
.pc-open .pc-launcher .pc-launcher-open { display: none; }
.pc-open .pc-launcher .pc-launcher-close { display: inline; }

.pc-panel {
  position: absolute; width: min(400px, calc(100vw - 40px)); height: min(600px, calc(100vh - 110px));
  background: var(--pc-bg, #f6f7f9); border: 1px solid var(--pc-line, #e6e8eb); border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,.28); overflow: hidden; display: none; flex-direction: column;
}
.pc-open .pc-panel { display: flex; }
/* open the panel away from the launcher depending on corner */
.pc-pos-bottom-right .pc-panel, .pc-pos-bottom-left .pc-panel { bottom: 68px; }
.pc-pos-top-right .pc-panel, .pc-pos-top-left .pc-panel { top: 68px; }
.pc-pos-bottom-right .pc-panel, .pc-pos-top-right .pc-panel { right: 0; }
.pc-pos-bottom-left .pc-panel, .pc-pos-top-left .pc-panel { left: 0; }

.pc-panel-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--pc-brand, #0a6b3b); color: #fff; flex: 0 0 auto;
}
.pc-panel-head .pc-logo { width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.2); color:#fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.pc-panel-head .pc-panel-title { font-weight: 650; font-size: 15px; }
.pc-panel-head .pc-expand { margin-left: auto; background: transparent; border: none; color: #fff; cursor: pointer; font-size: 17px; line-height: 1; opacity: .85; padding: 2px 4px; }
.pc-panel-head .pc-expand:hover { opacity: 1; }
.pc-panel-body { flex: 1 1 auto; min-height: 0; }
.pc-panel-body .pc-root { height: 100%; }

/* Expanded panel — most of the screen, capped so it doesn't get silly on huge monitors. */
.pc-bubble-root.pc-expanded .pc-panel { width: min(96vw, 1040px); height: min(94vh, 1180px); }

/* Skeleton loaders for the async sections (Kilder / Foreslåtte spørsmål). */
.pc-skel { position: relative; overflow: hidden; background: var(--pc-chip, #eef2f0); border-radius: 10px; }
.pc-skel::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  transform: translateX(-100%); animation: pc-shimmer 1.2s infinite; }
.pc-skel-card { height: 52px; }
.pc-skel-chip { display: inline-block; width: 150px; height: 34px; border-radius: 999px; }
@keyframes pc-shimmer { 100% { transform: translateX(100%); } }
.pc-panel-body .pc-composer { background: transparent; }

/* ── Member "my chats" history ─────────────────────────────────────── */
.pc-history { display: flex; height: 100%; gap: 16px; }
.pc-hist-list { flex: 0 0 260px; overflow-y: auto; border-right: 1px solid var(--pc-line); padding-right: 8px; }
.pc-hist-item {
  display: block; width: 100%; text-align: left; background: var(--pc-panel); border: 1px solid var(--pc-line);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; color: inherit;
}
.pc-hist-item:hover { border-color: var(--pc-brand); }
.pc-hist-item.pc-active { border-color: var(--pc-brand); box-shadow: 0 0 0 1px var(--pc-brand) inset; }
.pc-hist-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-hist-date { font-size: 11.5px; color: var(--pc-muted); margin-top: 2px; }
.pc-hist-view { flex: 1 1 auto; overflow-y: auto; padding-right: 4px; }
.pc-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; margin-bottom: 10px; font-size: 14.5px; }
.pc-msg p { margin: 0 0 8px; } .pc-msg p:last-child { margin-bottom: 0; }
.pc-msg-human { background: var(--pc-brand); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.pc-msg-ai { background: var(--pc-panel); border: 1px solid var(--pc-line); border-bottom-left-radius: 4px; }
.pc-msg-ai a { color: var(--pc-brand); }

/* Report dialog — centered modal + full-page overlay (replaces window.prompt) */
.pc-modal-overlay {
  --pc-brand: #0a6b3b;
  position: fixed; inset: 0; z-index: 2147483600;
  background: rgba(15, 23, 32, .5);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  font: 15px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  animation: pc-modal-fade .12s ease-out;
}
.pc-modal {
  width: 100%; max-width: 440px; background: #fff; color: #1c2024;
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  padding: 22px 22px 18px; animation: pc-modal-pop .14s ease-out;
}
.pc-modal-title { margin: 0 0 6px; font-size: 18px; font-weight: 650; }
.pc-modal-text { margin: 0 0 12px; color: #6b7280; font-size: 13.5px; }
.pc-modal-input {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 84px;
  border: 1px solid #e6e8eb; border-radius: 10px; padding: 10px 12px;
  font: inherit; color: #1c2024; outline: none; transition: border-color .1s;
}
.pc-modal-input:focus { border-color: var(--pc-brand); }
.pc-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.pc-modal-actions button {
  border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: filter .1s, background .1s;
}
.pc-modal-cancel { background: #fff; border-color: #e6e8eb; color: #6b7280; }
.pc-modal-cancel:hover { background: #f6f7f9; }
.pc-modal-send { background: var(--pc-brand); color: #fff; }
.pc-modal-send:hover { filter: brightness(1.08); }
@keyframes pc-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pc-modal-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
