:root {
  color-scheme: dark;
  --bg: #050606;
  --bg-2: #0a0d0e;
  --surface: #0e1314;
  --surface-2: #121a1b;
  --line: rgba(133, 255, 232, 0.18);
  --line-strong: rgba(133, 255, 232, 0.42);
  --text: #f1f7f4;
  --muted: #98a7a3;
  --cyan: #49f0da;
  --cyan-2: #20c8b9;
  --amber: #f0c46b;
  --red: #e42323;
  --red-2: #731111;
  --shadow: rgba(0, 0, 0, 0.48);
  --max: 1420px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(12, 16, 17, 0.94), rgba(5, 6, 6, 0.98) 42%, #050606),
    repeating-linear-gradient(90deg, rgba(73, 240, 218, 0.025) 0 1px, transparent 1px 84px),
    var(--bg);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, transparent 0 54%, rgba(228, 35, 35, 0.12) 54.1% 54.4%, transparent 54.5%),
    linear-gradient(64deg, transparent 0 48%, rgba(73, 240, 218, 0.08) 48.1% 48.3%, transparent 48.4%);
  opacity: 0.8;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 5, 5, 0.86);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 188px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark,
.action-icon {
  width: 18px;
  height: 18px;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 18px rgba(73, 240, 218, 0.4);
}

.brand-mark {
  transform: rotate(45deg);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  color: var(--muted);
  font-size: 14px;
}

.main-nav a,
.header-link,
.text-link,
.inline-link {
  color: inherit;
  text-decoration: none;
}

.main-nav a:hover,
.header-link:hover,
.text-link:hover,
.inline-link:hover {
  color: var(--cyan);
}

.inline-link {
  color: var(--cyan);
  font-weight: 820;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.header-link {
  min-width: 92px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  color: var(--cyan);
  text-align: center;
}

main {
  overflow: hidden;
}

.hero-section {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: center;
  padding: 72px max(28px, calc((100vw - var(--max)) / 2)) 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.8)),
    radial-gradient(circle at 50% 0%, rgba(240, 196, 107, 0.18), transparent 30%),
    linear-gradient(90deg, rgba(228, 35, 35, 0.18), transparent 16% 84%, rgba(228, 35, 35, 0.18));
}

.curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18vw;
  min-width: 150px;
  opacity: 0.52;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(125, 7, 7, 0.98) 0 12px, rgba(45, 3, 3, 0.96) 12px 22px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 24%);
  filter: saturate(1.2);
}

.curtain-left {
  left: 0;
  clip-path: polygon(0 0, 100% 0, 74% 100%, 0 100%);
}

.curtain-right {
  right: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 26% 100%);
}

.evidence-board {
  position: absolute;
  inset: 62px 12vw 36px;
  opacity: 0.33;
  pointer-events: none;
}

.evidence-board span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  border: 1px solid rgba(240, 196, 107, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 12px);
  box-shadow: 0 12px 22px var(--shadow);
  transform: rotate(-4deg);
}

.evidence-board i {
  position: absolute;
  left: var(--x1);
  top: var(--y1);
  width: calc(var(--x2) - var(--x1));
  height: 1px;
  background: rgba(228, 35, 35, 0.55);
  transform-origin: left center;
  transform: rotate(12deg);
}

.hero-copy,
.hero-stats {
  position: relative;
  z-index: 1;
}

.hero-copy {
  text-align: center;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(52px, 9vw, 142px);
  line-height: 0.96;
  letter-spacing: 0;
  font-weight: 950;
  text-shadow: 0 20px 34px var(--shadow);
}

.hero-copy h1 span {
  color: var(--red);
}

.hero-lead {
  margin: 22px 0 0;
  font-size: clamp(20px, 2.4vw, 34px);
  font-weight: 760;
}

.hero-note {
  max-width: 780px;
  margin: 18px auto 0;
  color: var(--cyan);
  font-size: 17px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}

