:root {
  color-scheme: dark;
  --bg: #11191a;
  --surface: #1a2425;
  --line: #334143;
  --muted: #91a3a1;
  --text: #edf3ee;
  --accent: #c4f29a;
  --amber: #e3bd78;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(#ffffff06 1px, transparent 1px), linear-gradient(90deg, #ffffff06 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
button { font: inherit; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.workspace { max-width: 1080px; margin: auto; padding: 30px 42px 90px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.identity { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 650; }
.identity-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--accent); color: var(--accent); font-size: 25px; line-height: 1; }
.top-label, .eyebrow, .section-index, .section-heading > span:last-child, .metric-head > span:last-child, .trace-subtitle {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .08em;
}
.entry { min-height: 580px; display: grid; grid-template-columns: 1fr .9fr; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.entry-copy { padding: 70px 0; position: relative; z-index: 1; }
.entry-copy h1 { margin-top: 4px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 34px; color: var(--accent); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px #c4f29a18; }
h1 { font-size: clamp(43px, 5.7vw, 68px); line-height: 1.24; font-weight: 600; margin: 0; }
h1 span { color: var(--accent); }
.lead { max-width: 420px; margin: 28px 0 36px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.start { min-width: 210px; min-height: 54px; display: inline-flex; align-items: center; justify-content: space-between; gap: 36px; padding: 0 19px; border: 0; border-radius: 3px; background: var(--accent); color: #19231c; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s, transform .2s; }
.start:hover { background: #d7ffb3; transform: translateY(-2px); }
.start:disabled { opacity: .6; cursor: wait; transform: none; }
.start span:last-child { font-size: 23px; font-weight: 400; line-height: 1; }
.signal { width: min(100%, 460px); aspect-ratio: 1; position: relative; justify-self: end; display: grid; place-items: center; overflow: hidden; }
.signal::before, .signal::after { content: ""; position: absolute; background: #b7d4c020; }
.signal::before { width: 1px; height: 100%; }
.signal::after { width: 100%; height: 1px; }
.signal-ring { position: absolute; border: 1px solid #bbdbbb35; border-radius: 50%; }
.ring-one { width: 35%; aspect-ratio: 1; border-color: #c4f29a8c; }
.ring-two { width: 65%; aspect-ratio: 1; }
.ring-three { width: 91%; aspect-ratio: 1; border-style: dashed; border-color: #bbdbbb28; animation: spin 90s linear infinite; }
.signal-core { width: 18%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #c4f29a13; border: 1px solid #c4f29a6b; box-shadow: 0 0 42px #c4f29a24; }
.signal-cross { font-family: ui-monospace, monospace; font-size: 30px; font-weight: 200; color: var(--accent); }
.signal-label { position: absolute; font: 10px ui-monospace, monospace; letter-spacing: .06em; color: #9bb4aa; background: var(--bg); padding: 5px 8px; }
.signal-label-a { left: 8%; top: 31%; }
.signal-label-b { right: 2%; bottom: 25%; }
@keyframes spin { to { transform: rotate(360deg); } }
.results { padding-top: 38px; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-index { color: var(--accent); }
.result-summary { min-height: 136px; display: flex; align-items: center; gap: 22px; padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); }
.result-icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); font-size: 25px; }
.result-icon.good { color: var(--accent); border-color: #9bd57675; background: #b5df8b10; }
.result-icon.warn { color: var(--amber); border-color: #e3bd7875; background: #e3bd7810; }
.result-icon.bad { color: #fa9f87; border-color: #fa9f8775; background: #fa9f8710; }
.result-copy { flex: 1; min-width: 0; }
.result-copy > p:first-child { color: var(--accent); font-size: 11px; margin: 0 0 7px; }
.result-copy h2 { font-size: 22px; font-weight: 600; margin: 0; }
.result-copy > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.copy { color: var(--text); background: transparent; border: 1px solid #718980; border-radius: 3px; padding: 11px 15px; white-space: nowrap; font-size: 12px; cursor: pointer; }
.copy:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.copy:disabled { opacity: .4; cursor: default; }
.progress-track { height: 2px; background: #30413d; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .24s; }
.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.metric { grid-column: span 2; min-height: 163px; padding: 20px; border: 1px solid var(--line); background: #182122; }
.metric:nth-child(n + 4) { grid-column: span 3; }
.metric-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; color: #c1cec9; }
.metric-head > span:last-child { color: #78918a; }
.metric-value { display: flex; align-items: baseline; gap: 7px; margin-top: 20px; min-height: 49px; }
.metric-value strong { min-width: 0; font-size: 39px; font-weight: 550; line-height: 1.2; }
.metric-value strong.metric-text { font-size: 22px; }
.metric-value small { font-size: 12px; color: var(--muted); }
.metric-value small[hidden] { display: none; }
.metric p { margin: 11px 0 0; font-size: 11px; color: #849995; }
.trace { margin-top: 10px; padding: 20px 22px 12px; border: 1px solid var(--line); background: #182122; }
.trace > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.trace-title { font-size: 13px; }
.trace canvas { display: block; width: 100%; height: 130px; margin-top: 8px; }
.footnote { margin: 19px 0; font-size: 11px; color: var(--muted); }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 28px; transform: translate(-50%, 15px); opacity: 0; pointer-events: none; background: var(--accent); color: #18221a; padding: 10px 16px; border-radius: 3px; font-size: 12px; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .workspace { padding: 23px 20px 60px; }
  .top-label { display: none; }
  .entry { min-height: 0; grid-template-columns: 1fr; position: relative; padding: 88px 0 75px; }
  .entry-copy { padding: 0; }
  .eyebrow { margin-bottom: 25px; }
  h1 { font-size: 43px; }
  .lead { font-size: 13px; margin: 24px 0 32px; }
  .signal { position: absolute; width: 280px; right: -110px; top: -18px; opacity: .24; pointer-events: none; }
  .signal-label { display: none; }
  .result-summary { gap: 13px; padding: 17px; flex-wrap: wrap; }
  .result-icon { width: 38px; height: 38px; font-size: 21px; }
  .result-copy { flex-basis: calc(100% - 60px); }
  .result-copy h2 { font-size: 18px; }
  .copy { margin-left: 51px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric, .metric:nth-child(n + 4) { grid-column: span 1; min-height: 148px; padding: 16px; }
  .metric:first-child { grid-column: span 2; }
  .metric-value strong { font-size: 31px; }
  .metric-value strong.metric-text { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
