:root {
  --bg: #0b0f14;
  --bg-elevated: #121821;
  --card: #161d28;
  --text: #eef2f7;
  --muted: #a9b4c4;
  --accent: #5b9cff;
  --ok: #3dd68c;
  --warn: #f5c14a;
  --danger: #ff6b7a;
  --line: rgba(238, 242, 247, 0.1);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
  font-family: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(91, 156, 255, 0.16), transparent 60%),
    linear-gradient(180deg, var(--bg-elevated) 0, var(--bg) 280px);
}

a { color: var(--accent); }

img { max-width: 100%; display: block; }

button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: min(680px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 24, 33, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #061018;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.button.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255, 107, 122, 0.5);
}

.button:disabled { opacity: 0.55; cursor: not-allowed; }

main { padding: 24px 0 48px; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 196px;
  margin-bottom: 22px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-elevated) url("assets/hero.svg") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(11, 15, 20, 0.92) 0%, rgba(11, 15, 20, 0.72) 48%, rgba(11, 15, 20, 0.28) 100%);
}

.hero > * { position: relative; z-index: 1; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lede, .hint, .meta, .empty, .site-foot p {
  color: var(--muted);
  line-height: 1.5;
}

.lede { max-width: 36ch; margin: 10px 0 0; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.stats span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11, 15, 20, 0.55);
  border: 1px solid var(--line);
  font-size: 13px;
}

.lane { margin-top: 22px; }

.lane-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.lane-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(91, 156, 255, 0.15);
}

.lane[data-tone="warn"] { --lane: var(--warn); }
.lane[data-tone="ok"] { --lane: var(--ok); }
.lane[data-tone="accent"] { --lane: var(--accent); }

.lane[data-tone="warn"] .dot { background: var(--warn); box-shadow: 0 0 0 4px rgba(245, 193, 74, 0.16); }
.lane[data-tone="ok"] .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(61, 214, 140, 0.16); }

.count {
  margin-left: auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

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

.card {
  display: block;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--lane, var(--accent));
  border-radius: 16px;
  background-color: var(--card);
  background-image:
    linear-gradient(180deg, rgba(22, 29, 40, 0.94), rgba(22, 29, 40, 0.9)),
    url("assets/card-bg.svg");
  background-size: auto, 180px;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.card h3 {
  margin: 10px 0 4px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.card-top, .row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracking {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.meta { margin: 6px 0 0; font-size: 13px; }

.status, .pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status.warn { background: var(--warn); color: #1c1504; }
.status.ok { background: var(--ok); color: #042216; }
.status.accent { background: var(--accent); color: #061426; }
.status.danger { background: var(--danger); color: #2a060c; }

.pill {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.empty {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(22, 29, 40, 0.45);
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.field { display: grid; gap: 8px; margin-bottom: 16px; }

.field span, .check span { font-size: 14px; font-weight: 700; }

textarea, input[type="text"], select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

textarea { min-height: 140px; resize: vertical; }

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

.preview {
  margin-top: 8px;
  padding-top: 8px;
}

.error {
  min-height: 1.2em;
  margin: 0 0 12px;
  color: var(--danger);
  font-weight: 700;
}

.back {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.detail-head { margin-bottom: 16px; }

.detail-head h1 { margin-top: 10px; }

.kv {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.kv div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.kv dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kv dd { margin: 4px 0 0; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

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

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

.timeline li {
  position: relative;
  padding: 0 0 16px 18px;
  border-left: 2px solid rgba(91, 156, 255, 0.35);
}

.timeline li:last-child { border-left-color: transparent; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline li.done::before { background: var(--ok); }
.timeline li.current::before { background: var(--warn); }

.timeline strong { display: block; }
.timeline span { color: var(--muted); font-size: 13px; }

.site-foot {
  padding: 8px 0 28px;
}

.site-foot p { margin: 0; font-size: 13px; }

@media (max-width: 640px) {
  .wrap { width: min(680px, calc(100% - 24px)); }
  .topbar .wrap { min-height: 64px; }
  .hero { padding: 22px 18px; }
}
