/* Chorus app stylesheet
 * Lifted from the original prototype and lightly normalised.
 * Section markers match the structural blocks in the templates.
 */

:root {
  --cream: #F7F4EF;
  --ink: #1A1814;
  --ink-60: #7A7570;
  --ink-30: #C8C4BE;
  --ink-10: #EDEAE5;
  --accent: #2B5C3F;
  --accent-light: #EBF2EE;
  --accent-mid: #4A8C65;
  --warn: #C44A2A;
  --warn-light: #FDF0EC;
  --gold: #B8873A;
  --gold-light: #FBF5EA;
  --radius: 10px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; }

/* ---------- Navigation ---------- */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 60px;
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: white;
  text-decoration: none;
}
.nav-logo span { color: var(--accent-mid); }
.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-weight: 500;
}
.nav-tab:hover:not(.active) { color: rgba(255, 255, 255, 0.8); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-reset {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.55);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}
.nav-reset:hover { color: white; border-color: rgba(255, 255, 255, 0.4); }

/* ---------- Page layout ---------- */
.hero {
  text-align: center;
  padding: 5rem 2rem 4rem;
  border-bottom: 1px solid var(--ink-10);
}
.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: -1px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p {
  font-size: 17px;
  color: var(--ink-60);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

.main { max-width: 960px; margin: 0 auto; padding: 3rem 2rem 6rem; }

.section-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-bottom: 6px;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.8rem;
  color: var(--ink);
  letter-spacing: -0.5px;
}

/* ---------- Flash messages ---------- */
.flash-list { margin-bottom: 1.5rem; }
.flash {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 6px;
}
.flash.error { background: var(--warn-light); border: 1px solid var(--warn); color: var(--warn); }
.flash.info  { background: var(--accent-light); border: 1px solid var(--accent-mid); color: var(--accent); }

/* ---------- Progress steps ---------- */
.progress {
  display: flex;
  margin-bottom: 2.5rem;
  border: 1px solid var(--ink-10);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
}
.prog-step {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-60);
  border: none;
  border-right: 1px solid var(--ink-10);
  line-height: 1.4;
  text-decoration: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.prog-step:hover:not(.active) { background: var(--ink-05, rgba(0,0,0,0.03)); color: var(--ink); }
.prog-step:last-child { border-right: none; }
.prog-step .step-num { font-size: 10px; opacity: 0.6; display: block; margin-bottom: 2px; }
.prog-step.active { background: var(--ink); color: white; font-weight: 500; }
.prog-step.done   { color: var(--accent); background: var(--accent-light); }

/* ---------- Step panels (wizard transitions) ---------- */
.step-panel { display: none; }
.step-panel.active {
  display: block;
  animation: panelIn 0.28s ease both;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Modal error ---------- */
.modal-error {
  color: var(--warn, #C44A2A);
  font-size: 13px;
  margin: 0.5rem 0 0;
}

/* ---------- Panel card ---------- */
.panel-card {
  background: white;
  border: 1px solid var(--ink-10);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.panel-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.panel-sub {
  font-size: 13px;
  color: var(--ink-60);
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* ---------- Adjective pills ---------- */
.adj-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1rem; }
.adj-pill {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--ink-10);
  background: var(--cream);
  color: var(--ink-60);
  cursor: pointer;
  user-select: none;
  transition: all 0.12s;
  font-family: 'DM Sans', sans-serif;
}
.adj-pill:hover { border-color: var(--ink-30); color: var(--ink); }
.adj-pill.selected { background: var(--accent); color: white; border-color: var(--accent); }
.adj-count { font-size: 12px; color: var(--ink-60); margin-bottom: 1rem; }

/* ---------- Sliders ---------- */
.slider-block { margin-bottom: 1.75rem; }
.slider-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.slider-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.slider-num { font-size: 13px; color: var(--ink-60); }
input[type=range] { width: 100%; accent-color: var(--accent); cursor: pointer; }
.slider-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-30); margin-top: 3px; }
.slider-ex {
  font-size: 11px;
  color: var(--ink-60);
  margin-top: 7px;
  font-style: italic;
  padding-left: 10px;
  border-left: 2px solid var(--ink-10);
  line-height: 1.5;
}

