/* Y1 — Signal Console
   Diagnostic-first: persistent status rail, dense ops hierarchy, cool slate + SendMatico blue.
   Sans-only brand (no serif clash). Primary lifecycle action lives in the rail once.
*/
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --y1-ink: #0b1220;
  --y1-panel: #111827;
  --y1-surface: #f1f5f9;
  --y1-card: #ffffff;
  --y1-line: #dbe3ee;
  --y1-blue: #1d4ed8;
  --y1-blue-soft: #dbeafe;
  --font: "IBM Plex Sans", system-ui, sans-serif;
}

body.dir-y1 {
  font-family: var(--font);
  color: var(--y1-ink);
  background: #0b1220;
}

.dir-y1 .app {
  display: grid;
  grid-template-columns: 168px 1fr;
  min-height: calc(100vh - 64px);
}

.dir-y1 .brand-rail {
  background: linear-gradient(180deg, #0b1220, #111827);
  color: #94a3b8;
  padding: 1.1rem 0.75rem;
  border-right: 1px solid #1f2937;
}
.dir-y1 .brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: #f8fafc;
  padding: 0.25rem 0.5rem 1rem;
}
.dir-y1 .brand::after {
  content: "";
  display: block;
  width: 28px; height: 3px; margin-top: 0.45rem;
  background: var(--y1-blue); border-radius: 2px;
}
.dir-y1 .app-nav button {
  display: block; width: 100%; text-align: left;
  background: transparent; border: 0; color: #94a3b8;
  padding: 0.5rem 0.6rem; border-radius: 6px; font-weight: 500; font-size: 0.84rem;
}
.dir-y1 .app-nav button.is-active,
.dir-y1 .app-nav button:hover { background: rgba(37,99,235,0.15); color: #fff; }

.dir-y1 .workspace { background: var(--y1-surface); display: flex; flex-direction: column; min-width: 0; }

.dir-y1 .chrome {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.1rem;
  background: #0f172a;
  color: #e2e8f0;
  border-bottom: 1px solid #1e293b;
}
.dir-y1 .chrome h1 { margin: 0; font-size: 1.15rem; letter-spacing: -0.02em; color: #fff; }
.dir-y1 .chrome-sub { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.25rem; }
.dir-y1 .pq { font-size: 0.78rem; color: #94a3b8; }
.dir-y1 .save-status { font-size: 0.72rem; color: #86efac; }
.dir-y1 .chrome-metrics .m-label { color: #94a3b8; }
.dir-y1 .chrome-metrics .m-val { color: #fff; }
.dir-y1 .chrome-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.dir-y1 .chrome-actions .btn-ghost { color: #fca5a5; }
.dir-y1 .menu-btn { display: none; background: transparent; border: 0; color: #fff; font-size: 1.1rem; }

.dir-y1 .sec-nav {
  display: flex; gap: 0.15rem; padding: 0.35rem 0.75rem;
  background: #e2e8f0; border-bottom: 1px solid var(--y1-line); overflow-x: auto;
}
.dir-y1 .sec-nav button {
  border: 0; background: transparent; padding: 0.45rem 0.7rem; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600; color: #475569; white-space: nowrap;
}
.dir-y1 .sec-nav button.is-active { background: #fff; color: var(--y1-blue); box-shadow: 0 1px 2px rgba(15,23,42,0.08); }

.dir-y1 .content-split {
  display: grid;
  grid-template-columns: 1fr 300px;
  flex: 1; min-height: 0;
}
.dir-y1 .main-panel { padding: 1rem 1.15rem 2rem; overflow: auto; }
.dir-y1 .status-rail {
  background: #fff;
  border-left: 1px solid var(--y1-line);
  padding: 1rem 0.85rem;
  overflow: auto;
  box-shadow: -8px 0 24px rgba(15,23,42,0.04);
}
.dir-y1 .status-rail h3 {
  margin: 0 0 0.35rem; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: #64748b;
}
.dir-y1 .rail-status { font-weight: 700; font-size: 0.95rem; margin: 0.25rem 0; }

.dir-y1 .pane-intro { margin-bottom: 1rem; }
.dir-y1 .eyebrow { margin: 0; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--y1-blue); }
.dir-y1 .pane-intro h2 { margin: 0.2rem 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.dir-y1 .lede { margin: 0; color: #475569; font-size: 0.9rem; }

.dir-y1 .ready-panel, .dir-y1 .ops-card, .dir-y1 .audience-preview, .dir-y1 .section-pane, .dir-y1 .seq-editor, .dir-y1 .seq-spine {
  background: var(--y1-card);
  border: 1px solid var(--y1-line);
  border-radius: 10px;
  padding: 0.85rem;
}
.dir-y1 .ready-panel { border-left: 4px solid #ef4444; }
.dir-y1 .ready-panel.is-ready { border-left-color: #22c55e; }
.dir-y1 .ready-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; margin-bottom: 0.5rem; }
.dir-y1 .ready-head h3 { margin: 0; font-size: 1rem; }

.dir-y1 .seq-spine { position: sticky; top: 0.5rem; }
.dir-y1 .spine-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.dir-y1 .editor-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 0.75rem; }
.dir-y1 .editor-top h2 { margin: 0; font-size: 1.1rem; }

.dir-y1 .btn-primary { background: var(--y1-blue); }
.dir-y1 .home-pane, .dir-y1 .section-pane { display: flex; flex-direction: column; gap: 0.85rem; }
.dir-y1 .audience-preview .ap-head, .dir-y1 .ops-card h3 { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.dir-y1 .ops-card h3, .dir-y1 .audience-preview h3 { margin: 0 0 0.5rem; font-size: 0.9rem; }

@media (max-width: 960px) {
  .dir-y1 .app { grid-template-columns: 1fr; }
  .dir-y1 .brand-rail { display: none; }
  .dir-y1 .content-split { grid-template-columns: 1fr; }
  .dir-y1 .status-rail { border-left: 0; border-top: 1px solid var(--y1-line); }
  .dir-y1 .chrome { grid-template-columns: 1fr; }
  .dir-y1 .menu-btn { display: inline-block; margin-right: 0.35rem; }
}
