:root {
  color-scheme: light;
  --ink: #12211e;
  --ink-soft: #4f625e;
  --paper: #f5f3ea;
  --paper-deep: #ebe8dc;
  --panel: rgba(255, 255, 250, 0.82);
  --jade: #123d35;
  --jade-bright: #1d6556;
  --mint: #bce6d2;
  --mint-soft: #e4f3ea;
  --vermillion: #d74a3a;
  --vermillion-soft: #f6ddd7;
  --gold: #c49a52;
  --line: rgba(18, 61, 53, 0.14);
  --shadow: 0 24px 70px rgba(25, 45, 40, 0.09);
  --display: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --body: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(18, 61, 53, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 61, 53, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(29, 101, 86, 0.24);
  outline-offset: 2px;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  top: -200px;
  right: -180px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(188, 230, 210, 0.46), transparent 68%);
}

.ambient-two {
  bottom: -260px;
  left: 20%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(196, 154, 82, 0.12), transparent 70%);
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 264px;
  flex-direction: column;
  padding: 26px 18px 20px;
  overflow: hidden;
  color: #f2f5ec;
  background:
    radial-gradient(circle at 12% 4%, rgba(188, 230, 210, 0.13), transparent 24%),
    linear-gradient(155deg, #163f37 0%, #0c2a25 68%, #091f1b 100%);
  box-shadow: 12px 0 50px rgba(8, 37, 31, 0.15);
}

