:root {
  --blue: #0077C8;
  --navy: #071D49;
  --ink: #071D49;
  --muted: #4b5a78;
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #d9e2ee;
  --good: #1f7a4d;
  --warn: #a35a00;
  --radius: 14px;
  font-family: "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-weight: 300; line-height: 1.5; }
h1, h2, strong { font-weight: 700; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.logo { height: 34px; }
.product { font-weight: 500; color: var(--navy); border-left: 1px solid var(--line); padding-left: 14px; letter-spacing: .02em; }
.banner { background: #fff6e0; color: #6b4a00; padding: 10px 24px; font-size: .95rem; border-bottom: 1px solid #f0dfb0; }

.screen { max-width: 1100px; margin: 0 auto; padding: 28px 16px 48px; }
.intro p { max-width: 680px; color: var(--muted); font-size: 1.05rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 24px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.card-face { height: 150px; border-radius: 10px; background: linear-gradient(#e7eef7, #d3e1f0); overflow: hidden; display: flex; justify-content: center; }
.card-face svg { height: 165px; margin-top: 4px; }
.card-face img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.card h3 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.card .who { color: var(--muted); font-size: .92rem; margin: 0; }
.card .goal { margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: .8rem; font-weight: 500; padding: 3px 10px; border-radius: 99px; background: #e6f1fa; color: var(--blue); }
.chip.Hard { background: #fde9e7; color: #9b2c1f; }
.chip.Easy { background: #e5f4ec; color: var(--good); }
.card .btn { margin-top: auto; }

.setup { display: grid; gap: 10px; }
.code-form { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: var(--radius); padding: 16px 18px; margin-top: 20px; max-width: 560px; }
.code-form span { color: var(--muted); font-weight: 300; }
.code-row { display: flex; gap: 10px; margin-top: 8px; }
.code-row input { flex: 1; font: inherit; padding: 10px 14px; border-radius: 99px; border: 1px solid var(--line); min-width: 0; }
.code-msg { margin: 8px 0 0; color: #9b2c1f; min-height: 1.2em; }
.locked .card .btn { opacity: .45; pointer-events: none; }
.toggle { display: flex; gap: 10px; align-items: flex-start; }
.toggle input { margin-top: 5px; accent-color: var(--blue); }
.briefing-tips { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.briefing-tips summary { cursor: pointer; font-weight: 500; color: var(--blue); }

.btn { font: inherit; font-weight: 500; border-radius: 99px; padding: 10px 20px; border: 2px solid var(--blue); cursor: pointer; background: #fff; color: var(--blue); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: #005f9f; border-color: #005f9f; }
.btn.ghost:hover { background: #eef5fb; }
.btn.big { padding: 14px 28px; font-size: 1.05rem; min-width: 200px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.listening { background: #c0392b; border-color: #c0392b; color: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(192, 57, 43, .15); } }

/* Meeting stage */
.stage-wrap { display: grid; gap: 12px; }
.stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #cfdbe8; box-shadow: 0 8px 30px rgba(7, 29, 73, .15); }
.office-bg { position: absolute; inset: 0; background: linear-gradient(180deg, #e9eff6 0%, #dfe7f0 62%, #b99a7a 62%, #a88866 100%); }
.office-bg .window { position: absolute; left: 7%; top: 10%; width: 22%; height: 42%; background: linear-gradient(#bcd8f0, #e4f0fa); border: 8px solid #f7f9fb; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.office-bg .flag { position: absolute; right: 9%; top: 8%; width: 6px; height: 54%; background: #8a7a5a; }
.office-bg .flag::after { content: ""; position: absolute; left: 6px; top: 0; width: 70px; height: 46px; background: repeating-linear-gradient(#b22234 0 7px, #fff 7px 14px); }
.office-bg .shelf { position: absolute; right: 22%; top: 30%; width: 16%; height: 8px; background: #8a6b4a; box-shadow: 0 -24px 0 -2px #4a6b8a, 30px -20px 0 -3px #0077C8; }
.avatar-holder { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 92%; aspect-ratio: 400 / 440; }
.avatar-holder svg { width: 100%; height: 100%; display: block; }
.avatar-holder.three { left: 0; right: 0; top: 0; bottom: 0; transform: none; width: 100%; height: 100%; aspect-ratio: auto; }
.nameplate { position: absolute; left: 16px; bottom: 16px; background: rgba(7, 29, 73, .88); color: #fff; padding: 8px 14px; border-radius: 8px; display: grid; font-size: .85rem; }
.nameplate strong { font-size: 1rem; }
.timer { position: absolute; top: 14px; left: 16px; background: rgba(255,255,255,.9); padding: 4px 12px; border-radius: 99px; font-weight: 500; font-variant-numeric: tabular-nums; }
.timer.over { background: #fde9e7; color: #9b2c1f; }
.selfview { position: absolute; right: 14px; bottom: 14px; width: 22%; min-width: 130px; border-radius: 10px; overflow: hidden; border: 3px solid #fff; background: #000; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.selfview video { width: 100%; display: block; transform: scaleX(-1); }
.presence-chip { position: absolute; left: 6px; bottom: 6px; right: 6px; text-align: center; font-size: .75rem; font-weight: 500; padding: 3px 6px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; }
.presence-chip.on { background: rgba(31, 122, 77, .9); }
.presence-chip.down, .presence-chip.away { background: rgba(163, 90, 0, .92); }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(7, 29, 73, .55); color: #fff; font-size: 1.3rem; font-weight: 500; text-align: center; padding: 20px; }
.captions { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; min-height: 84px; }
.captions p { margin: 2px 0; }
.cap-char { font-weight: 500; font-size: 1.1rem; }
.cap-you { color: var(--muted); font-style: italic; }
.controls { margin-top: 14px; }
.status { color: var(--muted); margin: 0 0 8px; min-height: 1.5em; }
.control-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.type-form { flex: 1; min-width: 220px; }
.type-form input { width: 100%; font: inherit; padding: 12px 16px; border-radius: 99px; border: 1px solid var(--line); }

/* Avatar animation */
.avatar .head, .avatar .body { transform-box: view-box; transform-origin: 200px 320px; transition: transform .5s ease; }
.avatar .body { animation: breathe 4.5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-2px); } }
.avatar .eye { transform-box: fill-box; transform-origin: center; transition: transform .08s; }
.avatar.blink .eye { transform: scaleY(.1); }
.avatar .pupil { transition: transform .35s ease; }
.avatar .brow { transform-box: fill-box; transform-origin: center; transition: transform .35s ease; }
.avatar.talking .head { animation: talkbob 1.6s ease-in-out infinite; }
@keyframes talkbob { 25% { transform: rotate(1deg) translateY(-1px); } 75% { transform: rotate(-1deg); } }
.avatar[data-expression="interested"] .brow { transform: translateY(-5px); }
.avatar[data-expression="pleased"] .brow { transform: translateY(-3px); }
.avatar[data-expression="skeptical"] .brow-l { transform: translateY(2px) rotate(6deg); }
.avatar[data-expression="skeptical"] .brow-r { transform: translateY(-9px) rotate(-6deg); }
.avatar[data-expression="impatient"] .brow-l { transform: translateY(4px) rotate(10deg); }
.avatar[data-expression="impatient"] .brow-r { transform: translateY(4px) rotate(-10deg); }
.avatar[data-expression="concerned"] .brow-l { transform: translateY(-3px) rotate(-12deg); }
.avatar[data-expression="concerned"] .brow-r { transform: translateY(-3px) rotate(12deg); }
.avatar .prop { transition: transform .45s ease, opacity .3s; opacity: 0; transform: translateY(90px); }
.avatar[data-action="glances_at_phone"] .prop-phone,
.avatar[data-action="checks_watch"] .prop-watch,
.avatar[data-action="takes_notes"] .prop-notes { opacity: 1; transform: none; }
.avatar[data-action="glances_at_phone"] .head,
.avatar[data-action="takes_notes"] .head { transform: rotate(3deg) translateY(4px); }
.avatar[data-action="checks_watch"] .head { transform: rotate(-4deg) translateY(4px); }
.avatar[data-action="takes_notes"] .pen { animation: write .5s ease-in-out infinite alternate; }
@keyframes write { to { transform: translate(-14px, 4px); } }
.avatar[data-action="nods"] .head { animation: nod .55s ease-in-out 2; }
@keyframes nod { 50% { transform: rotate(0) translateY(7px); } }
.avatar[data-action="shakes_head"] .head { animation: shake .5s ease-in-out 2; }
@keyframes shake { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.avatar[data-action="leans_in"] { transform: scale(1.06) translateY(-2%); transition: transform .6s ease; }
.avatar { transition: transform .6s ease; transform-origin: 50% 100%; }

/* Results */
.scoring { text-align: center; padding: 80px 0; color: var(--muted); }
.spinner { width: 46px; height: 46px; border: 5px solid #d6e6f5; border-top-color: var(--blue); border-radius: 50%; margin: 0 auto 16px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.score-hero { display: flex; gap: 24px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.score-ring { width: 130px; height: 130px; border-radius: 50%; border: 10px solid var(--blue); display: grid; place-content: center; text-align: center; background: #fff; }
.score-ring span { font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--navy); }
.score-ring small { color: var(--muted); }
.headline { font-size: 1.15rem; max-width: 640px; margin: 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.panel.accent { border-left: 5px solid var(--blue); }
.panel ul { margin: 0; padding-left: 20px; }
.panel li + li { margin-top: 6px; }
.crit { display: grid; grid-template-columns: 210px 90px 1fr; gap: 6px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.crit:first-child { border-top: 0; }
.crit .name { font-weight: 500; }
.dots { display: flex; gap: 4px; align-items: center; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: #dde5ef; }
.dots i.f { background: var(--blue); }
.crit .ev { color: var(--muted); font-style: italic; margin: 0; }
.crit .tip { margin: 2px 0 0; }
.crit .tip::before { content: "Try: "; font-weight: 500; color: var(--blue); }
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.stat { background: var(--bg); border-radius: 10px; padding: 10px 16px; min-width: 140px; }
.stat b { display: block; font-size: 1.5rem; color: var(--navy); }
.stat span { color: var(--muted); font-size: .85rem; }
summary h2.inline { display: inline; }
#transcript p { margin: 6px 0; }
#transcript .who { font-weight: 500; }

@media (max-width: 700px) {
  .topbar { padding: 12px 16px; }
  .stage { aspect-ratio: 4 / 5; }
  .avatar-holder { height: 78%; }
  .selfview { width: 34%; }
  .crit { grid-template-columns: 1fr; }
  .btn.big { width: 100%; }
}
@media print {
  .topbar, .control-row, .banner { display: none; }
  body { background: #fff; }
  details.panel { display: none; }
}
