:root {
  --ivory: #F5F2EB;
  --surface: #FFFFFF;
  --obsidian: #141413;
  --ink: #161614;
  --muted: #635F58;
  --muted-light: #A9A49B;
  --emerald: #0E4A39;
  --emerald-hover: #0A372A;
  --rule: #DDD8CE;
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --font-serif: "Syne", "Noto Sans TC", sans-serif;
  --font-sans: "Plus Jakarta Sans", "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--font-mono); }

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { width: min(1260px, calc(100% - 40px)); margin-inline: auto; }

.demo-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--obsidian);
  color: var(--ivory);
  border-bottom: 1px solid rgba(245, 242, 235, 0.14);
}

.demo-bar-inner {
  width: min(1260px, calc(100% - 32px));
  margin-inline: auto;
  min-height: 46px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block: 6px;
}

.demo-back { font-size: 13px; color: #D2CDC3; }
.demo-back:hover { color: #FFFFFF; }
.demo-tag { font-size: 11px; letter-spacing: 0.12em; color: #8FC5B3; }

.bezel-frame {
  padding: 7px;
  border-radius: 24px;
  background: rgba(22, 22, 20, 0.04);
  border: 1px solid rgba(22, 22, 20, 0.08);
}

.bezel-core {
  border-radius: 17px;
  overflow: hidden;
  background: var(--surface);
}

.hero-band {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--rule);
}

.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--emerald);
  margin-bottom: 10px;
}

.eyebrow-light { color: #8FC5B3; }

h1, h2 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.12;
}

h1 { font-size: clamp(32px, 3.8vw, 52px); }
h2 { font-size: clamp(28px, 3vw, 40px); }
.heading-light { color: var(--ivory); }

.lead { margin: 0 0 26px; font-size: 15px; color: var(--muted); max-width: 54ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 6px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 350ms var(--ease-spring), background-color 350ms var(--ease-spring);
}

.btn-pill:active { transform: scale(0.98); }
.btn-emerald { background: var(--emerald); color: var(--ivory); }
.btn-emerald:hover { background: var(--emerald-hover); }

.btn-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(245, 242, 235, 0.94);
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-outline {
  padding: 11px 22px;
  border: 1px solid rgba(22, 22, 20, 0.22);
}

.hero-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.band { padding: 64px 0; border-bottom: 1px solid var(--rule); }
.band-dark { background: var(--obsidian); color: var(--ivory); border-bottom-color: rgba(245, 242, 235, 0.14); }

.takeaways-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.take-card { padding: 24px; height: 100%; }
.take-num { display: block; font-size: 11px; color: var(--emerald); margin-bottom: 10px; }
.take-card h3 { margin: 0 0 10px; font-family: var(--font-serif); font-weight: 400; font-size: 24px; line-height: 1.25; }
.take-card p { margin: 0; font-size: 14px; color: var(--muted); }

.intel-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}

.table-bezel,
.pain-bezel {
  padding: 8px;
  border-radius: 22px;
  background: rgba(245, 242, 235, 0.05);
  border: 1px solid rgba(245, 242, 235, 0.14);
}

.table-scroll { overflow-x: auto; }

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #1B1B19;
  border-radius: 15px;
  overflow: hidden;
}

.matrix-table th, .matrix-table td {
  padding: 14px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(245, 242, 235, 0.1);
  white-space: nowrap;
}

.matrix-table th { font-size: 11px; letter-spacing: 0.08em; color: var(--muted-light); }

.shift-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(245, 242, 235, 0.1);
}

.shift-up { background: rgba(214, 114, 72, 0.22); color: #F5B89E; }
.shift-new { background: rgba(143, 197, 179, 0.2); color: #9ED9C4; }

.pain-wrap {
  background: #1B1B19;
  border-radius: 15px;
  padding: 20px;
}

/* Leads Section */
.leads-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; }

.filter-bar select {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface);
  font: inherit;
  font-size: 13px;
}

.dossier-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.leads-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

.leads-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #EFECE5;
  white-space: nowrap;
}

.leads-table tbody tr {
  cursor: pointer;
  transition: background-color 250ms var(--ease-spring);
}

.leads-table tbody tr:hover,
.leads-table tbody tr.is-selected {
  background: #EDF4F1;
}

.score-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: #E5F0EB;
  color: var(--emerald);
}

.detail-card { padding: 26px; display: grid; gap: 16px; }
.detail-card h3 { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 28px; line-height: 1.2; }
.detail-meta { font-size: 12px; color: var(--muted); }
.detail-gaps {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FAF5F0;
  border-left: 3px solid #9E4A2E;
  font-size: 13px;
}

.draft-box {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 14px;
  background: var(--ivory);
}

.draft-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
}

.copy-mini {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(14, 74, 57, 0.35);
  color: var(--emerald);
  font-size: 12px;
  background: var(--surface);
}

.draft-pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.55;
}

@media (max-width: 1024px) {
  .hero-split, .takeaways-grid, .intel-split, .dossier-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container { width: calc(100% - 28px); }
  .hero-band { padding: 36px 0 32px; }
  .band { padding: 44px 0; }
  .detail-card { padding: 18px; }
}
