:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --soft: #f8fafc;
  --ink: #172033;
  --muted: #667085;
  --line: #d8e0e8;
  --teal: #0f8f9f;
  --teal-soft: #e7f6f8;
  --green: #287a4b;
  --green-soft: #e8f5ee;
  --amber: #9a6500;
  --amber-soft: #fff4da;
  --red: #b43b45;
  --red-soft: #fdecef;
  --blue: #315f9b;
  --blue-soft: #e9f1fb;
  --purple: #6b4aa0;
  --purple-soft: #f1ecfb;
  --shadow: 0 14px 32px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.15;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin-bottom: 8px;
  font-size: 28px;
}

.login-security-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #f1d189;
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
  line-height: 1.55;
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.notes {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.field input {
  min-height: 42px;
  padding: 0 12px;
}

.notes {
  min-height: 126px;
  resize: vertical;
  padding: 12px;
  line-height: 1.65;
}

.login-button,
.primary-button {
  min-height: 42px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  padding: 22px 18px;
  background: #172033;
  color: #fff;
}

.brand {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin-bottom: 26px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4c44f;
  color: #172033;
  font-weight: 800;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav a,
.logout-button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.84);
  text-align: left;
  padding: 11px 12px;
  text-decoration: none;
}

.side-nav a.active {
  background: #fff;
  color: #172033;
  font-weight: 700;
}

.user-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.user-badge {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.user-badge span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  margin-top: 3px;
}

.logout-button {
  width: 100%;
  cursor: pointer;
}

.main {
  min-width: 0;
  padding: 26px;
}

.topbar {
  margin-bottom: 16px;
}

