:root {
  color-scheme: dark;
  --bg: #0b0d0f;
  --panel: #11161a;
  --panel-2: #151d22;
  --line: #263138;
  --text: #ecf0ec;
  --muted: #8d9a98;
  --accent: #d7b56d;
  --accent-2: #8db7a0;
  --danger: #e06f6f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 72% 12%, rgba(215, 181, 109, 0.12), transparent 28%),
    linear-gradient(135deg, #08090a 0%, #10181b 58%, #0b0d0f 100%);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

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

.rail,
.inspector {
  padding: 28px;
  background: rgba(10, 13, 15, 0.76);
  border-color: var(--line);
}

.rail {
  border-right: 1px solid var(--line);
}

.inspector {
  border-left: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 38px;
}

.mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, var(--accent), transparent 62%);
}

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

h1 {
  font-size: 20px;
}

.brand p,
.connection,
.inspector,
#eyebrow {
  color: var(--muted);
}

.brand p {
  margin-top: 6px;
  font-size: 12px;
}

.modes {
  display: grid;
  gap: 10px;
}

.mode {
  width: 100%;
  padding: 16px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.mode span {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.mode small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}

.mode.is-active {
  color: var(--text);
}

.mode.is-active span {
  color: var(--accent);
}

.connection {
  display: grid;
  gap: 14px;
  margin-top: 44px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 12px;
}

input,
textarea {
  width: 100%;
  color: var(--text);
  background: #0d1113;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: none;
}

input {
  height: 38px;
  padding: 0 10px;
}

textarea {
  resize: vertical;
  min-height: 190px;
  padding: 18px;
  line-height: 1.7;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
}

.workspace {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 26px;
  padding: 36px;
}

.topline {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

#eyebrow {
  margin-bottom: 10px;
  font-size: 13px;
}

h2 {
  max-width: 760px;
  font-size: 42px;
  line-height: 1.12;
  font-weight: 600;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  color: var(--muted);
  font-size: 13px;
}

#modeLamp {
  width: 9px;
  height: 9px;
  background: var(--accent-2);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--accent-2);
}

.input-zone,
.result-zone {
  display: grid;
  gap: 16px;
}

.actions {
  display: flex;
  gap: 10px;
}

button {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.primary {
  background: var(--accent);
  color: #151008;
  border-color: var(--accent);
}

.secondary,
.ghost {
  background: transparent;
  color: var(--text);
}

.result-zone {
  min-height: 0;
  padding-top: 6px;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

pre {
  min-height: 300px;
  margin: 0;
  padding: 22px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.75;
  color: #dfe7e2;
  background: rgba(12, 17, 19, 0.72);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.inspector {
  display: grid;
  align-content: start;
  gap: 30px;
}

.inspector h3 {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 15px;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

dl div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

dt {
  font-size: 12px;
}

dd {
  margin: 4px 0 0;
  color: var(--text);
  word-break: break-all;
}

.checks {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.checks li::before {
  content: "○";
  margin-right: 8px;
  color: var(--muted);
}

.checks li.is-ok::before {
  content: "●";
  color: var(--accent-2);
}

.state.is-ok {
  color: var(--accent-2);
}

.state.is-bad {
  color: var(--danger);
}

.result-zone.is-loading pre {
  opacity: 0.58;
}

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

  .rail,
  .inspector {
    border: 0;
  }

  .topline {
    display: grid;
  }

  h2 {
    font-size: 30px;
  }
}
