:root {
  color-scheme: dark;
  --bg: #12111b;
  --bg-soft: #1a1725;
  --panel: rgba(28, 24, 38, .70);
  --panel-strong: rgba(31, 27, 43, .92);
  --panel-light: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #f5f2eb;
  --muted: #b7b2c2;
  --muted-2: #8e879b;
  --gold: #d6b36a;
  --gold-bright: #f3d58a;
  --gold-deep: #8a6428;
  --purple: #8b66ff;
  --purple-bright: #b49cff;
  --blue: #5a8cff;
  --teal: #55d6c2;
  --green: #4dd49e;
  --red: #ff7171;
  --shadow: 0 28px 80px rgba(8, 6, 18, .24);
  --shadow-soft: 0 16px 42px rgba(8, 6, 18, .18);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% -10%, rgba(139, 102, 255, .24), transparent 35%),
    radial-gradient(circle at 88% 0%, rgba(243, 213, 138, .20), transparent 32%),
    radial-gradient(circle at 50% 62%, rgba(85, 214, 194, .10), transparent 36%),
    linear-gradient(180deg, #161422 0%, #141320 42%, #18141f 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 25%, black 0%, transparent 72%);
  z-index: -4;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
[hidden] { display: none !important; }

.particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  opacity: .98;
  mix-blend-mode: screen;
}
.flow-ribbons {
  position: fixed;
  inset: -8% -12%;
  pointer-events: none;
  z-index: -3;
  overflow: hidden;
}
.ribbon {
  position: absolute;
  display: block;
  width: 52vw;
  height: 16vw;
  min-width: 420px;
  min-height: 150px;
  border-radius: 999px;
  filter: blur(32px);
  opacity: .24;
}
.ribbon-one {
  left: -8%; top: 8%;
  background: linear-gradient(90deg, rgba(214,179,106,.05), rgba(214,179,106,.34), rgba(139,102,255,.0));
  animation: ribbonDriftOne 20s ease-in-out infinite alternate;
}
.ribbon-two {
  right: -10%; top: 34%;
  background: linear-gradient(90deg, rgba(85,214,194,.0), rgba(85,214,194,.22), rgba(243,213,138,.14));
  animation: ribbonDriftTwo 24s ease-in-out infinite alternate;
}
.ribbon-three {
  left: 14%; bottom: -3%;
  background: linear-gradient(90deg, rgba(139,102,255,.0), rgba(139,102,255,.18), rgba(214,179,106,.18));
  animation: ribbonDriftThree 22s ease-in-out infinite alternate;
}
.ambient {
  position: fixed;
  pointer-events: none;
  z-index: -3;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .25;
  animation: ambientFloat 14s ease-in-out infinite alternate;
}
.ambient-one { width: 380px; height: 380px; left: -130px; top: 28%; background: var(--purple); }
.ambient-two { width: 330px; height: 330px; right: -120px; top: 46%; background: var(--gold); animation-delay: -5s; }
.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px max(22px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(22, 20, 33, .72);
  backdrop-filter: blur(22px) saturate(150%);
}
.brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; }
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--gold-bright);
  background: linear-gradient(145deg, rgba(214, 179, 106, .18), rgba(139, 102, 255, .15));
  border: 1px solid rgba(243, 213, 138, .32);
  box-shadow: inset 0 1px rgba(255,255,255,.14), 0 10px 28px rgba(0,0,0,.26);
}
.brand-mark svg { width: 29px; height: 29px; }
.brand-mark svg path:first-child { fill: rgba(214,179,106,.10); }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 15px; letter-spacing: .02em; }
.brand-copy small { font-size: 11px; color: var(--muted); }
.topnav { display: flex; align-items: center; gap: 30px; }
.topnav a { color: var(--muted); font-size: 13px; transition: .2s ease; position: relative; }
.topnav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 1px; background: linear-gradient(90deg, var(--gold), var(--purple)); transition: .25s ease; }
.topnav a:hover { color: var(--text); }
.topnav a:hover::after { right: 0; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.035);
  border-radius: 12px;
  transition: .2s ease;
}
.icon-button:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.075); transform: translateY(-1px); }
.icon-button svg { width: 18px; height: 18px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
}
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px rgba(255,255,255,.04); }
.badge.pending { color: #c7c2ce; }
.badge.ok { color: #a9f0d1; border-color: rgba(77,212,158,.24); background: rgba(77,212,158,.08); }
.badge.ok i { background: var(--green); box-shadow: 0 0 12px rgba(77,212,158,.75); }
.badge.error { color: #ffb2b2; border-color: rgba(255,113,113,.22); background: rgba(255,113,113,.08); }
.badge.error i { background: var(--red); box-shadow: 0 0 12px rgba(255,113,113,.65); }
.badge.warning { color: #f5d99a; border-color: rgba(214,179,106,.28); background: rgba(214,179,106,.10); }
.badge.warning i { background: var(--gold); box-shadow: 0 0 12px rgba(214,179,106,.72); }

.offline-notice {
  margin: 18px 0 22px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(214,179,106,.26);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(214,179,106,.14), rgba(139,102,255,.09), rgba(255,255,255,.04));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}
.offline-notice strong { display: block; color: var(--gold-bright); font-size: 15px; margin-bottom: 5px; }
.offline-notice p { margin: 0; color: #d4cedc; font-size: 12px; line-height: 1.65; }
.offline-orb { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: rgba(214,179,106,.12); border: 1px solid rgba(214,179,106,.28); }
.offline-orb span { width: 11px; height: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 8px rgba(214,179,106,.08), 0 0 22px rgba(214,179,106,.65); animation: pulse 1.9s ease-in-out infinite; }

.button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 17px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 750;
  color: var(--text);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  overflow: hidden;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .46; cursor: not-allowed; transform: none; }
.button svg { width: 19px; height: 19px; }
.button.primary {
  color: #100d08;
  background: linear-gradient(115deg, #9b6d2b 0%, var(--gold-bright) 46%, #b88332 100%);
  box-shadow: 0 12px 34px rgba(214,179,106,.18), inset 0 1px rgba(255,255,255,.55);
}
.button.primary:hover { box-shadow: 0 15px 42px rgba(214,179,106,.28), inset 0 1px rgba(255,255,255,.65); }
.button.secondary { color: #ece7ff; border-color: rgba(139,102,255,.32); background: linear-gradient(135deg, rgba(139,102,255,.26), rgba(90,140,255,.16)); }
.button.glass { color: var(--text); border-color: var(--line); background: rgba(255,255,255,.05); backdrop-filter: blur(12px); }
.button.glass:hover { border-color: rgba(214,179,106,.35); background: rgba(255,255,255,.085); }
.button.full { width: 100%; }
.button.large { min-height: 51px; padding-inline: 22px; }
.wallet-button { min-height: 40px; padding: 9px 14px; color: #f3e9d1; border-color: rgba(214,179,106,.32); background: rgba(214,179,106,.10); }
.wallet-button:hover { background: rgba(214,179,106,.16); }
.button-shine { position: absolute; z-index: -1; width: 70px; height: 220%; left: -100px; top: -60%; transform: rotate(22deg); background: rgba(255,255,255,.28); filter: blur(4px); transition: left .65s ease; }
.generate-button:hover .button-shine { left: calc(100% + 60px); }
.text-button { border: 0; background: transparent; color: var(--gold); font-weight: 750; white-space: nowrap; padding: 8px 0; }

.page-shell { max-width: var(--max-width); margin: 0 auto; padding: 70px 22px 72px; }
.hero-section {
  min-height: 590px;
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  align-items: center;
  gap: 62px;
  position: relative;
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.eyebrow > span { width: 24px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
h1 { margin: 19px 0 20px; max-width: 760px; font-size: clamp(44px, 6vw, 76px); line-height: 1.05; letter-spacing: -.055em; font-weight: 780; }
h1 em { font-style: normal; color: transparent; background: linear-gradient(105deg, var(--gold-bright) 0%, #f2c9a6 34%, var(--purple-bright) 72%, var(--teal) 110%); -webkit-background-clip: text; background-clip: text; }
.hero-copy > p { max-width: 690px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.85; }
.hero-copy > p { text-shadow: 0 8px 30px rgba(8, 6, 18, .16); }
.hero-section::after {
  content: "";
  position: absolute;
  inset: 7% -3% auto auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243,213,138,.18), transparent 66%);
  filter: blur(8px);
  pointer-events: none;
}
.protocol-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.protocol-pills span {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(214,179,106,.22);
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  color: #ece4d3;
  font-size: 12px;
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 12px 32px rgba(9, 8, 18, .12);
}
.orchestration-note {
  margin-top: 18px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(214,179,106,.18);
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(214,179,106,.05));
}
.orchestration-title {
  color: var(--gold-bright);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  margin-bottom: 8px;
}
.orchestration-note p { margin: 0; color: #d9d4df; font-size: 12px; line-height: 1.7; }
.orchestration-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.orchestration-tags span { padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); color: #f0eadb; font-size: 10px; }
.panel, .value-strip, .certificate-preview, .disclaimer { box-shadow: var(--shadow); }
.jewel-stage::after { box-shadow: 0 0 70px rgba(243,213,138,.12), inset 0 0 50px rgba(255,255,255,.04); }
.security-note { background: linear-gradient(135deg, rgba(214,179,106,.10), rgba(255,255,255,.035)); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 28px; color: #c2beca; font-size: 12px; }
.trust-row span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.purple { background: var(--purple); box-shadow: 0 0 12px rgba(139,102,255,.75); }
.dot.gold { background: var(--gold); box-shadow: 0 0 12px rgba(214,179,106,.7); }
.dot.teal { background: var(--teal); box-shadow: 0 0 12px rgba(85,214,194,.7); }

.hero-visual { min-height: 520px; display: grid; place-items: center; position: relative; }
.jewel-stage {
  position: relative;
  width: min(470px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,102,255,.11) 0%, rgba(214,179,106,.05) 32%, transparent 66%);
}
.jewel-stage::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle at 44% 34%, rgba(255,255,255,.1), transparent 16%), radial-gradient(circle, rgba(214,179,106,.08), transparent 64%); filter: blur(4px); }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.orbit-a { inset: 11%; transform: rotate(24deg) scaleY(.56); animation: orbitSpin 15s linear infinite; border-color: rgba(214,179,106,.28); }
.orbit-b { inset: 19%; transform: rotate(-42deg) scaleY(.67); animation: orbitSpinReverse 12s linear infinite; border-color: rgba(139,102,255,.36); }
.orbit-c { inset: 29%; border-style: dashed; border-color: rgba(85,214,194,.25); animation: orbitSpin 18s linear infinite reverse; }
.orbit span { position: absolute; width: 9px; height: 9px; border-radius: 50%; top: 50%; left: -5px; background: var(--gold-bright); box-shadow: 0 0 17px rgba(243,213,138,.9); }
.orbit-b span { left: auto; right: -5px; background: var(--purple-bright); box-shadow: 0 0 17px rgba(180,156,255,.9); }
.gem-core {
  position: relative;
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0%, 92% 24%, 84% 78%, 50% 100%, 16% 78%, 8% 24%);
  background: linear-gradient(145deg, rgba(243,213,138,.96), rgba(139,102,255,.72) 55%, rgba(85,214,194,.72));
  box-shadow: 0 0 70px rgba(139,102,255,.34);
  animation: gemFloat 5s ease-in-out infinite;
}
.gem-core::before { content: ""; position: absolute; inset: 4px; clip-path: inherit; background: linear-gradient(145deg, #181522, #0e0d14); }
.gem-core::after { content: ""; position: absolute; inset: 11px; clip-path: inherit; background: linear-gradient(120deg, rgba(255,255,255,.12), transparent 35%, rgba(139,102,255,.16) 68%, rgba(214,179,106,.18)); }
.gem-core span { position: relative; z-index: 2; color: var(--gold-bright); font-weight: 850; letter-spacing: .14em; font-size: 26px; text-shadow: 0 0 20px rgba(243,213,138,.4); }
.gem-facet { position: absolute; z-index: 2; width: 1px; height: 100%; background: linear-gradient(transparent, rgba(255,255,255,.25), transparent); transform: rotate(26deg); }
.floating-card {
  position: absolute;
  min-width: 152px;
  padding: 13px 15px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(16,16,25,.76);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
  animation: cardFloat 5.5s ease-in-out infinite;
}
.floating-card span { color: var(--gold); font-size: 11px; font-weight: 850; letter-spacing: .08em; }
.floating-card b { font-size: 13px; }
.floating-card small { color: var(--muted-2); font-size: 10px; }
.card-v1 { left: 0; top: 22%; }
.card-v2 { right: -2%; bottom: 23%; animation-delay: -2s; }
.card-chain { left: 8%; bottom: 7%; animation-delay: -3.5s; }
.card-chain i { position: absolute; right: 13px; top: 13px; width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 12px rgba(77,212,158,.8); }

.value-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 2px 0 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.035);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.value-strip article { min-height: 102px; padding: 20px 21px; display: flex; align-items: center; gap: 14px; border-right: 1px solid var(--line); }
.value-strip article:last-child { border-right: 0; }
.value-strip strong { color: var(--gold); font-size: 15px; }
.value-strip div { display: grid; gap: 4px; }
.value-strip b { font-size: 13px; }
.value-strip span { color: var(--muted); font-size: 11px; line-height: 1.5; }

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(24,24,36,.92), rgba(12,12,19,.88));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(255,255,255,.045), transparent 28%); }
.studio-layout { display: grid; grid-template-columns: 1.22fr .78fr; gap: 22px; }
.creation-panel, .system-panel, .revision-panel, .agent-panel { padding: 29px; }
.panel-heading { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.panel-heading h2, .workspace-header h2, .certificate-preview h2 { margin: 5px 0 7px; font-size: 24px; letter-spacing: -.025em; }
.panel-heading p, .certificate-preview p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.panel-kicker { color: var(--gold); font-size: 10px; letter-spacing: .16em; font-weight: 850; }
.step-pill { flex: 0 0 auto; padding: 7px 10px; color: #dcd4ed; border: 1px solid rgba(139,102,255,.24); background: rgba(139,102,255,.08); border-radius: 999px; font-size: 10px; font-weight: 800; }
.compact-heading { align-items: center; }
.live-indicator { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 13px rgba(77,212,158,.8); animation: pulse 1.8s ease-in-out infinite; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.preset-chip, .change-chips button, .question-chips button {
  border: 1px solid var(--line);
  color: #ccc7d3;
  background: rgba(255,255,255,.035);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 11px;
  transition: .2s ease;
}
.preset-chip:hover, .change-chips button:hover, .question-chips button:hover { color: var(--text); border-color: rgba(214,179,106,.32); background: rgba(214,179,106,.08); transform: translateY(-1px); }
.field-label { display: block; margin: 0 0 8px; color: #d9d5df; font-size: 12px; font-weight: 750; }
.textarea-shell { position: relative; }
textarea, input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: rgba(5,5,10,.52);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  transition: .2s ease;
}
textarea { resize: vertical; min-height: 148px; line-height: 1.72; }
textarea::placeholder, input::placeholder { color: #676371; }
textarea:focus, input:focus { border-color: rgba(139,102,255,.48); box-shadow: 0 0 0 4px rgba(139,102,255,.09), 0 0 28px rgba(139,102,255,.08); }
.char-count { position: absolute; right: 13px; bottom: 11px; color: var(--muted-2); font-size: 10px; pointer-events: none; }
.form-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 14px 0 18px; }
.compact-field { flex: 1; display: grid; gap: 7px; color: var(--muted); font-size: 11px; }
.compact-field input { min-height: 41px; padding: 10px 12px; }
.job-panel { margin-top: 17px; padding: 17px; border: 1px solid rgba(139,102,255,.16); border-radius: 18px; background: linear-gradient(135deg, rgba(139,102,255,.085), rgba(90,140,255,.04)); }
.job-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: #d7d1e5; font-size: 12px; }
.job-head b { color: var(--purple-bright); }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.075); }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--blue), var(--teal)); box-shadow: 0 0 18px rgba(139,102,255,.45); transition: width .3s ease; }
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 14px; }
.pipeline span { position: relative; display: grid; justify-items: center; gap: 6px; color: var(--muted-2); text-align: center; font-size: 9px; }
.pipeline span::after { content: ""; position: absolute; top: 10px; left: calc(50% + 12px); width: calc(100% - 24px); height: 1px; background: var(--line); }
.pipeline span:last-child::after { display: none; }
.pipeline i { position: relative; z-index: 1; width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #15151f; font-style: normal; font-size: 9px; }
.pipeline span.active { color: #e4dcff; }
.pipeline span.active i { border-color: rgba(139,102,255,.55); background: rgba(139,102,255,.22); box-shadow: 0 0 15px rgba(139,102,255,.28); }
.pipeline span.done { color: #a7e9d0; }
.pipeline span.done i { color: #07100c; border-color: transparent; background: var(--green); }
.pipeline span.done i::before { content: "✓"; }
.pipeline span.done i { font-size: 0; }
.pipeline span.done i::before { font-size: 11px; }
.pipeline span.done::after { background: rgba(77,212,158,.42); }
.error-box { margin-top: 14px; padding: 13px 14px; color: #ffc1c1; border: 1px solid rgba(255,113,113,.2); border-radius: 14px; background: rgba(255,113,113,.08); font-size: 12px; line-height: 1.6; }

.status-grid { display: grid; gap: 10px; }
.status-item { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid rgba(255,255,255,.07); border-radius: 16px; background: rgba(255,255,255,.025); }
.status-icon { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; font-size: 10px; font-weight: 850; }
.status-icon.purple { color: #d9ceff; background: rgba(139,102,255,.14); }
.status-icon.gold { color: var(--gold-bright); background: rgba(214,179,106,.13); }
.status-icon.teal { color: #b8f6ec; background: rgba(85,214,194,.12); }
.status-icon.neutral { color: #d4d0dc; background: rgba(255,255,255,.07); }
.status-item div { min-width: 0; display: grid; gap: 3px; }
.status-item small { color: var(--muted-2); font-size: 10px; }
.status-item b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.security-note { display: flex; gap: 12px; margin-top: 16px; padding: 15px; border-radius: 17px; background: linear-gradient(135deg, rgba(214,179,106,.09), rgba(255,255,255,.025)); border: 1px solid rgba(214,179,106,.15); }
.security-note svg { flex: 0 0 auto; width: 23px; height: 23px; color: var(--gold); }
.security-note strong { font-size: 12px; }
.security-note p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.architecture-mini { display: flex; align-items: center; gap: 6px; margin-top: 17px; overflow-x: auto; padding-bottom: 2px; }
.architecture-mini span { flex: 0 0 auto; padding: 6px 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; font-size: 9px; }
.architecture-mini i { flex: 0 0 15px; height: 1px; background: linear-gradient(90deg, var(--purple), var(--gold)); }

.workspace { margin-top: 22px; }
.versions-panel { padding: 30px; }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.workspace-header h2 { font-size: 27px; }
.workspace-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.icon-button.framed { border-color: var(--line-strong); }
.project-summary { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.project-summary strong { color: var(--text); font-size: 13px; }
.project-summary .summary-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.project-summary .summary-badges span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: #bcb7c5; font-size: 9px; }

.compare-section { margin-bottom: 28px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.025); }
.compare-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.compare-head h3 { margin: 0 0 4px; font-size: 16px; }
.compare-head p { margin: 0; color: var(--muted); font-size: 11px; }
.compare-legend { display: flex; align-items: center; gap: 8px; }
.compare-legend span { padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.06); color: #d5d0dc; font-size: 10px; }
.compare-view { position: relative; overflow: hidden; width: 100%; max-height: 580px; aspect-ratio: 16 / 9; border-radius: 18px; background: #08080d; }
.compare-image { width: 100%; height: 100%; display: block; object-fit: contain; background: radial-gradient(circle, rgba(214,179,106,.05), transparent 64%); }
.compare-overlay { position: absolute; inset: 0 auto 0 0; width: 50%; overflow: hidden; border-right: 1px solid rgba(255,255,255,.65); }
.compare-overlay .compare-image { position: absolute; inset: 0; max-width: none; }
.compare-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(255,255,255,.55); pointer-events: none; }
.compare-divider span { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; display: grid; place-items: center; transform: translate(-50%,-50%); color: #18131d; background: var(--gold-bright); border-radius: 50%; box-shadow: 0 8px 30px rgba(0,0,0,.35); font-weight: 850; }
.compare-view input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; }
.timeline-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 0 2px 11px; border-bottom: 1px solid var(--line); }
.timeline-head span { font-weight: 800; font-size: 13px; }
.timeline-head small { color: var(--muted); font-size: 10px; }
.timeline { display: grid; gap: 17px; margin-top: 17px; }
.version-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 290px) 1fr;
  gap: 20px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  transition: .25s ease;
}
.version-card:hover { transform: translateY(-3px); border-color: rgba(214,179,106,.23); box-shadow: 0 20px 50px rgba(0,0,0,.22); }
.version-card::before { content: ""; position: absolute; left: -25px; top: 38px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(214,179,106,.08), 0 0 18px rgba(214,179,106,.45); }
.version-media { position: relative; overflow: hidden; border-radius: 17px; background: #0a0a10; cursor: zoom-in; }
.version-image { width: 100%; height: 100%; min-height: 230px; aspect-ratio: 1; display: block; object-fit: cover; transition: transform .5s ease, filter .5s ease; }
.version-media:hover .version-image { transform: scale(1.035); filter: brightness(1.06); }
.version-media::after { content: "查看大图"; position: absolute; right: 10px; bottom: 10px; padding: 6px 8px; color: white; background: rgba(5,5,10,.68); backdrop-filter: blur(8px); border-radius: 9px; font-size: 9px; opacity: 0; transform: translateY(6px); transition: .2s ease; }
.version-media:hover::after { opacity: 1; transform: translateY(0); }
.version-body { min-width: 0; padding: 3px 2px; }
.version-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.version-title { display: flex; align-items: center; gap: 10px; }
.version-number { width: 43px; height: 43px; display: grid; place-items: center; color: #12100c; background: linear-gradient(145deg, var(--gold-bright), #aa792f); border-radius: 13px; font-weight: 900; }
.version-top h3 { margin: 0 0 3px; font-size: 19px; }
.version-top .muted { color: var(--muted); font-size: 10px; }
.version-state { flex: 0 0 auto; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: #c8c3cf; background: rgba(255,255,255,.04); font-size: 9px; font-weight: 800; }
.version-state.confirmed, .version-state.finalized { color: #aaf0d2; border-color: rgba(77,212,158,.2); background: rgba(77,212,158,.08); }
.version-state.finalized { color: var(--gold-bright); border-color: rgba(214,179,106,.25); background: rgba(214,179,106,.09); box-shadow: 0 0 20px rgba(214,179,106,.08); }
.version-state.failed { color: #ffc0c0; border-color: rgba(255,113,113,.22); background: rgba(255,113,113,.08); }
.version-description { margin: 14px 0; color: var(--muted); font-size: 12px; line-height: 1.68; }
.version-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.version-fields > div { min-width: 0; padding: 10px 11px; border: 1px solid rgba(255,255,255,.06); border-radius: 13px; background: rgba(0,0,0,.13); }
.version-fields span { display: block; color: var(--muted-2); font-size: 9px; margin-bottom: 4px; }
.version-fields b, .version-fields code { display: block; color: #ddd8e2; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hash-row { display: flex; align-items: center; gap: 7px; }
.hash-row code { flex: 1; min-width: 0; }
.copy-mini { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; padding: 0; color: var(--muted); border: 1px solid var(--line); background: transparent; border-radius: 8px; }
.copy-mini:hover { color: var(--gold); border-color: rgba(214,179,106,.3); }
.copy-mini svg { width: 12px; height: 12px; }
.version-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.version-actions .button { min-height: 39px; padding: 8px 12px; border-radius: 11px; font-size: 10px; }
.version-warning { margin-top: 10px; color: #e5bc65; font-size: 10px; line-height: 1.5; }

.workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.compact-textarea textarea { min-height: 129px; }
.change-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 16px; }
.question-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 17px; }
.inline-input { display: flex; gap: 8px; }
.inline-input input { min-width: 0; }
.inline-input .button { flex: 0 0 auto; }
.agent-orb { position: relative; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, white 0 2%, var(--purple-bright) 10%, var(--purple) 36%, rgba(85,214,194,.55) 74%, transparent 76%); box-shadow: 0 0 30px rgba(139,102,255,.38); animation: agentPulse 3.2s ease-in-out infinite; }
.agent-orb::after { content: ""; position: absolute; inset: -5px; border: 1px solid rgba(139,102,255,.28); border-radius: 50%; animation: orbitSpin 8s linear infinite; }
.agent-answer { min-height: 126px; display: flex; gap: 12px; margin-top: 16px; padding: 16px; border: 1px solid rgba(139,102,255,.16); border-radius: 17px; background: linear-gradient(135deg, rgba(139,102,255,.10), rgba(85,214,194,.035)); color: #ddd7e8; line-height: 1.7; font-size: 12px; }
.agent-answer-icon { flex: 0 0 auto; width: 33px; height: 33px; display: grid; place-items: center; color: white; border-radius: 11px; background: linear-gradient(135deg, var(--purple), var(--blue)); font-size: 9px; font-weight: 850; }
.agent-answer p { margin: 2px 0 0; }
.evidence { display: grid; gap: 7px; margin-top: 9px; }
.evidence div { padding-top: 7px; border-top: 1px solid rgba(255,255,255,.07); color: #aaa5b4; font-size: 10px; word-break: break-all; }
.evidence a { color: var(--teal); }

.certificate-preview { margin-top: 22px; padding: 30px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 25px; }
.certificate-mark { width: 72px; height: 72px; display: grid; place-items: center; clip-path: polygon(50% 0, 90% 24%, 82% 78%, 50% 100%, 18% 78%, 10% 24%); color: #17120a; background: linear-gradient(145deg, var(--gold-bright), #9c6d27); font-weight: 900; letter-spacing: .08em; }
.certificate-preview h2 { font-size: 22px; }
.certificate-preview p { max-width: 770px; }
.certificate-points { display: grid; gap: 7px; }
.certificate-points span { padding: 7px 9px; color: #bbb6c3; border: 1px solid var(--line); border-radius: 10px; font-size: 9px; text-align: center; }
.disclaimer { margin-top: 18px; padding: 17px 20px; display: flex; gap: 18px; align-items: flex-start; color: var(--muted); border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.025); }
.disclaimer strong { flex: 0 0 auto; color: var(--gold); font-size: 11px; }
.disclaimer p { margin: 0; font-size: 10px; line-height: 1.7; }

.site-footer { max-width: var(--max-width); margin: 0 auto; padding: 0 22px 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted-2); }
.site-footer div { display: grid; gap: 3px; }
.site-footer b { color: #bcb7c4; font-size: 11px; }
.site-footer span, .site-footer small { font-size: 9px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: min(430px, calc(100vw - 40px)); padding: 13px 16px; color: var(--text); border: 1px solid rgba(214,179,106,.25); border-radius: 14px; background: rgba(18,18,27,.94); backdrop-filter: blur(18px); box-shadow: var(--shadow); font-size: 12px; animation: toastIn .25s ease; }
.toast.error { border-color: rgba(255,113,113,.28); background: rgba(55,20,25,.95); }
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 30px; background: rgba(2,2,7,.88); backdrop-filter: blur(16px); }
.modal img { max-width: min(1100px, 94vw); max-height: 82vh; object-fit: contain; border-radius: 18px; box-shadow: 0 30px 100px rgba(0,0,0,.58); }
.modal-close { position: fixed; right: 22px; top: 22px; width: 44px; height: 44px; color: white; border: 1px solid var(--line-strong); background: rgba(255,255,255,.08); border-radius: 50%; font-size: 27px; line-height: 1; }
.modal-caption { margin-top: 12px; color: #d4cfdb; font-size: 12px; text-align: center; }
.mobile-primary { display: none; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes ambientFloat { to { transform: translate3d(40px,-35px,0) scale(1.12); } }
@keyframes ribbonDriftOne { from { transform: translate3d(0,0,0) rotate(-10deg) scale(1); } to { transform: translate3d(8vw, 3vw, 0) rotate(-2deg) scale(1.12); } }
@keyframes ribbonDriftTwo { from { transform: translate3d(0,0,0) rotate(12deg) scale(1); } to { transform: translate3d(-8vw, 2vw, 0) rotate(2deg) scale(1.08); } }
@keyframes ribbonDriftThree { from { transform: translate3d(0,0,0) rotate(3deg) scale(1); } to { transform: translate3d(10vw, -2vw, 0) rotate(-5deg) scale(1.1); } }
@keyframes orbitSpin { to { transform: rotate(384deg) scaleY(.56); } }
@keyframes orbitSpinReverse { to { transform: rotate(-402deg) scaleY(.67); } }
@keyframes gemFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes cardFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes agentPulse { 0%,100% { transform: scale(.96); } 50% { transform: scale(1.05); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-button.spinning svg { animation: spin .8s linear infinite; }

@media (max-width: 1040px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topnav { display: none; }
  .hero-section { grid-template-columns: 1fr 1fr; gap: 30px; }
  .studio-layout { grid-template-columns: 1fr; }
  .system-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .system-panel .panel-heading { grid-column: 1 / -1; margin-bottom: 0; }
  .system-panel .architecture-mini { grid-column: 1 / -1; }
  .certificate-preview { grid-template-columns: auto 1fr; }
  .certificate-points { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 820px) {
  .page-shell { padding-top: 42px; }
  .hero-section { min-height: auto; grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy > p { margin-inline: auto; }
  .hero-actions, .trust-row, .protocol-pills { justify-content: center; }
  .hero-visual { min-height: 430px; }
  .jewel-stage { max-width: 430px; }
  .value-strip { grid-template-columns: repeat(2, 1fr); }
  .value-strip article:nth-child(2) { border-right: 0; }
  .value-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .workspace-grid { grid-template-columns: 1fr; }
  .version-card { grid-template-columns: 220px 1fr; }
  .certificate-preview { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .certificate-points { width: 100%; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { padding-bottom: 72px; }
  .topbar { padding: 11px 13px; }
  .brand-copy small, .top-actions .badge, .top-actions > .icon-button { display: none; }
  .brand-mark { width: 39px; height: 39px; }
  .wallet-button { min-width: 42px; width: 42px; padding: 0; }
  .wallet-button span { display: none; }
  .page-shell { padding-inline: 13px; padding-bottom: 38px; }
  h1 { font-size: clamp(39px, 12vw, 55px); }
  .hero-copy > p { font-size: 14px; }
  .hero-actions .button { flex: 1 1 100%; }
  .trust-row { gap: 12px; }
  .hero-visual { min-height: 355px; }
  .jewel-stage { width: 330px; }
  .gem-core { width: 108px; height: 108px; }
  .floating-card { min-width: 127px; padding: 10px 11px; }
  .floating-card b { font-size: 10px; }
  .card-v1 { left: -2%; }
  .card-v2 { right: -2%; }
  .value-strip { grid-template-columns: 1fr; }
  .offline-notice { grid-template-columns: auto 1fr; padding: 16px; }
  .offline-notice .button { grid-column: 1 / -1; width: 100%; }
  .protocol-pills span { width: 100%; justify-content: center; text-align: center; }
  .orchestration-tags span { font-size: 9px; }
  .value-strip article { min-height: 83px; border-right: 0; border-bottom: 1px solid var(--line); }
  .value-strip article:last-child { border-bottom: 0; }
  .creation-panel, .system-panel, .revision-panel, .agent-panel, .versions-panel, .certificate-preview { padding: 20px; border-radius: 22px; }
  .panel-heading { gap: 10px; }
  .panel-heading h2, .workspace-header h2 { font-size: 21px; }
  .system-panel { display: block; }
  .system-panel .panel-heading { margin-bottom: 18px; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .status-item { align-items: flex-start; padding: 11px; }
  .status-icon { width: 32px; height: 32px; }
  .status-item b { white-space: normal; font-size: 10px; }
  .form-row { align-items: stretch; flex-direction: column; }
  .text-button { align-self: flex-start; }
  .pipeline { gap: 2px; }
  .pipeline span { font-size: 0; }
  .pipeline i { width: 25px; height: 25px; font-size: 9px; }
  .pipeline span::after { top: 12px; left: calc(50% + 14px); width: calc(100% - 28px); }
  .workspace-header { flex-direction: column; }
  .workspace-actions { width: 100%; }
  .workspace-actions .button { flex: 1; font-size: 9px; }
  .compare-section { padding: 13px; }
  .compare-head { align-items: stretch; flex-direction: column; }
  .compare-view { aspect-ratio: 1; }
  .version-card { grid-template-columns: 1fr; }
  .version-card::before { display: none; }
  .version-image { min-height: 0; }
  .version-fields { grid-template-columns: 1fr; }
  .inline-input { flex-direction: column; }
  .disclaimer { flex-direction: column; gap: 6px; }
  .site-footer { display: none; }
  .mobile-primary.is-visible {
    position: fixed;
    left: 13px;
    right: 13px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 60;
    display: block;
    min-height: 50px;
    border: 0;
    color: #100d08;
    border-radius: 15px;
    background: linear-gradient(115deg, #9b6d2b, var(--gold-bright), #b88332);
    box-shadow: 0 14px 45px rgba(0,0,0,.45);
    font-weight: 850;
  }
  .mobile-primary.hidden-by-workspace { display: none !important; }
  .modal { padding: 12px; }
  .modal-close { right: 12px; top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .particle-canvas { display: none; }
  .reveal { opacity: 1; transform: none; }
}
