:root {
  --bg: #070d14;
  --bg-elev: #0d1622;
  --panel: #111c2b;
  --line: rgba(140, 190, 220, 0.14);
  --text: #e8f1f8;
  --muted: #8fa6bb;
  --accent: #3dffa8;
  --accent-2: #4ec4ff;
  --warn: #ff8e6b;
  --font-display: "Space Grotesk", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "Space Grotesk", sans-serif;
  --max: 1080px;
  --radius: 12px;
  /* Shared light-page motion (services now; wall later) */
  --motion-dur: 0.55s;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-rise: 12px;
}

/* Restraint reveal — reuse on wall when content settles */
.jz-reveal {
  opacity: 0;
  transform: translateY(var(--motion-rise));
  transition:
    opacity var(--motion-dur) var(--motion-ease),
    transform var(--motion-dur) var(--motion-ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.jz-reveal.is-in {
  opacity: 1;
  transform: none;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(7, 13, 20, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.topbar .brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}
.topbar nav {
  margin-left: auto;
  display: flex;
  gap: 1.1rem;
  color: var(--muted);
  font-size: 0.94rem;
}
.topbar nav a:hover { color: var(--text); }
.topbar nav a.active {
  color: rgba(232, 241, 248, 0.82);
  font-weight: 500;
}
.topbar .menu-btn {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.topbar .menu-btn span {
  width: 16px;
  height: 2px;
  background: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #04140f;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(61, 255, 168, 0.2);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { box-shadow: none; border-color: var(--accent-2); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.88rem; }

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.page-head {
  margin-bottom: 2rem;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
}
.page-head p {
  color: var(--muted);
  margin-top: 0.5rem;
  max-width: 40rem;
}

.notice {
  margin: 1rem 0 1.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(78, 196, 255, 0.06);
  color: var(--muted);
  font-size: 0.92rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  position: relative;
  padding: 1.25rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 28, 43, 0.72);
  overflow: hidden;
  --mx: 50%;
  --my: 50%;
}
.card.soft-light::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(78, 196, 255, 0.1), transparent 42%);
  opacity: 0;
  transition: opacity 0.25s;
}
.card.soft-light:hover::after { opacity: 1; }
.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.card p { color: var(--muted); font-size: 0.95rem; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.55rem;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 2rem 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
}
.foot a:hover { color: var(--text); }
.foot .warn { color: var(--warn); }

.form {
  max-width: 420px;
  display: grid;
  gap: 0.9rem;
}
.form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.form input, .form textarea, .form select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  outline: none;
}
.form input:focus, .form textarea:focus, .form select:focus {
  border-color: rgba(78, 196, 255, 0.55);
}
.form .hint { font-size: 0.82rem; color: var(--muted); }
.form .error {
  color: var(--warn);
  font-size: 0.88rem;
  min-height: 1.2em;
}

.list-stack { display: grid; gap: 0.85rem; }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.chip {
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  cursor: default;
  font-family: inherit;
}
button.chip { cursor: pointer; }
.chip.on {
  color: var(--accent);
  border-color: rgba(61, 255, 168, 0.35);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-left: 3px solid transparent;
  animation: open-rise 0.55s ease both;
  animation-delay: calc(var(--i, 0) * 0.04s);
}
.project-card.tone-quant {
  border-left-color: rgba(61, 255, 168, 0.55);
  background:
    linear-gradient(135deg, rgba(61, 255, 168, 0.05), transparent 42%),
    rgba(17, 28, 43, 0.78);
}
.project-card.tone-auto {
  border-left-color: rgba(78, 196, 255, 0.55);
  background:
    linear-gradient(135deg, rgba(78, 196, 255, 0.06), transparent 42%),
    rgba(17, 28, 43, 0.78);
}
.project-card.is-open {
  box-shadow: 0 0 0 1px rgba(78, 196, 255, 0.22);
}
.project-top {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}
.project-idx {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  opacity: 0.75;
  flex-shrink: 0;
}
.project-card h3 { margin-bottom: 0; }
.project-summary {
  flex: 1;
  line-height: 1.55;
  margin-top: 0.25rem;
}
.project-detail {
  margin-top: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(140, 190, 220, 0.16);
  background: rgba(0, 0, 0, 0.22);
}
.project-detail p {
  color: #c5d6e6;
  font-size: 0.9rem;
  line-height: 1.7;
}
.clone-block {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}
.clone-cmd {
  flex: 1;
  min-width: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #b8d4e8;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
  overflow: hidden;
}
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.copy-btn { flex-shrink: 0; }

/* open page extras (chrome from light-inner.css) */
.page-open .page {
  position: relative;
}
.open-kicker {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.35rem;
  opacity: 0.85;
}
.open-head h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}
.open-notice {
  border-color: rgba(78, 196, 255, 0.18);
  background: linear-gradient(90deg, rgba(78, 196, 255, 0.06), rgba(17, 28, 43, 0.5));
}
.page-open .filter-row .chip {
  padding: 0.4rem 0.85rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.page-open .filter-row .chip:hover {
  color: var(--text);
  border-color: rgba(140, 190, 220, 0.35);
}
.page-open .filter-row .chip.on {
  background: rgba(61, 255, 168, 0.1);
}
@keyframes open-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.foot-brand {
  color: var(--text);
  font-family: var(--font-display);
  display: block;
  margin-bottom: 0.35rem;
}

/* demand wall */
.wall-head { margin-bottom: 1.25rem; }
.wall-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
}
.wall-section { margin: 2rem 0; }
.wall-h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
}
.wall-lead {
  color: var(--muted);
  margin: -0.35rem 0 1rem;
  max-width: 40rem;
  font-size: 0.95rem;
}
.wall-muted { color: var(--muted); font-size: 0.88rem; }
.wall-fields {
  display: grid;
  gap: 0.55rem;
  margin: 0.65rem 0 0.35rem;
}
.wall-fields dt {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.15rem;
}
.wall-fields dd {
  color: var(--muted);
  font-size: 0.95rem;
}
.wall-card .meta-row { margin-top: 1rem; }
.wall-hist-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font-size: 0.88rem;
}
.wall-hist-btn:hover { border-color: var(--accent-2); }
.wall-history { margin-top: 0.85rem; opacity: 0.92; }
.wall-form { max-width: 560px; }
.wall-form .req { color: var(--warn); }
.wall-form .hint { font-size: 0.82rem; color: var(--muted); }
.wall-form .hint.is-bad { color: var(--warn); }
.wall-form .form-error { min-height: 1.2em; }
.wall-bid-meta {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 28, 43, 0.72);
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (max-width: 860px) {
  .topbar nav { display: none; }
  .topbar.open nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(7, 13, 20, 0.98);
    border-bottom: 1px solid var(--line);
  }
  .topbar.open nav a {
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--line);
  }
  .topbar .menu-btn { display: flex; }
  .grid-2, .grid-3, .project-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
