.muted { color: var(--ink-3); font-size: 14px; }
.demo-note { background: var(--yellow); border-bottom: var(--stroke); font-size: 14.5px; font-weight: 500; padding: 10px 0; }
.demo-note .marker { display: inline-block; background: var(--ink); color: var(--yellow); padding: 2px 10px; border-radius: 6px; margin-right: 8px; font-size: 14px; transform: rotate(-2deg); }

.app { padding-top: 32px; padding-bottom: 72px; }
.tabs { display: flex; gap: 10px; margin-bottom: 32px; overflow-x: auto; padding: 4px 6px 10px 2px; }
.tabs button { font: 700 15px var(--body); color: var(--ink); background: var(--white); border: var(--stroke); border-radius: 999px; padding: 10px 20px; cursor: pointer; white-space: nowrap; box-shadow: 3px 3px 0 var(--ink); transition: transform 0.12s; }
.tabs button:hover { transform: translate(-1px, -1px); }
.tabs button[aria-selected="true"] { background: var(--blue); color: #fff; }

.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.panel-head h1 { font-size: clamp(28px, 3.4vw, 42px); }
.panel-head p { color: var(--ink-2); margin-top: 8px; font-size: 15.5px; }

.seg { display: inline-flex; background: var(--white); border: var(--stroke); border-radius: 999px; padding: 3px; box-shadow: 3px 3px 0 var(--ink); }
.seg button { font: 700 14px var(--body); border: 0; background: none; color: var(--ink); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.kpi { border: var(--stroke); border-radius: var(--radius-m); box-shadow: var(--pop); padding: 18px 20px; background: var(--white); }
.kpi:nth-child(1) { background: var(--yellow); transform: rotate(-1deg); }
.kpi:nth-child(2) { background: var(--blue); color: #fff; }
.kpi:nth-child(3) { background: var(--white); transform: rotate(1deg); }
.kpi:nth-child(4) { background: var(--red-soft); }
.kpi .label { font-size: 14px; font-weight: 700; }
.kpi .val { font-family: var(--marker); font-size: 40px; margin-top: 4px; line-height: 1.05; }
.kpi .delta { display: inline-block; font-size: 13px; font-weight: 700; margin-top: 8px; padding: 2px 10px; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); }
.delta.up::before { content: "↑ "; color: var(--green); }
.delta.down::before { content: "↓ "; color: var(--red); }
@media (max-width: 860px) { .kpis { grid-template-columns: 1fr 1fr; } }

.block { position: relative; background: var(--white); border: var(--stroke); border-radius: var(--radius-m); box-shadow: var(--pop); padding: 22px; margin-bottom: 24px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.block-head h2 { font-family: var(--marker); font-weight: 400; font-size: 22px; }
.block-head .muted { font-family: var(--hand); font-size: 19px; font-weight: 700; color: var(--blue); }
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.grid-2 .block:last-child { background-color: #fffbe6; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; gap: 0; } }

.trend svg { width: 100%; height: auto; overflow: visible; }
.trend .axis { font: 600 12px var(--body); fill: var(--ink-3); }
.trend .grid { stroke: #e7ebf5; stroke-width: 1.5; }
.trend .lineA { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.trend .areaA { fill: var(--blue-soft); }
.trend .dot { fill: var(--yellow); stroke: var(--ink); stroke-width: 2.5; }
.trend .last { font: 400 18px var(--marker); fill: var(--red); }

.objections { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.objections li { display: grid; gap: 6px; }
.objections .top { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.objections .top b { font-weight: 700; }
.objections .top span { font-family: var(--marker); }
.objections .bar { height: 12px; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.objections .bar i { display: block; height: 100%; background: var(--red); border-right: 2px solid var(--ink); }

.table-scroll { overflow-x: auto; position: relative; }
table.agents { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
.agents th { text-align: left; font-size: 13px; font-weight: 700; color: var(--ink-3); padding: 0 12px 10px; border-bottom: var(--stroke); }
.agents td { padding: 12px; border-bottom: 1.5px dashed #cfcab9; vertical-align: middle; }
.agents tr:last-child td { border-bottom: 0; }
.agents tr.sel td { background: var(--yellow-soft); }
.who { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--blue-soft); border: 2px solid var(--ink); flex: none; }
.agents tr:nth-child(3n+2) .av { background: var(--yellow); }
.agents tr:nth-child(3n) .av { background: var(--red-soft); }
.pill { display: inline-block; font-family: var(--marker); font-size: 15px; padding: 2px 12px; border-radius: 999px; border: 2px solid var(--ink); }
.pill.hi { background: var(--green-soft); }
.pill.mid { background: var(--yellow); }
.pill.lo { background: var(--red); color: #fff; }
.linkbtn { font: 700 14px var(--body); color: var(--blue); background: none; border: 0; cursor: pointer; padding: 6px 0; text-decoration: underline wavy 1.5px; text-underline-offset: 5px; }

.coach-plan { margin-top: 18px; border-top: var(--stroke); padding-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.coach-plan h3 { font-family: var(--marker); font-weight: 400; font-size: 19px; margin-bottom: 12px; }
.coach-plan ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-family: var(--hand); font-size: 21px; font-weight: 700; line-height: 1.2; }
.coach-plan > div:last-child { background: var(--yellow-soft); border: var(--stroke); padding: 18px; transform: rotate(1deg); box-shadow: 4px 4px 0 var(--ink); }
.skillbars { display: grid; gap: 10px; }
.skillbars div { display: grid; grid-template-columns: 110px 1fr 34px; gap: 10px; align-items: center; font-size: 14px; }
.skillbars span { height: 12px; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.skillbars span i { display: block; height: 100%; background: var(--green); }
.skillbars span i.warn { background: var(--yellow); }
.skillbars span i.bad { background: var(--red); }
@media (max-width: 720px) { .coach-plan { grid-template-columns: 1fr; } }

/* Call review */
.review { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .review { grid-template-columns: 1fr; } }
.call-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.call-list button { width: 100%; text-align: left; font: inherit; background: var(--white); border: var(--stroke); border-radius: var(--radius-m); padding: 14px 16px; cursor: pointer; display: grid; gap: 4px; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: transform 0.12s; }
.call-list button:hover { transform: translate(-1px, -1px); }
.call-list button[aria-current="true"] { background: var(--yellow); box-shadow: var(--pop); transform: rotate(-1deg); }
.call-list .r1 { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.call-list .r2 { font-size: 13.5px; color: var(--ink-2); }

.call-detail { display: grid; gap: 24px; }
.call-detail .block { margin: 0; }
.summary-grid { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.ring { position: relative; width: 116px; height: 116px; }
.ring svg { transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--marker); font-weight: 400; font-size: 36px; }
.summary-grid h2 { font-family: var(--marker); font-weight: 400; }
.summary-grid p { color: var(--ink-2); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.meta span { font-size: 13px; font-weight: 700; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; }
.meta span:last-child { background: var(--yellow); }
@media (max-width: 560px) { .summary-grid { grid-template-columns: 1fr; } }

.criteria { display: grid; gap: 12px; }
.crit { display: grid; grid-template-columns: 1fr 160px 40px; gap: 12px; align-items: center; font-size: 15px; }
.crit span { height: 12px; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.crit span i { display: block; height: 100%; }
.crit em { font-style: normal; font-family: var(--marker); text-align: right; }
@media (max-width: 520px) { .crit { grid-template-columns: 1fr 80px 34px; } }

.call-detail .block:last-child { background-color: #fffbe6; background-image: linear-gradient(transparent 39px, #c9d3f2 39px, #c9d3f2 40px); background-size: 100% 40px; }
.transcript { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.transcript li { display: grid; grid-template-columns: 52px 78px 1fr; gap: 10px; padding: 8px 0; font-size: 15.5px; }
.transcript .ts { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.transcript .sp { font-weight: 700; font-size: 13.5px; color: var(--ink-3); padding-top: 1px; }
.transcript li.a .sp { color: var(--blue); }
.note { display: block; margin-top: 6px; font-family: var(--hand); font-size: 20px; font-weight: 700; line-height: 1.2; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 2px 2px 0 var(--ink); }
.note.good { background: var(--green-soft); }
.note.coach { background: var(--yellow); }
.note.miss { background: var(--red-soft); color: #9c2a12; }
@media (max-width: 560px) { .transcript li { grid-template-columns: 1fr; gap: 2px; } .transcript .ts, .transcript .sp { display: inline; } }

/* Role-play */
.play { display: grid; grid-template-columns: 290px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .play { grid-template-columns: 1fr; } .personas { grid-template-columns: repeat(3, minmax(200px, 1fr)); overflow-x: auto; padding: 4px 6px 10px 2px; } }
.personas { display: grid; gap: 12px; }
.persona { text-align: left; font: inherit; color: var(--ink); background: var(--white); border: var(--stroke); border-radius: var(--radius-m); padding: 16px; cursor: pointer; display: grid; gap: 4px; box-shadow: 3px 3px 0 var(--ink); }
.persona b { font-family: var(--marker); font-weight: 400; font-size: 17px; }
.persona span { font-size: 14px; color: var(--ink-2); }
.persona .lvl { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.persona[aria-checked="true"] { background: var(--yellow); box-shadow: var(--pop); transform: rotate(-1deg); }

.chat-wrap { background: var(--white); border: var(--stroke); border-radius: var(--radius-m); box-shadow: var(--pop); display: flex; flex-direction: column; min-height: 540px; overflow: hidden; }
.chat { flex: 1; padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; max-height: 580px; background-color: #fff; background-image: linear-gradient(#eef1f8 1px, transparent 1px), linear-gradient(90deg, #eef1f8 1px, transparent 1px); background-size: 22px 22px; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 18px; font-size: 15.5px; line-height: 1.5; border: 2px solid var(--ink); }
.msg.cust { background: var(--white); border-bottom-left-radius: 4px; align-self: flex-start; box-shadow: 3px 3px 0 var(--ink); }
.msg.me { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; box-shadow: 3px 3px 0 var(--ink); }
.msg .from { display: block; font-size: 12.5px; font-weight: 700; color: var(--red); margin-bottom: 2px; }
.fb { align-self: flex-end; max-width: 86%; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.fb span { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 2px solid var(--ink); }
.fb .g { background: var(--green-soft); }
.fb .w { background: var(--yellow); }
.fb .b { background: var(--red); color: #fff; }
.sys { align-self: center; font-family: var(--hand); font-size: 20px; font-weight: 700; color: var(--blue); text-align: center; max-width: 34em; line-height: 1.2; }
.result { border: var(--stroke); border-radius: var(--radius-m); padding: 22px; background: var(--yellow); box-shadow: var(--pop); transform: rotate(-0.6deg); }
.result h3 { font-family: var(--marker); font-weight: 400; font-size: 26px; }
.result .big { font-family: var(--marker); font-size: 52px; color: var(--blue); line-height: 1; margin: 8px 0 12px; }
.result ul { margin: 8px 0 14px; padding-left: 20px; display: grid; gap: 6px; }
.composer { border-top: var(--stroke); padding: 14px; display: grid; gap: 10px; background: var(--white); }
.composer textarea { font: inherit; font-size: 16px; width: 100%; resize: vertical; min-height: 64px; border: 2px solid var(--ink); border-radius: var(--radius-s); padding: 12px 14px; background: #fff; color: var(--ink); }
.composer textarea:focus { outline: none; box-shadow: 3px 3px 0 var(--blue); border-color: var(--blue); }
.composer-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.typing { align-self: flex-start; font-family: var(--hand); font-size: 19px; font-weight: 700; color: var(--ink-3); }
