/* YouthVoice conversation. Each version sets the --yvc-* tokens on the mount element. */
.yvc {
  --yvc-surface: #fff; --yvc-ink: #111827; --yvc-muted: rgba(17, 24, 39, .64); --yvc-line: rgba(17, 24, 39, .14);
  --yvc-accent: #35D6A0; --yvc-accent-ink: #111827; --yvc-soft: #E6FBF3; --yvc-soft-ink: #0B7A55;
  --yvc-me: #35D6A0; --yvc-me-ink: #111827; --yvc-ai: #111827; --yvc-ai-ink: #fff;
  --yvc-hl: #35D6A0; --yvc-hl-ink: #111827; --yvc-display: "Barlow Condensed", system-ui, sans-serif; --yvc-body: "Barlow", system-ui, sans-serif; --yvc-radius: 22px;
  background: var(--yvc-surface); color: var(--yvc-ink); font-family: var(--yvc-body); border-radius: calc(var(--yvc-radius) + 10px); padding: 30px; display: grid; gap: 0;
}
.yvc button { font-family: var(--yvc-body); }
.yvc-kicker { margin: 0; font-weight: 800; font-size: .95rem; color: var(--yvc-accent); }
.yvc-kicker span { color: var(--yvc-muted); font-weight: 700; }
.yvc-q { font-family: var(--yvc-display); font-style: italic; font-weight: 900; font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1; margin: 8px 0 0; letter-spacing: -0.01em; }
.yvc-q span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .yvc-q.intro span { animation: yvc-qin .55s cubic-bezier(.2, 1.2, .4, 1) both; animation-delay: calc(var(--i) * 70ms + 200ms); }
  @keyframes yvc-qin { 0% { opacity: 0; transform: translateY(12px); } 55% { opacity: 1; background: var(--yvc-accent); } 100% { transform: none; background: transparent; } }
}
.yvc-q.speaking span { opacity: .3; transition: opacity .1s, color .1s; }
.yvc-q.speaking span.on { opacity: 1; color: var(--yvc-ink); text-decoration: underline var(--yvc-accent) 4px; text-underline-offset: 4px; }
.yvc-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 14px; }
.yvc-hear { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: .95rem; background: var(--yvc-soft); color: var(--yvc-soft-ink); border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer; }
.yvc-bars { display: inline-flex; gap: 3px; align-items: center; height: 18px; }
.yvc-bars i { width: 3px; height: 6px; border-radius: 2px; background: currentColor; }
.yvc-bars i:nth-child(odd) { height: 10px; }
@media (prefers-reduced-motion: no-preference) {
  .yvc-hear.on .yvc-bars i { animation: yvc-hb .7s ease-in-out infinite; }
  .yvc-hear.on .yvc-bars i:nth-child(2) { animation-delay: .1s; } .yvc-hear.on .yvc-bars i:nth-child(3) { animation-delay: .2s; } .yvc-hear.on .yvc-bars i:nth-child(4) { animation-delay: .3s; } .yvc-hear.on .yvc-bars i:nth-child(5) { animation-delay: .4s; }
  @keyframes yvc-hb { 50% { height: 18px; } }
  .yvc-hear.nudge { animation: yvc-nudge 1.6s ease-in-out 1.4s 2; } @keyframes yvc-nudge { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--yvc-soft-ink) 16%, transparent); } }
}
.yvc-voice { font-weight: 700; font-size: .92rem; display: inline-flex; gap: 8px; align-items: center; }
.yvc-voice select { font: inherit; max-width: 150px; border: 2px solid var(--yvc-line); border-radius: 999px; padding: 4px 10px; color: var(--yvc-ink); background: var(--yvc-surface); }
.yvc-voices { font-weight: 700; font-size: .92rem; color: var(--yvc-soft-ink); }

