:root {
  --night: #071f1b;
  --night-soft: #0c3029;
  --paper: #f3f7f5;
  --surface: #ffffff;
  --ink: #10201c;
  --muted: #687873;
  --line: #d9e4e0;
  --jade: #20a77a;
  --mint: #88e1bd;
  --mint-pale: #e7f7f0;
  --violet: #7657d6;
  --violet-pale: #f0edfb;
  --coral: #f26d5b;
  --amber: #d99a37;
  --card-shadow: 0 18px 45px rgba(14, 51, 43, .09);
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
a { color: inherit; }
button, select, input { border-radius: 0; }
:focus-visible { outline: 3px solid rgba(32, 167, 122, .35); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.masthead {
  width: min(1320px, calc(100% - 64px));
  height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: 184px; height: auto; }
.run-status { display: flex; align-items: center; gap: 9px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.62); color: var(--muted); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px rgba(217, 154, 55, .1); }
.run-status.ok .status-dot { background: var(--jade); box-shadow: 0 0 0 5px rgba(32, 167, 122, .1); }
.run-status.error .status-dot { background: var(--coral); box-shadow: 0 0 0 5px rgba(242, 109, 91, .1); }

main { width: min(1320px, calc(100% - 64px)); margin: 0 auto; }
.section-kicker { margin: 0 0 17px; color: var(--jade); font: 650 11px/1.4 "SFMono-Regular", Consolas, monospace; letter-spacing: .13em; text-transform: uppercase; }
.view-tabs { display: flex; gap: 6px; width: fit-content; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.7); }
.view-tab { min-width: 164px; padding: 12px 16px; border: 0; border-radius: 11px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--muted); background: transparent; cursor: pointer; text-align: left; }
.view-tab span { font-size: 14px; font-weight: 650; }
.view-tab strong { font: 600 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .07em; text-transform: uppercase; opacity: .68; }
.view-tab:hover { color: var(--ink); background: rgba(255,255,255,.75); }
.view-tab.is-active { color: #fff; background: var(--night); }
.view-tab.is-active strong { color: var(--mint); opacity: 1; }
.signal-strip { position: relative; z-index: 4; width: 100%; margin: 0 0 24px; display: grid; grid-template-columns: repeat(4, 1fr) 1.45fr; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: 0 12px 38px rgba(11,45,38,.07); }
.signal-strip > div { min-height: 104px; padding: 22px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.signal-strip > div:last-child { border-right: 0; }
.signal-strip span { color: var(--muted); font-size: 11px; }
.signal-strip strong { font: 650 28px/1.2 "Avenir Next Condensed", "Arial Narrow", sans-serif; }
.signal-strip .last-scan strong { font-size: 15px; font-family: "PingFang SC", sans-serif; font-weight: 600; }

.catalog { padding: 44px 0 110px; }
.catalog-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.catalog-heading .section-kicker { margin-bottom: 7px; }
.catalog-heading h1 { margin: 0; font-size: 42px; line-height: 1.15; letter-spacing: -.05em; }
.catalog-heading > p { margin: 0 0 5px; color: var(--muted); font-size: 12px; }

.filters { position: sticky; z-index: 10; top: 12px; display: grid; grid-template-columns: minmax(210px, 1.45fr) repeat(6, minmax(102px, .7fr)) auto; gap: 8px; padding: 10px; border: 1px solid rgba(201,216,211,.9); border-radius: 20px; background: rgba(243,247,245,.88); box-shadow: 0 12px 38px rgba(13,47,40,.08); backdrop-filter: blur(14px); }
.filters label { position: relative; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 8px 11px; border: 1px solid transparent; border-radius: 12px; background: var(--surface); }
.filters label:focus-within { border-color: var(--jade); }
.filters label > span:not(.sr-only) { color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.filters input, .filters select { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-field { flex-direction: row !important; align-items: center; }
.search-field svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.filters button, .empty-state button { border: 1px solid var(--night); border-radius: 12px; background: var(--night); color: #fff; padding: 0 16px; cursor: pointer; font-size: 12px; transition: background .18s ease, transform .18s ease; }
.filters button:hover, .empty-state button:hover { background: var(--jade); border-color: var(--jade); transform: translateY(-1px); }

.catalog-grid { margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.signal-card { --tone: var(--jade); min-width: 0; min-height: 548px; padding: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; display: flex; flex-direction: column; background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.8); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.signal-card::before { content: ""; height: 5px; margin: -24px -24px 21px; background: linear-gradient(90deg, var(--tone), color-mix(in srgb, var(--tone) 25%, transparent)); }
.signal-card.tone-health { --tone: var(--jade); }
.signal-card.tone-tech { --tone: var(--violet); }
.signal-card.tone-hybrid { --tone: var(--coral); }
.signal-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--tone) 35%, var(--line)); box-shadow: var(--card-shadow); }
.card-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-meta, .card-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.language-mark { min-width: 27px; height: 27px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--tone) 12%, white); color: var(--tone); font: 700 9px/1 "SFMono-Regular", Consolas, monospace; }
.card-meta span:not(.language-mark) { color: var(--muted); font-size: 10px; }
.signal-no { color: #b9c6c2; font: 650 13px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .06em; }
.signal-card h3 { margin: 20px 0 18px; font-size: 18px; line-height: 1.46; letter-spacing: -.018em; }
.cn-insight { position: relative; padding: 16px 17px 17px; border-radius: 16px; background: linear-gradient(145deg, color-mix(in srgb, var(--tone) 10%, white), color-mix(in srgb, var(--tone) 4%, white)); }
.cn-insight > div { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cn-insight span { color: var(--tone); font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.cn-insight small { color: var(--muted); font-size: 9px; }
.cn-insight p { position: relative; z-index: 1; margin: 9px 0 0; color: #344943; font-size: 13px; line-height: 1.72; }
.decision-list { margin: 15px 0 0; padding: 0; border-top: 1px solid var(--line); }
.decision-list > div { min-height: 35px; display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.decision-list dt { color: var(--muted); font-size: 10px; }
.decision-list dd { margin: 0; color: var(--ink); text-align: right; font-size: 11px; font-weight: 650; }
.decision-list .priority-urgent dd { color: #c44231; }
.decision-list .priority-research dd { color: var(--violet); }
.decision-list .priority-watch dd { color: #60716c; }
.card-tags { margin-top: auto; padding-top: 21px; }
.tag { padding: 5px 8px; border-radius: 999px; background: #eef4f1; color: #46605a; font-size: 9px; }
.tag:first-child { color: var(--tone); background: color-mix(in srgb, var(--tone) 10%, white); }
.tag.stage { color: var(--violet); background: var(--violet-pale); }
.source-link { margin-top: 17px; min-height: 47px; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px; border-radius: 13px; padding: 10px 12px; background: var(--night); color: #fff; text-decoration: none; font-size: 11px; }
.source-link strong { white-space: nowrap; }
.source-link b { color: var(--mint); font-size: 15px; }
.source-link span { min-width: 0; color: rgba(233,248,242,.58); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-link:hover { background: var(--night-soft); }

.empty-state { margin-top: 28px; min-height: 300px; border: 1px dashed #b8c9c3; border-radius: 24px; display: grid; place-items: center; align-content: center; text-align: center; background: rgba(255,255,255,.6); }
.empty-state[hidden] { display: none; }
.empty-state h3 { margin: 12px 0 6px; }
.empty-state p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.empty-state button { min-height: 40px; }
.empty-cat { color: var(--coral); font-size: 42px; transform: rotate(-10deg); }

.brand-view { padding: 44px 0 110px; }
.brand-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 28px; }
.brand-heading .section-kicker { margin-bottom: 7px; }
.brand-heading h1 { margin: 0; font-size: 42px; line-height: 1.15; letter-spacing: -.05em; }
.brand-heading > div > p:last-child { max-width: 680px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.text-button { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; white-space: nowrap; }
.text-button:hover { color: var(--ink); border-color: #b7c8c2; background: var(--surface); }
.brand-lock { min-height: 420px; padding: 56px 24px; border: 1px solid var(--line); border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,255,255,.72); text-align: center; }
.lock-mark { width: 54px; height: 54px; margin-bottom: 20px; border-radius: 17px; display: grid; place-items: center; color: var(--mint); background: var(--night); font: 700 13px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; }
.brand-lock .section-kicker { margin-bottom: 8px; }
.brand-lock h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.brand-lock > p:not(.section-kicker) { margin: 10px 0 26px; color: var(--muted); font-size: 13px; }
#brand-login { width: min(100%, 520px); text-align: left; }
#brand-login label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.password-row input { min-width: 0; height: 48px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--ink); background: var(--surface); }
.password-row input:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(32,167,122,.1); }
.password-row button { min-height: 48px; padding: 0 18px; border: 1px solid var(--night); border-radius: 12px; color: #fff; background: var(--night); cursor: pointer; }
.password-row button:hover { border-color: var(--jade); background: var(--jade); }
.password-row button:disabled { cursor: wait; opacity: .65; }
.form-message { min-height: 18px; margin: 8px 2px 0; color: #c44231; font-size: 11px; }
.brand-metrics { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.brand-metrics > div { min-height: 104px; padding: 22px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.brand-metrics > div:last-child { border-right: 0; }
.brand-metrics span { color: var(--muted); font-size: 11px; }
.brand-metrics strong { color: #afbbb7; font: 650 28px/1.2 "Avenir Next Condensed", "Arial Narrow", sans-serif; }
.brand-empty { min-height: 310px; margin-top: 18px; padding: 40px 24px; border: 1px dashed #b8c9c3; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,255,255,.55); text-align: center; }
.brand-empty > span { color: var(--jade); font-size: 38px; }
.brand-empty h2 { margin: 10px 0 7px; font-size: 21px; }
.brand-empty p { max-width: 610px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.tracked-terms { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 20px; }
.tracked-terms span { padding: 6px 10px; border-radius: 999px; color: #49615a; background: #e8f1ed; font-size: 10px; }

footer { width: min(1320px, calc(100% - 64px)); margin: 0 auto; padding: 28px 0 42px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 30px; color: var(--muted); font-size: 11px; }
footer p { margin: 0; }
footer p:last-child { display: flex; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 1060px) {
  .signal-strip { grid-template-columns: repeat(3, 1fr); }
  .signal-strip > div:nth-child(3) { border-right: 0; }
  .signal-strip > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .signal-strip .last-scan { grid-column: span 2; }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .search-field { grid-column: span 2; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-metrics { grid-template-columns: repeat(2, 1fr); }
  .brand-metrics > div:nth-child(2) { border-right: 0; }
  .brand-metrics > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .masthead, main, footer { width: min(100% - 28px, 1320px); }
  .masthead { height: 76px; }
  .brand img { width: 150px; }
  .run-status { max-width: 155px; }
  .run-status span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .view-tabs { width: 100%; }
  .view-tab { min-width: 0; flex: 1; padding: 11px 12px; }
  .view-tab strong { display: none; }
  .signal-strip { width: 100%; grid-template-columns: repeat(2, 1fr); border-radius: 18px; }
  .signal-strip > div { min-height: 84px; padding: 15px; border-top: 1px solid var(--line); }
  .signal-strip > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .signal-strip > div:nth-child(even) { border-right: 0; }
  .signal-strip > div:first-child, .signal-strip > div:nth-child(2) { border-top: 0; }
  .signal-strip .last-scan { grid-column: span 2; }
  .signal-strip strong { font-size: 23px; }
  .catalog, .brand-view { padding: 38px 0 84px; }
  .catalog-heading { align-items: flex-start; gap: 18px; }
  .catalog-heading h1, .brand-heading h1 { font-size: 33px; }
  .catalog-heading > p { text-align: right; }
  .filters { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; border-radius: 17px; }
  .search-field { grid-column: span 2; min-height: 50px; }
  .filters button { min-height: 48px; }
  .catalog-grid { grid-template-columns: 1fr; gap: 14px; }
  .signal-card { min-height: 0; padding: 21px; border-radius: 20px; }
  .signal-card::before { margin: -21px -21px 19px; }
  .signal-card h3 { font-size: 17px; }
  .brand-heading { flex-direction: column; align-items: flex-start; gap: 14px; }
  .brand-lock { min-height: 360px; padding: 42px 18px; border-radius: 20px; }
  .password-row { grid-template-columns: 1fr; }
  .brand-metrics { border-radius: 18px; }
  .brand-metrics > div { min-height: 84px; padding: 15px; }
  footer { flex-direction: column; }
}
