/* Opinion AI — basert på Opinions visuelle identitet (2025-malen) */
:root {
  --orange: #F26649;
  --orange-deep: #DD5236;
  --blue: #1C7CA1;
  --blue-deep: #166383;
  --aqua: #71C3B3;
  --yellow: #FCE164;
  --light-yellow: #FCF7BA;
  --cream: #FEF9E0;
  --bg: #FAF8F4;
  --bg-green: #D5EDE7;
  --bg-yellow: #FDF6DC;
  --surface: #FFFFFF;
  --ink: #302026;
  --grey: #515350;
  --grey-soft: #82847F;
  --line: #E7E6E6;
  --danger: #C2402A;

  --font-head: "Century Gothic", CenturyGothic, "Futura", "Avenir Next", "Trebuchet MS", sans-serif;
  --font-body: Arial, Helvetica, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(48, 32, 38, .04), 0 10px 30px rgba(48, 32, 38, .07);
  --shadow-lift: 0 4px 10px rgba(48, 32, 38, .08), 0 18px 44px rgba(48, 32, 38, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
  color: var(--grey);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 920px; margin: 0 auto; padding: 0 22px 90px; }

h1, h2, h3, .brand { font-family: var(--font-head); }
h1 { font-size: 1.9rem; color: var(--ink); text-transform: uppercase; letter-spacing: .015em; margin: 34px 0 8px; }
h2 { font-size: 1.05rem; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
h3 { font-size: 1rem; color: var(--ink); margin: 0 0 4px; }
.sub { color: var(--grey-soft); margin: 0 0 26px; max-width: 60ch; }

/* ---- Topplinje med enso-logo ---- */
header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0 20px; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.enso {
  width: 34px; height: 34px; border-radius: 50%;
  border: 9px solid var(--orange); flex: none;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
.brand:hover .enso { transform: rotate(180deg) scale(1.08); }
.brand-text { font-weight: 700; font-size: 1.3rem; letter-spacing: .01em; line-height: 1.15; }
.brand-text em { font-style: normal; color: var(--orange); }
.brand-text small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .7rem; color: var(--grey-soft); letter-spacing: .08em; text-transform: uppercase; }

/* ---- Hero med bokeh-sirkler (Opinion-mønsteret) ---- */
.hero {
  position: relative; overflow: hidden;
  background: var(--orange);
  border-radius: var(--radius);
  padding: 38px 36px 34px;
  margin: 6px 0 30px;
  color: #fff;
  box-shadow: var(--shadow);
}
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 340px; height: 340px; right: -70px; top: -160px; background: var(--light-yellow); opacity: .92; }
.hero::after { width: 190px; height: 190px; right: 150px; top: 40px; background: var(--orange-deep); opacity: .55; }
.hero h1 { max-width: 15ch; }
.hero p { padding-right: 110px; }
@media (max-width: 700px) {
  .hero::before { right: -200px; }
  .hero p { padding-right: 0; }
  .welcome-hero::before { right: -200px; }
}
.hero .dot { position: absolute; border-radius: 50%; background: var(--cream); pointer-events: none; }
.hero .dot.d1 { width: 70px; height: 70px; right: 80px; bottom: -22px; opacity: .85; }
.hero .dot.d2 { width: 34px; height: 34px; right: 250px; bottom: 38px; opacity: .65; }
.hero h1 { color: #fff; margin: 0 0 6px; font-size: 2rem; position: relative; z-index: 1; }
.hero p { margin: 0; max-width: 52ch; color: var(--cream); position: relative; z-index: 1; }
.hero .row { margin-top: 22px; position: relative; z-index: 1; }

/* ---- Kort ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 18px;
}

.banner { border-radius: var(--radius-sm); padding: 13px 18px; margin: 14px 0; font-size: .92rem; }
.banner.warn { background: var(--bg-yellow); color: #7a5a14; border: 1px solid #efdfa8; }

/* ---- Skjema ---- */
label { display: block; font-weight: 700; font-size: .85rem; color: var(--ink); margin: 16px 0 6px; }
label .hint { font-weight: 400; color: var(--grey-soft); }
input[type=text], input[type=password], input[type=email], textarea, select {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .95rem; background: #fff; color: var(--grey);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(28, 124, 161, .15);
}
textarea { resize: vertical; min-height: 68px; }

/* ---- Knapper ---- */
button {
  font-family: var(--font-head); font-weight: 700; font-size: .92rem;
  letter-spacing: .02em; cursor: pointer;
  border: none; border-radius: 999px; padding: 11px 24px;
  background: var(--orange); color: #fff;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
button:hover { background: var(--orange-deep); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(242, 102, 73, .35); }
button:active { transform: translateY(0); }
button:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
button.ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
button.ghost:hover { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(28, 124, 161, .3); }
button.subtle { background: var(--bg-green); color: var(--blue-deep); }
button.subtle:hover { background: var(--aqua); color: #fff; box-shadow: 0 6px 16px rgba(113, 195, 179, .4); }
button.danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
button.danger:hover { background: var(--danger); color: #fff; box-shadow: 0 6px 16px rgba(194, 64, 42, .3); }
button.small { padding: 7px 16px; font-size: .82rem; }
button.onhero { background: #fff; color: var(--orange-deep); }
button.onhero:hover { background: var(--cream); box-shadow: 0 6px 16px rgba(48, 32, 38, .25); }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.topic-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.topic-row .q { flex: 2; }
.topic-row .p { flex: 1.4; }
.topic-row button { flex: none; }

/* ---- Kompakte knapper ---- */
button.mini { padding: 5px 13px; font-size: .76rem; }

/* ---- Nummererte designseksjoner (à la Tellet) ---- */
details.d-sec { border-top: 1px solid var(--line); }
details.d-sec:last-of-type { border-bottom: 1px solid var(--line); }
details.d-sec > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px;
  padding: 14px 4px; font-family: var(--font-head); font-weight: 700; color: var(--ink);
}
details.d-sec > summary::-webkit-details-marker { display: none; }
details.d-sec > summary .sec-num {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--blue); color: #fff; font-size: .8rem;
  display: inline-flex; align-items: center; justify-content: center;
}
details.d-sec > summary .sec-hint { font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--grey-soft); }
details.d-sec > summary::after { content: '▾'; margin-left: auto; color: var(--grey-soft); transition: transform .15s ease; }
details.d-sec[open] > summary::after { transform: rotate(180deg); }
details.d-sec > .sec-body { padding: 0 4px 20px 36px; }
.save-bar {
  position: sticky; bottom: 0; z-index: 5;
  background: linear-gradient(transparent, var(--surface) 35%);
  padding: 14px 0 4px; display: flex; gap: 12px; align-items: center;
}
.save-bar button { flex: 1; }

/* ---- Spørsmålskort med media (Design-fanen) ---- */
.topic-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 10px 8px; margin-bottom: 8px; background: #fff; }
.topic-card textarea.q { min-height: 62px; font-size: .92rem; margin-bottom: 6px; }
.topic-card .topic-row { margin-bottom: 4px; }
.topic-card .topic-row input { padding: 8px 11px; font-size: .85rem; }
.media-item { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.media-item img, .media-item .media-ico {
  height: 38px; width: 38px; flex: none; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); cursor: zoom-in;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-green); font-size: 1.05rem; text-decoration: none;
}
.media-item input { flex: 1; padding: 6px 10px; font-size: .82rem; }
button.icon-btn {
  padding: 6px 10px; font-size: .82rem; line-height: 1;
  background: transparent; color: var(--grey-soft); border: 1px solid var(--line);
}
button.icon-btn:hover { background: var(--bg-green); color: var(--blue-deep); border-color: var(--aqua); transform: none; box-shadow: none; }
.media-menu-wrap { position: relative; display: inline-block; }
.media-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 10;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift); padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 130px;
}
.media-menu button { background: transparent; color: var(--grey); text-align: left; padding: 7px 12px; font-size: .82rem; box-shadow: none; }
.media-menu button:hover { background: var(--bg-green); color: var(--blue-deep); transform: none; box-shadow: none; }

