:root {
  --bg: #0f1115;
  --bg-soft: #161a22;
  --bg-card: #1b2030;
  --border: #2a3142;
  --text: #e8ecf3;
  --text-soft: #aab3c5;
  --muted: #7a8499;
  --accent: #f59e0b;
  --accent-soft: #fbbf24;
  --danger: #ef4444;
  --success: #22c55e;
  --wedge: #3b82f6;
  --iem: #a855f7;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.25);
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

/* Header */
.site-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; color: var(--accent-soft); }
.brand-mark { color: var(--accent); }
.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 48px 0 32px;
}
.hero h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.lead {
  color: var(--text-soft);
  font-size: 1.1rem;
  margin: 0 0 20px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.mini-plot {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plot-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.plot-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
}
.plot-dot.w { background: var(--wedge); }
.plot-dot.i { background: var(--iem); }
.plot-label {
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #1a1a1a;
}
.btn-primary:hover { background: var(--accent-soft); text-decoration: none; }
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--border); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); text-decoration: none; }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover { background: rgba(239,68,68,0.1); text-decoration: none; }

/* Sections */
section {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}
.section-sub {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

/* Worksheet */
.presets {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.select {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}

.mix-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.gig-meta {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg-soft);
  margin: 0;
}
.gig-meta legend {
  padding: 0 8px;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 500;
}
.field input[type="text"],
.field input[type="date"],
.field textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}
.field input:focus,
.field textarea:focus,
.select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field textarea {
  resize: vertical;
  min-height: 80px;
}

/* Performer cards */
.performers {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.performer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  position: relative;
}
.performer.shared {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.performer-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.performer-head h3 {
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.feed-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
}
.feed-badge.wedge { background: var(--wedge); }
.feed-badge.iem { background: var(--iem); }
.performer-remove {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
}
.performer-remove:hover {
  color: var(--danger);
  border-color: var(--danger);
}
.performer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stems {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stem-row {
  display: grid;
  grid-template-columns: 140px 1fr 44px;
  align-items: center;
  gap: 10px;
}
.stem-row label {
  font-size: 0.9rem;
  color: var(--text-soft);
}
.stem-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.stem-level {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.performer-notes {
  grid-column: 1 / -1;
}
.performer-notes textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}
.shared-note {
  grid-column: 1 / -1;
  background: rgba(245,158,11,0.1);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--accent-soft);
}

.empty-state {
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--muted);
}
.empty-state p { margin: 0; }

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.save-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--success);
  min-height: 1.2em;
}

/* Stage plot */
.plot-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.plot-stage {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 24px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.plot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  width: 100%;
}
.plot-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plot-item .pi-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.plot-item .pi-feed {
  font-size: 0.8rem;
  color: var(--muted);
}
.plot-item .pi-channel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 40px;
  height: 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
}
.plot-item .pi-channel.w { background: var(--wedge); }
.plot-item .pi-channel.i { background: var(--iem); }
.plot-floor {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Notes */
.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checklist li label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
}
.checklist input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Example table */
.example-table {
  overflow-x: auto;
}
.example-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.example-table th,
.example-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.example-table th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--text-soft);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.example-table tr:last-child td {
  border-bottom: none;
}

/* Content block */
.content-block h2 {
  font-size: 1.4rem;
  margin-top: 0;
}
.content-block h3 {
  font-size: 1.1rem;
  margin-top: 24px;
  margin-bottom: 8px;
}
.content-block p,
.content-block li {
  color: var(--text-soft);
}
.content-block ul {
  padding-left: 20px;
}
.content-block li {
  margin-bottom: 6px;
}

/* Footer */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 32px 0;
}
.footer-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.footer-text {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}
.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--text-soft);
  font-size: 0.9rem;
}
.footer-nav a:hover { color: var(--text); text-decoration: none; }
.footer-meta {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}

/* Print */
@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .form-actions,
  .presets,
  .performer-remove,
  .btn,
  .empty-state {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .performer,
  .plot-frame,
  .example-table table {
    break-inside: avoid;
    border: 1px solid #ccc;
    background: white;
    color: black;
  }
  .section-head { margin-bottom: 12px; }
  section { padding: 16px 0; border-top: none; }
  .plot-dot, .pi-channel { border: 1px solid #333; color: black; }
  .plot-dot.w, .pi-channel.w { background: #dbeafe; }
  .plot-dot.i, .pi-channel.i { background: #ede9fe; }
}

/* Responsive */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 32px 0 16px;
  }
  .hero h1 { font-size: 1.7rem; }
  .performer,
  .performer-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }
  .stem-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .stem-level { text-align: left; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