.sidebar::after {
  position: absolute;
  right: -42px;
  bottom: 92px;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(188, 230, 210, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 22px rgba(188, 230, 210, 0.025),
    0 0 0 44px rgba(188, 230, 210, 0.02);
  content: "";
}

.brand-block {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(188, 230, 210, 0.48);
  border-radius: 50%;
  color: var(--mint);
  background: rgba(255, 255, 255, 0.045);
  font-family: var(--display);
  font-size: 24px;
}

.brand-kicker {
  margin-bottom: 4px;
  color: rgba(226, 243, 234, 0.56);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.brand-name {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.primary-nav {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  margin-top: 28px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  min-height: 48px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  color: rgba(241, 248, 241, 0.66);
  background: transparent;
  text-align: left;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.nav-item.active {
  color: #fafff8;
  background: linear-gradient(90deg, rgba(188, 230, 210, 0.19), rgba(188, 230, 210, 0.07));
  box-shadow: inset 3px 0 var(--mint);
}

.nav-icon {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 7px;
  font-family: var(--display);
  font-size: 12px;
}

.nav-count {
  min-width: 23px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #16463a;
  background: var(--mint);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.nav-count.alert-count:not(:empty) {
  color: #fff;
  background: var(--vermillion);
}

.sidebar-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.runtime-card {
  padding: 14px;
  border: 1px solid rgba(188, 230, 210, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.runtime-card p {
  margin: 8px 0 0 17px;
  color: rgba(242, 248, 239, 0.48);
  font-size: 11px;
  line-height: 1.7;
}

.runtime-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(242, 248, 239, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border: 2px solid rgba(188, 230, 210, 0.36);
  border-radius: 50%;
  background: #83d6ad;
  box-shadow: 0 0 12px rgba(131, 214, 173, 0.55);
}

.version {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-align: center;
}

.workspace {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 243, 234, 0.86);
  backdrop-filter: blur(18px);
}

.breadcrumb {
  color: var(--ink-soft);
  font-size: 12px;
}

.topbar-date {
  margin-top: 5px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}

.capture-state {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.capture-state strong,
.capture-state small {
  display: block;
}

.capture-state strong {
  font-size: 11px;
}

.capture-state small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 9px;
}

.capture-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jade-bright);
}

.capture-pulse::after {
  position: absolute;
  inset: -5px;
  border: 1px solid var(--jade-bright);
  border-radius: 50%;
  animation: pulse 2.2s infinite;
  content: "";
}

@keyframes pulse {
  0%,
  30% {
    opacity: 0.75;
    transform: scale(0.6);
  }

  75%,
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

.icon-button,
.mobile-menu {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--jade);
  background: rgba(255, 255, 255, 0.55);
  font-size: 18px;
  transition: transform 180ms ease, background 180ms ease;
}

.icon-button:hover {
  background: #fff;
  transform: rotate(12deg);
}

.mobile-menu {
  display: none;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #f8fff8;
  background: var(--jade);
  font-family: var(--display);
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(18, 61, 53, 0.2);
}

.main-content {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 34px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: view-in 420ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  position: relative;
  display: grid;
  min-height: 310px;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  padding: 44px 50px;
  overflow: hidden;
  border: 1px solid rgba(18, 61, 53, 0.18);
  border-radius: 26px;
  color: #ecf6ee;
  background:
    linear-gradient(100deg, rgba(9, 39, 34, 0.98), rgba(20, 74, 62, 0.9)),
    var(--jade);
  box-shadow: 0 32px 80px rgba(13, 45, 39, 0.2);
}

.hero::before {
  position: absolute;
  top: -35%;
  right: -5%;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(188, 230, 210, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(188, 230, 210, 0.025),
    0 0 0 76px rgba(188, 230, 210, 0.02);
  content: "";
}

.hero::after {
  position: absolute;
  inset: 0;
  opacity: 0.17;
  background-image: radial-gradient(rgba(255, 255, 255, 0.45) 0.5px, transparent 0.6px);
  background-size: 7px 7px;
  mix-blend-mode: overlay;
  content: "";
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-index {
  color: var(--jade-bright);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.hero .eyebrow {
  color: rgba(188, 230, 210, 0.72);
}

.hero h1 {
  margin: 16px 0 13px;
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 53px);
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.18;
}

.hero h1 em {
  color: var(--mint);
  font-style: normal;
}

.hero p {
  max-width: 690px;
  margin: 0;
  color: rgba(235, 247, 237, 0.66);
  font-size: 13px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 23px;
  margin-top: 26px;
}

.primary-button,
.secondary-button,
.text-button {
  border: 0;
}

.primary-button {
  min-height: 42px;
  padding: 0 21px;
  border-radius: 11px;
  color: #0c3028;
  background: var(--mint);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 11px 28px rgba(3, 23, 19, 0.17);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover {
  box-shadow: 0 15px 32px rgba(3, 23, 19, 0.26);
  transform: translateY(-2px);
}

.text-button {
  padding: 6px 0;
  color: var(--jade-bright);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.hero .text-button {
  color: rgba(235, 247, 237, 0.74);
}

.hero-seal {
  position: relative;
  z-index: 2;
  display: grid;
  width: 150px;
  height: 150px;
  grid-template-columns: 1fr;
  place-content: center;
  place-items: center;
  justify-self: end;
  border: 1px solid rgba(188, 230, 210, 0.38);
  border-radius: 50%;
  background: rgba(3, 30, 24, 0.2);
  box-shadow: inset 0 0 0 8px rgba(188, 230, 210, 0.025);
  transform: rotate(8deg);
}

.hero-seal span {
  color: var(--mint);
  font-family: var(--display);
  font-size: 64px;
  line-height: 0.95;
}

.hero-seal small {
  margin-top: 5px;
  color: rgba(188, 230, 210, 0.55);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.19em;
  line-height: 1.4;
  text-align: center;
}

.hero-grid-label {
  position: absolute;
  right: 28px;
  bottom: 18px;
  z-index: 2;
  color: rgba(188, 230, 210, 0.35);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.metric-card {
  position: relative;
  min-height: 138px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease;
}

.metric-card:hover {
  border-color: rgba(18, 61, 53, 0.28);
  transform: translateY(-3px);
}

.metric-card::after {
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 92px;
  height: 92px;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
}

.metric-primary {
  color: #f3fbf5;
  border-color: var(--jade);
  background: var(--jade);
}

.metric-alert .metric-value {
  color: var(--vermillion);
}

.metric-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.metric-primary .metric-label,
.metric-primary .metric-note {
  color: rgba(238, 249, 241, 0.62);
}

.metric-value {
  margin: 8px 0 7px;
  font-family: var(--display);
  font-size: 40px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.metric-note {
  color: var(--ink-soft);
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.7fr);
  gap: 20px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
}

.panel-heading {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  padding: 19px 23px 15px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2,
.capture-principles h2 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: 21px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 13px 18px;
  color: #72817d;
  background: rgba(18, 61, 53, 0.025);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

td {
  padding: 15px 18px;
  border-top: 1px solid rgba(18, 61, 53, 0.08);
  font-size: 12px;
  vertical-align: middle;
}

tbody tr {
  transition: background 160ms ease;
}

tbody tr:hover {
  background: rgba(188, 230, 210, 0.13);
}

.compact-table td:first-child {
  max-width: 400px;
}

.product-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-link {
  width: fit-content;
  text-decoration: none;
  text-underline-offset: 3px;
}

.product-link:hover {
  color: var(--jade-bright);
  text-decoration: underline;
}

.item-link {
  display: inline-flex;
  margin-top: 6px;
  color: var(--jade-bright);
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.item-link:hover {
  text-decoration: underline;
}

.product-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.term-chip,
.endpoint-chip,
.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.term-chip {
  padding: 3px 7px;
  color: #1b6656;
  background: var(--mint-soft);
  font-size: 9px;
  font-weight: 750;
}

.price {
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.price::before {
  margin-right: 2px;
  color: var(--vermillion);
  content: "¥";
  font-family: var(--body);
  font-size: 9px;
}

.store-name,
.time-text {
  max-width: 180px;
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  gap: 5px;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pending {
  color: #8b6a27;
  background: #f4ead2;
}

.status-confirmed {
  color: #1c6655;
  background: var(--mint-soft);
}

.status-false_positive {
  color: #6f7472;
  background: #eceeeb;
}

.status-handled {
  color: #35566e;
  background: #e1ebf1;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.ai-relevant {
  color: #17604f;
  background: var(--mint-soft);
}

.ai-irrelevant {
  color: #767d79;
  background: #eceeeb;
}

.ai-uncertain,
.ai-pending {
  color: #8b6a27;
  background: #f4ead2;
}

.ai-runtime-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ai-runtime-card {
  display: grid;
  min-height: 120px;
  align-content: center;
  padding: 18px 20px;
}

.ai-runtime-card > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.ai-runtime-card strong {
  margin: 8px 0 4px;
  color: var(--jade);
  font-family: var(--display);
  font-size: 26px;
}

.ai-runtime-card strong.runtime-error {
  color: var(--vermillion);
}

.ai-runtime-card small {
  color: var(--ink-soft);
  font-size: 9px;
}

.screening-table th:nth-child(4),
.screening-table td:nth-child(4) {
  min-width: 210px;
}

.confidence-value {
  color: var(--jade);
  font-variant-numeric: tabular-nums;
}

.ai-reason {
  max-width: 280px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.screening-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.screening-actions .text-button {
  white-space: nowrap;
}

.ai-review-reason {
  padding: 10px 12px;
  border-left: 3px solid var(--mint);
  background: var(--mint-soft);
  line-height: 1.6;
}

.loading-cell,
.empty-inline {
  padding: 34px !important;
  color: var(--ink-soft);
  text-align: center;
}

.timeline {
  max-height: 390px;
  padding: 18px 22px;
  overflow-y: auto;
}

.timeline-item {
  position: relative;
  padding: 3px 0 22px 22px;
  border-left: 1px solid var(--line);
}

.timeline-item::before {
  position: absolute;
  top: 5px;
  left: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--vermillion);
  content: "";
}

.timeline-item:last-child {
  padding-bottom: 3px;
  border-color: transparent;
}

.timeline-item strong {
  display: block;
  font-size: 12px;
  line-height: 1.6;
}

.timeline-item p {
  margin: 4px 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.timeline-item time {
  color: #81908c;
  font-size: 9px;
}

.page-heading {
  display: flex;
  min-height: 150px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 20px 3px 28px;
}

.page-heading h1 {
  margin: 8px 0 8px;
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.page-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.heading-stat {
  display: grid;
  width: 118px;
  height: 118px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.heading-stat span {
  font-family: var(--display);
  font-size: 34px;
  font-variant-numeric: tabular-nums;
}

.heading-stat small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 9px;
}

.heading-stat.mint {
  color: var(--jade);
  border-color: rgba(29, 101, 86, 0.25);
  background: var(--mint-soft);
}

.heading-stat.red {
  color: var(--vermillion);
  border-color: rgba(215, 74, 58, 0.24);
  background: var(--vermillion-soft);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 210px auto;
  gap: 12px;
  margin-bottom: 16px;
}

.screening-toolbar {
  grid-template-columns: minmax(260px, 1fr) 210px auto auto;
}

.search-field,
.select-field {
  display: flex;
  min-height: 47px;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.64);
}

.search-field span {
  color: var(--jade-bright);
  font-family: var(--display);
  font-size: 20px;
}

.search-field input,
.select-field select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.select-field {
  display: grid;
  grid-template-columns: auto 1fr;
}

.select-field span {
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
}

.secondary-button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--jade);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease;
}

.secondary-button:hover {
  background: #fff;
  transform: translateY(-1px);
}

.product-table {
  min-width: 920px;
}

.product-table td:first-child {
  width: 42%;
}

.review-button {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--jade);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.review-button:hover {
  color: #fff;
  background: var(--jade);
}

.table-footer {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pager button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--jade);
  background: #fff;
  font-size: 10px;
}

.pager button:disabled {
  cursor: default;
  opacity: 0.4;
}

.keyword-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.keyword-card,
.loading-card {
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.keyword-card {
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease;
}

.keyword-card:hover {
  border-color: rgba(29, 101, 86, 0.3);
  transform: translateY(-3px);
}

.keyword-card::after {
  position: absolute;
  right: -18px;
  bottom: -22px;
  color: rgba(18, 61, 53, 0.045);
  font-family: var(--display);
  font-size: 68px;
  font-weight: 700;
  content: "词";
}

.keyword-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 650;
}

.keyword-card .keyword-counts {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 20px;
  margin-top: 24px;
}

.keyword-counts strong,
.keyword-counts small {
  display: block;
}

.keyword-counts strong {
  color: var(--jade-bright);
  font-family: var(--display);
  font-size: 21px;
}

.keyword-counts small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 8px;
}

.alert-page-panel {
  overflow: hidden;
}

.alert-list {
  display: grid;
}

.alert-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: start;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.alert-row:last-child {
  border-bottom: 0;
}

.alert-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--vermillion);
  background: var(--vermillion-soft);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
}

.alert-row h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.alert-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.alert-row time {
  color: #84908d;
  font-size: 9px;
  white-space: nowrap;
}

.empty-state {
  padding: 70px 25px;
  color: var(--ink-soft);
  text-align: center;
}

.empty-state-mark {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 15px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--jade-bright);
  font-family: var(--display);
  font-size: 24px;
}

.empty-state h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 20px;
}

.empty-state p {
  margin: 0;
  font-size: 11px;
}

.patrol-panel {
  position: relative;
  margin-bottom: 20px;
  padding: 28px;
  overflow: hidden;
}

.patrol-panel::after {
  position: absolute;
  top: -82px;
  right: -64px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(29, 101, 86, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.patrol-panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.patrol-kicker {
  color: var(--jade-bright);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.22em;
}

.patrol-panel h2 {
  margin: 8px 0 6px;
  font-family: var(--display);
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 600;
}

.patrol-panel-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.extension-badge {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(215, 74, 58, 0.22);
  border-radius: 999px;
  color: #8e4038;
  background: var(--vermillion-soft);
  font-size: 9px;
  white-space: nowrap;
}

.extension-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vermillion);
}

.extension-badge[data-connected="true"] {
  border-color: rgba(29, 101, 86, 0.18);
  color: var(--jade);
  background: var(--mint-soft);
}

.extension-badge[data-connected="true"] span {
  background: var(--jade-bright);
  box-shadow: 0 0 0 4px rgba(29, 101, 86, 0.1);
}

.patrol-controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(228, 243, 234, 0.48);
}

.page-limit-field {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-soft);
  font-size: 10px;
}

.page-limit-field input {
  width: 48px;
  border: 0;
  outline: 0;
  color: var(--jade);
  background: transparent;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  text-align: center;
}

.patrol-start,
.patrol-resume {
  color: #f5fff8;
  background: var(--jade);
}

.patrol-controls .danger-text {
  margin-left: auto;
  color: var(--vermillion);
}

.patrol-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.patrol-progress-wrap {
  margin-top: 24px;
}

.patrol-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 10px;
}

.patrol-progress-copy strong {
  color: var(--ink);
  font-size: 12px;
}

.patrol-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-deep);
  box-shadow: inset 0 1px 2px rgba(18, 61, 53, 0.08);
}

.patrol-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--jade-bright), #75bd9f);
  transition: width 360ms ease;
}