/* ---- Media i chat ---- */
.bubble.media-bubble { padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 18px 5px; align-self: flex-start; box-shadow: var(--shadow); }
.bubble.media-bubble img.single { display: block; max-width: min(300px, 100%); max-height: 260px; border-radius: 12px; cursor: zoom-in; }
.bubble.media-bubble video { display: block; max-width: min(380px, 100%); border-radius: 12px; }
.bubble.media-bubble audio { display: block; width: min(320px, 100%); }
.bubble.media-bubble .img-label { display: block; font-size: .78rem; color: var(--grey-soft); padding: 6px 4px 2px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 6px; width: min(350px, 78vw); }
.media-grid img { width: 100%; height: 105px; object-fit: cover; border-radius: 10px; cursor: zoom-in; transition: transform .12s ease; }
.media-grid img:hover { transform: scale(1.03); }
.transcript-line img.inline-media, .transcript-line video.inline-media { display: block; max-width: 300px; border-radius: 10px; border: 1px solid var(--line); margin-top: 6px; cursor: zoom-in; }
.transcript-line audio.inline-media { display: block; width: 280px; margin-top: 6px; }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(48, 32, 38, .86);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; animation: lb-fade .15s ease both;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: var(--cream); font-size: .9rem; margin-top: 10px; }