/* ---------- Choice buttons ---------- */
.choice-group { margin-bottom: 1.75rem; }
.choice-label { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.choice-options { display: flex; gap: 8px; flex-wrap: wrap; }
.choice-btn {
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid var(--ink-10);
  background: var(--cream);
  color: var(--ink-60);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.12s;
}
.choice-btn:hover { border-color: var(--ink-30); color: var(--ink); }
.choice-btn.selected { background: var(--accent); color: white; border-color: var(--accent); }

/* ---------- Nav row / buttons ---------- */
.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-10);
}
.btn-back, .btn-next, .btn-generate, .btn-cancel, .btn-save-ex, .btn-copy, .btn-regen, .btn-add-example {
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}
.btn-back {
  padding: 9px 22px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid var(--ink-10);
  background: transparent;
  color: var(--ink-60);
  text-decoration: none;
  display: inline-block;
}
.btn-back:hover { border-color: var(--ink-30); color: var(--ink); }
.btn-next {
  padding: 10px 26px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: var(--ink);
  color: white;
}
.btn-next:hover { background: #333; }

/* ---------- Summary (step 5) ---------- */
.summary-box {
  background: var(--cream);
  border: 1px solid var(--ink-10);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.summary-section { margin-bottom: 1.25rem; }
.summary-section:last-child { margin-bottom: 0; }
.summary-eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-30);
  margin-bottom: 8px;
}
.summary-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.summary-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-mid);
}
.summary-pill.empty {
  background: none;
  color: var(--ink-30);
  border-color: var(--ink-10);
  font-style: italic;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--ink-10);
  font-size: 13px;
}
.summary-row:last-child { border-bottom: none; }
.summary-row-label { color: var(--ink-60); }
.summary-row-val { font-weight: 500; color: var(--ink); }

/* ---------- Output box ---------- */
.output-wrap { margin-top: 1.5rem; }
.output-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-bottom: 8px;
}
.output-box {
  background: var(--cream);
  border: 1px solid var(--ink-10);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  white-space: pre-wrap;
  min-height: 80px;
}
.output-placeholder { color: var(--ink-30); font-style: italic; }
.output-actions { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }
.btn-copy {
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--ink-10);
  background: white;
  color: var(--ink-60);
}
.btn-copy:hover { border-color: var(--ink-30); color: var(--ink); }
.btn-regen {
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: var(--accent);
  color: white;
}

/* ---------- Examples library ---------- */
.ex-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 10px;
}
.ex-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.ex-filter-btn {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--ink-10);
  background: var(--cream);
  color: var(--ink-60);
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  display: inline-block;
  transition: all 0.12s;
}
.ex-filter-btn:hover { border-color: var(--ink-30); color: var(--ink); }
.ex-filter-btn.active { background: var(--ink); color: white; border-color: var(--ink); }
.btn-add-example {
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: var(--accent);
  color: white;
  text-decoration: none;
  display: inline-block;
}
.ex-count-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 14px;
  background: var(--cream);
  border: 1px solid var(--ink-10);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 13px;
}
.ex-count-item { display: flex; align-items: center; gap: 6px; color: var(--ink-60); }
.ex-count-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ex-count-dot.good { background: var(--accent); }
.ex-count-dot.bad  { background: var(--warn); }
.ex-count-dot.pair { background: var(--gold); }
.ex-count-num { font-weight: 500; color: var(--ink); }
.ex-empty-inline {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--cream);
  border: 1px dashed var(--ink-10);
  border-radius: var(--radius-lg);
}
.ex-empty-inline p { font-size: 13px; color: var(--ink-60); margin-bottom: 1rem; }
.ex-grid { display: flex; flex-direction: column; gap: 10px; }
.ex-card {
  background: var(--cream);
  border: 1px solid var(--ink-10);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}
.ex-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 10px;
}
.ex-card-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.ex-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--ink-10);
  color: var(--ink-60);
  background: white;
}
.ex-tag.good { background: var(--accent-light); color: var(--accent); border-color: var(--accent-mid); }
.ex-tag.bad  { background: var(--warn-light); color: var(--warn); border-color: var(--warn); }
.ex-tag.pair { background: var(--gold-light); color: var(--gold); border-color: var(--gold); }
.ex-card-actions { display: flex; gap: 5px; flex-shrink: 0; }
.ex-action-btn {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--ink-10);
  background: transparent;
  color: var(--ink-60);
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}
.ex-action-btn.delete:hover { border-color: var(--warn); color: var(--warn); }
.ex-copy-text {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.6;
  background: white;
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 8px;
  white-space: pre-wrap;
  border: 1px solid var(--ink-10);
}
.ex-after-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 6px 0 4px;
}
.ex-annotation {
  font-size: 12px;
  line-height: 1.5;
  border-left: 3px solid var(--ink-10);
  padding-left: 8px;
  font-style: italic;
  color: var(--ink-60);
}
.ex-annotation.good { border-color: var(--accent-mid); color: var(--accent); }
.ex-annotation.bad  { border-color: var(--warn); color: var(--warn); }
.ex-annotation.pair { border-color: var(--gold); color: var(--gold); }

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.modal-sub { font-size: 13px; color: var(--ink-60); margin-bottom: 1.5rem; line-height: 1.5; }
.modal-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-60);
  margin-bottom: 6px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modal-field { margin-bottom: 1.25rem; }