.patrol-stats {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 0.7fr));
  gap: 10px;
  margin-top: 16px;
}

.patrol-stats article {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
}

.patrol-stats span,
.patrol-stats strong {
  display: block;
}

.patrol-stats span {
  color: var(--ink-soft);
  font-size: 9px;
}

.patrol-stats strong {
  margin-top: 5px;
  overflow: hidden;
  font-family: var(--display);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patrol-message {
  margin-top: 15px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.verification-callout {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(215, 74, 58, 0.25);
  border-radius: 13px;
  color: #77372f;
  background: var(--vermillion-soft);
}

.verification-callout strong {
  display: block;
  font-family: var(--display);
  font-size: 16px;
}

.verification-callout p {
  margin: 5px 0 0;
  font-size: 10px;
  line-height: 1.65;
}

.capture-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.65fr);
  gap: 20px;
}

.capture-steps {
  padding: 8px 24px;
}

.step-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 18px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--line);
}

.step-card:last-child {
  border-bottom: 0;
}

.step-number {
  color: rgba(18, 61, 53, 0.22);
  font-family: var(--display);
  font-size: 31px;
}

.step-card h3 {
  margin: 0 0 7px;
  font-family: var(--display);
  font-size: 20px;
}

.step-card p {
  max-width: 670px;
  margin: 0 0 13px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
}