/* ---- Merkelapper ---- */
.pill {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-family: var(--font-body); font-size: .72rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
}
.pill.prevalence { background: var(--aqua); color: #fff; }

/* ---- Studieliste ---- */
.project-item { display: block; text-decoration: none; color: inherit; }
.project-item .card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; margin-bottom: 14px; }
.project-item:hover .card { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--orange); }
.project-item strong { font-family: var(--font-head); font-size: 1.05rem; color: var(--ink); }
.meta { color: var(--grey-soft); font-size: .85rem; }

/* ---- Faner ---- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 4px 0 22px; overflow-x: auto; }
.tabs button {
  background: transparent; color: var(--grey-soft); border-radius: 10px 10px 0 0;
  padding: 10px 18px; font-size: .88rem; box-shadow: none; transform: none;
  border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.tabs button:hover { background: var(--bg-green); color: var(--blue-deep); box-shadow: none; transform: none; }
.tabs button.active { color: var(--orange-deep); border-bottom-color: var(--orange); }

/* ---- Filterbrikker ---- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chips button {
  background: var(--surface); color: var(--grey); border: 1px solid var(--line);
  padding: 7px 16px; font-size: .82rem; box-shadow: none;
}
.chips button:hover { transform: none; box-shadow: none; border-color: var(--blue); color: var(--blue-deep); }
.chips button.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---- Test-chat (Design-fanen) ---- */
.design-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .design-grid { grid-template-columns: 1fr; } }
.test-chat { display: flex; flex-direction: column; height: 640px; position: sticky; top: 14px; }
.test-chat .messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px 10px; }
.test-chat .bubble { max-width: 92%; font-size: .9rem; padding: 10px 14px; }
.test-chat form { display: flex; gap: 8px; margin-top: 8px; }
.test-chat textarea { flex: 1; min-height: 44px; max-height: 120px; }

