/* ─────────────────────────────────────────────────────────────
   Cue — conversation / multimodal concept page
   ───────────────────────────────────────────────────────────── */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.chero__cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.chero__note { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); max-width: 44ch; line-height: 1.6; }
.lede--wide { max-width: 40ch; margin-bottom: clamp(32px, 5vh, 56px); }

/* chips used in dialogs + lede */
.chip {
  display: inline-block; vertical-align: middle;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px; margin-right: 6px; line-height: 1.2;
}
.chip--voice { background: var(--cobalt); color: var(--paper); }
.chip--screen { background: var(--fg); color: var(--bg); }
.chip--earcon { border: 1px solid var(--line); color: var(--muted); }

/* ── Problems ── */
.problems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.problem { border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; background: var(--soft); }
.problem__num { font-family: var(--font-display); font-variation-settings: "wdth" 66, "wght" 900; font-size: 48px; line-height: .8; color: var(--cobalt); }
.problem h3 { font-family: var(--font-display); font-variation-settings: "wdth" 76, "wght" 800; text-transform: uppercase; letter-spacing: -.02em; font-size: 22px; }
.problem p { font-size: 15px; line-height: 1.45; }

/* ── Rules ── */
.rules { border-top: 1px solid var(--line); }
.rule { display: grid; grid-template-columns: 72px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.rule__num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--cobalt); padding-top: .4em; }
.rule h3 { font-family: var(--font-display); font-variation-settings: "wdth" 78, "wght" 800; font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -.02em; line-height: 1.05; margin-bottom: 10px; }
.rule p { font-size: clamp(16px, 1.2vw, 18px); line-height: 1.5; max-width: 62ch; }

/* ── Voice table ── */
.voice-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.voice-table th { text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.voice-table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.4; }
.voice-table td:nth-child(2) { font-family: var(--font-serif); font-style: italic; font-size: 18px; }
.voice-table td:nth-child(3) { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(220, 38, 38, .5); }

/* ── Dialogs ── */
.dialogs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dialog { border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 2.4vw, 32px); display: flex; flex-direction: column; gap: 14px; background: var(--paper); color: var(--ink); }
.dialog__head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.dialog__head h3 { font-family: var(--font-display); font-variation-settings: "wdth" 76, "wght" 800; text-transform: uppercase; letter-spacing: -.02em; font-size: 24px; line-height: 1; }
.turn { display: grid; grid-template-columns: 52px 1fr; gap: 6px 12px; align-items: start; }
.turn > *:not(.turn__who) { grid-column: 2; }
.turn__who { grid-row: 1; }
.turn__who { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 10px; }
.turn p { padding: 10px 14px; border-radius: 14px; font-size: 16px; line-height: 1.45; }
.turn--user p { background: var(--ink); color: var(--paper); border-bottom-left-radius: 4px; width: fit-content; }
.turn--cue p { background: rgba(16, 16, 18, .06); border-bottom-left-radius: 4px; }
.turn__alt { margin-top: 6px; font-size: 14px !important; color: var(--muted); background: transparent !important; border: 1px dashed var(--line); }
.turn__muffled { font-style: italic; opacity: .6; }
.turn__conf { grid-column: 2; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); margin-top: -4px; padding-left: 4px; }
.turn__note { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }
.dialog__why { font-size: 14px; line-height: 1.5; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }

/* ── Spec tables ── */
.spec-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.spec { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 14px; }
.spec th, .spec td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; line-height: 1.45; }
.spec thead th { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--soft); }
.spec tbody th { font-family: var(--font-display); font-variation-settings: "wdth" 80, "wght" 700; font-size: 15px; white-space: nowrap; }
.spec tr:last-child td, .spec tr:last-child th { border-bottom: 0; }
.spec td:first-of-type { }
.spec--repair { min-width: 760px; }

/* ── Flow diagram ── */
.flow { margin: 0; border: 1px solid var(--line); border-radius: 20px; padding: clamp(16px, 3vw, 40px); overflow-x: auto; }
.flow__svg { width: 100%; min-width: 760px; height: auto; color: var(--fg); }
.flow__nodes rect, .flow__nodes path { fill: var(--bg); stroke: var(--fg); stroke-width: 1.5; }
.flow__nodes text { fill: var(--fg); }
.flow__nodes .flow__ok { stroke: var(--cobalt); }
.flow__nodes .flow__warn { stroke-dasharray: 4 3; }
.flow__sub { font-size: 10px; opacity: .6; }
.flow figcaption { margin-top: 16px; }