.primary-action,
.secondary-action,
.primary-button,
.quiet-button,
.botcf-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.primary-action {
  gap: 14px;
  min-width: 260px;
  padding: 18px 26px;
  border-color: rgba(255, 101, 87, 0.76);
  background: linear-gradient(180deg, rgba(228, 35, 35, 0.96), rgba(93, 4, 4, 0.98));
  color: #fff;
  font-size: 26px;
  font-weight: 850;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 20px 42px rgba(228, 35, 35, 0.28);
}

.secondary-action {
  min-width: 260px;
  padding: 18px 28px;
  border-color: var(--line-strong);
  background: rgba(3, 13, 13, 0.78);
  color: var(--cyan);
  font-size: 20px;
  font-weight: 760;
}

.primary-action:hover,
.secondary-action:hover,
.primary-button:hover,
.quiet-button:hover,
.botcf-links a:hover {
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  gap: 0;
  border: 1px solid var(--line-strong);
  background: rgba(2, 9, 9, 0.78);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.hero-stats div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 10px;
  padding: 26px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stats div:last-child {
  border-bottom: 0;
}

.hero-stats strong {
  color: var(--cyan);
  font-size: 36px;
  line-height: 1;
}

.hero-stats span {
  align-self: end;
  font-size: 16px;
  font-weight: 720;
}

.hero-stats small {
  grid-column: 1 / -1;
  margin-top: 8px;
  color: var(--muted);
}

.tool-section,
.matrix-section,
.research-section,
.botcf-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 28px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  color: var(--cyan);
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.source-line,
.matrix-count {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.source-line span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 10px 2px;
  background: var(--cyan);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 16px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 19, 20, 0.72);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  outline: none;
  background: #050808;
  color: var(--text);
}

.search-box input:focus {
  border-color: var(--cyan);
}

.toggle-row {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  color: var(--muted);
  font-size: 14px;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.quiet-button {
  min-width: 126px;
  padding: 0 16px;
  white-space: nowrap;
}

.primary-button {
  border-color: rgba(255, 101, 87, 0.64);
  background: var(--red-2);
  color: #fff;
  font-weight: 760;
}

.quiet-button {
  border-color: var(--line);
  background: rgba(5, 8, 8, 0.88);
  color: var(--cyan);
}

.batch-shell {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 7, 7, 0.74);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
}

.status-strip div {
  min-height: 74px;
  padding: 16px 18px;
  background: rgba(8, 12, 12, 0.9);
}

.status-strip strong {
  display: block;
  color: var(--cyan);
  font-size: 26px;
  line-height: 1;
}