/* ---- Kategorier og innsikt ---- */
.cat { display: inline-block; background: var(--bg-yellow); border: 1px solid #efdfa8; color: #7a5a14; border-radius: 999px; padding: 4px 14px; font-size: .82rem; margin: 0 6px 8px 0; }
.cat b { color: var(--orange-deep); }
.answer-item { border-top: 1px solid var(--line); padding: 10px 0; }
.answer-item:first-child { border-top: none; }
.snippet-score { font-variant-numeric: tabular-nums; color: var(--grey-soft); font-size: .82rem; }
.search-grid { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .search-grid { grid-template-columns: 1fr; } }
.history-item { display: block; width: 100%; text-align: left; background: var(--surface); color: var(--grey); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-family: var(--font-body); font-weight: 400; font-size: .84rem; margin-bottom: 8px; box-shadow: none; }
.history-item:hover { border-color: var(--blue); transform: none; box-shadow: none; background: var(--bg-green); }
.history-item.active { border-color: var(--blue); background: var(--bg-green); }
.search-answer { background: var(--bg-green); border-radius: var(--radius); padding: 18px 22px; white-space: pre-wrap; }

details.q-acc { border-top: 1px solid var(--line); padding: 4px 0; }
details.q-acc summary { cursor: pointer; padding: 10px 0; font-weight: 700; color: var(--ink); list-style: none; display: flex; gap: 10px; align-items: baseline; }
details.q-acc summary::before { content: '▸'; color: var(--orange); transition: transform .15s ease; }
details.q-acc[open] summary::before { transform: rotate(90deg); }
details.q-acc .q-num { color: var(--orange); font-family: var(--font-head); }

.pill.voice { background: var(--orange); color: #fff; }
.pill.q-high { background: var(--bg-green); color: var(--blue-deep); }
.pill.q-medium { background: var(--bg-yellow); color: #8a6d1e; }
.pill.q-low { background: var(--line); color: var(--grey-soft); }
.pill.draft { background: var(--line); color: var(--grey); }
.pill.published { background: var(--bg-green); color: var(--blue-deep); }
.pill.completed-project { background: var(--blue); color: #fff; }

/* ---- Nøkkeltall ---- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 18px; }
.stats.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .stats.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stats, .stats.cols-4 { grid-template-columns: 1fr; } }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 22px 14px; text-align: center;
}
.stat .num { font-family: var(--font-head); font-weight: 700; font-size: 2.3rem; line-height: 1.1; display: block; }
.stat.c-blue .num { color: var(--blue); }
.stat.c-orange .num { color: var(--orange); }
.stat.c-aqua .num { color: var(--aqua); }
.stat .lbl { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--grey-soft); }
.stat .bar { width: 44px; height: 3px; border-radius: 2px; margin: 8px auto 6px; }
.stat.c-blue .bar { background: var(--blue); }
.stat.c-orange .bar { background: var(--orange); }
.stat.c-aqua .bar { background: var(--aqua); }

/* ---- Tabell ---- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
table select { width: auto; min-width: 150px; padding: 6px 8px; }
th { text-align: left; color: var(--grey-soft); font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; padding: 8px 10px; }
td { padding: 11px 10px; border-top: 1px solid var(--line); vertical-align: top; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--bg-green); }

.share-box { display: flex; gap: 8px; flex-wrap: wrap; }
.share-box input { flex: 1; min-width: 220px; font-size: .9rem; color: var(--grey-soft); background: var(--bg); }

/* ---- Chat (respondent) ---- */
.chat-page { display: flex; flex-direction: column; min-height: 100dvh; }
.chat-page .container { flex: 1; display: flex; flex-direction: column; max-width: 740px; width: 100%; }

.welcome-hero {
  position: relative; overflow: hidden;
  background: var(--orange); color: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 36px 34px;
}
/* pointer-events: none — dekorsirklene skal aldri stjele trykk fra knappene. */
.welcome-hero::before { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; right: -90px; top: -150px; background: var(--light-yellow); opacity: .9; pointer-events: none; }
.welcome-hero::after { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 50%; right: 130px; bottom: -50px; background: var(--orange-deep); opacity: .6; pointer-events: none; }
.welcome-hero h1 { color: #fff; margin: 0 0 10px; font-size: 1.7rem; position: relative; z-index: 1; max-width: 16ch; }
.welcome-hero p { position: relative; z-index: 1; color: var(--cream); max-width: 46ch; }
.welcome-hero .meta-note { font-size: .85rem; color: var(--cream); opacity: .92; }
.welcome-hero button { position: relative; z-index: 1; margin-top: 10px; }

#chat { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 14px 0 20px; }
.bubble {
  max-width: 84%; padding: 13px 18px;
  white-space: pre-wrap; word-wrap: break-word;
  animation: rise .3s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bubble.assistant {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px 18px 18px 5px;
  align-self: flex-start; box-shadow: var(--shadow); color: var(--grey);
}
.bubble.user {
  background: var(--blue); color: #fff;
  border-radius: 18px 18px 5px 18px;
  align-self: flex-end;
}

.typing { display: flex; gap: 5px; align-self: flex-start; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 18px 5px; box-shadow: var(--shadow); }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); animation: bounce 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; background: var(--aqua); }
.typing i:nth-child(3) { animation-delay: .3s; background: var(--blue); }
@keyframes bounce { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-6px); opacity: 1; } }

#composer {
  position: sticky; bottom: 0;
  background: linear-gradient(transparent, var(--bg) 30%);
  padding: 14px 0 max(24px, env(safe-area-inset-bottom, 0px));
  display: flex; gap: 10px;
}
/* 16px hindrer at iOS auto-zoomer inn når feltet får fokus. */
#composer textarea { flex: 1; min-height: 50px; max-height: 170px; border-radius: 16px; box-shadow: var(--shadow); font-size: 16px; }
#composer button { align-self: flex-end; }

/* Respondent-chatten på mobil: composeren skal helt ned, og knappene skal ikke spise skrivefeltet. */
.chat-page .container { padding-bottom: 0; }
@media (max-width: 520px) {
  .chat-page .container { padding-left: 14px; padding-right: 14px; }
  .bubble { max-width: 92%; padding: 12px 15px; }
  #composer { gap: 8px; }
  #composer button { padding: 11px 16px; }
  .welcome-hero { padding: 28px 22px; }
  .welcome-hero h1 { font-size: 1.45rem; }
  /* Løft bokeh-sirkelen ut av tekstlinjene — hvit tekst på lysegul er ulesbart. */
  .welcome-hero::before { top: -210px; }
  .welcome-hero .meta-note { font-size: .82rem; }
}

/* ---- Talemodus (respondent) ---- */
.hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.hero-actions .onhero + .onhero { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .75); }
.hero-actions .onhero + .onhero:hover { background: rgba(255, 255, 255, .16); box-shadow: none; }