.modal-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--ink-10);
  background: var(--cream);
  font-size: 13px;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  resize: none;
  line-height: 1.6;
  outline: none;
}
.modal-textarea:focus { border-color: var(--ink-30); background: white; }
.modal-select {
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--ink-10);
  background: var(--cream);
  font-size: 13px;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  outline: none;
}
.modal-select:focus { border-color: var(--ink-30); }
.modal-type-toggle { display: flex; gap: 8px; margin-bottom: 1.25rem; }
.type-btn {
  flex: 1;
  padding: 10px 6px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  border: 2px solid var(--ink-10);
  background: var(--cream);
  color: var(--ink-60);
  cursor: pointer;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  display: inline-block;
  transition: all 0.12s;
}
.type-btn.good.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.type-btn.bad.active  { border-color: var(--warn); background: var(--warn-light); color: var(--warn); }
.type-btn.pair.active { border-color: var(--gold); background: var(--gold-light); color: var(--gold); }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-10);
}
.btn-cancel {
  padding: 9px 22px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid var(--ink-10);
  background: transparent;
  color: var(--ink-60);
  text-decoration: none;
  display: inline-block;
}
.btn-save-ex {
  padding: 9px 24px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: var(--ink);
  color: white;
}
.modal-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.pair-fields { display: none; }
.pair-fields.visible { display: block; }
.pair-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-30);
}
.pair-divider::before, .pair-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ink-10);
}

/* ---------- Generator ---------- */
.tov-active-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
  margin-bottom: 2rem;
}
.tov-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.tov-active-label { font-size: 12px; font-weight: 500; color: var(--accent); }
.tov-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.tov-chip {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: white;
  color: var(--accent);
  border: 1px solid var(--accent-mid);
}
.tov-chip.muted { color: var(--ink-60); border-color: var(--ink-10); }

.gen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.field-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-bottom: 8px;
  display: block;
}
.option-list { display: flex; flex-direction: column; gap: 6px; }
.option-card {
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--ink-10);
  background: var(--cream);
  cursor: pointer;
  transition: all 0.12s;
}
.option-card:hover { border-color: var(--ink-30); background: white; }
.option-card.selected { border-color: var(--accent); background: var(--accent-light); }
.option-card.selected .opt-title { color: var(--accent); }
.option-card.selected .opt-sub { color: var(--accent); opacity: 0.7; }
.opt-title { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 1px; }
.opt-sub { font-size: 11px; color: var(--ink-60); line-height: 1.4; }
.channel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.channel-btn {
  padding: 10px 4px;
  border-radius: var(--radius);
  border: 1px solid var(--ink-10);
  background: var(--cream);
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  color: var(--ink-60);
  font-family: 'DM Sans', sans-serif;
  transition: all 0.12s;
}
.channel-btn:hover { border-color: var(--ink-30); color: var(--ink); background: white; }
.channel-btn.selected { border-color: var(--accent); background: var(--accent-light); color: var(--accent); font-weight: 500; }
.context-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--ink-10);
  background: var(--cream);
  font-size: 13px;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  resize: none;
  min-height: 72px;
  line-height: 1.6;
  outline: none;
}
.context-textarea:focus { border-color: var(--ink-30); background: white; }
.context-textarea::placeholder { color: var(--ink-30); }
.gen-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-10);
}
.btn-generate {
  padding: 12px 30px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: var(--ink);
  color: white;
}
.btn-generate:hover { background: #333; }

.api-warning {
  background: var(--gold-light);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 1.5rem;
  font-size: 13px;
  color: #7A5A1A;
  line-height: 1.5;
}
.api-warning strong { font-weight: 500; }
.api-warning a { color: var(--gold); }

@media (max-width: 640px) {
  .gen-grid { grid-template-columns: 1fr; }
  .main { padding: 2rem 1rem 4rem; }
  .panel-card { padding: 1.25rem; }
  .modal-3col { grid-template-columns: 1fr; }
  .modal-type-toggle { flex-direction: column; }
  .nav-bar { padding: 0 1rem; }
}
