:root {
  --bg: #f5f1ea;
  --panel: rgba(255, 252, 247, 0.9);
  --panel-solid: #fffdfa;
  --ink: #1e2728;
  --muted: #6b7474;
  --line: #e5ddd0;
  --accent: #355c5d;
  --accent-2: #a66f45;
  --gold: #c9954b;
  --green: #587d62;
  --red: #a64d4d;
  --blue: #4a6c89;
  --shadow: 0 22px 60px rgba(54, 47, 38, 0.12);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(166, 111, 69, 0.18), transparent 32rem),
    radial-gradient(circle at 90% 5%, rgba(53, 92, 93, 0.15), transparent 30rem),
    var(--bg);
}

.app-shell { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 28px;
  background: rgba(35, 46, 47, 0.95); color: white;
  display: flex; flex-direction: column; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 50px; height: 50px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, #d7a65d, #94613b); font-weight: 800; letter-spacing: -0.04em;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 19px; letter-spacing: -0.03em; }
h2 { font-size: clamp(34px, 5vw, 64px); letter-spacing: -0.07em; line-height: 0.95; margin-top: 8px; max-width: 720px; }
h3 { font-size: 24px; letter-spacing: -0.04em; }
.eyebrow { text-transform: uppercase; font-size: 11px; letter-spacing: .15em; color: var(--accent-2); font-weight: 800; }
.sidebar .eyebrow { color: #d7b17a; }
.nav { display: grid; gap: 8px; }
.nav a { color: rgba(255,255,255,.76); text-decoration: none; padding: 12px 14px; border-radius: 16px; font-weight: 650; }
.nav a.active, .nav a:hover { background: rgba(255,255,255,.11); color: white; }
.sidebar-card { margin-top: auto; border: 1px solid rgba(255,255,255,.13); border-radius: 22px; padding: 18px; background: rgba(255,255,255,.08); }
.sidebar-card .label { color: #d7b17a; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.sidebar-card strong { display: block; margin: 10px 0; font-size: 18px; }
.sidebar-card p { color: rgba(255,255,255,.72); line-height: 1.45; font-size: 14px; }

main { padding: 34px; display: grid; gap: 28px; }
.hero { min-height: 360px; padding: 34px; border-radius: 34px; background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(248,240,229,.78)); box-shadow: var(--shadow); display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border: 1px solid rgba(255,255,255,.7); }
.hero-copy { color: var(--muted); max-width: 680px; margin-top: 18px; font-size: 18px; line-height: 1.55; }
.primary-button { border: 0; background: var(--accent); color: white; padding: 13px 18px; border-radius: 999px; font-weight: 800; box-shadow: 0 14px 30px rgba(53,92,93,.22); white-space: nowrap; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 0; padding: 0; }
.stat-card { background: var(--panel-solid); border: 1px solid var(--line); box-shadow: 0 12px 35px rgba(54, 47, 38, .08); border-radius: 22px; padding: 24px 22px; min-height: 134px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; overflow: hidden; }
.stat-card span { color: var(--muted); font-size: 12px; line-height: 1.25; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.stat-card strong { font-size: clamp(30px, 3.2vw, 42px); line-height: .95; letter-spacing: -0.06em; }
.stat-card em { color: var(--muted); font-size: 12px; line-height: 1.35; font-style: normal; }
.stat-card.urgent strong { color: var(--red); }
.toolbar, .panel { background: var(--panel); backdrop-filter: blur(16px); border: 1px solid rgba(229,221,208,.9); border-radius: var(--radius); box-shadow: var(--shadow); }
.toolbar { padding: 16px; display: flex; gap: 18px; align-items: center; justify-content: space-between; }
.search-wrap { display: flex; align-items: center; gap: 12px; flex: 1; color: var(--muted); font-weight: 800; }
.search-wrap input { width: 100%; border: 1px solid var(--line); background: white; border-radius: 999px; padding: 12px 16px; font: inherit; outline: none; }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 999px; padding: 10px 13px; font-weight: 800; cursor: pointer; }
.pill.active { background: var(--accent); color: white; border-color: var(--accent); }
.two-column { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); gap: 24px; align-items: start; }
.two-column.lower { grid-template-columns: 1fr 1fr; }
.panel { padding: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.muted { color: var(--muted); font-size: 13px; font-weight: 700; }
.pipeline-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stage { background: rgba(255,255,255,.58); border: 1px solid var(--line); border-radius: 20px; padding: 12px; min-height: 180px; }
.stage-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--muted); font-weight: 850; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.stage-count { background: #eee4d4; padding: 3px 8px; border-radius: 999px; color: var(--ink); }
.opportunity-card { border: 1px solid var(--line); background: white; border-radius: 18px; padding: 14px; margin-top: 10px; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.opportunity-card:hover, .opportunity-card.selected { transform: translateY(-2px); border-color: rgba(53,92,93,.45); box-shadow: 0 12px 24px rgba(54,47,38,.1); }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.company { font-weight: 900; letter-spacing: -0.03em; }
.role { color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.35; }
.score { width: 38px; height: 38px; border-radius: 14px; display: grid; place-items: center; background: #eff5f2; color: var(--green); font-weight: 900; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tag, .status-badge { border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 850; background: #f1e7d9; color: #765334; }
.tag.priority-a { background: #e2f0e5; color: var(--green); }
.tag.action { background: #f7e0dd; color: var(--red); }
.next { color: var(--ink); font-size: 13px; line-height: 1.4; border-top: 1px solid var(--line); padding-top: 10px; }
.focus-list { display: grid; gap: 12px; }
.focus-item { border-left: 4px solid var(--accent-2); background: white; border-radius: 16px; padding: 14px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.focus-item strong { display: block; margin-bottom: 5px; }
.focus-item p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.profile-content { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.empty-state { color: var(--muted); display: block; padding: 24px; border: 1px dashed var(--line); border-radius: 18px; background: rgba(255,255,255,.55); }
.detail-block { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.detail-block.full { grid-column: 1 / -1; }
.detail-block span { display: block; color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 7px; }
.detail-block p, .detail-block li { color: #344041; line-height: 1.5; }
ul { padding-left: 18px; margin: 0; }
.timeline, .resource-list { display: grid; gap: 12px; }
.timeline-item, .resource-item { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 4px; }
.timeline-item time, .resource-item span { color: var(--muted); font-size: 12px; font-weight: 800; }
.timeline-item strong, .resource-item strong { letter-spacing: -0.02em; }
.timeline-item p, .resource-item p { color: var(--muted); font-size: 13px; line-height: 1.45; }
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .stats-grid, .two-column, .two-column.lower { grid-template-columns: 1fr; }
  .stats-grid { margin-top: 0; padding: 0; }
  .pipeline-board { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  main { padding: 18px; }
  .hero, .toolbar { flex-direction: column; align-items: stretch; }
  .profile-content { grid-template-columns: 1fr; }
}

.signature-strip {
  margin-top: -54px;
  margin-left: 24px;
  margin-right: 24px;
  margin-bottom: 28px;
  position: relative;
  z-index: 2;
  padding: 18px 22px;
  border-radius: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(35,46,47,.96), rgba(53,92,93,.94));
  color: white;
  box-shadow: 0 18px 45px rgba(35,46,47,.2);
  border: 1px solid rgba(255,255,255,.12);
}
.signature-strip strong { display: block; font-size: 24px; letter-spacing: -0.05em; margin-top: 3px; }
.signature-strip p:last-child { max-width: 680px; color: rgba(255,255,255,.78); line-height: 1.45; }
.footer-brand {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  padding: 8px 4px 26px;
}
.footer-brand span:first-child { color: var(--accent); }
.hero::after {
  content: "YDL · NOA";
  position: absolute;
  right: 32px;
  bottom: 28px;
  color: rgba(53,92,93,.045);
  font-weight: 950;
  font-size: clamp(34px, 6vw, 82px);
  letter-spacing: -0.08em;
  pointer-events: none;
}
.hero { position: relative; overflow: hidden; }
@media (max-width: 1180px) {
  .signature-strip { margin-top: 0; margin-left: 0; margin-right: 0; flex-direction: column; align-items: flex-start; }
}


.small-credit {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .02em;
}
.signature-strip strong { font-size: 20px; }
.signature-strip p span { color: #d7b17a; font-weight: 850; white-space: nowrap; }


/* v6: quieter maker's marks — bespoke without shouting */
.small-credit { opacity: .72; }
.footer-brand span:last-child { opacity: .68; }
.signature-strip { padding: 16px 20px; }
.signature-strip .eyebrow { opacity: .82; }


/* v8 spacing polish: no crowded metric cards */
.toolbar { margin-top: 2px; }
@media (max-width: 1280px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 116px; }
}

/* v8.1 final breathing room after visual check */
.signature-strip { margin-bottom: 34px; }
.stats-grid { margin-bottom: 4px; }
.toolbar { margin-top: 10px; }
.two-column { margin-top: 2px; }

/* v9 compact command-center layout */
.hero { min-height: 292px; padding: 28px 32px; }
h2 { font-size: clamp(32px, 4.35vw, 54px); line-height: 0.98; max-width: 900px; }
.hero-copy { margin-top: 14px; font-size: 16px; max-width: 780px; }
.small-credit { margin-top: 12px; }
.signature-strip { margin-top: -34px; margin-bottom: 22px; padding: 14px 18px; }
.signature-strip strong { font-size: 18px; }
.signature-strip p:last-child { font-size: 14px; }
.stats-grid { gap: 14px; }
.stat-card { min-height: 108px; padding: 18px 18px; }
.stat-card strong { font-size: clamp(28px, 2.6vw, 36px); }
.toolbar { padding: 12px 14px; margin-top: 0; }
.panel { padding: 20px; }
.section-heading { margin-bottom: 14px; }
.compact-heading { align-items: center; }
.company-cards-panel { scroll-margin-top: 20px; }
.company-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.company-profile-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 12px;
  min-height: 245px;
  box-shadow: 0 10px 26px rgba(54,47,38,.07);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.company-profile-card:hover {
  transform: translateY(-2px);
  border-color: rgba(53,92,93,.42);
  box-shadow: 0 16px 32px rgba(54,47,38,.12);
}
.company-profile-card .profile-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.company-profile-card h4 { margin: 0; font-size: 18px; letter-spacing: -0.04em; }
.company-profile-card .role-line { color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 3px; }
.fit-bubble { width: 44px; min-width: 44px; height: 44px; border-radius: 16px; display: grid; place-items: center; background: #eff5f2; color: var(--green); font-weight: 950; }
.quick-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-meta div { background: #faf6ef; border: 1px solid #eee3d4; border-radius: 13px; padding: 8px; }
.quick-meta span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; margin-bottom: 3px; }
.quick-meta strong { font-size: 12px; line-height: 1.25; }
.check-row { border-top: 1px solid var(--line); padding-top: 10px; }
.check-row span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.check-row p { font-size: 13px; line-height: 1.4; color: #344041; }
.company-profile-card .mini-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.company-profile-card .mini-tag { border-radius: 999px; padding: 5px 8px; font-size: 11px; font-weight: 850; background: #f1e7d9; color: #765334; }
.company-profile-card .mini-tag.hot { background: #e2f0e5; color: var(--green); }
.company-profile-card .mini-tag.action { background: #f7e0dd; color: var(--red); }
.pipeline-board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opportunity-card { padding: 12px; }
.focus-list { gap: 10px; }
.profile-panel { display: none; }
@media (max-width: 1500px) {
  .company-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .company-card-grid, .pipeline-board { grid-template-columns: 1fr; }
  .quick-meta { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .signature-strip { margin-top: 0; }
}

/* v9.1 reduce above-the-fold scrolling */
.hero { min-height: 220px; padding: 24px 28px; align-items: flex-start; }
h2 { font-size: clamp(30px, 3.8vw, 48px); max-width: 980px; }
.hero-copy { max-width: 920px; margin-top: 10px; }
.primary-button { padding: 10px 14px; font-size: 13px; }
.signature-strip { margin-top: -18px; margin-bottom: 16px; padding: 12px 16px; border-radius: 18px; }
.signature-strip p:last-child { max-width: 820px; line-height: 1.32; }
.stats-grid { margin-top: -2px; }
.stat-card { min-height: 96px; padding: 15px 16px; }
.company-profile-card { min-height: 220px; padding: 14px; gap: 10px; }
.check-row { padding-top: 8px; }
.check-row p { font-size: 12.5px; line-height: 1.34; }
.quick-meta div { padding: 7px; }
.sidebar { padding: 24px; gap: 22px; }
.sidebar-card { padding: 15px; }
.sidebar-card strong { font-size: 16px; }
.sidebar-card p { font-size: 13px; }