/* ── Simulator ── */
.sim { border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--ink); color: var(--paper); }
.sim__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid rgba(241, 237, 228, .14); }
.seg { display: inline-flex; border: 1px solid rgba(241, 237, 228, .25); border-radius: 999px; padding: 4px; }
.seg__btn { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 10px 16px; border-radius: 999px; min-height: 40px; color: var(--paper); }
.seg__btn.is-on { background: var(--paper); color: var(--ink); }
.sim__opts { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; min-height: 44px; }
.switch input { width: 18px; height: 18px; accent-color: var(--cobalt); }
.sim__reset { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(241, 237, 228, .7); padding: 10px 0; min-height: 44px; }
.sim__reset:hover { color: var(--paper); }

.sim__body { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 560px; }
.sim__chat { display: flex; flex-direction: column; border-right: 1px solid rgba(241, 237, 228, .14); }
.sim__log { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 420px; min-height: 260px; }
.msg { display: flex; flex-direction: column; gap: 4px; max-width: 85%; }
.msg--user { align-self: flex-end; align-items: flex-end; }
.msg__who { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(241, 237, 228, .55); }
.msg__bubble { padding: 10px 14px; border-radius: 14px; font-size: 16px; line-height: 1.4; }
.msg--user .msg__bubble { background: var(--paper); color: var(--ink); border-bottom-right-radius: 4px; }
.msg--cue .msg__bubble { background: rgba(241, 237, 228, .1); border-bottom-left-radius: 4px; }
.msg--cue .msg__bubble.is-earcon { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(241, 237, 228, .7); background: transparent; border: 1px dashed rgba(241, 237, 228, .3); }
.msg__meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: rgba(241, 237, 228, .45); }
.msg__typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.msg__typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--paper); opacity: .5; animation: blink 1s infinite; }
.msg__typing i:nth-child(2) { animation-delay: .15s; } .msg__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.sim__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-top: 1px solid rgba(241, 237, 228, .14); }
.chip-btn { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; padding: 10px 12px; border-radius: 999px; border: 1px solid rgba(241, 237, 228, .3); color: var(--paper); min-height: 40px; transition: background-color .2s, color .2s; }
.chip-btn:hover { background: var(--paper); color: var(--ink); }
.chip-btn small { opacity: .6; font-size: 11px; }
.chip-btn--ghost { border-style: dashed; color: rgba(241, 237, 228, .6); }

