:root {
  --bg: #0f172a;
  --panel: #0b1120;
  --stroke: #1f2937;
  --ink: #e5e7eb;
  --muted: #9ca3af;

  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --radius: 18px;

  /* bias system stays */
  --bias-hue: 120;
  --bias-intensity: 0.18;
}


* { 
    box-sizing: border-box; 
}

.wrap {
  width: calc(100% - 3rem);
  max-width: 760px;
  margin: 1.5rem auto;
  padding: 2rem;

  background: linear-gradient(145deg, #020617, #020617);
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.18);

  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.85);
  position: relative;
}

.wrap::before {
  content: "";
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.14), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(94, 234, 212, 0.10), transparent 55%);
  opacity: 0.75;
  mix-blend-mode: screen;
  pointer-events: none;
}


.card {
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.94)
  );

  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  padding: 1.25rem 1.4rem;

  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.75),
    0 0 0 1px rgba(15, 23, 42, 0.9);

  backdrop-filter: blur(16px);
}


h1 { margin: 8px 0 4px; }

.hint { 
    color: var(--muted); 
    font-size: 12px; 
}

.row { 
    display:flex; 
    gap:8px; 
    margin-top:12px; 
}

input[type="text"]{ 
    flex: 1; 
    padding: 12px; 
    border-radius: 12px; 
    border: 1px solid #2a3347; 
    background: #0f1420; 
    color: var(--ink); 
}

button{ 
    padding:12px 16px; 
    border-radius:12px; 
    border:1px solid #2a3347; 
    background:#1a2233; 
    color:var(--ink); 
    cursor:pointer; 
}

button:disabled{ 
    opacity:.6; 
    cursor:not-allowed; 
}

#transparency { 
    width:100%; 
    margin: 6px 0 2px; 
}

.legend { 
    display:flex; 
    justify-content:space-between; 
    font-size:12px; 
    color:var(--muted); 
}

.chat { 
    display:flex; 
    flex-direction:column; 
    gap:6px; 
    margin-top:12px; 
    min-height:160px; 
}

.bubble { 
    padding:12px 14px; 
    border-radius:12px; 
    margin:2px 0; 
    line-height:1.4; 
}

.me { 
    background:#1f2a3d; 
    align-self:flex-end; 
}

.ai { 
    background:#172033; 
    border:1px solid #2a3347; 
}

.bubble.ai { 
    opacity: .95 
}

.bubble.ai::after { 
    content:""; 
    display:inline-block; 
    width:6px; height:6px; 
    margin-left:6px; 
    border-radius:50%; 
    animation: blink 1s infinite;
    background:#9fb0c8; }
@keyframes blink { 50% { opacity:.3 } 

}

:root{
    --t: 50;                 /* slider value 0-100 */
    --bias-hue: 120;         /* grønn ~ ærlig, rød ~ manipulerende */
    --bias-intensity: 0.18;  /* styrke på glow */
  }
  
  
  /* kort/glow rundt chat-boksen */
  .container, .card{
    box-shadow:
      0 0 40px -20px hsla(var(--bias-hue), 90%, 60%, calc(var(--bias-intensity) * 1.4)),
      0 0 140px -80px hsla(var(--bias-hue), 90%, 60%, calc(var(--bias-intensity) * 1.6));
    transition: box-shadow 220ms ease;
  }
  
  /* liten tekst som viser tolkning av tone */
  .tone-label{
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
  }
  
  :root {
    --bias-hue: 120;         /* 0 = rød (manip), 120 = grønn (transparent) */
    --bias-intensity: 0.18;  /* styrke på glød */
  }

  
  /* Glød rundt kort/container/chat */
  .container, .card, #chat {
    box-shadow:
      0 0 40px -20px hsla(var(--bias-hue), 90%, 60%, calc(var(--bias-intensity) * 1.4)),
      0 0 140px -80px hsla(var(--bias-hue), 90%, 60%, calc(var(--bias-intensity) * 1.6));
    transition: box-shadow 220ms ease;
  }
  
  /* Liten tekstlabel for modus (valgfritt) */
  .tone-label {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 4px;
  }
  
  :root {
    --bias-hue: 120; /* green default */
  }
  
  body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, Arial, sans-serif;

  color: var(--ink);

  background:
    radial-gradient(circle at top,
      #1e293b 0%,
      #020617 45%,
      #000 100%);
    
  display: flex;
  justify-content: center;
}

.bubble.ai {
  border-color: hsl(var(--bias-hue), 80%, 70%);
  background: hsla(var(--bias-hue), 80%, 50%, 0.18);
  backdrop-filter: blur(8px);
}

  
  .bubble.me {
    background: rgba(255, 255, 255, 0.12);
  }
  
  .container-box {
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.05);
  }
  
.next-button,
.back-button {
  position: absolute;
  top: 12px;
  right: 12px;

  padding: 6px 10px;
  font-size: 0.75rem;
  line-height: 1;

  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(31, 41, 55, 0.9);
  color: var(--ink);

  cursor: pointer;
  z-index: 10;
  opacity: 0.9;
}

.next-button:hover,
.back-button:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Make content a positioning context */
.content {
  position: relative;
}

/* Back button: top-right, ABOVE header row */
.back-button {
  position: absolute;
  top: -2.2rem;   /* lifts it above the header row */
  right: 0;

  padding: 6px 10px;
  font-size: 0.75rem;
  line-height: 1;

  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(31, 41, 55, 0.9);
  color: var(--ink);

  cursor: pointer;
  z-index: 20;
}
