:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #172b32;
  background: #f4f6f6;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 76px;
  border-bottom: 1px solid #dce4e4;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
}
.brand {
  font-weight: 850;
  letter-spacing: 2px;
  text-decoration: none;
  color: #172b32;
}
.brand span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  margin-left: 14px;
  color: #697c80;
}
#identity {
  font-size: 12px;
  color: #64787c;
}
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 28px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 2px;
  color: #64827c;
}
h1 {
  font-size: 36px;
  letter-spacing: -1px;
  margin: 12px 0;
}
h2 {
  font-size: 18px;
  margin: 0 0 18px;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.8;
  color: #627579;
}
.badge {
  display: inline-block;
  background: #e4eeeb;
  color: #2f6656;
  border: 1px solid #caddd4;
  border-radius: 20px;
  padding: 7px 13px;
  font-size: 12px;
  white-space: nowrap;
}
.card {
  background: white;
  border: 1px solid #dce4e4;
  border-radius: 14px;
  padding: 25px;
  margin-bottom: 22px;
  box-shadow: 0 4px 20px #172b3204;
}
.columns {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 22px;
}
.columns > .card {
  min-width: 0;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.row h2 {
  margin: 0;
}
.actions {
  justify-content: flex-end;
  margin-top: 20px;
}
label {
  display: block;
  color: #627579;
  font-size: 12px;
  line-height: 1.7;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d0dcda;
  background: #fbfcfc;
  border-radius: 7px;
  font: inherit;
  color: #203b42;
  padding: 11px 12px;
  margin: 6px 0 14px;
}
textarea {
  resize: vertical;
  line-height: 1.85;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #7fae9a;
  outline-offset: 1px;
}
#token {
  max-width: 380px;
  margin: 0;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
button,
.button {
  cursor: pointer;
  display: inline-block;
  border: 1px solid #28594b;
  border-radius: 7px;
  background: #28594b;
  color: white;
  padding: 10px 17px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 550;
  font-family: inherit;
}
button:hover,
.button:hover {
  filter: brightness(1.08);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: white;
  color: #365d54;
  border-color: #cbdad5;
}
nav {
  display: flex;
  gap: 25px;
  margin: 24px 0;
}
.tab {
  background: none;
  border: 0;
  border-radius: 0;
  color: #73858a;
  padding: 10px 0;
}
.tab.active {
  color: #28594b;
  border-bottom: 2px solid #28594b;
}
summary {
  cursor: pointer;
  color: #46665c;
  font-size: 13px;
  padding: 8px 0;
}
.notice {
  background: #f4f7f6;
  border-left: 3px solid #c7dad0;
  padding: 14px;
  line-height: 1.8;
  font-size: 12px;
  color: #71847f;
  margin-top: 25px;
}
.empty {
  color: #849693;
  padding: 40px 0;
  text-align: center;
}
.chunk {
  padding: 13px 0;
  border-bottom: 1px solid #edf1ef;
  line-height: 1.9;
}
.chunk small {
  display: block;
  color: #7b938b;
  font-size: 11px;
}
.error {
  color: #ad433c;
  font-size: 13px;
  white-space: pre-wrap;
}
.attempt {
  margin-top: 14px;
  border-top: 1px solid #e4ebe8;
  padding-top: 14px;
}
.attempt summary {
  font-weight: 600;
}
.attempt p {
  font-size: 13px;
  margin: 8px 0;
}
.attempt audio {
  height: 35px;
  width: 100%;
  margin-top: 10px;
}
audio {
  width: 100%;
  margin: 18px 0;
}
pre {
  overflow: auto;
  font-size: 12px;
  background: #f4f7f6;
  border-radius: 8px;
  padding: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e7eeeb;
  vertical-align: top;
}
th {
  color: #778e84;
  font-weight: 550;
}
footer {
  margin: 35px 0;
  color: #99aaa5;
  font-size: 10px;
  letter-spacing: 1.8px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  .columns {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 26px;
  }
  .brand span {
    display: none;
  }
  .intro {
    gap: 10px;
  }
  main {
    padding: 25px 16px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  header {
    padding: 0 18px;
  }
  .card {
    padding: 18px;
  }
}
.workflow-steps {
  display: flex;
  gap: 12px;
  margin: 0 0 22px;
}
.workflow-steps span {
  flex: 1;
  border: 1px solid #d6e2dd;
  padding: 14px 18px;
  border-radius: 8px;
  color: #7b8e86;
  font-size: 13px;
}
.workflow-steps .active {
  background: #e6eee9;
  color: #28594b;
  border-color: #91b2a2;
}

.workflow-list {
  overflow-x: auto;
}
.workflow-list-head,
.line-card {
  display: grid;
  grid-template-columns:
    42px minmax(220px, 1fr) 170px
    126px 100px 76px 110px 128px 42px;
  align-items: center;
  gap: 12px;
  min-width: 1230px;
}
.workflow-list-head {
  padding: 10px 12px;
  background: #f3f6f4;
  border-radius: 6px 6px 0 0;
  color: #71857c;
  font-size: 12px;
}
.line-card {
  padding: 12px;
  border-bottom: 1px solid #e3ebe7;
}
.line-card:hover {
  background: #fafcfb;
}
.line-number {
  color: #81958c;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.line-card label,
.line-card textarea,
.line-card input,
.line-card select {
  margin: 0;
}
.line-card textarea {
  min-height: 58px;
  padding: 9px 10px;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
}
.line-card select,
.line-card input {
  padding: 9px 8px;
  font-size: 13px;
}
.line-card .badge {
  font-size: 11px;
  padding: 5px 7px;
  background: transparent;
}
.line-preview {
  display: none;
  margin: 0;
  line-height: 1.7;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.line-audio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.line-audio-controls button {
  padding: 7px 10px;
  font-size: 12px;
}
.line-audio-controls select {
  flex-basis: 100%;
  min-width: 0;
}
.line-card audio {
  grid-column: 2 / -1;
  width: 100%;
  max-width: 650px;
  height: 34px;
}
.line-card > p {
  grid-column: 2 / -1;
  margin: 0;
  font-size: 12px;
  color: #a04f40;
}
.workflow-navigation {
  padding-top: 22px;
}
#wf-state,
#wf-plan-state {
  font-size: 12px;
  color: #71897e;
}
#workflow[data-step="2"] .line-card audio {
  display: none;
}
#workflow[data-step="3"] .wf-edit-column,
#workflow[data-step="3"] .line-text textarea {
  display: none;
}
#workflow[data-step="3"] .line-preview {
  display: block;
}
#workflow[data-step="3"] .workflow-list-head,
#workflow[data-step="3"] .line-card {
  grid-template-columns: 42px minmax(260px, 1fr) 170px 140px 140px 42px;
  min-width: 760px;
}
@media (max-width: 800px) {
  .workflow-steps {
    gap: 5px;
  }
  .workflow-steps span {
    padding: 10px 8px;
    font-size: 11px;
  }
}