.voice-stage {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0 2px;
  background: linear-gradient(var(--bg) 78%, rgba(250, 248, 244, 0));
}
.voice-stage canvas { width: 176px; height: 176px; transition: width .5s ease, height .5s ease; }
.voice-stage.compact canvas { width: 116px; height: 116px; }
.voice-status { font-size: .85rem; color: var(--grey-soft); text-align: center; min-height: 1.4em; padding-bottom: 4px; }
.voice-status.live { color: var(--blue); }

/* Fokusvisning: kun moderatorens spørsmål, i ro. Respondentens egne ord vises
   ikke — å lese seg selv mens man snakker trekker oppmerksomheten ut av samtalen. */
.voice-focus {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 8px 0 28px; min-height: 38vh;
}
.focus-text {
  margin: 0; max-width: 30ch;
  font-size: 1.42rem; line-height: 1.55; color: var(--ink);
  white-space: pre-wrap; word-wrap: break-word;
}
.focus-text .interrupted { opacity: .5; font-style: italic; font-size: 1rem; }
.focus-media:not(:empty) { margin-top: 24px; }
/* Vedlegget deler render med chatten, men skal ikke se ut som en boble her. */
.focus-media .bubble.media-bubble {
  background: none; border: none; box-shadow: none;
  border-radius: 0; padding: 0; max-width: 100%;
}
.focus-media img { display: block; margin: 0 auto; max-width: min(320px, 100%); max-height: 250px; border-radius: 12px; cursor: zoom-in; }
.focus-media video { display: block; margin: 0 auto; max-width: min(380px, 100%); border-radius: 12px; }
.focus-media audio { display: block; margin: 0 auto; width: min(320px, 100%); }
.focus-media .img-label { display: block; font-size: .78rem; color: var(--grey-soft); padding-top: 8px; }

.voice-bar {
  position: sticky; bottom: 0;
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  background: linear-gradient(transparent, var(--bg) 40%);
  padding: 14px 0 max(20px, env(safe-area-inset-bottom, 0px));
}
.switch-bar { display: flex; justify-content: center; padding: 4px 0 0; }
.bubble .interrupted { opacity: .55; font-style: italic; }

@media (max-width: 520px) {
  .voice-stage canvas { width: 140px; height: 140px; }
  .voice-stage.compact canvas { width: 92px; height: 92px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .voice-bar { gap: 8px; }
  .voice-bar button { padding: 10px 12px; font-size: .82rem; }
  .focus-text { font-size: 1.22rem; max-width: 24ch; }
}

.done-note {
  text-align: center; padding: 26px;
  background: var(--bg-green); border-radius: var(--radius);
  color: var(--blue-deep); font-family: var(--font-head); font-weight: 700;
  margin-bottom: 30px; animation: rise .4s ease both;
}

/* ---- Analyse ---- */
.theme { border-left: 4px solid var(--orange); padding: 6px 0 6px 18px; margin: 22px 0; }
.theme h3 { font-size: 1.02rem; }
blockquote {
  margin: 12px 0; padding: 12px 16px; background: var(--bg-green);
  border-radius: var(--radius-sm); font-style: italic; font-size: .92rem; color: var(--grey);
}
blockquote cite { display: block; font-style: normal; font-size: .76rem; color: var(--grey-soft); margin-top: 5px; text-transform: uppercase; letter-spacing: .05em; }
.insight-box {
  background: var(--blue); color: #fff;
  border-radius: var(--radius); padding: 20px 24px; margin: 14px 0 20px;
}
.insight-box strong { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; display: block; margin-bottom: 6px; color: var(--cream); }
ul.tight { margin: 6px 0; padding-left: 20px; }
ul.tight li { margin: 5px 0; }
ul.tight li::marker { color: var(--orange); }

dialog {
  border: none; border-radius: var(--radius); box-shadow: var(--shadow-lift);
  max-width: 780px; width: calc(100vw - 40px); padding: 28px;
  color: var(--grey);
}
dialog::backdrop { background: rgba(48, 32, 38, .4); }
.transcript-line { margin: 12px 0; }
.transcript-line .who { font-family: var(--font-head); font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--orange); }
.transcript-line.user .who { color: var(--blue); }
.transcript-line p { margin: 2px 0 0; white-space: pre-wrap; }

.empty { text-align: center; color: var(--grey-soft); padding: 40px 0; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2.5px solid var(--bg-green); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