.yvc-thread { display: grid; gap: 10px; margin-top: 18px; }
.yvc-thread:empty { display: none; }
.yvc-b { max-width: 90%; padding: 12px 16px; border-radius: var(--yvc-radius); line-height: 1.45; }
.yvc-me { justify-self: end; width: min(100%, 470px); background: var(--yvc-me); color: var(--yvc-me-ink); border-bottom-right-radius: 6px;
  --yv-accent: var(--yvc-me-ink); --yv-accent-ink: var(--yvc-me); --yv-wave-dim: color-mix(in srgb, var(--yvc-me-ink) 24%, transparent); --yv-ink: var(--yvc-me-ink); --yv-highlight: var(--yvc-me-ink); --yv-highlight-ink: var(--yvc-me); --yv-wave-chip: color-mix(in srgb, var(--yvc-me-ink) 10%, transparent); }
.yvc-me-text { margin: 0; }
.yvc-me small { display: block; margin-top: 6px; opacity: .75; }
.yvc-ai { justify-self: start; background: var(--yvc-ai); color: var(--yvc-ai-ink); border-bottom-left-radius: 6px; font-family: var(--yvc-display); font-weight: 700; font-size: 1.15rem; line-height: 1.25; }
.yvc-who-name { display: block; font-family: var(--yvc-body); font-weight: 800; font-size: .78rem; opacity: .75; margin-bottom: 2px; }
.yvc-ai .line span { opacity: .4; transition: opacity .12s; } .yvc-ai .line span.on { opacity: 1; }
.yvc-replay { display: inline-flex; margin-left: 8px; vertical-align: middle; width: 28px; height: 28px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--yvc-ai-ink) 18%, transparent); color: var(--yvc-ai-ink); cursor: pointer; align-items: center; justify-content: center; }
.yvc-replay svg { width: 13px; height: 13px; }
.yvc-to-help { display: block; margin-top: 8px; color: var(--yvc-hl); font-family: var(--yvc-body); font-weight: 800; font-size: .92rem; }
.yvc-think { justify-self: start; background: var(--yvc-soft); color: var(--yvc-soft-ink); font-weight: 800; }
@media (prefers-reduced-motion: no-preference) { .yvc-think { animation: yvc-think 1s ease-in-out infinite; } @keyframes yvc-think { 50% { opacity: .45; } } }

/* In-line feedback */
.yvc-insight { justify-self: end; width: min(100%, 470px); display: grid; gap: 8px; margin-top: -2px; }
@media (prefers-reduced-motion: no-preference) { .yvc-insight { animation: yvc-rise .45s cubic-bezier(.2, 1, .3, 1) both; } @keyframes yvc-rise { from { opacity: 0; transform: translateY(8px); } } }
.yvc-strengths { display: grid; gap: 6px; }
.yvc-strength { background: var(--yvc-surface); border: 2px solid var(--yvc-me); border-radius: 16px; padding: 9px 12px; display: grid; gap: 2px; }
.yvc-strength b { font-family: var(--yvc-display); font-style: italic; font-weight: 800; font-size: 1.1rem; }
.yvc-strength q { font-size: .92rem; color: var(--yvc-muted); }
.yvc-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.yvc-facts span { font-size: .85rem; background: var(--yvc-soft); color: var(--yvc-ink); border-radius: 999px; padding: 5px 11px; }
.yvc-facts em { font-style: normal; font-weight: 800; background: var(--yvc-hl); color: var(--yvc-hl-ink); border-radius: 6px; padding: 0 5px; margin-left: 3px; }

/* Contribution */
.yvc-contrib { margin-top: 16px; border: 2px dashed var(--yvc-line); border-radius: var(--yvc-radius); padding: 16px 18px; display: grid; gap: 10px; }
.yvc-c-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.yvc-c-head b { font-family: var(--yvc-display); font-style: italic; font-weight: 800; font-size: 1.2rem; }
.yvc-c-head span { font-size: .88rem; color: var(--yvc-muted); font-weight: 700; }
.yvc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.yvc-steps li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: center; font-size: .95rem; color: var(--yvc-muted); }
.yvc-steps li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--yvc-line); }
.yvc-steps li.done { color: var(--yvc-ink); font-weight: 700; }
.yvc-steps li.done::before { background: var(--yvc-accent); border-color: var(--yvc-accent); }
.yvc-c-st { margin: 0; font-size: .92rem; }