.filters {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.source-review-panel {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.filter-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.filter-row strong {
  color: var(--muted);
  font-size: 13px;
}

.filter-options,
.card-topline,
.tag-line,
.source-line,
.card-footer,
.detail-meta,
.detail-actions,
.source-tabs,
.search-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-pill,
.source-tab,
.quiet-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.filter-pill.active,
.source-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.filter-hint {
  margin: -2px 0 0 110px;
  color: var(--muted);
  font-size: 13px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 20px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.event-list,
.source-list,
.turning-points,
.config-list {
  display: grid;
  gap: 12px;
}

.event-card,
.detail-card,
.config-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.event-card {
  display: block;
  padding: 16px;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.event-card:hover {
  border-color: rgba(15, 143, 159, 0.65);
  outline: 3px solid var(--teal-soft);
}

.card-topline {
  justify-content: space-between;
  margin-bottom: 9px;
}

.event-title {
  margin: 0 0 7px;
  font-size: 21px;
  line-height: 1.35;
}

.event-name {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.summary {
  margin-bottom: 12px;
  color: #344054;
  line-height: 1.65;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.tag.teal {
  background: var(--teal-soft);
  border-color: #b8e4ea;
  color: #096976;
}

.tag.green {
  background: var(--green-soft);
  border-color: #bbe3cd;
  color: var(--green);
}

.tag.amber {
  background: var(--amber-soft);
  border-color: #f1d189;
  color: var(--amber);
}

.tag.red {
  background: var(--red-soft);
  border-color: #f3b9c0;
  color: var(--red);
}

.tag.blue {
  background: var(--blue-soft);
  border-color: #c6d8f0;
  color: var(--blue);
}

.tag.purple {
  background: var(--purple-soft);
  border-color: #d8c9f0;
  color: var(--purple);
}

.source-line {
  margin: 12px 0;
}

.source-chip {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 30px;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: #344054;
  font-size: 13px;
}

.source-chip b {
  color: var(--ink);
}

.card-footer {
  justify-content: space-between;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 800;
  padding: 0;
}

.text-action.danger {
  color: var(--red);
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  box-shadow: none;
}

.detail-view,
.list-only-view {
  max-width: 1100px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-bottom: 16px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.detail-card,
.config-card {
  padding: 18px;
}

.detail-title {
  margin: 8px 0;
  font-size: 28px;
  line-height: 1.25;
}

.detail-section {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.source-tabs {
  margin-bottom: 12px;
}

.source-link {
  display: grid;
  grid-template-columns: 34px 142px 86px minmax(0, 1fr) 80px;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.source-link:hover {
  border-color: rgba(15, 143, 159, 0.65);
}

.source-title {
  min-width: 0;
}

.source-title-main {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.source-platform {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.p-weibo {
  background: #d94444;
}

.p-baidu {
  background: #315fcb;
}

.p-douyin {
  background: #111827;
}

.p-toutiao {
  background: #d65a31;
}

.p-zhihu {
  background: #1f75cb;
}

.p-bili {
  background: #2f9dcc;
}

.p-xhs {
  background: #c23b55;
}

.p-official {
  background: #287a4b;
}

.p-media {
  background: #6b4aa0;
}

.p-image {
  background: #8a6d2f;
}

.turning-point {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.turning-point time,
.source-link time,
.unmatched-row time {
  color: var(--muted);
  font-size: 13px;
}

.turning-point b {
  display: block;
  margin-bottom: 6px;
}

.turning-point p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.search-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 11px;
  text-decoration: none;
  font-weight: 700;
}

.search-link span {
  margin-left: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.config-card {
  display: grid;
  gap: 8px;
}

.config-card h3 {
  margin-bottom: 0;
}

.source-config-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.source-risk,
.source-next,
.source-verify-note {
  margin: 0;
  line-height: 1.55;
  font-size: 13px;
}

.source-risk {
  color: var(--amber);
}

.source-next {
  color: var(--muted);
}

.source-verify-note {
  color: var(--blue);
}

.source-tests {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.source-tests summary {
  width: fit-content;
  color: var(--teal);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.source-tests ul {
  margin: 8px 0 0 18px;
  padding: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

.config-section {
  margin-top: 22px;
}

.config-section.first-section {
  margin-top: 0;
}

.preferences-card {
  gap: 18px;
}

.security-boundary-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #f1d189;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.security-boundary-card h3 {
  margin: 10px 0 8px;
  font-size: 20px;
}

.security-boundary-card p {
  margin: 0;
  color: #344054;
  line-height: 1.65;
}

.security-boundary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.security-boundary-grid span {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.security-boundary-grid small {
  color: var(--muted);
  line-height: 1.45;
}

.preference-block {
  display: grid;
  gap: 8px;
}

.preference-block h3 {
  font-size: 17px;
}

.preference-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preference-pill {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.preference-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.preference-textarea {
  min-height: 96px;
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  line-height: 1.6;
}

.preference-toggle {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.preference-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.preference-toggle strong,
.preference-toggle small {
  display: block;
}

.preference-toggle small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.unmatched-list {
  display: grid;
  gap: 10px;
}

.unmatched-row {
  display: grid;
  grid-template-columns: 34px 112px 86px minmax(0, 1.1fr) minmax(140px, 0.7fr) minmax(120px, 0.6fr) 78px;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.unmatched-row.processed {
  background: var(--soft);
}

.unmatched-row:hover {
  border-color: rgba(15, 143, 159, 0.65);
}

.unmatched-reason {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.unmatched-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 2px;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.5;
}

.unmatched-meta span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--blue-soft);
  padding: 0 9px;
}

.unmatched-link {
  display: flex;
  justify-content: flex-end;
}

.source-open {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 9px;
  color: var(--teal);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.unmatched-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.unmatched-select,
.new-event-grid input,
.new-event-grid select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.unmatched-select {
  max-width: 420px;
}

.new-event-fields {
  flex-basis: 100%;
}

.new-event-fields summary {
  width: fit-content;
  min-height: 30px;
  display: flex;
  align-items: center;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.new-event-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) 128px minmax(220px, 1.3fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 8px;
}

.new-event-grid label {
  display: grid;
  gap: 4px;
}

.new-event-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.input-error {
  border-color: var(--red);
  outline: 3px solid var(--red-soft);
}

.unmatched-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.unmatched-status.attach,
.unmatched-status.create {
  background: var(--green-soft);
  color: var(--green);
}

.unmatched-status.ignore {
  background: var(--red-soft);
  color: var(--red);
}

.audit-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.audit-metric {
  min-height: 126px;
  align-content: start;
}

.audit-metric strong {
  font-size: 26px;
  line-height: 1.15;
}

.audit-metric strong.ok {
  color: var(--green);
}

.audit-metric strong.bad {
  color: var(--red);
}

.audit-metric small {
  color: var(--muted);
  line-height: 1.45;
}

.audit-summary-list,
.audit-issue-list {
  display: grid;
  gap: 10px;
}

.audit-summary-row,
.audit-issue-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.audit-summary-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
}

.audit-issue-row {
  display: grid;
  grid-template-columns: 64px minmax(180px, 0.9fr) minmax(210px, 1fr) minmax(240px, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.audit-issue-row.processed {
  background: var(--soft);
}

.audit-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.audit-source-select {
  min-height: 32px;
  min-width: min(620px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.audit-event-link {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.audit-event-link:hover {
  text-decoration: underline;
}

.audit-path {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-message {
  line-height: 1.5;
}

.update-log-list {
  display: grid;
  gap: 10px;
}

.pipeline-step-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.pipeline-step {
  display: grid;
  grid-template-columns: 64px 120px 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pipeline-step.bad {
  border-color: #f3b9c0;
  background: var(--red-soft);
}

.pipeline-step code {
  grid-column: 1 / -1;
  color: var(--red);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}

.update-log-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.update-log-main,
.update-log-counts,
.update-log-meta,
.update-problems {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.update-log-main strong {
  font-size: 18px;
}

.update-log-counts {
  color: #344054;
  font-size: 13px;
}

.update-log-meta {
  color: var(--muted);
  font-size: 12px;
}

.system-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.system-hero.ok {
  border-color: #bbe3cd;
}

.system-hero.warn {
  border-color: #f1d189;
}

.system-hero.bad {
  border-color: #f3b9c0;
}

.system-hero h2 {
  margin: 10px 0 8px;
  font-size: 26px;
}

.system-hero p {
  margin: 0;
  color: #344054;
  line-height: 1.6;
}

.system-hero-meta {
  min-width: 250px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.system-hero-meta span {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}

.system-hero-meta strong {
  color: var(--ink);
  font-size: 20px;
}

.system-safety-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: #344054;
}

.system-safety-note strong {
  color: var(--ink);
}

.system-safety-note span {
  color: var(--muted);
  line-height: 1.5;
}

.system-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.system-check-card {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.system-check-card:hover {
  border-color: rgba(15, 143, 159, 0.65);
  outline: 3px solid var(--teal-soft);
}

.system-check-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.system-check-card p {
  margin: 0;
  font-weight: 800;
  line-height: 1.45;
}

.system-check-card small {
  color: var(--muted);
  line-height: 1.55;
}

.system-task-board,
.system-task-list {
  display: grid;
  gap: 12px;
}

.system-task-group {
  display: grid;
  gap: 10px;
}

.system-task-group-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  color: var(--muted);
}

.system-task-group-head strong {
  color: var(--ink);
  font-size: 16px;
}

.system-task-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(180px, 0.35fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.system-task-row.warn {
  border-left: 4px solid #d98900;
}

.system-task-row.bad {
  border-left: 4px solid #c1364a;
}

.system-task-row:hover {
  border-color: rgba(15, 143, 159, 0.65);
  outline: 3px solid var(--teal-soft);
}

.system-task-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-weight: 800;
}

.system-task-main,
.system-task-action {
  display: grid;
  gap: 7px;
}

.system-task-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.system-task-main p {
  margin: 0;
  color: #344054;
  line-height: 1.55;
}

.system-task-main small,
.system-task-action small {
  color: var(--muted);
  line-height: 1.5;
}

.system-task-action {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.system-task-action span {
  font-weight: 800;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .filter-row,
  .source-link,
  .unmatched-row,
  .turning-point {
    grid-template-columns: 1fr;
  }

  .filter-hint {
    margin-left: 0;
  }

  .source-title-main {
    white-space: normal;
  }

  .unmatched-link {
    justify-content: flex-start;
  }

  .unmatched-select {
    width: 100%;
    max-width: none;
  }

  .panel-heading,
  .panel-actions,
  .new-event-grid {
    align-items: stretch;
  }

  .new-event-grid {
    grid-template-columns: 1fr;
  }

  .audit-summary-grid,
  .audit-issue-row,
  .system-hero,
  .system-hero-meta,
  .system-check-grid,
  .system-task-row,
  .security-boundary-card,
  .security-boundary-grid,
  .pipeline-step {
    grid-template-columns: 1fr;
  }

  .system-hero {
    display: grid;
  }

  .audit-summary-row {
    align-items: flex-start;
  }

  .audit-path {
    white-space: normal;
  }
}