.step-card code {
  display: inline-block;
  max-width: 100%;
  padding: 8px 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--jade);
  background: var(--mint-soft);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-chip {
  gap: 8px;
  max-width: 100%;
  padding: 8px 12px;
  overflow: hidden;
  color: var(--ink-soft);
  background: var(--paper-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-chip span {
  padding: 2px 5px;
  border-radius: 5px;
  color: #fff;
  background: var(--jade);
  font-family: var(--body);
  font-size: 7px;
  font-weight: 800;
}

.capture-principles {
  padding: 27px;
  border-radius: 21px;
  color: #eff9f0;
  background:
    radial-gradient(circle at 85% 10%, rgba(188, 230, 210, 0.15), transparent 28%),
    var(--jade);
  box-shadow: 0 25px 65px rgba(18, 61, 53, 0.18);
}

.capture-principles .section-index {
  color: rgba(188, 230, 210, 0.56);
}

.capture-principles h2 {
  margin: 10px 0 24px;
  font-size: 27px;
}

.capture-principles ul {
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.capture-principles li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  color: rgba(239, 249, 240, 0.8);
  font-size: 11px;
  line-height: 1.6;
}

.capture-principles li span {
  color: var(--mint);
  font-weight: 900;
}

.capture-principles li.muted {
  color: rgba(239, 249, 240, 0.42);
}

.capture-principles li.muted span {
  color: rgba(239, 249, 240, 0.34);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  visibility: hidden;
  opacity: 0;
  background: rgba(4, 23, 19, 0.35);
  backdrop-filter: blur(3px);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.drawer-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.review-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: min(460px, 94vw);
  padding: 38px 32px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #faf8f0;
  box-shadow: -25px 0 70px rgba(6, 29, 24, 0.15);
  transform: translateX(105%);
  transition: transform 300ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.review-drawer.open {
  transform: translateX(0);
}

.review-drawer h2 {
  margin: 9px 0 26px;
  font-family: var(--display);
  font-size: 34px;
}

.drawer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 18px;
}

.drawer-product {
  margin-bottom: 25px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--mint-soft);
}

.drawer-product h3 {
  margin: 0 0 9px;
  font-size: 13px;
  line-height: 1.7;
}

.drawer-product p {
  margin: 4px 0;
  color: var(--ink-soft);
  font-size: 10px;
}

#review-form {
  display: grid;
  gap: 19px;
}