/* Mic + typing */
.yvc-mic-row { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.yvc-mic { --lvl: 0; width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--yvc-accent); color: var(--yvc-accent-ink); cursor: pointer; flex: none; display: grid; place-items: center; box-shadow: 0 0 0 calc(var(--lvl) * 30px) color-mix(in srgb, var(--yvc-accent) 25%, transparent); transition: box-shadow .08s linear; }
.yvc-mic svg { width: 38px; height: 38px; }
.yvc-mic[aria-pressed="true"] { background: var(--yvc-ink); color: var(--yvc-surface); }
.yvc-mic:disabled { opacity: .5; cursor: wait; }
.yvc-mic-label b { font-family: var(--yvc-display); font-style: italic; font-weight: 800; font-size: 1.3rem; display: block; }
.yvc-mic-label span { font-size: .95rem; color: var(--yvc-muted); }
.yvc-wave { display: none; width: 100%; height: 56px; margin-top: 14px; --yv-accent: var(--yvc-accent); }
.yvc-wave.on { display: block; }
.yvc-live { margin: 12px 0 0; min-height: 1.5em; font-family: var(--yvc-display); font-size: 1.1rem; line-height: 1.4; }
.yvc-type-link { justify-self: start; margin-top: 10px; background: none; border: 0; padding: 0; color: var(--yvc-soft-ink); text-decoration: underline; cursor: pointer; font-weight: 800; font-size: 1rem; }
.yvc-typed { display: none; margin-top: 12px; gap: 10px; }
.yvc-typed.show { display: grid; }
.yvc-typed label { display: grid; gap: 8px; }
.yvc-typed textarea { font: inherit; border: 2px solid var(--yvc-line); border-radius: 18px; padding: 14px; min-height: 100px; color: var(--yvc-ink); background: var(--yvc-surface); }
.yvc-typed textarea:focus { outline: none; border-color: var(--yvc-ink); }
.yvc-send { justify-self: start; font-weight: 800; border: 0; border-radius: 999px; padding: 12px 22px; background: var(--yvc-accent); color: var(--yvc-accent-ink); cursor: pointer; }
.yvc-who { border: 0; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.yvc-who legend { font-size: .92rem; color: var(--yvc-muted); margin-bottom: 8px; padding: 0; }
.yvc-who input { position: absolute; opacity: 0; }
.yvc-who label { border: 2px solid var(--yvc-line); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .92rem; cursor: pointer; }
.yvc-who input:checked + label { background: var(--yvc-ink); border-color: var(--yvc-ink); color: var(--yvc-surface); }
.yvc-who input:focus-visible + label { outline: 3px solid var(--yvc-accent); outline-offset: 2px; }
.yvc-fine { margin: 16px 0 0; font-size: .85rem; color: var(--yvc-muted); }
.yvc-fine a { color: inherit; font-weight: 800; }
@media (max-width: 520px) { .yvc { padding: 20px; } .yvc-mic { width: 80px; height: 80px; } .yvc-b { max-width: 100%; } }

/* Map pop-up */
.yvc-map { max-width: min(1040px, calc(100vw - 24px)); }
.yvc-map-in { display: grid; grid-template-columns: 330px 1fr; min-height: min(620px, calc(100dvh - 40px)); position: relative; }
.yvc-map-side { padding: 30px; display: grid; gap: 14px; align-content: start; }
.yvc-map-side h2 { padding-right: 0; }
.yvc-map-lede b { background: #35D6A0; color: #111827; border-radius: 6px; padding: 0 5px; }
.yvc-map-where p { font-weight: 700; margin-bottom: 8px; }
.yvc-map-row { display: flex; flex-wrap: wrap; gap: 8px; }
.yvc-zipf { display: flex; gap: 6px; }
.yvc-zipf input { width: 90px; font: inherit; border: 2px solid rgba(0,0,0,.15); border-radius: 999px; padding: 9px 14px; }
.yvc-census { display: grid; gap: 4px; }
.yvc-census-n { font-size: 1.15rem; }
.yvc-census-n b { font-size: 1.5rem; }
.yvc-src { font-size: .8rem; opacity: .7; }
.yvc-keep { justify-self: start; }
.yvc-map-map { min-height: 360px; border-radius: 0 var(--yv-radius, 20px) var(--yv-radius, 20px) 0; overflow: hidden; }
.yvc-map .yv-close { background: #fff; color: #111; }
.yvc-you { width: 24px; height: 24px; border-radius: 50%; background: #111827; border: 4px solid #35D6A0; box-shadow: 0 0 0 3px #111827; }
.yvc-map .leaflet-tile-pane { filter: saturate(.4) brightness(1.06); }
@media (max-width: 760px) { .yvc-map-in { grid-template-columns: 1fr; } .yvc-map-map { min-height: 300px; border-radius: 0; } }

/* Resources flash, used by any version's help box */
@media (prefers-reduced-motion: no-preference) { .yv-flash { animation: yv-flash 1s ease-in-out 3; } @keyframes yv-flash { 50% { box-shadow: 0 0 0 8px var(--yv-flash, #35D6A0); } } }

/* Read or listen + choose your peer */
.yvc-mode { display: inline-flex; background: var(--yvc-soft); border-radius: 999px; padding: 4px; }
.yvc-mode button { border: 0; background: transparent; color: var(--yvc-ink); font-weight: 800; font-size: .92rem; padding: 7px 16px; border-radius: 999px; cursor: pointer; }
.yvc-mode button[aria-pressed="true"] { background: var(--yvc-ink); color: var(--yvc-surface); }
.yvc-peers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.yvc-peer { text-align: left; border: 2px solid var(--yvc-line); background: var(--yvc-surface); color: var(--yvc-ink); border-radius: 16px; padding: 10px 12px; cursor: pointer; display: grid; grid-template-columns: 32px 1fr; column-gap: 9px; align-items: center; }
.yvc-peer:hover { border-color: var(--yvc-ink); }
.yvc-peer[aria-checked="true"] { border-color: var(--yvc-ink); background: var(--yvc-soft); box-shadow: inset 0 0 0 1px var(--yvc-ink); }
.yvc-av { grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; background: var(--yvc-ink); color: var(--yvc-accent); display: grid; place-items: center; font-family: var(--yvc-display); font-style: italic; font-weight: 900; font-size: 1.2rem; }
.yvc-peer[aria-checked="true"] .yvc-av { background: var(--yvc-accent); color: var(--yvc-ink); }
.yvc-peer b { font-family: var(--yvc-display); font-style: italic; font-weight: 800; font-size: 1.1rem; line-height: 1; }
.yvc-peer small { font-size: .78rem; color: var(--yvc-muted); line-height: 1.2; }
.yvc-hi { margin: 8px 0 0; min-height: 1.4em; font-weight: 700; font-size: .98rem; }
.yvc-hi span { opacity: .3; transition: opacity .12s; } .yvc-hi span.on { opacity: 1; }
.yvc.reading .yvc-bars { display: none; }
@media (max-width: 400px) { .yvc-peers { grid-template-columns: 1fr 1fr; } }

/* Type first: read and type only, until they ask to listen and talk */
.yvc.typefirst .yvc-tools, .yvc.typefirst .yvc-peers, .yvc.typefirst .yvc-hi, .yvc.typefirst .yvc-mic-row, .yvc.typefirst .yvc-wave, .yvc.typefirst .yvc-type-link, .yvc.typefirst .yvc-live { display: none; }
.yvc-typed.show { display: grid; }
.yvc-coach { position: relative; margin-top: 12px; background: #111827; color: #fff; border-radius: 18px; padding: 16px 44px 16px 16px; display: grid; gap: 6px; justify-items: start; box-shadow: 0 16px 32px -18px rgba(17,24,39,.7); animation: yvc-coach-in .28s ease-out; }
.yvc-coach[hidden] { display: none; }
.yvc-coach b { font: italic 900 1.35rem/1 var(--yvc-display, "Barlow Condensed", sans-serif); }
.yvc-coach span { color: #D1D5DB; font-size: .95rem; }
.yvc-coach-go { margin-top: 6px; font: 800 .95rem "Barlow", system-ui, sans-serif; border: 0; border-radius: 999px; padding: 9px 16px; background: #E6FBF3; color: #111827; cursor: pointer; }
.yvc-coach-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.2rem; cursor: pointer; }
@keyframes yvc-coach-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .yvc-coach { animation: none; } }
