:root {
  --yellow: #ffcc00;
  --black: #0d0d0f;
  --soft-black: #19191d;
  --grey: #6b7280;
  --line: #e7e7ea;
  --bg: #f7f7f8;
  --card: #ffffff;
  --success: #19a463;
  --warning: #ff9f1a;
  --danger: #e54b4b;
  --radius: 22px;
  --shadow: 0 18px 55px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top right, rgba(255,204,0,.18), transparent 28%), var(--bg);
  color: var(--black);
}
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 320px;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--black);
  color: #fff;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.brand-block { display: flex; gap: 14px; align-items: center; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--yellow); color: var(--black);
  display: grid; place-items: center;
  font-weight: 900;
}
.brand-block h1 { margin: 0; font-size: 22px; }
.brand-block p { margin: 4px 0 0; color: #a8a8b3; font-size: 13px; }
.steps { display: grid; gap: 10px; }
.step-link {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  padding: 12px 14px;
  color: #d9d9df;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}
.step-link.done { border-color: rgba(255,204,0,.55); color: #fff; }
.side-note {
  margin-top: auto;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 18px;
}
.health-bar { height: 10px; background: rgba(255,255,255,.12); border-radius: 999px; margin: 14px 0 8px; overflow: hidden; }
.health-bar span { display: block; height: 100%; width: 0%; background: var(--yellow); border-radius: inherit; transition: width .25s ease; }
.side-note p { margin: 0; color: #a8a8b3; font-size: 13px; }
.main { flex: 1; padding: 38px; max-width: 1280px; margin: 0 auto; }
.hero-card, .panel {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 24px;
}
.eyebrow { display: inline-flex; background: #fff3bf; border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 800; }
.hero-card h2 { font-size: clamp(34px, 5vw, 64px); margin: 18px 0 10px; letter-spacing: -0.05em; }
.hero-card p { max-width: 720px; color: var(--grey); font-size: 18px; line-height: 1.55; }
.section-title { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.section-title span { background: var(--black); color: var(--yellow); border-radius: 12px; padding: 9px 11px; font-weight: 900; }
.section-title h3 { margin: 0; font-size: 25px; }
.section-title p { margin: 5px 0 0; color: var(--grey); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 8px; font-weight: 750; font-size: 14px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 15px;
  padding: 14px 15px; font: inherit; background: #fff; color: var(--black);
  outline: none;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255,204,0,.18); }
.job-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.job-card {
  border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 18px; cursor: pointer;
  transition: .2s ease;
}
.job-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.job-card.selected { border-color: var(--yellow); background: linear-gradient(135deg, #fff, #fff8d8); box-shadow: inset 0 0 0 2px var(--yellow); }
.job-card .icon { font-size: 28px; }
.job-card h4 { margin: 12px 0 5px; font-size: 16px; }
.job-card p { margin: 0; color: var(--grey); font-size: 13px; line-height: 1.4; }
.pill-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 11px 14px; cursor: pointer; font-weight: 750; font-size: 14px;
}
.pill.selected { background: var(--black); color: #fff; border-color: var(--black); }
.module-stack { margin-top: 22px; display: grid; gap: 16px; }
.module {
  border: 1px solid var(--line); border-radius: 20px; background: #fff; overflow: hidden;
}
.module summary { cursor: pointer; padding: 18px; font-weight: 900; list-style: none; display: flex; justify-content: space-between; }
.module summary::-webkit-details-marker { display: none; }
.module-content { padding: 0 18px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.validation-box { display: grid; gap: 12px; }
.alert { border-radius: 16px; padding: 14px 16px; border: 1px solid var(--line); background: #fff; }
.alert.good { border-color: rgba(25,164,99,.25); background: #ecfff6; }
.alert.warn { border-color: rgba(255,159,26,.35); background: #fff8e8; }
.alert.danger { border-color: rgba(229,75,75,.25); background: #fff0f0; }
.alert h4 { margin: 0 0 8px; }
.alert ul { margin: 0; padding-left: 20px; }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
button { border: 0; border-radius: 999px; padding: 13px 18px; font-weight: 900; cursor: pointer; font: inherit; }
.primary-btn { background: var(--yellow); color: var(--black); }
.secondary-btn { background: var(--black); color: #fff; }
.ghost-btn { background: transparent; color: var(--grey); border: 1px solid var(--line); }
.brief-output { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px; line-height: 1.6; }
.brief-output.empty { color: var(--grey); }
.brief-output h2 { margin-top: 0; }
.brief-output h3 { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; }
.brief-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.brief-meta div { background: #f7f7f8; border-radius: 14px; padding: 12px; }
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: relative; width: 100%; height: auto; }
  .main { padding: 20px; }
  .grid.two, .module-content, .brief-meta { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .hero-card, .panel:not([data-section="generate"]), .action-row { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; }
  .panel { box-shadow: none; border: none; padding: 0; }
  .brief-output { border: none; }
}

/* Always-on media channel checklist */
.mini-helper {
  background: #fff8d8;
  border: 1px solid rgba(255,204,0,.45);
  border-radius: 16px;
  padding: 12px 14px;
  color: #5d4a00;
  font-size: 13px;
  margin-bottom: 18px;
}
.media-channel-builder {
  display: grid;
  gap: 14px;
}
.channel-group {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}
.channel-group-header {
  background: #f3f3f5;
  padding: 13px 16px;
  font-weight: 900;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.channel-items {
  display: grid;
  gap: 0;
}
.channel-item {
  display: grid;
  grid-template-columns: 28px 190px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.channel-item input[type="checkbox"] { width: 18px; height: 18px; box-shadow: none; }
.channel-item input[type="text"] { padding: 10px 12px; border-radius: 12px; }
.channel-label { font-weight: 750; font-size: 14px; }
.custom-channel-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}
.brand-export-settings { margin-top: 22px; }
.export-header, .export-footer {
  display: none;
}
.brief-output .export-header, .brief-output .export-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  background: #fff;
}
.brief-output .export-footer { margin-top: 26px; margin-bottom: 0; font-size: 12px; color: var(--grey); }
.export-logo { max-height: 52px; max-width: 180px; object-fit: contain; }
.channel-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 14px;
}
.channel-summary-table th, .channel-summary-table td {
  border: 1px solid var(--line);
  text-align: left;
  padding: 10px;
  vertical-align: top;
}
.channel-summary-table th { background: #f3f3f5; }

@media print {
  body { background: #fff; }
  .sidebar, .hero-card, .panel:not([data-section="generate"]), .action-row { display: none !important; }
  .main { padding: 0; max-width: none; }
  .panel[data-section="generate"] { display: block; box-shadow: none; border: 0; padding: 0; margin: 0; }
  .panel[data-section="generate"] .section-title { display: none; }
  .brief-output { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
  .brief-output.empty { display: none; }
  .brief-output .export-header, .brief-output .export-footer { display: flex; border-radius: 0; border-left: 0; border-right: 0; }
  @page { margin: 16mm; }
}

@media (max-width: 780px) {
  .channel-item { grid-template-columns: 24px 1fr; }
  .channel-item input[type="text"] { grid-column: 2 / -1; }
  .custom-channel-row { grid-template-columns: 1fr; }
}
