:root{
  --bg:#ffffff;
  --card:#f7f9fb;
  --accent:#ff6b00;
  --accent2:#e55c00;
  --text:#12223c;
  --muted:#475569;
  --ok:#16a34a;
  --warn:#f59e0b;
  --bad:#ef4444;
  --border:#e5e7eb;
  --shadow:0 10px 30px rgba(2,6,23,.06);
  --radius:16px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background: var(--bg);
  display:flex; align-items:center; justify-content:center; padding:28px;
}
.pageHeader {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  width: 100%;
}

.pageHeader > div {
  flex: 1;
  min-width: 0;
}

.pageLogo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: contain;
  box-shadow: 0 3px 6px rgba(2,6,23,.12);
}

/* Make title + CTA sit nicely in one row */
.pageTitle {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap; /* so it doesn't break on small screens */
  justify-content: space-between;
  width: 100%;
  position: relative;
}

.pageTitle > span:first-child {
  flex: 1;
}

#headline-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  justify-content: flex-end;
  flex-direction: row;
}

.pageSubtitle {
  margin: 2px 0 0 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
}

.wrap{width:min(1040px,100%);}

.badge{ font-size:12px; color:#fff; background:linear-gradient(135deg,var(--accent),var(--accent2)); padding:2px 8px; border-radius:999px }
.badge.muted{ background:#f1f5f9; color:var(--muted); border:1px solid var(--border) }
.badge.ok{ background:#dcfce7; color:#065f46; border:1px solid #bbf7d0 }
.badge.warn{ background:#fef9c3; color:#854d0e; border:1px solid #fde68a }
.badge.bad{ background:#fee2e2; color:#991b1b; border:1px solid #fecaca }

.card{background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:18px; margin-top:12px}
.tabs{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px}
.tab{
  border:1px solid var(--border); background:#fff; border-radius:999px; padding:10px 14px; cursor:pointer; font-weight:700;
  display:inline-flex; align-items:center; gap:8px;
}
.tab[aria-selected="true"]{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(255,107,0,.18)}

.progress{width:100%; height:10px; background:#f1f5f9; border-radius:999px; overflow:hidden; margin:6px 0 12px; border:1px solid var(--border);}
.bar{height:100%; width:0%; background: linear-gradient(90deg,var(--accent),var(--accent2)); transition:width .25s ease}

.dimHeader{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap }
.dimHeader h2{ margin:0; font-size: clamp(18px, 2vw, 24px) }
.dimBlurb{ color:var(--muted); margin:4px 0 0 }

.qlist{display:grid; gap:20px; margin-top:8px;}
.qblock{border:1px solid var(--border); border-radius:12px; padding:14px;}
.qblock h3{font-size:18px; margin:8px 0}
.labels{display:flex; justify-content:space-between; font-size:12px; color:var(--muted)}
.scale{display:grid; grid-template-columns: repeat(10,1fr); gap:6px; margin-top:8px;}
.scale button{padding:10px; border-radius:8px; border:1px solid var(--border); background:#f8fafc; cursor:pointer; font-weight:700}
.scale button[aria-pressed="true"]{border-color:var(--accent); background:#fff; box-shadow:0 0 0 3px rgba(255,107,0,.2);}

.actions{margin-top:14px; display:flex; gap:10px; flex-wrap:wrap}
.btn{padding:10px 14px; border-radius:10px; border:1px solid var(--border); background:#fff; cursor:pointer; font-weight:700}
.btn.primary{background:linear-gradient(135deg,var(--accent),var(--accent2)); border:none; color:#fff}
.btn.ghost{ background:#f8fafc }

.result{margin-top:16px; display:grid; gap:12px;}

/* Inline per-question recommendation block */
.inlineRes{
  margin-top:8px;
  padding:10px;
  background:#f8fafc;
  border:1px solid var(--border);
  border-radius:10px;
  font-size:14px; color:var(--muted);
}
.inlineRes .badge{ margin-right:8px; }
.inlineRes .icon{ margin:0 6px 0 2px; }

/* Radar summary card */
.radarCard {
  margin: 8px 0;
  padding: 10px 14px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}
.radarHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.radarHead strong { font-size: 15px; }
.radarHint { font-size: 12px; color: var(--muted); }

.radarCenter {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

/* Bigger chart */
#radarCanvas{
  width: 520px;   /* visible CSS size */
  height: 460px;  /* visible CSS size */
  max-width: 100%;
}
@media (max-width: 640px){
  #radarCanvas{ width: 360px; height: 320px; }
}


/* Legend now outside (below) */
.radarLegend {
  list-style: none;
  padding: 0;
  margin: 12px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  font-size: 13px;
  color: var(--muted);
}
.radarLegend li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.radarLegend .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent2);
}

.radarGeneralNote {
  margin-top: 1em;
  padding-top: 1em;
  border-top: 1px solid var(--border);
  text-align: left;
}

/* Mobile */
@media (max-width: 600px){
  #radarCanvas { max-width: 220px; }
  .radarHint { display: none; }
}

#dimStatus {
  display: none !important;
}

.discuss-floating {
  position: fixed;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

.discuss-floating.show {
  opacity: 1;
  pointer-events: auto;
}

/* Optional: center on very small screens */
@media (max-width: 600px) {
  .discuss-floating {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

.headline-cta-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
  opacity: 0;
  transition: opacity 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

#printPdfBtn {
  order: 2;
}

.headline-cta-btn.show {
  opacity: 1;
}
