:root {
  --ink: #151515;
  --muted: #72746f;
  --line: #dedfd8;
  --paper: #f5f5f0;
  --surface: #ffffff;
  --accent: #d9ff43;
  --accent-dark: #b9df24;
  --orange: #ff7a3d;
  --blue: #4979ff;
  --shadow: 0 18px 45px rgba(22, 24, 18, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  background: #171816;
  color: white;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 42px; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  color: #121310; background: var(--accent); border-radius: 11px;
  font-weight: 900; font-size: 20px; transform: rotate(-4deg);
}
.brand strong { display: block; font-size: 17px; letter-spacing: .04em; }
.brand small { display: block; margin-top: 4px; color: #8e9288; font-size: 8px; letter-spacing: .18em; }
.nav { display: grid; gap: 8px; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  color: #aeb1a9; background: transparent; border: 0; border-radius: 12px; text-align: left;
  transition: .2s ease;
}
.nav-item span { display: grid; place-items: center; width: 24px; font-size: 17px; }
.nav-item:hover { color: white; background: #262823; }
.nav-item.is-active { color: #171816; background: var(--accent); font-weight: 750; }
.sidebar-note {
  margin-top: auto; padding: 18px; color: #dddeda; background: #22231f;
  border: 1px solid #34362f; border-radius: 16px;
}
.sidebar-note .eyebrow { color: #8e9288; }
.sidebar-note strong { display: block; margin: 8px 0; font-size: 23px; }
.sidebar-note p { margin: 9px 0 0; color: #868a80; font-size: 11px; line-height: 1.5; }
.mini-progress { height: 5px; overflow: hidden; background: #3a3c35; border-radius: 9px; }
.mini-progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .3s; }

.main { grid-column: 2; min-width: 0; padding: 0 42px 56px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center; min-height: 112px;
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 3px 0 0; font-size: 28px; letter-spacing: -.04em; }
.eyebrow { margin: 0; color: #868980; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.button {
  min-height: 42px; padding: 0 17px; border: 1px solid var(--line); border-radius: 11px;
  background: white; color: var(--ink); font-weight: 700; transition: .18s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.07); }
.button-primary { border-color: #171816; color: white; background: #171816; }
.button-primary span { color: var(--accent); }
.button-ghost { background: transparent; }
.file-button { display: inline-flex; align-items: center; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.view { display: none; padding-top: 28px; animation: fadeIn .25s ease; }
.view.is-active { display: block; }
@keyframes fadeIn { from { opacity: .25; transform: translateY(5px); } }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metric-card {
  min-height: 142px; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 14px;
  padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.metric-card small { grid-column: 2; align-self: end; color: var(--muted); font-size: 11px; }
.metric-card div span { display: block; color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; margin-top: 10px; font-size: 34px; letter-spacing: -.05em; }
.metric-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; font-weight: 900; }
.metric-featured { color: #15170f; background: var(--accent); border-color: var(--accent); }
.metric-featured .metric-icon { border-color: rgba(0,0,0,.18); }
.metric-featured div span, .metric-featured small { color: #555c35; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.opportunity-panel { padding: 24px; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel h2, .page-intro h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.035em; }
.result-count { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.filter-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter-row select, .search-field {
  height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fafaf7;
}
.filter-row select { padding: 0 28px 0 11px; color: #51534e; }
.search-field { display: flex; align-items: center; gap: 7px; width: 250px; padding: 0 11px; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; }
.filter-reset { height: 40px; padding: 0 12px; color: #5c5f57; background: transparent; border: 1px dashed #c9cbc3; border-radius: 10px; }
.filter-reset:hover { color: var(--ink); border-color: #92958b; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.project-card {
  position: relative; min-height: 365px; display: flex; flex-direction: column; padding: 19px;
  border: 1px solid var(--line); border-radius: 15px; background: #fbfbf8; overflow: hidden;
  transition: .2s ease;
}
.project-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--band-color); }
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c9cbc2; }
.project-card[data-band="strong"] { --band-color: var(--accent-dark); }
.project-card[data-band="watch"] { --band-color: var(--orange); }
.project-card[data-band="weak"] { --band-color: #b9bcb3; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.platforms { display: flex; flex-wrap: wrap; gap: 5px; }
.platform-chip, .status-chip {
  padding: 4px 7px; border-radius: 6px; background: #eceee6; color: #555850;
  font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.status-chip { background: #1c1d1a; color: white; }
.status-chip.testing { background: var(--blue); }
.status-chip.shortlist { background: #c3eb31; color: #222; }
.status-chip.parked { background: #d4d5d0; color: #5b5d57; }
.project-card h3 { margin: 18px 0 4px; font-size: 19px; letter-spacing: -.03em; }
.advertiser { margin: 0; color: var(--muted); font-size: 11px; }
.pain-copy { margin: 17px 0; color: #484a45; font-size: 12px; line-height: 1.65; }
.evidence-chips { display: flex; flex-wrap: wrap; gap: 5px; min-height: 46px; margin-bottom: 12px; align-content: flex-start; }
.evidence-chips span { padding: 5px 7px; color: #4d562d; background: #f0f8d6; border-radius: 6px; font-size: 8px; font-weight: 800; }
.evidence-chips span.is-muted { color: #85877f; background: #eeefea; }
.signal-row { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid #e5e6e0; border-bottom: 1px solid #e5e6e0; }
.signal-row > span { min-width: 0; flex: 1; }
.signal-row span { color: var(--muted); font-size: 10px; }
.signal-row b { display: block; margin-top: 3px; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.score-row { display: flex; align-items: end; justify-content: space-between; margin-top: auto; padding-top: 16px; }
.score-number { display: flex; align-items: baseline; gap: 4px; }
.score-number strong { font-size: 30px; letter-spacing: -.06em; }
.score-number span { color: var(--muted); font-size: 10px; }
.score-label { display: block; margin-bottom: 3px; color: var(--band-color); font-size: 10px; font-weight: 800; }
.card-actions { display: flex; gap: 6px; }
.card-actions button, .card-actions a {
  display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line);
  border-radius: 8px; background: white; color: #444740;
}
.card-actions button:hover, .card-actions a:hover { border-color: #999c92; }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-state span { font-size: 34px; }
.empty-state h3 { margin: 10px 0 4px; color: var(--ink); }
.empty-state p { margin: 0; font-size: 12px; }

.live-hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 15px 0 22px; }
.live-hero h2 { margin: 5px 0 8px; font-size: 31px; letter-spacing: -.045em; }
.live-hero p:last-child { max-width: 700px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.live-status { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 10px 13px; color: #777a71; background: white; border: 1px solid var(--line); border-radius: 10px; font-size: 10px; }
.live-status i { width: 8px; height: 8px; background: #b8bbb2; border-radius: 50%; }
.live-status.is-online i { background: #82b400; box-shadow: 0 0 0 4px #edf8c9; }
.live-status.is-offline i { background: #e25737; box-shadow: 0 0 0 4px #ffe2da; }
.automation-control-panel { margin-bottom: 14px; padding: 21px; color: white; background: #191a17; border: 1px solid #292b26; border-radius: 16px; box-shadow: 0 18px 50px rgba(22,23,19,.12); }
.automation-control-panel.is-running { border-color: #63752a; }
.automation-control-panel.is-paused { opacity: .78; }
.automation-control-panel.is-unavailable { border-color: #78483c; }
.automation-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.automation-title { display: flex; align-items: center; gap: 12px; }
.automation-icon { display: grid; place-items: center; width: 38px; height: 38px; color: #181915; background: var(--accent); border-radius: 11px; font-size: 20px; font-weight: 900; }
.automation-control-panel.is-running .automation-icon { animation: automationSpin 1.8s linear infinite; }
@keyframes automationSpin { to { transform: rotate(360deg); } }
.automation-title h3 { margin: 3px 0 3px; font-size: 17px; }
.automation-title small { color: #979b91; font-size: 9px; }
.automation-controls { display: flex; align-items: center; gap: 10px; }
.automation-switch { display: flex; align-items: center; gap: 7px; color: #bec1b8; cursor: pointer; font-size: 9px; }
.automation-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.automation-switch span { position: relative; width: 35px; height: 20px; background: #3a3c36; border-radius: 99px; transition: .2s; }
.automation-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: #aaaDA4; border-radius: 50%; transition: .2s; }
.automation-switch input:checked + span { background: var(--accent); }
.automation-switch input:checked + span::after { left: 18px; background: #191a17; }
.automation-run-button { color: #1a1b17; background: var(--accent); border-color: var(--accent); }
.automation-run-button:disabled { cursor: not-allowed; opacity: .48; }
.automation-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.automation-stats > div { min-width: 0; padding: 13px; background: #252722; border: 1px solid #33352f; border-radius: 10px; }
.automation-stats span { display: block; color: #8c9086; font-size: 8px; font-weight: 800; }
.automation-stats strong { display: block; margin: 7px 0 3px; overflow: hidden; color: white; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.automation-stats small { color: #73776e; font-size: 7px; }
.automation-coverage { margin-top: 9px; padding: 9px 11px; color: #aeb2a8; background: #22241f; border: 1px solid #30322c; border-radius: 8px; font-size: 8px; line-height: 1.5; }
.automation-progress-row { display: grid; gap: 9px; margin-top: 11px; }
.automation-progress-row > div { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 12px; }
.automation-progress-row > div > span { color: #9da198; font-size: 8px; }
.automation-progress-row > div > i { height: 5px; overflow: hidden; background: #30322d; border-radius: 99px; }
.automation-progress-row > div > i em { display: block; width: 0; height: 100%; background: var(--accent); border-radius: inherit; transition: .3s; }
.automation-details { background: #22241f; border-radius: 9px; }
.automation-details summary { padding: 10px 12px; color: #a9ada3; cursor: pointer; font-size: 8px; font-weight: 800; }
.automation-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 2px 12px 13px; }
.automation-details-grid h4 { margin: 0 0 7px; color: #7f8379; font-size: 8px; }
.automation-details-grid > div > div { display: grid; gap: 5px; max-height: 145px; overflow-y: auto; }
.automation-details-grid span { display: flex; align-items: center; gap: 6px; padding: 7px 8px; color: #afb3a9; background: #2b2d28; border-radius: 6px; font-size: 7px; }
.automation-details-grid span b { color: var(--accent); }
.automation-details-grid span small { margin-left: auto; color: #70746b; }
.automation-details-grid span.has-failure { color: #f0ae9e; }
.automation-config-details { margin-top: 12px; background: #22241f; border: 1px solid #30322c; border-radius: 12px; }
.automation-config-details summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; color: #d8dbd2; cursor: pointer; list-style: none; }
.automation-config-details summary::-webkit-details-marker { display: none; }
.automation-config-details summary span { display: grid; gap: 3px; }
.automation-config-details summary b { font-size: 10px; }
.automation-config-details summary small { color: #8f9389; font-size: 8px; }
.automation-config-details summary i { display: grid; place-items: center; width: 24px; height: 24px; color: #191a17; background: var(--accent); border-radius: 7px; font-style: normal; font-weight: 900; transition: .2s; }
.automation-config-details[open] summary i { transform: rotate(45deg); }
.automation-config-grid { display: grid; grid-template-columns: 1.25fr 1fr .75fr; gap: 10px; padding: 0 13px 13px; }
.automation-config-card { display: grid; gap: 10px; padding: 13px; background: #2a2c27; border: 1px solid #393b35; border-radius: 10px; }
.automation-config-card h4 { margin: 3px 0 0; color: white; font-size: 12px; }
.automation-config-card small { color: #90958a; font-size: 8px; }
.automation-config-card small.is-error { color: #f0ae9e; }
.automation-config-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.automation-config-fields label { display: grid; gap: 5px; color: #8e9288; font-size: 8px; font-weight: 800; }
.automation-config-fields label.wide { grid-column: 1 / -1; }
.automation-config-fields input, .automation-config-fields select { width: 100%; min-width: 0; padding: 9px 10px; color: #f5f6ef; background: #1d1f1b; border: 1px solid #3a3d36; border-radius: 8px; outline: none; font: inherit; font-size: 9px; }
.automation-config-fields input:focus, .automation-config-fields select:focus { border-color: var(--accent); }
.automation-config-lists { display: grid; grid-template-columns: 1.3fr .7fr 1fr; gap: 10px; padding: 0 13px 13px; }
.automation-config-lists > div { min-width: 0; padding: 11px; background: #282a25; border: 1px solid #373a33; border-radius: 10px; }
.automation-config-lists h4 { margin: 0 0 8px; color: #a3a79e; font-size: 9px; }
.automation-config-lists > div > div { display: grid; gap: 6px; max-height: 160px; overflow-y: auto; }
.automation-config-lists span { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 7px 8px; color: #c5c9bf; background: #1f211d; border-radius: 7px; font-size: 8px; }
.automation-config-lists span b { flex: 0 0 auto; color: var(--accent); }
.automation-config-lists span small { margin-left: auto; overflow: hidden; color: #81867b; text-overflow: ellipsis; white-space: nowrap; }
.automation-config-lists button { flex: 0 0 auto; padding: 4px 7px; color: #f0ae9e; background: transparent; border: 1px solid #55413b; border-radius: 6px; cursor: pointer; font-size: 8px; }
.live-metric-grid { display: grid; grid-template-columns: 1.15fr repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.live-metric-card { min-width: 0; min-height: 118px; padding: 19px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.live-metric-card > span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; }
.live-metric-card strong { display: block; margin: 13px 0 5px; font-size: 31px; line-height: 1; letter-spacing: -.06em; }
.live-metric-card small { color: #8a8d84; font-size: 9px; }
.live-metric-primary { color: #171910; background: var(--accent); border-color: var(--accent); }
.live-metric-primary > span, .live-metric-primary small { color: #596039; }
.live-insight-grid { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr; gap: 12px; margin-bottom: 14px; }
.insight-card { min-width: 0; padding: 20px; }
.insight-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.insight-heading h3 { margin: 4px 0 0; font-size: 15px; }
.insight-heading > span { padding: 5px 7px; color: #777a72; background: #f0f1ec; border-radius: 6px; font-size: 8px; font-weight: 800; }
.bar-list { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(85px, 1fr) minmax(90px, 1.3fr) 30px; align-items: center; gap: 9px; }
.bar-row > div { display: flex; align-items: center; justify-content: space-between; min-width: 0; color: #666960; font-size: 9px; }
.bar-row > div b { color: var(--ink); font-size: 10px; }
.bar-row > i { height: 6px; overflow: hidden; background: #eceee7; border-radius: 99px; }
.bar-row > i em { display: block; width: var(--bar-width); height: 100%; background: #9ca096; border-radius: inherit; }
.bar-row > small { color: #8c8f86; font-size: 8px; text-align: right; }
.bar-row.bar-app > i em { background: #4e78e4; }
.bar-row.bar-social > i em { background: #a45bd2; }
.bar-row.bar-commerce > i em { background: #e38243; }
.bar-row.bar-excluded > i em { background: #b5b8b0; }
.bar-row.bar-meta > i em { background: #2864e8; }
.bar-row.bar-instagram > i em { background: linear-gradient(90deg, #f58529, #dd2a7b, #8134af); }
.bar-row.bar-tiktok > i em { background: #191a17; }
.bar-row.bar-google > i em { background: #e35b4f; }
.bar-row.bar-youtube > i em { background: #ef3434; }
.quality-card dl { display: grid; gap: 0; margin: 0; }
.quality-card dl > div { display: flex; align-items: center; justify-content: space-between; min-height: 43px; border-bottom: 1px solid #ecece7; }
.quality-card dl > div:last-child { border-bottom: 0; }
.quality-card dt { color: #777a72; font-size: 9px; }
.quality-card dd { margin: 0; font-size: 15px; font-weight: 850; }
.collector-setup { display: grid; grid-template-columns: .75fr 1.25fr; gap: 35px; margin-bottom: 16px; padding: 24px; color: white; background: #191a17; border-radius: var(--radius); }
.setup-copy h3 { margin: 6px 0 8px; font-size: 19px; }
.setup-copy > p:last-child { margin: 0; color: #92968b; font-size: 10px; line-height: 1.7; }
.setup-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.setup-steps span { display: flex; align-items: center; gap: 8px; padding: 12px; color: #c3c6bd; background: #252722; border: 1px solid #34362f; border-radius: 9px; font-size: 9px; }
.setup-steps b { display: grid; place-items: center; width: 20px; height: 20px; color: #171816; background: var(--accent); border-radius: 6px; font-size: 9px; }
.setup-steps code { grid-column: 1 / -1; padding: 12px 14px; overflow: hidden; color: var(--accent); background: #10110f; border-radius: 8px; font-family: Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.collector-setup.collector-details { display: block; padding: 0; }
.collector-details summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 19px; cursor: pointer; list-style: none; }
.collector-details summary::-webkit-details-marker { display: none; }
.collector-details summary span { display: flex; align-items: center; gap: 10px; }
.collector-details summary b { color: white; font-size: 11px; }
.collector-details summary small { color: #858980; font-size: 9px; }
.collector-details summary i { display: grid; place-items: center; width: 25px; height: 25px; color: #1a1b17; background: var(--accent); border-radius: 7px; font-style: normal; font-weight: 900; transition: .2s; }
.collector-details[open] summary i { transform: rotate(45deg); }
.collector-details-body { display: grid; grid-template-columns: .75fr 1.25fr; gap: 35px; padding: 3px 24px 24px; }
.live-panel { padding: 24px; }
.live-panel-heading { margin-bottom: 14px; }
.capture-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 11px; background: #f3f4ef; border-radius: 11px; }
.capture-search { display: flex; align-items: center; gap: 7px; min-width: 260px; height: 38px; padding: 0 10px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.capture-search span { color: #85887f; }
.capture-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 10px; }
.capture-toolbar select { height: 38px; padding: 0 28px 0 10px; color: #54574f; background: white; border: 1px solid var(--line); border-radius: 9px; font-size: 9px; }
.capture-toolbar .filter-reset { height: 38px; margin-left: auto; }
.capture-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: -4px 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.capture-tabs button { min-height: 36px; padding: 0 11px; color: #6d7068; background: #f1f2ed; border: 1px solid transparent; border-radius: 9px; font-size: 9px; font-weight: 800; }
.capture-tabs button b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 5px; padding: 0 5px; color: #73766e; background: white; border-radius: 6px; font-size: 8px; }
.capture-tabs button.is-active { color: white; background: #191a17; }
.capture-tabs button.is-active b { color: #171816; background: var(--accent); }
.capture-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.capture-table { width: 100%; min-width: 800px; border-collapse: collapse; background: white; }
.capture-table th { padding: 11px 12px; color: #7b7e75; background: #f5f6f2; border-bottom: 1px solid var(--line); font-size: 8px; font-weight: 850; letter-spacing: .04em; text-align: left; }
.capture-table td { padding: 13px 12px; border-bottom: 1px solid #ecece7; color: #4e514a; font-size: 9px; vertical-align: middle; }
.capture-table tr:last-child td { border-bottom: 0; }
.capture-table tbody tr:hover td { background: #fbfcf7; }
.capture-table tr[data-focus-category^="excluded"] td { color: #85887f; background: #fafaf8; }
.capture-project-cell { width: 34%; }
.capture-project-cell strong { display: block; color: var(--ink); font-size: 11px; line-height: 1.45; }
.capture-project-cell small { display: block; margin-top: 4px; color: #868980; font-size: 8px; }
.translated-caption { display: -webkit-box; margin: 6px 0 0; overflow: hidden; color: #575a53; font-size: 8px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.translation-pending { display: inline-block; margin-top: 5px; padding: 3px 5px; color: #8a5b30; background: #fff0dc; border-radius: 4px; font-size: 7px; font-weight: 800; }
.original-copy { margin-top: 6px; }
.original-copy summary { width: fit-content; color: #6d743f; cursor: pointer; font-size: 7px; font-weight: 850; }
.original-copy p { margin: 5px 0 0; padding: 6px 7px; color: #787b74; background: #f2f3ef; border-radius: 5px; font-size: 7px; line-height: 1.55; }
.original-copy b { color: #565951; }
.source-ok, .source-pending { display: block; margin-top: 6px; color: #66821d; font-size: 7px; font-weight: 850; }
.source-pending { color: #9d6d3d; }
.table-signals { display: flex; flex-wrap: wrap; gap: 5px; max-width: 190px; }
.table-signals span { padding: 4px 6px; color: #596143; background: #eff5d9; border-radius: 5px; font-size: 7px; }
.table-signals span b { color: var(--ink); }
.table-signals .signal-copy { color: #73766f; background: #f0f1ed; line-height: 1.45; }
.landing-state { color: #90938a; font-size: 8px; font-weight: 800; }
.landing-state.has-landing { color: #4d6417; }
.capture-table time { color: #75786f; font-size: 8px; white-space: nowrap; }
.table-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.table-actions a, .table-actions button { min-height: 29px; padding: 0 8px; color: #444740; background: white; border: 1px solid var(--line); border-radius: 7px; font-size: 8px; font-weight: 800; }
.table-actions button { color: white; background: #191a17; border-color: #191a17; }
.capture-pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 12px; color: #777a72; font-size: 8px; }
.capture-pagination label, .capture-pagination > div { display: flex; align-items: center; gap: 7px; }
.capture-pagination select, .capture-pagination button { height: 30px; padding: 0 8px; color: #55584f; background: white; border: 1px solid var(--line); border-radius: 7px; font-size: 8px; }
.capture-pagination button:disabled { opacity: .38; cursor: not-allowed; }
.capture-pagination span { min-width: 70px; text-align: center; }
.capture-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.capture-card { display: flex; flex-direction: column; min-height: 360px; padding: 20px; background: #fbfbf8; border: 1px solid var(--line); border-radius: 15px; }
.capture-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.capture-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.focus-badge { padding: 4px 7px; color: #484c42; background: #e7e9e1; border-radius: 6px; font-size: 8px; font-weight: 900; }
.focus-badge.app { color: #274caa; background: #e1eaff; }
.focus-badge.social_lead { color: #6a398f; background: #f0e1ff; }
.focus-badge.ecommerce { color: #814521; background: #ffe7d5; }
.focus-badge.excluded_local, .focus-badge.excluded_brand { color: #74776f; background: #e8e9e4; }
.verified-badge, .unverified-badge { padding: 5px 8px; color: #40501d; background: #eaf8b7; border-radius: 7px; font-size: 8px; font-weight: 900; }
.unverified-badge { color: #8a5c34; background: #fff0dd; }
.capture-card h3 { margin: 16px 0 5px; font-size: 19px; letter-spacing: -.03em; }
.capture-meta { margin: 0; color: var(--muted); font-size: 10px; }
.classification-reason { margin: 8px 0 0; color: #7c8076; font-size: 9px; font-weight: 700; }
.capture-caption { display: -webkit-box; margin: 17px 0; overflow: hidden; color: #494b46; font-size: 11px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.capture-metrics { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0; border-top: 1px solid #e5e6e0; border-bottom: 1px solid #e5e6e0; }
.capture-metrics span { min-width: 70px; color: var(--muted); font-size: 8px; }
.capture-metrics b { display: block; margin-top: 3px; color: var(--ink); font-size: 11px; }
.capture-source { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 13px; color: #868980; font-size: 8px; }
.capture-source code { color: #6c714f; }
.capture-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.capture-actions a, .capture-actions button { display: inline-flex; align-items: center; min-height: 34px; padding: 0 11px; color: #3f423c; background: white; border: 1px solid var(--line); border-radius: 8px; font-size: 9px; font-weight: 800; }
.capture-actions button { margin-left: auto; color: white; background: #191a17; border-color: #191a17; }

.page-intro { max-width: 720px; margin: 15px 0 30px; }
.page-intro h2 { font-size: 32px; }
.page-intro > p:last-child { color: var(--muted); line-height: 1.8; }
.source-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.source-card {
  min-height: 170px; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 18px;
  padding: 24px; border-radius: var(--radius); background: white; border: 1px solid var(--line); transition: .2s;
}
.source-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.source-logo { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: #ededeb; font-size: 20px; font-weight: 900; }
.source-card div > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .15em; }
.source-card h3 { margin: 7px 0; font-size: 19px; }
.source-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.source-card b { font-size: 18px; }
.source-card.meta .source-logo { color: white; background: #2864e8; }
.source-card.instagram .source-logo { color: white; background: linear-gradient(135deg, #f58529, #dd2a7b 45%, #8134af); }
.source-card.google .source-logo { color: white; background: #e54b3e; }
.source-card.tiktok .source-logo { color: white; background: #171816; }
.source-card.youtube .source-logo { color: white; background: #f12828; }
.checklist-panel { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; margin-top: 16px; padding: 28px; }
.checklist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.checklist span { padding: 14px; background: #f2f3ed; border-radius: 9px; font-size: 11px; font-weight: 700; }

.method-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 14px; margin-bottom: 16px; }
.method-flow article { min-height: 190px; padding: 23px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.method-flow article > span { color: var(--accent-dark); font-size: 12px; font-weight: 900; }
.method-flow h3 { margin: 30px 0 8px; font-size: 19px; }
.method-flow p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.method-flow i { color: #a2a49d; font-style: normal; }
.score-guide { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; padding: 30px; }
.score-guide-copy p:last-child { color: var(--muted); font-size: 12px; line-height: 1.7; }
.score-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 25px; }
.score-bars div { position: relative; padding-bottom: 9px; border-bottom: 4px solid #e8e9e3; font-size: 11px; }
.score-bars span { color: var(--muted); }
.score-bars b { float: right; }
.score-bars i { position: absolute; left: 0; bottom: -4px; width: var(--width); height: 4px; background: var(--accent-dark); }

.project-dialog {
  width: min(780px, calc(100vw - 30px)); max-height: calc(100vh - 30px); padding: 0;
  border: 0; border-radius: 20px; box-shadow: 0 35px 100px rgba(0,0,0,.28);
}
.project-dialog::backdrop { background: rgba(18,19,16,.62); backdrop-filter: blur(4px); }
.project-dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 30px); }
.dialog-head, .dialog-actions { display: flex; align-items: center; justify-content: space-between; padding: 21px 25px; background: white; }
.dialog-head { border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 3px 0 0; font-size: 23px; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 22px; }
.dialog-body { overflow-y: auto; padding: 0 25px; background: #f8f8f4; }
.dialog-actions { border-top: 1px solid var(--line); justify-content: flex-end; gap: 8px; }
.form-section { position: relative; padding: 24px 0 28px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 19px; }
.form-section-title > span { display: grid; place-items: center; width: 32px; height: 32px; color: #20221a; background: var(--accent); border-radius: 9px; font-size: 10px; font-weight: 900; }
.form-section-title h3 { margin: 0; font-size: 15px; }
.form-section-title p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: grid; gap: 6px; color: #65675f; font-size: 11px; font-weight: 700; }
.field-wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid #d9dbd3; border-radius: 9px; background: white; outline: none;
  color: var(--ink); font-weight: 500;
}
.field input, .field select { height: 40px; padding: 0 11px; }
.field textarea { padding: 10px 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #93978b; box-shadow: 0 0 0 3px rgba(217,255,67,.35); }
.checkbox-field { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 12px; border: 1px solid #d9dbd3; border-radius: 9px; background: white; }
.checkbox-field legend { padding: 0 5px; }
.checkbox-field label { display: flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 7px; background: #f1f2ed; }
.economics-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
.cac-preview { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 20px; margin-top: 3px; padding: 16px 18px; color: white; background: #1b1c19; border-radius: 12px; }
.cac-preview span { font-size: 11px; font-weight: 700; }
.cac-preview strong { grid-row: 1 / 3; grid-column: 2; color: var(--accent); font-size: 28px; letter-spacing: -.04em; }
.cac-preview small { color: #90948a; font-size: 9px; }
.evidence-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 14px; }
.evidence-preview span { padding: 9px 10px; color: #969990; background: #eeefea; border-radius: 8px; font-size: 9px; font-weight: 750; }
.evidence-preview span.is-met { color: #43501c; background: #eaf8b7; }
.score-section { padding-right: 130px; }
.live-score { position: absolute; top: 24px; right: 4px; width: 112px; text-align: center; }
.live-score strong { font-size: 35px; letter-spacing: -.07em; }
.live-score span { color: var(--muted); font-size: 10px; }
.live-score small { display: block; color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.slider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.slider-grid label > span { display: flex; justify-content: space-between; color: #5f625a; font-size: 11px; font-weight: 700; }
.slider-grid b { color: var(--ink); }
input[type="range"] { width: 100%; accent-color: #181915; }

.detail-dialog {
  width: min(920px, calc(100vw - 30px)); max-height: calc(100vh - 30px); padding: 0;
  border: 0; border-radius: 20px; box-shadow: 0 35px 100px rgba(0,0,0,.28);
}
.detail-dialog::backdrop { background: rgba(18,19,16,.62); backdrop-filter: blur(4px); }
.detail-head, .detail-actions { position: sticky; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 21px 25px; background: white; }
.detail-head { top: 0; border-bottom: 1px solid var(--line); }
.detail-head h2 { margin: 3px 0 0; font-size: 23px; }
.detail-actions { bottom: 0; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.detail-body { padding: 24px; background: #f8f8f4; }
.detail-summary { display: grid; grid-template-columns: 150px 1fr; gap: 14px; margin-bottom: 14px; }
.detail-score { display: grid; place-content: center; min-height: 140px; text-align: center; color: var(--ink); background: var(--accent); border-radius: 16px; }
.detail-score[data-band="watch"] { background: #ffe2d4; }
.detail-score[data-band="weak"] { background: #e4e5df; }
.detail-score strong { font-size: 47px; line-height: 1; letter-spacing: -.08em; }
.detail-score > span { color: #676b5a; font-size: 10px; }
.detail-score small { margin-top: 8px; font-size: 10px; font-weight: 900; }
.detail-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.detail-kpis div { display: flex; align-items: center; justify-content: space-between; padding: 17px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.detail-kpis span { color: var(--muted); font-size: 10px; }
.detail-kpis b { font-size: 16px; }
.detail-section { margin-top: 14px; padding: 23px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.detail-section-head { margin-bottom: 17px; }
.detail-section-head h3 { margin: 3px 0 0; font-size: 17px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 11px; }
.detail-field { padding: 14px; background: #fbfbf8; }
.detail-field span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.detail-field p { margin: 6px 0 0; font-size: 11px; line-height: 1.65; }
.detail-split { display: grid; grid-template-columns: 1fr 280px; gap: 22px; }
.detail-evidence { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.detail-evidence span { display: flex; align-items: center; gap: 7px; padding: 9px; color: #8c8f87; background: #f0f1ec; border-radius: 8px; font-size: 9px; }
.detail-evidence span.is-met { color: #3f4a20; background: #edf8c8; }
.detail-evidence b { font-size: 12px; }
.economics-card { display: flex; flex-direction: column; justify-content: center; min-height: 190px; padding: 22px; color: white; background: #191a17; border-radius: 14px; }
.economics-card .eyebrow { color: #858a7e; }
.economics-card > span { margin-top: 24px; color: #afb2aa; font-size: 10px; }
.economics-card strong { margin: 5px 0; color: var(--accent); font-size: 39px; letter-spacing: -.06em; }
.economics-card small { color: #7f8378; font-size: 9px; line-height: 1.5; }
.detail-notes { margin: 0; color: #4f514c; font-size: 11px; line-height: 1.8; white-space: pre-wrap; }
.detail-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.detail-links a { padding: 9px 12px; background: #eff0eb; border-radius: 8px; font-size: 10px; font-weight: 800; }
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 20; padding: 12px 16px;
  color: white; background: #191a17; border-radius: 10px; box-shadow: var(--shadow);
  font-size: 12px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .method-flow { grid-template-columns: repeat(2, 1fr); }
  .method-flow i { display: none; }
  .live-metric-grid { grid-template-columns: repeat(3, 1fr); }
  .live-insight-grid { grid-template-columns: 1fr 1fr; }
  .quality-card { grid-column: 1 / -1; }
}
@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 16px; }
  .brand { margin: 0 0 16px; }
  .nav { grid-template-columns: repeat(4, 1fr); }
  .nav-item { justify-content: center; }
  .sidebar-note { display: none; }
  .main { padding: 0 16px 35px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 16px; padding: 22px 0; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .topbar-actions .button { flex: 1; }
  .panel-heading { align-items: stretch; flex-direction: column; }
  .filter-row { flex-wrap: wrap; }
  .search-field { width: 100%; }
  .filter-row select { flex: 1; }
  .source-grid, .score-guide, .checklist-panel { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: repeat(2, 1fr); }
  .economics-form { grid-template-columns: repeat(2, 1fr); }
  .detail-split { grid-template-columns: 1fr; }
  .collector-setup { grid-template-columns: 1fr; }
  .live-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .live-insight-grid { grid-template-columns: 1fr; }
  .quality-card { grid-column: auto; }
  .collector-details-body { grid-template-columns: 1fr; }
  .capture-toolbar { align-items: stretch; flex-wrap: wrap; }
  .capture-search { width: 100%; min-width: 0; }
  .capture-toolbar select { flex: 1; }
  .automation-head { align-items: flex-start; flex-direction: column; }
  .automation-controls { width: 100%; justify-content: space-between; }
  .automation-stats { grid-template-columns: repeat(2, 1fr); }
  .automation-progress-row > div { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav-item { font-size: 11px; padding: 10px 6px; }
  .nav-item span { display: none; }
  .metric-grid, .project-grid, .method-flow, .form-grid, .slider-grid, .score-bars, .capture-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 120px; }
  .page-intro h2 { font-size: 27px; }
  .field-wide { grid-column: auto; }
  .economics-form, .evidence-preview, .detail-summary, .detail-kpis, .detail-grid, .detail-evidence { grid-template-columns: 1fr; }
  .cac-preview { grid-column: auto; }
  .score-section { padding-right: 0; }
  .live-score { position: static; width: auto; margin: -5px 0 18px; text-align: left; }
  .dialog-body { padding: 0 17px; }
  .live-hero { align-items: flex-start; flex-direction: column; }
  .setup-steps { grid-template-columns: 1fr; }
  .setup-steps code { grid-column: auto; }
  .live-metric-grid { grid-template-columns: 1fr 1fr; }
  .live-metric-primary { grid-column: 1 / -1; }
  .collector-details summary span { align-items: flex-start; flex-direction: column; gap: 3px; }
  .capture-toolbar select { width: 100%; flex: auto; }
  .capture-toolbar .filter-reset { width: 100%; margin-left: 0; }
  .capture-pagination { align-items: stretch; flex-direction: column; }
  .capture-pagination > div { justify-content: space-between; }
  .automation-controls { align-items: stretch; flex-direction: column; }
  .automation-details-grid { grid-template-columns: 1fr; }
  .capture-table-wrap { overflow: visible; border: 0; }
  .capture-table { min-width: 0; background: transparent; }
  .capture-table thead { display: none; }
  .capture-table, .capture-table tbody, .capture-table tr, .capture-table td { display: block; width: 100%; }
  .capture-table tr { margin-bottom: 10px; padding: 13px; background: white; border: 1px solid var(--line); border-radius: 12px; }
  .capture-table td { display: grid; grid-template-columns: 92px 1fr; align-items: center; padding: 8px 0; border-bottom: 1px solid #efefeb; }
  .capture-table td::before { content: attr(data-label); color: #969990; font-size: 8px; font-weight: 800; }
  .capture-project-cell { width: 100%; }
  .capture-project-cell strong, .capture-project-cell small { grid-column: 2; }
  .table-signals { max-width: none; }
}