#review-form label {
  display: grid;
  gap: 8px;
}

#review-form label > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

#review-form select,
#review-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

#review-form select {
  min-height: 45px;
  padding: 0 12px;
}

#review-form textarea {
  padding: 12px;
  resize: vertical;
  line-height: 1.65;
}

.full-width {
  width: 100%;
  margin-top: 5px;
  color: #fff;
  background: var(--jade);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  max-width: min(380px, calc(100vw - 48px));
  padding: 13px 17px;
  border-radius: 12px;
  opacity: 0;
  color: #fff;
  background: var(--jade);
  box-shadow: 0 18px 45px rgba(7, 35, 29, 0.28);
  font-size: 11px;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #9e392f;
}

@media (max-width: 1180px) {
  .metric-grid,
  .keyword-mosaic,
  .ai-runtime-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .capture-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 140px;
  }

  .hero-seal {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    width: min(300px, 86vw);
    transform: translateX(-105%);
    transition: transform 240ms ease;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .workspace {
    min-width: 0;
  }

  .topbar {
    min-height: 66px;
    padding: 0 18px;
  }

  .mobile-menu {
    display: grid;
    margin-right: 10px;
  }

  .topbar > div:nth-child(2) {
    margin-right: auto;
  }

  .capture-state {
    display: none;
  }

  .main-content {
    padding: 22px 17px 40px;
  }

  .patrol-panel-head,
  .patrol-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .patrol-controls .danger-text {
    margin-left: 0;
  }

  .patrol-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 390px;
    grid-template-columns: 1fr;
    padding: 34px 28px;
  }

  .hero-seal {
    position: absolute;
    right: 24px;
    bottom: 20px;
    width: 86px;
    height: 86px;
    opacity: 0.62;
  }

  .hero-seal span {
    font-size: 38px;
  }

  .hero-seal small,
  .hero-grid-label {
    display: none;
  }

  .page-heading {
    min-height: 125px;
  }

  .heading-stat {
    width: 90px;
    height: 90px;
  }

  .heading-stat span {
    font-size: 27px;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .metric-grid,
  .keyword-mosaic,
  .ai-runtime-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 122px;
  }

  .page-heading {
    align-items: flex-start;
  }

  .heading-stat {
    display: none;
  }

  .hero h1 {
    font-size: 33px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .step-card {
    grid-template-columns: 48px 1fr;
  }

  .topbar-date,
  .avatar {
    display: none;
  }
}

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