.icon {
  flex-shrink: 0;
  vertical-align: middle;
}
button[data-icon],
.line-menu button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.line-actions {
  display: flex;
  justify-content: flex-end;
}
.gear-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 8px;
}
.gear-button[aria-expanded="true"] {
  background: #e3eee8;
  border-color: #6b9480;
}
.line-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 270px;
  max-height: min(440px, 90vh);
  overflow-y: auto;
  border: 1px solid #d8e3dd;
  padding: 8px;
  border-radius: 10px;
  background: white;
  box-shadow: 0 12px 38px #173a2926;
  color: #293e35;
}
.line-menu::backdrop {
  background: transparent;
}
.line-menu button {
  width: 100%;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #304b3f;
  padding: 10px;
  text-align: left;
  font-size: 13px;
}
.line-menu button:hover {
  background: #edf4ef;
}
.line-menu button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.line-menu .reset-action {
  color: #a34b37;
}
.line-menu label {
  display: block;
  padding: 10px;
  border-top: 1px solid #e3ebe7;
  font-size: 12px;
}
.line-menu select {
  margin-top: 7px;
  width: 100%;
  font-size: 12px;
}
.line-menu .menu-hint {
  margin: 0 10px 10px;
  color: #83948b;
  font-size: 11px;
  line-height: 1.5;
}
.line-elapsed {
  font-size: 12px;
  color: #758a80;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.line-card .badge[data-tone="success"] {
  background: #dcf4e4;
  color: #19643a;
  border-color: #b6dec5;
}
.line-card .badge[data-tone="warning"] {
  background: #fff0bf;
  color: #805b0e;
  border-color: #ebd38a;
}
.line-card .badge[data-tone="danger"] {
  background: #fde0df;
  color: #9b302d;
  border-color: #efb6b2;
}

.line-card.sequence-playing {
  background: #edf6f0;
  box-shadow: inset 3px 0 #398362;
}
#wf-play-state {
  font-size: 13px;
  color: #527465;
}

.speaker-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(200px, 2fr) 42px;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}
.line-voice {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.line-voice-preview {
  display: none;
  font-size: 12px;
  color: #567164;
  overflow-wrap: anywhere;
}
#workflow[data-step="3"] .line-voice select {
  display: none;
}
#workflow[data-step="3"] .line-voice-preview {
  display: block;
}

#workflow[data-voice-mode="unified"] .wf-voice-column {
  display: none;
}
#workflow[data-voice-mode="unified"] .workflow-list-head,
#workflow[data-voice-mode="unified"] .line-card {
  grid-template-columns: 42px minmax(
      220px,
      1fr
    ) 126px 100px 76px 110px 128px 42px;
  min-width: 1050px;
}
#workflow[data-voice-mode="unified"][data-step="3"] .workflow-list-head,
#workflow[data-voice-mode="unified"][data-step="3"] .line-card {
  grid-template-columns: 42px minmax(260px, 1fr) 140px 140px 42px;
  min-width: 760px;
}
.voice-sample {
  font-size: 12px;
  padding: 5px 8px;
}
#workflow[data-step="3"] .voice-sample {
  display: none;
}