.status-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.batch-status {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.batch-status div {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.batch-status span {
  color: var(--muted);
}

.batch-status strong {
  color: var(--text);
  font-size: 20px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pager button {
  width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  background: rgba(8, 11, 11, 0.9);
  color: var(--muted);
  cursor: pointer;
}

.pager button.is-active {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(73, 240, 218, 0.22) inset;
}

.pager button:hover {
  color: var(--text);
}

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

.domain-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.domain-table th,
.domain-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.domain-table th {
  color: var(--amber);
  font-size: 13px;
  font-family: inherit;
  font-weight: 760;
}

.domain-table td:first-child,
.domain-table th:first-child {
  width: 72px;
  color: var(--muted);
  text-align: right;
}

.domain-table td:last-child,
.domain-table th:last-child {
  width: 176px;
}

.domain-table td:nth-child(3),
.domain-table th:nth-child(3) {
  width: 154px;
}

.domain-table td:nth-child(3) small {
  display: block;
  max-width: 140px;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-link {
  color: var(--cyan);
  font-weight: 760;
  text-decoration: none;
}

.domain-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-ui, inherit);
  font-size: 13px;
}

.mini-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.is-compact {
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 0;
}

.status-badge.status-ok {
  border-color: rgba(73, 240, 218, 0.38);
  background: rgba(73, 240, 218, 0.1);
  color: var(--cyan);
}

.status-badge.status-limited {
  border-color: rgba(240, 196, 107, 0.45);
  background: rgba(240, 196, 107, 0.1);
  color: var(--amber);
}

.status-badge.status-gone,
.status-badge.status-bad {
  border-color: rgba(255, 101, 87, 0.58);
  background: rgba(228, 35, 35, 0.16);
  color: #ff948a;
}

.status-badge.status-down {
  border-color: rgba(152, 167, 163, 0.36);
  background: rgba(152, 167, 163, 0.1);
  color: #c7d0ce;
}

.status-badge.status-unknown {
  border-color: rgba(152, 167, 163, 0.22);
  background: rgba(152, 167, 163, 0.06);
  color: var(--muted);
}

.row-status-gone td,
.row-status-bad td {
  background: rgba(228, 35, 35, 0.055);
}

.row-status-down td {
  background: rgba(152, 167, 163, 0.045);
}

.status-message {
  min-height: 28px;
  margin: 18px 0 0;
  color: var(--amber);
  text-align: center;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.grid-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 8, 8, 0.72);
  text-decoration: none;
}

.grid-item.is-current {
  background: rgba(73, 240, 218, 0.08);
  box-shadow: 0 0 0 1px rgba(73, 240, 218, 0.18) inset;
}

.grid-item.status-gone,
.grid-item.status-bad {
  background: rgba(48, 8, 8, 0.76);
}

.grid-item.status-down {
  background: rgba(28, 31, 31, 0.72);
}

.grid-item b {
  color: var(--muted);
  text-align: right;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.grid-item span {
  overflow: hidden;
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-item:hover {
  background: rgba(73, 240, 218, 0.13);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.research-grid article {
  min-height: 210px;
  padding: 28px;
  background: rgba(10, 13, 14, 0.92);
}

.research-grid span {
  color: var(--amber);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.research-grid h3 {
  margin: 20px 0 10px;
  font-size: 24px;
}

.research-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.botcf-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.68fr);
  gap: 42px;
  align-items: center;
}

.botcf-copy h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1.08;
}

.botcf-copy p {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.botcf-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.botcf-links a {
  min-width: 142px;
  padding: 0 18px;
  border-color: var(--line);
  color: var(--cyan);
  background: rgba(5, 8, 8, 0.88);
  font-weight: 760;
}

.botcf-links a:first-child {
  border-color: rgba(255, 101, 87, 0.64);
  color: #fff;
  background: var(--red-2);
}

.botcf-points {
  display: grid;
  border: 1px solid var(--line);
  background: rgba(7, 12, 12, 0.84);
}

.botcf-points p {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.botcf-points p:last-child {
  border-bottom: 0;
}

.botcf-points strong {
  color: var(--cyan);
}

.botcf-points span {
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 14px;
}

.batch-page main {
  overflow: visible;
}

.batch-main {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 64px 28px;
}

.batch-hero {
  padding: 52px 0 34px;
  text-align: center;
}

.batch-hero h1 {
  margin: 0;
  color: var(--cyan);
  font-size: clamp(42px, 7vw, 92px);
  line-height: 1;
}

.batch-hero p {
  max-width: 760px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.batch-actions {
  margin-top: 26px;
}

.batch-actions .primary-action,
.batch-actions .secondary-action {
  min-width: 220px;
  font-size: 18px;
}

.launcher-shell {
  margin-top: 0;
}

.launcher-table {
  min-width: 680px;
}

@media (max-width: 1180px) {
  .hero-section,
  .botcf-section {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-stats div {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 0;
  }

  .hero-stats div:last-child {
    border-right: 0;
  }

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

  .toolbar-actions {
    flex-wrap: wrap;
  }

  .domain-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .site-header {
    position: static;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
  }

  .brand,
  .header-link {
    min-width: 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-section {
    min-height: auto;
    padding: 54px 18px 38px;
  }

  .curtain {
    width: 24vw;
    min-width: 86px;
  }

  .hero-actions,
  .hero-stats,
  .section-heading,
  .batch-status,
  .site-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions {
    display: grid;
  }

  .hero-stats div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .source-line {
    white-space: normal;
  }

  .tool-section,
  .matrix-section,
  .research-section,
  .botcf-section,
  .batch-main {
    padding: 46px 18px;
  }

  .domain-grid,
  .research-grid,
  .status-strip {
    grid-template-columns: 1fr;
  }

  .domain-table th,
  .domain-table td {
    padding: 12px;
  }
}

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