:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-strong: #eef3f5;
  --text: #14171a;
  --muted: #66717e;
  --line: #dbe2e7;
  --green: #22a06b;
  --blue: #2f6fec;
  --coral: #e35643;
  --amber: #c98914;
  --ink: #20252b;
  --shadow: 0 20px 60px rgba(31, 41, 55, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 247, 250, 0.88)),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(47, 111, 236, 0.04) 42px 43px);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid rgba(219, 226, 231, 0.86);
  background: rgba(245, 247, 250, 0.86);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 164px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.site-nav a {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 8px;
  color: #48515a;
  font-size: 14px;
}

.site-nav a:hover {
  background: #e9eef2;
  color: var(--text);
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(26px, 6vw, 84px);
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: 56px 0 42px;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-text {
  max-width: 640px;
  margin: 22px 0 0;
  color: #4b5563;
  font-size: clamp(16px, 2vw, 19px);
}

.hero-actions,
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
}

.button:hover {
  border-color: #b9c3cc;
  transform: translateY(-1px);
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.button.ghost {
  background: transparent;
}

.button.compact {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14px;
}

.server-visual {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.status-bar,
.metrics,
.rack-row,
.status-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px;
  color: #3f4953;
}

.status-bar strong {
  margin-left: auto;
  color: var(--text);
  font-size: 13px;
}

.pulse,
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(34, 160, 107, 0.14);
}

.pulse.offline,
.status-dot.offline {
  background: var(--coral);
  box-shadow: 0 0 0 6px rgba(227, 86, 67, 0.14);
}

.rack {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
  background: #232a31;
}

.rack-row {
  display: grid;
  grid-template-columns: repeat(3, 14px) 1fr;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 12px;
  background: #15191e;
  color: #d8dee6;
}

.rack-row span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #56616d;
}

.rack-row.active span:first-child,
.rack-row:nth-child(1) span:nth-child(2),
.rack-row:nth-child(3) span:nth-child(3) {
  background: var(--green);
}

.rack-row strong {
  justify-self: end;
  font-size: 13px;
}

.hero-resource-list {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 8px;
  background: #f8fafc;
}

.hero-resource-item {
  display: grid;
  gap: 8px;
}

.hero-resource-item strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.hero-resource-item span {
  font-weight: 850;
}

.mini-meter {
  width: 80px;
  height: 8px;
  vertical-align: middle;
  accent-color: #198c35;
}

.mini-meter::-webkit-meter-bar {
  border: 1px solid #c8d1da;
  border-radius: 999px;
  background: #eef2f5;
}

.mini-meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: #198c35;
}

.mini-meter::-webkit-meter-suboptimum-value {
  border-radius: 999px;
  background: var(--amber);
}

.mini-meter::-webkit-meter-even-less-good-value {
  border-radius: 999px;
  background: var(--coral);
}

.mini-meter::-moz-meter-bar {
  border-radius: 999px;
  background: #198c35;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
}

.metrics div {
  padding: 14px;
}

.metrics div + div {
  border-left: 1px solid var(--line);
}

.metrics small,
.status-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metrics strong,
.status-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 19px;
}

.section-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.stat {
  min-height: 138px;
  padding: 22px;
  background: #fff;
}

.stat span {
  color: var(--coral);
  font-weight: 850;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.stat p,
.section-heading p,
.tool-card p,
.post-list p,
.deploy li {
  color: var(--muted);
}

.section,
.split-section,
.deploy {
  padding: 56px 0;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 24px;
}

.section-heading h2,
.deploy h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.section-heading p:last-child {
  margin-bottom: 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tool-card,
.post-list article,
.link-board a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 18px;
}

.tool-card.wide {
  grid-column: span 2;
}

.tool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-card h3,
.post-list h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.tool-card p {
  margin: 4px 0 0;
  font-size: 14px;
}

.badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(34, 160, 107, 0.12);
  color: #15704c;
  font-size: 12px;
  font-weight: 800;
}

textarea,
input[type="number"],
input[type="datetime-local"] {
  width: 100%;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--text);
}

textarea {
  min-height: 150px;
  resize: vertical;
  padding: 12px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: #46515c;
  font-size: 13px;
  font-weight: 750;
}

input[type="number"],
input[type="datetime-local"] {
  min-height: 42px;
  padding: 9px 10px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.checks {
  display: flex;
  gap: 14px;
}

.checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4f5964;
}

.password-output {
  display: block;
  min-height: 48px;
  padding: 12px;
  border: 1px dashed #b9c3cc;
  border-radius: 8px;
  background: #f7fafc;
  overflow-wrap: anywhere;
  font-family: "Cascadia Code", Consolas, monospace;
}

.tool-message {
  min-height: 22px;
  margin-top: auto;
  font-size: 13px;
}

.tool-message.success {
  color: #15704c;
}

.tool-message.error {
  color: var(--coral);
}

.palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.swatch {
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 10px 4px;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.link-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.link-board a {
  display: block;
  min-height: 92px;
  padding: 18px;
}

.link-board a:hover,
.post-list article:hover,
.tool-card:focus-within {
  border-color: #aeb9c4;
  box-shadow: 0 14px 34px rgba(31, 41, 55, 0.08);
}

.link-board strong,
.link-board span {
  display: block;
}

.link-board span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 26px;
  align-items: start;
}

.post-list {
  display: grid;
  gap: 12px;
}

.post-list article {
  padding: 18px;
}

.post-list span {
  color: var(--amber);
  font-size: 13px;
  font-weight: 850;
}

.post-list p {
  margin: 8px 0 0;
}

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

.status-grid article {
  position: relative;
  min-height: 118px;
  padding: 18px;
}

.status-grid .status-dot {
  position: absolute;
  top: 20px;
  right: 20px;
}

.live-panel {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.resource-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
}

.resource-row div {
  min-width: 0;
}

.resource-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.resource-row strong {
  display: block;
  color: var(--text);
  font-size: 20px;
}

meter {
  width: 100%;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: #e8edf1;
}

meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: #e8edf1;
}

meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: var(--green);
}

meter::-webkit-meter-suboptimum-value {
  border-radius: 999px;
  background: var(--amber);
}

meter::-webkit-meter-even-less-good-value {
  border-radius: 999px;
  background: var(--coral);
}

meter::-moz-meter-bar {
  border-radius: 999px;
  background: var(--green);
}

.live-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.deploy {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
}

.deploy ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

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

.download-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.download-button:hover {
  border-color: #aeb9c4;
  box-shadow: 0 14px 34px rgba(31, 41, 55, 0.08);
  transform: translateY(-1px);
}

.download-button span {
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.download-button strong {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(16px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

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

  .hero {
    min-height: auto;
  }

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

@media (max-width: 640px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  main {
    width: min(100% - 24px, 1160px);
  }

  .hero {
    padding-top: 34px;
  }

  .section-strip,
  .tool-grid,
  .link-board,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .tool-card.wide {
    grid-column: span 1;
  }

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

  .metrics div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .status-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-bar strong {
    margin-left: 0;
  }

  .site-footer {
    flex-direction: column;
  }

  .resource-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .download-button {
    align-items: flex-start;
    flex-direction: column;
  }
}
