:root {
  --ink: #111516;
  --muted: #607071;
  --paper: #f5f7f5;
  --panel: #ffffff;
  --line: #d7dfdc;
  --teal: #0b7f7a;
  --teal-dark: #075d5a;
  --coral: #ef6657;
  --gold: #e0a72e;
  --charcoal: #1b2528;
  --shadow: 0 18px 45px rgba(13, 28, 30, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  padding: 0 clamp(20px, 5vw, 64px);
  color: #fff;
  background: rgba(17, 21, 22, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
  font-size: 0.94rem;
}

.top-nav a {
  color: rgba(255, 255, 255, 0.78);
}

.top-nav a:hover {
  color: #fff;
}

.header-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 750;
  letter-spacing: 0;
}

.header-action {
  color: var(--ink);
  background: #fff;
}

.hero {
  min-height: 86svh;
  display: flex;
  align-items: flex-end;
  padding: 128px clamp(20px, 5vw, 64px) 58px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(8, 14, 15, 0.9) 0%, rgba(8, 14, 15, 0.62) 40%, rgba(8, 14, 15, 0.24) 72%),
    linear-gradient(0deg, rgba(8, 14, 15, 0.58), rgba(8, 14, 15, 0.05) 42%),
    url("./assets/wordplay-hero.png") center / cover no-repeat;
}

.hero-inner {
  width: min(760px, 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--coral);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  font-size: 7.4rem;
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 670px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.22rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button-primary {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 13px 28px rgba(11, 127, 122, 0.32);
}

.button-primary:hover {
  background: var(--teal-dark);
}

.button:disabled,
.header-action:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.button-secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.12);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.button-quiet {
  color: var(--teal-dark);
  background: #e8f4f2;
  border: 1px solid #c3dfdc;
}

.button-symbol {
  font-size: 1rem;
  line-height: 1;
}

.hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
}

.hero-strip span {
  border-radius: 999px;
  padding: 9px 13px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.lab-section,
.persona-section,
.feedback-section,
.connect-section {
  padding: 78px clamp(20px, 5vw, 64px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 30px;
}

.section-heading.compact {
  max-width: 900px;
}

.section-heading h2,
.connect-copy h2 {
  margin: 0;
  color: var(--charcoal);
  font-size: 3.2rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.connect-copy p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.65;
}

.lab-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(320px, 1fr);
  gap: 22px;
  align-items: stretch;
}

.practice-panel,
.call-preview,
.report-panel,
.notes-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.practice-panel,
.call-preview {
  padding: clamp(20px, 3vw, 30px);
}

.field-group,
.mode-pane {
  display: grid;
  gap: 12px;
}

.field-group + .field-group,
.field-group + .mode-pane,
.mode-pane + .field-group,
.mode-pane + .button {
  margin-top: 20px;
}

label,
.practice-panel > .field-group > label {
  color: var(--charcoal);
  font-weight: 800;
  font-size: 0.92rem;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 48px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4f1;
}

.mode-button {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.mode-button.is-active {
  color: #fff;
  background: var(--teal);
}

.mode-pane {
  display: none;
}

.mode-pane.is-active {
  display: grid;
}

.dropzone {
  display: grid;
  gap: 8px;
  min-height: 138px;
  align-content: center;
  justify-items: center;
  padding: 18px;
  text-align: center;
  border: 1px dashed #9fb8b4;
  border-radius: 8px;
  background: #f4faf8;
}

.dropzone:hover {
  border-color: var(--teal);
}

.drop-title {
  color: var(--charcoal);
  font-size: 1.05rem;
  font-weight: 850;
}

.drop-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

textarea,
select,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

textarea {
  min-height: 130px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.5;
}

select,
input {
  min-height: 46px;
  padding: 0 12px;
}

.key-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.full-width {
  width: 100%;
}

.status-line {
  min-height: 40px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ready-pill {
  border-radius: 999px;
  padding: 6px 10px;
  color: #0b4b45;
  background: #dbf2e8;
  font-size: 0.82rem;
  font-weight: 800;
}

.call-preview h3 {
  margin: 6px 0 18px;
  color: var(--charcoal);
  font-size: 2rem;
  line-height: 1.1;
}

.brief-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.brief-list div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.brief-list dt {
  color: var(--muted);
  font-weight: 800;
}

.brief-list dd {
  margin: 0;
  color: var(--charcoal);
  line-height: 1.45;
}

.script-preview {
  min-height: 114px;
  margin-top: 24px;
  padding: 16px;
  color: #344246;
  line-height: 1.55;
  border-left: 4px solid var(--gold);
  background: #fff7e4;
  border-radius: 0 8px 8px 0;
}

.live-transcript {
  display: grid;
  gap: 10px;
  max-height: 220px;
  overflow: auto;
  margin-top: 16px;
  padding: 15px;
  color: #eaf5f2;
  line-height: 1.5;
  border-radius: 8px;
  background: var(--charcoal);
}

.live-transcript p {
  margin: 0;
}

.live-transcript strong {
  color: #fff;
}

.meter {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 9px;
  align-items: end;
  height: 94px;
  margin-top: 24px;
  padding-top: 8px;
}

.meter span {
  display: block;
  height: var(--height);
  min-height: 18px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--coral), var(--teal));
}

.persona-section {
  background: #172326;
  color: #fff;
}

.persona-section .section-heading h2 {
  color: #fff;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.persona-card {
  display: grid;
  gap: 12px;
  min-height: 210px;
  align-content: start;
  padding: 22px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.persona-card:hover,
.persona-card.is-selected {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.12);
}

.persona-card span {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.persona-card strong {
  font-size: 1.45rem;
  line-height: 1.12;
}

.persona-card small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
  line-height: 1.45;
}

.feedback-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(280px, 0.7fr);
  gap: 20px;
}

