/* Noosy researcher app, v3 design: white, neon coral, Archivo + Inter, light paper sidebar. */
:root {
  --bg: #ffffff; --panel: #ffffff; --ink: #111111; --muted: #6b645b; --line: #EAE4DA; --soft: #F3F0EA;
  --accent: #FF4D5E; --accent-ink: #fff; --rec: #FF4D5E; --ok: #1f7a48; --warn: #9a5b00; --cobalt: #1F4BFF;
  --display: 'Archivo', 'Archivo Black', system-ui, sans-serif;
  --radius: 16px; --shadow: 0 1px 2px rgba(17,17,17,.04);
  --font: 'Inter', ui-sans-serif, -apple-system, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
h1, h2, h3 { line-height: 1.05; margin: 0 0 .4em; font-family: var(--display); font-weight: 900; letter-spacing: -.035em; }
h1 { font-size: 46px; } h2 { font-size: 22px; letter-spacing: -.025em; } h3 { font-size: 17px; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: var(--mono); font-size: 13px; }
.label { font: 700 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: #8a8279; }

/* shell: paper sidebar + content */
body.has-side { padding-left: 232px; }
.side { position: fixed; left: 0; top: 0; bottom: 0; width: 232px; background: #F6F4F0; border-right: 1px solid var(--line); padding: 28px 18px; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.side .side-logo { display: block; padding: 0 10px 26px; } .side .side-logo svg { height: 26px !important; width: 93px !important; display: block; }
.side nav { display: grid; gap: 4px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; font: 600 15px/1 var(--font); color: #6b645b; }
.side nav a:hover { background: #fff; color: var(--ink); }
.side nav a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.side nav a.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.side .tip { margin-top: auto; padding: 0 10px; font: 500 13px/1.45 var(--font); color: #8a8279; }
.side .tip b { color: var(--ink); }
.side .me { display: flex; align-items: center; gap: 10px; padding: 16px 10px 0; font: 600 14px/1 var(--font); }
.side .me span { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; }
.topbar { display: none; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 40px 48px 90px; }
.narrow { max-width: 720px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .cols-2 { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; }
.card.flat { background: var(--soft); border-color: transparent; }
.list { display: grid; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 4px 22px; }
.list:empty { display: none; }
.item { display: flex; align-items: center; gap: 16px; padding: 18px 0; color: var(--ink); border-top: 1px solid #F0EBE3; }
.item:first-child { border-top: 0; }
.item:hover .title { text-decoration: underline; text-underline-offset: 3px; }
.item .grow { flex: 1; min-width: 0; }
.item .title { font: 800 18px/1.15 var(--display); letter-spacing: -.02em; }

.btn { appearance: none; border: 1.5px solid #D9D1C5; background: #fff; color: var(--ink); font: 700 14px/1 var(--font); padding: 12px 18px; min-height: 44px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover, .btn.dark:hover { filter: brightness(1.05); }
.btn.danger { color: #b4232a; }
.btn.big { padding: 16px 26px; font-size: 16px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { min-height: 36px; padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #5e574f; }
input[type=text], input[type=url], input[type=password], input[type=number], input[type=email], textarea, select {
  font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #E2DBD0; border-radius: 12px; padding: 11px 13px; width: 100%; font-weight: 400;
}
textarea { min-height: 76px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--soft); color: #5e574f; white-space: nowrap; }
.pill.ai { background: #EEF1FF; color: var(--cobalt); }
.pill.ok { background: var(--ink); color: #fff; }
.pill.rec { background: #FFE7EA; color: #D42A3C; }
.pill.warn { background: #FFF1DD; color: var(--warn); }

.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; font: 600 14px/1 var(--font); padding: 10px 16px; border-radius: 999px; color: #6b645b; cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); border: 1.5px dashed #E2DBD0; border-radius: 22px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; z-index: 50; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

.md { font-size: 15px; line-height: 1.6; }
.md h1, .md h2 { font-size: 22px; margin-top: 1.2em; } .md h3 { font-size: 17px; margin-top: 1em; }
.md ul { padding-left: 20px; margin: .3em 0 .8em; } .md li { margin: .25em 0; }
.md blockquote { margin: .6em 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--soft); border-radius: 0 12px 12px 0; }
.md code { font-family: var(--mono); font-size: 13px; background: var(--soft); padding: 1px 5px; border-radius: 5px; }

/* Step editor */
.step { border: 1px solid var(--line); border-radius: 20px; background: #fff; padding: 16px 18px; display: grid; gap: 10px; }
.step-head { display: flex; gap: 10px; align-items: center; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--display); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.step-head select { width: auto; }
.step-head .tools { margin-left: auto; display: flex; gap: 2px; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; min-width: 40px; min-height: 40px; border-radius: 10px; font-size: 16px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }

/* Participant */
.stage { min-height: calc(100vh - 0px); display: grid; place-items: center; padding: 24px; }
.stage .panel { width: 100%; max-width: 640px; }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.check .st { margin-left: auto; }
.preview { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 10px; object-fit: cover; }
.meter { height: 6px; background: var(--soft); border-radius: 6px; overflow: hidden; width: 120px; }
.meter > i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s; }
.recbar { position: fixed; top: 14px; right: 14px; display: flex; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px 6px 10px; font-size: 13px; font-weight: 600; z-index: 10; box-shadow: var(--shadow); }
.recdot { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.prompt { font-size: 22px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; }
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale button { flex: 1; min-width: 44px; padding: 12px 0; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.scale button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.progress { height: 4px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.orb { width: 92px; height: 92px; border-radius: 50%; margin: 6px auto 18px; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent)); transition: transform .12s; box-shadow: 0 10px 40px color-mix(in srgb, var(--accent) 35%, transparent); }
.orb.listening { background: radial-gradient(circle at 35% 30%, #8fe3b5, var(--ok)); box-shadow: 0 10px 40px color-mix(in srgb, var(--ok) 35%, transparent); }
.orb.thinking { animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.92); opacity: .8; } }
.caption { min-height: 48px; text-align: center; color: var(--muted); font-size: 15px; }
.caption .live { color: var(--ink); }

/* Review */
.review { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .review { grid-template-columns: 1fr; } }
.player { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; }
.player video.main { width: 100%; height: 100%; object-fit: contain; display: block; }
.player video.pip { position: absolute; right: 12px; bottom: 12px; width: 22%; min-width: 140px; border-radius: 10px; border: 2px solid rgba(255,255,255,.7); background: #222; object-fit: cover; aspect-ratio: 4/3; }
.controls { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.timeline { position: relative; flex: 1; height: 34px; background: var(--soft); border-radius: 8px; cursor: pointer; overflow: hidden; }
.timeline .seg-b { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 16%, transparent); border-left: 2px solid var(--accent); }
.timeline .seg-b span { position: absolute; left: 4px; top: 8px; font-size: 11px; font-weight: 700; color: var(--accent); }
.timeline .note-m { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--warn); }
.timeline .head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--rec); pointer-events: none; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-color: var(--ink); }
.transcript { max-height: 62vh; overflow: auto; display: grid; gap: 2px; }
.line { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.line:hover { background: var(--soft); }
.line.now { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.line .ts { color: var(--muted); font-family: var(--mono); font-size: 12px; padding-top: 2px; }
.line.mod .tx { color: var(--accent); }
.steprow { padding: 10px 0; border-bottom: 1px solid var(--line); }
.steprow:last-child { border: 0; }

/* ---------- Nosy mascot + brand ---------- */
.brand .by { font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 2px; }
.nosy { --s: 92px; position: relative; display: inline-block; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  background: radial-gradient(circle at 34% 28%, #ffd3a8, #ff7a45 55%, #e8513a); box-shadow: 0 calc(var(--s) * .1) calc(var(--s) * .4) rgba(232, 81, 58, .28); transition: transform .15s; }
.nosy .eye { position: absolute; top: 34%; width: 24%; height: 28%; background: #fff; border-radius: 50%; overflow: hidden; animation: blink 5s infinite; }
.nosy .eye.l { left: 22%; } .nosy .eye.r { right: 22%; }
.nosy .eye b { position: absolute; width: 52%; height: 52%; border-radius: 50%; background: #1b1b20; top: 26%; left: 24%; animation: look 7s ease-in-out infinite; }
@keyframes blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.1); } }
@keyframes look { 0%, 20% { transform: translate(0, 0); } 30%, 45% { transform: translate(35%, -10%); } 55%, 70% { transform: translate(-35%, 10%); } 80%, 100% { transform: translate(0, 0); } }
.nosy.listening { background: radial-gradient(circle at 34% 28%, #c7f5d9, #39b26b 60%, #2a8f56); box-shadow: 0 calc(var(--s) * .1) calc(var(--s) * .4) rgba(57, 178, 107, .3); }
.nosy.listening .eye b { animation: none; transform: translate(0, -8%) scale(1.1); }
.nosy.thinking { animation: breathe 1.2s ease-in-out infinite; }
.nosy.thinking .eye b { animation: none; transform: translate(30%, -30%); }
.nosy.speaking { animation: talk .5s ease-in-out infinite; }
@keyframes talk { 50% { transform: scale(1.05) rotate(-2deg); } }
.madeby { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }
.madeby b { color: var(--ink); }
.hello { display: flex; gap: 14px; align-items: center; }
.bubble { background: var(--soft); border-radius: 14px 14px 14px 4px; padding: 10px 14px; font-size: 14px; }

/* skip link */
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
/* responsive researcher app */
@media (max-width: 720px) {
  .wrap { padding: 18px 16px 64px; }
  .topbar { padding: 10px 16px; }
  .item { flex-wrap: wrap; }
  .item .grow { flex-basis: 100%; }
  h1 { font-size: 26px; }
  .tabs { overflow-x: auto; }
  .row.spread > .row { width: 100%; }
  .row.spread > .row .btn { flex: 1; justify-content: center; }
}
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; min-width: 200px; z-index: 20; }
.menu-pop button { width: 100%; justify-content: flex-start; border: 0; }

/* H-10 contrast + targets */
.btn.danger { color: #b4232a; }

.pill { font-size: 12.5px; padding: 3px 10px; }
.seg button { min-height: 40px; }
.tabs button { min-height: 44px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
label.row.small { min-height: 32px; }
a { text-underline-offset: 2px; }
.card a, .md a { text-decoration: underline; }
/* H-01 funnel */
.fsteps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fstep { display: grid; gap: 4px; }
.fbar { height: 72px; background: var(--soft); border-radius: 10px; display: flex; align-items: flex-end; overflow: hidden; }
.fbar i { display: block; width: 100%; background: #CFC7BB; border-radius: 10px 10px 0 0; min-height: 3px; }
.fstep b { font-size: 34px; font-family: var(--display); font-weight: 900; letter-spacing: -.04em; } .fstep:last-child .fbar i { background: var(--accent); }
.warn-t { color: var(--warn); font-weight: 600; }
/* H-09 step chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip-b { appearance: none; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; min-height: 36px; padding: 6px 12px; border-radius: 99px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chip-b.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }

/* v3 additions */
.tabs button { font-size: 15px; } .tabs button.on { border-color: var(--accent); }
.player { border-radius: 20px; }
.share-link { display: flex; align-items: center; gap: 12px; justify-content: space-between; border: 1.5px solid #E2DBD0; border-radius: 16px; padding: 12px 12px 12px 18px; }
.share-link b { font: 900 22px/1.1 var(--display); letter-spacing: -.03em; word-break: break-all; }
.invite { border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: grid; gap: 8px; font-size: 14px; line-height: 1.5; color: #333; }
.invite .row b { font: 800 16px/1 var(--display); }
.kpis { display: flex; gap: 56px; flex-wrap: wrap; margin: 6px 0 26px; }
.kpis b { display: block; font: 900 40px/1 var(--display); letter-spacing: -.04em; }
.kpis span { font-size: 14px; color: #6b645b; }
.hostrow { display: flex; align-items: center; gap: 14px; }
/* phone + small tablet: slim header with the logo and a Menu button; the menu drops down */
.side .side-menu { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; }
.side .menu-btn { display: none; }
@media (max-width: 860px) {
  body.has-side { padding-left: 0; padding-top: 60px; }
  .side { width: auto; right: 0; bottom: auto; height: 60px; flex-direction: row; align-items: center; padding: 0 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .side-logo { padding: 0; } .side .side-by { display: none; }
  .side .menu-btn { display: inline-flex; margin-left: auto; appearance: none; border: 1.5px solid #D9D1C5; background: #fff; border-radius: 999px; padding: 9px 16px; font: 700 14px/1 var(--font); color: var(--ink); min-height: 40px; align-items: center; }
  .side .side-menu { display: none; position: absolute; top: 60px; left: 0; right: 0; background: #F6F4F0; padding: 10px 16px 18px; border-bottom: 1px solid var(--line); box-shadow: 0 14px 30px rgba(17,17,17,.12); }
  .side.open .side-menu { display: flex; }
  .side .tip { display: none; } .side .me { padding-top: 12px; }
  .wrap { padding: 24px 18px 70px; } h1 { font-size: 34px; }
}

.side .side-by { margin: -20px 10px 22px; font: 600 12px/1 var(--font); color: #8a8279; }
.side .side-by:hover { color: var(--ink); }



/* selects: our own chevron, so the arrow sits right in every browser */
select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b645b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
