:root {
  --ink: #10243f;
  --ink-2: #203b5c;
  --paper: #f7fafc;
  --white: #ffffff;
  --line: #d9e3ec;
  --muted: #61758a;
  --teal: #18a999;
  --teal-dark: #087f76;
  --teal-pale: #dff8f3;
  --gold: #f4c95d;
  --red: #e85757;
  --blue: #2e6fd8;
  --shadow: 0 18px 50px rgba(16, 36, 63, .09);
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.5 "DM Sans", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(46, 111, 216, .35);
  outline-offset: 2px;
}

.topbar {
  min-height: 76px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  background: var(--ink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #d3d3d3;
  transform: rotate(-3deg);
  overflow: hidden;
}

.brand-mark img {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font: 800 18px/1.15 Manrope, sans-serif;
}

.brand small {
  margin-top: 3px;
  color: #b9c9d8;
  font-size: 12px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.status-pill {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 14px;
  color: #dce7ef;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5de0cf;
  box-shadow: 0 0 0 4px rgba(93,224,207,.14);
}

main {
  overflow: hidden;
}

.workspace {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.lead-row {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.intro-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 4px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal-dark);
  letter-spacing: .13em;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Manrope, sans-serif;
  line-height: 1.13;
}

h1 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -.035em;
}

h2 {
  font-size: clamp(22px, 2.7vw, 30px);
  letter-spacing: -.025em;
}

.intro-copy {
  max-width: 440px;
  margin: 14px 0 0;
  color: var(--muted);
}

.card {
  min-width: 0;
  background: var(--white);
  border: 1px solid rgba(16,36,63,.09);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.flow-card {
  overflow: hidden;
  padding: 0;
}

.flow-heading {
  min-height: 78px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.flow-heading h2 {
  font-size: 18px;
}

.flow-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sequence {
  min-width: 0;
  padding: 19px 20px 21px;
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sequence span {
  min-width: 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: #eef4f8;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.sequence b {
  color: var(--teal-dark);
}

.sequence i {
  color: #9aaabb;
  font-style: normal;
}

.setup-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 22px;
}

.setup-card,
.settings-card {
  padding: 26px;
}

.card-heading {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 22px;
}

.card-heading h2 {
  font-size: 21px;
}

.card-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.step-number {
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font: 800 15px Manrope, sans-serif;
}

.step-number.complete {
  color: var(--ink);
  background: var(--gold);
}

.section-label {
  margin: 20px 0 9px;
  color: var(--muted);
  letter-spacing: .1em;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check {
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfe;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: border-color .15s, background .15s, color .15s;
}

.check:hover {
  border-color: #aabed0;
}

.check:has(input:checked) {
  border-color: rgba(8,127,118,.34);
  background: var(--teal-pale);
  color: var(--teal-dark);
}

.check input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  accent-color: var(--teal-dark);
}

.placement-choice {
  grid-template-columns: 1fr;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
}

.field select,
.field input {
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid #cbd8e3;
  border-radius: 10px;
  background: white;
}

.field select:focus,
.field input:focus {
  border-color: var(--blue);
}

.setup-error {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #fff1f1;
  color: #9f3434;
  font-size: 13px;
  font-weight: 800;
}

.seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid #cbd8e3;
  border-radius: 12px;
  background: #eef4f8;
}

.seg label {
  min-width: 0;
  cursor: pointer;
}

.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg span {
  min-height: 40px;
  padding: 9px 7px;
  border-radius: 9px;
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.seg input:checked + span {
  color: white;
  background: var(--ink);
  box-shadow: 0 4px 12px rgba(16,36,63,.18);
}

.launch-card {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.launch-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.launch-copy strong {
  display: block;
  color: var(--ink);
  font: 800 17px/1.2 Manrope, sans-serif;
}

.launch-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  min-width: 180px;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 8px 25px rgba(244,201,93,.18);
  transition: transform .15s, background .15s;
}

.primary-button:hover {
  transform: translateY(-2px);
  background: #ffda78;
}

.primary-button:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}

.secondary-button {
  border: 1px solid #cbd8e3;
  color: var(--ink);
  background: white;
}

.hidden {
  display: none !important;
}

.session-head {
  min-width: 0;
  margin-bottom: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.session-head h1 {
  font-size: clamp(30px, 4vw, 42px);
}

.session-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

.stage {
  min-width: 0;
  overflow: hidden;
}

.phase-bar {
  min-width: 0;
  min-height: 118px;
  padding: 22px 28px;
  color: white;
  background: linear-gradient(145deg, #112943, #0d2037);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.phase-name {
  font: 800 clamp(32px, 6vw, 62px)/.95 Manrope, sans-serif;
  letter-spacing: -.045em;
}

.role {
  margin-top: 8px;
  color: #c3d1dd;
  font-size: 15px;
  font-weight: 700;
}

.call-pill {
  flex: 0 0 auto;
  max-width: 220px;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #eaf1f6;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.music-area {
  min-width: 0;
  min-height: 390px;
  padding: 30px 32px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.staff-wrap {
  position: relative;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.staff {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 230px;
}

.cover {
  position: absolute;
  inset: 0;
  padding: 20px;
  background: white;
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
}

.syllables {
  min-width: 0;
  min-height: 36px;
  margin-top: 5px;
  color: var(--blue);
  overflow-wrap: anywhere;
  text-align: center;
  font-size: clamp(15px, 2vw, 20px);
  letter-spacing: .13em;
  font-weight: 800;
}

.pulse-wrap {
  min-width: 0;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.beat-dots {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}

.dot {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #cbd8e3;
  transition: transform 80ms, background 80ms;
}

.dot.on {
  background: var(--gold);
  transform: scale(1.45);
  box-shadow: 0 0 0 5px rgba(244,201,93,.2);
}

.beat-text {
  width: 72px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.continuity {
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.finished {
  padding: 54px 24px;
  text-align: center;
}

.finished h2 {
  font-size: 28px;
}

.finished p:not(.eyebrow) {
  max-width: 620px;
  margin: 9px auto 20px;
  color: var(--muted);
}

.ready-view {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.big-check {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: var(--teal-dark);
  background: var(--teal-pale);
  display: grid;
  place-items: center;
  font: 800 34px Manrope, sans-serif;
}

.session-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

footer {
  min-height: 74px;
  padding: 20px max(24px, calc((100vw - 1180px) / 2));
  color: #c3d1dd;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-size: 14px;
}

footer strong {
  color: white;
  font-family: Manrope, sans-serif;
}

@media (max-width: 1020px) {
  .lead-row {
    grid-template-columns: 1fr;
  }

  .intro-block {
    padding: 4px 2px;
  }
}

@media (max-width: 850px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }

  .launch-card {
    grid-column: auto;
  }
}

@media (max-width: 650px) {
  .topbar {
    min-height: 68px;
    padding: 10px 18px;
  }

  .status-pill {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
  }

  .status-pill span {
    flex: 0 0 auto;
  }

  .workspace {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

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

  .sequence i {
    display: none;
  }

  .sequence span {
    text-align: center;
    white-space: normal;
  }

  .setup-card,
  .settings-card {
    padding: 19px;
    border-radius: 17px;
  }

  .choices,
  .fields {
    grid-template-columns: 1fr;
  }

  .seg {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .launch-card {
    padding: 19px;
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button {
    width: 100%;
  }

  .session-head {
    align-items: stretch;
    flex-direction: column;
  }

  .session-head .secondary-button {
    align-self: flex-start;
  }

  .phase-bar {
    padding: 19px;
    align-items: flex-start;
    flex-direction: column;
  }

  .call-pill {
    max-width: 100%;
  }

  .music-area {
    min-height: 330px;
    padding: 24px 12px 22px;
  }

  .pulse-wrap {
    flex-wrap: wrap;
  }

  footer {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 400px) {
  .sequence {
    grid-template-columns: 1fr 1fr;
  }

  .syllables {
    letter-spacing: .08em;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