.report-panel,
.notes-panel {
  padding: clamp(20px, 3vw, 28px);
}

.report-topline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.report-topline div {
  display: grid;
  gap: 7px;
  min-height: 94px;
  align-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.report-topline span {
  color: var(--muted);
  font-weight: 800;
}

.report-topline strong {
  color: var(--charcoal);
  font-size: 1.65rem;
  line-height: 1;
}

.score-bars {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.score-bars div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
}

.score-bars span {
  color: var(--charcoal);
  font-weight: 800;
}

meter {
  width: 100%;
  height: 16px;
}

meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: #e9efec;
}

meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--coral));
}

.notes-panel {
  background: var(--charcoal);
  color: #fff;
}

.notes-panel h3 {
  margin: 0 0 16px;
  font-size: 1.6rem;
}

.notes-panel ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.connect-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: center;
  background: #e8f1ee;
}

.assistant-badge {
  display: grid;
  gap: 10px;
  padding: clamp(20px, 3vw, 26px);
  border: 1px solid #b9d1cc;
  border-radius: 8px;
  background: #fff;
}

.assistant-badge span {
  color: var(--muted);
  font-weight: 850;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.call-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(420px, calc(100vw - 32px));
  padding: 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(17, 21, 22, 0.94);
  box-shadow: 0 16px 40px rgba(17, 21, 22, 0.28);
  backdrop-filter: blur(14px);
}

.call-dock div {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.call-dock span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.call-dock strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-button {
  min-width: 112px;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: var(--coral);
  font-weight: 850;
}

.dock-button:hover {
  background: #d94c40;
}

.dock-button.is-live {
  background: #b3312a;
}

.dock-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.transcript-modal[hidden] {
  display: none;
}

.transcript-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 12, 14, 0.68);
}

.transcript-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(780px, 100%);
  max-height: min(760px, calc(100svh - 40px));
  padding: clamp(20px, 3vw, 28px);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(6, 12, 14, 0.38);
}

.transcript-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.transcript-header h2 {
  margin: 0;
  color: var(--charcoal);
  font-size: 2.3rem;
  line-height: 1.05;
}

.transcript-header p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--charcoal);
  background: #f6faf8;
  font-size: 1.2rem;
  font-weight: 850;
  line-height: 1;
}

.transcript-body {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding: 16px;
  color: #253235;
  line-height: 1.55;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.transcript-line {
  display: grid;
  gap: 4px;
  margin: 0;
}

.transcript-line strong {
  color: var(--teal-dark);
}

.transcript-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.assistant-badge code {
  overflow-wrap: anywhere;
  color: var(--charcoal);
  font-size: 1rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(20px, 5vw, 64px);
  color: rgba(255, 255, 255, 0.72);
  background: var(--ink);
}

.site-footer span:first-child {
  color: #fff;
  font-weight: 850;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 920px) {
  .top-nav {
    display: none;
  }

  .lab-layout,
  .feedback-layout,
  .connect-section {
    grid-template-columns: 1fr;
  }

  .persona-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 84svh;
    background-position: 60% center;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: 64px;
    padding-inline: 16px;
  }

  .header-action {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 0.9rem;
  }

  .hero {
    min-height: 82svh;
    padding: 104px 16px 42px;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .lab-section,
  .persona-section,
  .feedback-section,
  .connect-section {
    padding: 54px 16px;
  }

  .key-row,
  .brief-list div,
  .score-bars div,
  .report-topline {
    grid-template-columns: 1fr;
  }

  .persona-grid {
    grid-template-columns: 1fr;
  }

  .persona-card {
    min-height: 176px;
  }

  .call-dock {
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .call-dock strong {
    white-space: normal;
  }

  .dock-button {
    width: 100%;
  }

  .transcript-card {
    max-height: calc(100svh - 24px);
    padding: 18px;
  }

  .transcript-header h2 {
    font-size: 1.9rem;
  }
}