.sim__form { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 12px 20px 20px; }
.sim__form input { min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(241, 237, 228, .3); background: rgba(241, 237, 228, .06); color: var(--paper); font: inherit; font-size: 16px; }
.sim__form input::placeholder { color: rgba(241, 237, 228, .45); }
.sim__form input:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.sim__mic, .sim__send { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; }
.sim__send { background: var(--cobalt); color: var(--paper); }
.sim__mic { border: 1px solid rgba(241, 237, 228, .3); color: var(--paper); }
.sim__mic.is-listening { background: #dc2626; border-color: #dc2626; animation: pulse-red 1.2s infinite; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .5); } 100% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); } }
.sim__mic svg, .sim__send svg { width: 20px; height: 20px; }

.sim__device { display: flex; flex-direction: column; gap: 16px; padding: 20px; background: rgba(241, 237, 228, .03); }
.device { flex: 1; display: grid; place-items: center; min-height: 300px; }

/* speaker */
.speaker { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.speaker__ring {
  width: 160px; height: 160px; border-radius: 50%;
  border: 2px solid rgba(241, 237, 228, .25);
  position: relative; transition: border-color .4s, box-shadow .4s;
}
.speaker__ring::before { content: ""; position: absolute; inset: 22px; border-radius: 50%; background: radial-gradient(circle, rgba(35, 56, 255, .0) 40%, rgba(35, 56, 255, 0) 70%); transition: background .4s; }
.speaker__ring.is-listening { border-color: var(--cobalt); box-shadow: 0 0 0 10px rgba(35, 56, 255, .15); animation: ring 1.4s ease-in-out infinite; }
.speaker__ring.is-speaking { border-color: var(--paper); box-shadow: 0 0 40px -10px rgba(241, 237, 228, .5); }
.speaker__ring.is-speaking::before { background: radial-gradient(circle, rgba(35, 56, 255, .55) 30%, rgba(35, 56, 255, 0) 70%); }
.speaker__ring.is-playing::before { background: radial-gradient(circle, rgba(35, 56, 255, .35) 30%, rgba(35, 56, 255, 0) 70%); animation: breathe 3s ease-in-out infinite; }
@keyframes ring { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes breathe { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
.speaker__caption { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(241, 237, 228, .7); text-align: center; max-width: 30ch; line-height: 1.6; }

/* display */
.display { width: min(100%, 420px); aspect-ratio: 16 / 10; border-radius: 18px; background: #0a0a0c; border: 1px solid rgba(241, 237, 228, .18); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.display__bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: rgba(241, 237, 228, .6); }
.display__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(241, 237, 228, .25); transition: background .3s, box-shadow .3s; }
.display__dot.is-listening { background: var(--cobalt); box-shadow: 0 0 0 4px rgba(35, 56, 255, .25); }
.display__screen { flex: 1; padding: 12px 16px 16px; display: flex; flex-direction: column; }
.card-np { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; flex: 1; }
.art { width: 96px; height: 96px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-variation-settings: "wdth" 66, "wght" 900; font-size: 30px; color: var(--paper); text-transform: uppercase; }
.card-np__title { font-family: var(--font-display); font-variation-settings: "wdth" 80, "wght" 800; font-size: 20px; letter-spacing: -.01em; line-height: 1.1; }
.card-np__sub { font-size: 13px; color: rgba(241, 237, 228, .65); margin-top: 4px; }
.card-np__reason { font-size: 12px; color: rgba(241, 237, 228, .5); margin-top: 8px; font-style: italic; }
.card-np__bar { grid-column: 1 / -1; height: 3px; background: rgba(241, 237, 228, .15); border-radius: 2px; overflow: hidden; }
.card-np__bar i { display: block; height: 100%; width: 35%; background: var(--cobalt); }
.card-np__ctrls { grid-column: 1 / -1; display: flex; gap: 18px; justify-content: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(241, 237, 228, .6); }
.card-q { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.card-q__title { font-family: var(--font-display); font-variation-settings: "wdth" 80, "wght" 800; font-size: 18px; }
.card-q__opts { display: grid; gap: 8px; }
.card-q__opt { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; border: 1px solid rgba(241, 237, 228, .2); color: var(--paper); text-align: left; min-height: 48px; }
.card-q__opt:hover { background: rgba(241, 237, 228, .08); }
.card-q__opt .art { width: 40px; height: 40px; border-radius: 8px; font-size: 14px; }
.card-q__opt small { display: block; color: rgba(241, 237, 228, .55); font-size: 11px; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.card-q__opt b { font-size: 14px; font-weight: 600; }
.card-help { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.card-help p { font-size: 15px; }
.card-help__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.card-help__chips span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(241, 237, 228, .25); }
.card-idle { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center; }
.card-idle b { font-family: var(--font-display); font-variation-settings: "wdth" 66, "wght" 900; font-size: 44px; line-height: 1; }
.card-idle span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(241, 237, 228, .5); }
.toast { margin-top: auto; font-size: 12px; padding: 8px 12px; border-radius: 8px; background: rgba(241, 237, 228, .12); display: flex; justify-content: space-between; align-items: center; }
.toast b { font-weight: 600; text-decoration: underline; }

.sim__trace { border-top: 1px solid rgba(241, 237, 228, .14); padding-top: 12px; }
.sim__trace pre { margin: 6px 0 0; font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: rgba(241, 237, 228, .8); white-space: pre-wrap; }
.sim__trace[hidden] { display: none; }
.sim__notes { margin-top: clamp(40px, 6vh, 72px); margin-bottom: 0; }

/* ── Edges ── */
.edges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.edges li { border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.edges h3 { font-family: var(--font-display); font-variation-settings: "wdth" 78, "wght" 800; font-size: 20px; letter-spacing: -.01em; margin-bottom: 10px; }
.edges p { font-size: 15px; line-height: 1.5; }

/* ── Metrics ── */
.metrics { border-top: 1px solid var(--line); }
.metrics > div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.metrics dt { font-family: var(--font-display); font-variation-settings: "wdth" 80, "wght" 700; }

/* ── Responsive ── */
@media (max-width: 1100px) { .problems { grid-template-columns: 1fr 1fr; } .edges { grid-template-columns: 1fr 1fr; } }
@media (max-width: 960px) {
  .dialogs { grid-template-columns: 1fr; }
  .sim__body { grid-template-columns: 1fr; }
  .sim__chat { border-right: 0; border-bottom: 1px solid rgba(241, 237, 228, .14); }
  .sim__log { max-height: 360px; }
}
@media (max-width: 640px) {
  .problems, .edges { grid-template-columns: 1fr; }
  .rule { grid-template-columns: 1fr; gap: 8px; }
  .metrics > div { grid-template-columns: 1fr; gap: 4px; }
  .voice-table td:nth-child(3) { display: none; } .voice-table th:nth-child(3) { display: none; }
  .turn { grid-template-columns: 1fr; gap: 4px; }
  .turn__who { padding-top: 0; }
  .sim__bar { padding: 12px 16px; }
  .sim__log, .sim__chips, .sim__form { padding-left: 16px; padding-right: 16px; }
  .sim__device { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .speaker__ring, .speaker__ring::before, .msg__typing i, .sim__mic { animation: none !important; }
}
