/* Noted — demo styles. Deaf-therapist-first: big, high-contrast, minimal. */

:root {
  --bg:        #0a0a0f;
  --panel:    #12131a;
  --panel-2:  #1b1d25;
  --text:     #e6edf3;
  --muted:    #8b949e;
  --accent:   #1f6feb;
  --danger:   #d9534f;
  --warn:     #d29922;
  --therapist:#1f6feb;
  --client:   #d29922;
  --border:   #23252e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
a { color: var(--accent); }
u { text-decoration-color: var(--warn); }

/* DEMO banner */
#demo-banner {
  background: #3a2a05;
  border-bottom: 2px solid var(--warn);
  color: #fff3d6;
  padding: 10px 18px;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}
#demo-banner strong { color: var(--warn); letter-spacing: .5px; }
#demo-banner a { color: #fff3d6; text-decoration: underline; margin-left: 6px; }

#app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px clamp(12px, 3vw, 32px) 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff14;
  padding-bottom: 10px;
}
header h1 { margin: 0; font-size: 28px; letter-spacing: .5px; }
.tag { color: var(--muted); font-size: 13px; }
header nav { display: flex; gap: 14px; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav-link:hover { color: var(--text); }

.card {
  background: var(--panel);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.card-head h2 { margin: 0; font-size: 18px; }
button.collapse {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
}

/* First-time card */
#first-time ol { margin: 6px 0 0 20px; padding: 0; line-height: 1.6; }
#first-time code { background: var(--panel-2); padding: 1px 6px; border-radius: 4px; }

/* Controls */
#controls .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
#controls .row + .row { margin-top: 14px; }
#controls .row.buttons { align-items: center; }
#controls label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); flex: 1 1 180px; min-width: 150px; }
.lbl { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
#controls input, #controls select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 11px;
  font-size: 15px;
  min-width: 130px;
}
#controls input:focus, #controls select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  background: #2a2d36;
  color: var(--text);
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--accent); }
button.danger  { background: var(--danger); }

/* Help ? button */
button.info {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  cursor: pointer;
  flex: 0 0 auto;
}
button.info:hover { color: var(--text); border-color: var(--text); }
button.info.big { width: 34px; height: 34px; font-size: 18px; align-self: center; margin-left: auto; }

.muted { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* Captions */
#caption-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
}
.cap {
  background: rgba(0,0,0,.82);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: clamp(22px, 3.4vw, 36px);
  line-height: 1.28;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
}
.cap .spk {
  display: inline-block;
  margin-right: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.62em;
  vertical-align: middle;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.cap.therapist .spk { background: var(--therapist); color: #fff; }
.cap.client    .spk { background: var(--client);    color: #000; }
.cap.partial { opacity: .7; font-style: italic; }

/* Note */
#note pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  background: #0c0d13;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-family: "Consolas", "SF Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
  color: #dbe1e8;
}
#copy-note { margin-top: 8px; }

footer {
  display: flex; justify-content: space-between;
  color: var(--muted); font-size: 12px; padding-top: 16px;
  border-top: 1px solid #ffffff14;
}
footer a { color: var(--muted); }

/* Help modal */
#help-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
/* HTML `hidden` attr = display:none, but our `display:flex` above
   would win on specificity. Explicit override so JS `modal.hidden=true`
   actually closes it. */
#help-modal[hidden] { display: none; }
.modal-inner {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  max-height: 82vh;
  overflow: auto;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 17px; }
#help-close {
  background: transparent; border: none; color: var(--muted);
  font-size: 26px; cursor: pointer; line-height: 1; padding: 0 4px;
}
#help-body { padding: 14px 18px; line-height: 1.55; font-size: 15px; }
#help-body p { margin: 0 0 10px; }

@media (max-width: 480px) {
  header h1 { font-size: 22px; }
  .tag { display: none; }
  #controls label { flex-basis: 100%; }
}
