:root {
  --bg: #070b0d;
  --bg-elev: #0e1518;
  --bg-card: #10181c;
  --line: #1c2d32;
  --text: #e8eef0;
  --muted: #8aa0a6;
  --accent: #3ddec8;
  --accent-dim: #1a3d38;
  --danger: #e07070;
  --ok: #3ddec8;
  --font: "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 11, 13, 0.92);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { color: var(--text); font-weight: 650; letter-spacing: 0.04em; text-decoration: none; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand span { color: var(--accent); }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
nav a:hover, nav a.active { color: var(--text); text-decoration: none; }
.top-actions { margin-left: auto; display: flex; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px; border-radius: 4px; border: 1px solid var(--line);
  color: var(--text); background: transparent; font: inherit; cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-primary { background: var(--accent); color: #06201c; border-color: var(--accent); font-weight: 650; }
.btn-primary:hover { filter: brightness(1.05); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

.notice {
  border-bottom: 1px solid var(--line);
  background: var(--accent-dim);
  color: var(--text);
  font-size: 13px;
  padding: 8px 0;
}
.notice .wrap { display: flex; gap: 16px; flex-wrap: wrap; }

.hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: flex-end;
  background: #070b0d center / cover no-repeat;
}
.hero-photo {
  border-top: 0;
  padding: 0;
  background-image: url("../assets/hero-edge-mesh.jpg");
  background-image: image-set(
    url("../assets/hero-edge-mesh.webp") type("image/webp"),
    url("../assets/hero-edge-mesh.jpg") type("image/jpeg")
  );
}
.hero-mask {
  position: absolute; inset: 0;
  background: rgba(7, 11, 13, 0.62);
}
.hero-body { position: relative; z-index: 1; padding: 72px 0 56px; }
.kicker { color: var(--accent); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.15; font-weight: 650; margin: 12px 0 16px; }
.lede { color: var(--muted); font-size: 18px; max-width: 36em; line-height: 1.6; }
.cta-row { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

section { padding: 72px 0; border-top: 1px solid var(--line); }
h2 { font-size: 24px; margin: 0 0 8px; font-weight: 650; }
h3 { font-size: 16px; margin: 0 0 8px; font-weight: 650; }
.sub { color: var(--muted); margin: 0 0 28px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 800px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
}
.card p, .prose p { color: var(--muted); line-height: 1.65; }
.step { font-family: var(--mono); color: var(--accent); font-size: 12px; margin-bottom: 8px; }

.shot {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.shot img { width: 100%; height: 280px; object-fit: cover; }

.prose { max-width: 46em; }
.prose ul { color: var(--muted); line-height: 1.7; }
code, .mono { font-family: var(--mono); font-size: 0.92em; color: var(--accent); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td {
  text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle;
}
table.data th { color: var(--muted); font-weight: 500; font-size: 12px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.tag-ok { color: var(--ok); border-color: var(--accent-dim); }
.tag-warn { color: #d8c07a; }
.tag-off { color: var(--danger); }

.form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  height: 40px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); padding: 0 10px; font: inherit;
}
textarea { height: auto; padding: 10px; min-height: 96px; }
.err { color: var(--danger); font-size: 13px; min-height: 1.2em; }
.okmsg { color: var(--ok); font-size: 13px; }

.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 13px;
}
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.app {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}
.side {
  border-right: 1px solid var(--line);
  padding: 20px 16px;
  background: var(--bg-elev);
}
.side a {
  display: block; color: var(--muted); padding: 8px 10px; border-radius: 4px; text-decoration: none;
}
.side a:hover, .side a.active { background: var(--accent-dim); color: var(--text); text-decoration: none; }
.main { padding: 28px; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.row-actions { display: flex; gap: 8px; }
.row-actions button { height: 32px; padding: 0 10px; font-size: 12px; }

@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
}
