:root {
  color-scheme: dark;
  --bg: #000000;
  --white: #ffffff;
  --title-bottom: #858b96;
  --text: #eef3fb;
  --muted: #8b96a7;
  --quiet: #5f6978;
  --panel: rgba(8, 13, 22, 0.72);
  --panel-strong: rgba(11, 18, 30, 0.88);
  --card: rgba(10, 16, 27, 0.82);
  --field: rgba(255, 255, 255, 0.06);
  --line: rgba(180, 210, 255, 0.16);
  --line-strong: rgba(117, 196, 255, 0.34);
  --blue: #2369ff;
  --cyan: #40f0ff;
  --cyan-soft: #9eeeff;
  --danger: #ff7e72;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.68);
  --radius: 8px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
}

body::before,
body::after {
  position: fixed;
  top: -8vh;
  z-index: -1;
  width: 60vw;
  height: 80vh;
  content: "";
  pointer-events: none;
  filter: blur(70px);
  background: radial-gradient(ellipse at top left, rgba(160, 205, 255, 0.75) 0%, rgba(70, 135, 235, 0.4) 42%, transparent 85%);
  opacity: 0.92;
}

body::before {
  left: -8vw;
  transform: rotate(20deg);
  transform-origin: 0 0;
}

body::after {
  right: -8vw;
  transform: rotate(-20deg);
  transform-origin: 100% 0;
  background: radial-gradient(ellipse at top right, rgba(160, 205, 255, 0.75) 0%, rgba(70, 135, 235, 0.4) 42%, transparent 85%);
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.lock-screen {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 0.95fr);
  min-height: 100vh;
  overflow: hidden;
}

.lock-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
  background: transparent;
}

.lock-visual::before {
  position: absolute;
  inset: 12%;
  content: "";
  border: 1px solid rgba(160, 205, 255, 0.13);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 30px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.lock-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent 0 42%, rgba(0, 0, 0, 0.44) 100%);
  pointer-events: none;
}

.signal-lattice {
  position: absolute;
  top: 8%;
  left: 8%;
  right: 8%;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  color: rgba(188, 222, 255, 0.62);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.signal-lattice span {
  min-height: 28px;
  padding: 8px 10px;
  border: 1px solid rgba(160, 205, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
}

.prompt-strip {
  position: absolute;
  left: -8%;
  right: -8%;
  z-index: 1;
  display: flex;
  gap: 10px;
  justify-content: center;
  white-space: nowrap;
  transform: rotate(-6deg);
}

.prompt-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 15px;
  border: 1px solid rgba(160, 205, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(222, 235, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.strip-a {
  top: 16%;
}

.strip-b {
  bottom: 12%;
  transform: rotate(5deg);
}

.artifact-board {
  position: relative;
  z-index: 2;
  width: min(72%, 620px);
  min-height: 590px;
  padding: 28px;
  border: 1px solid rgba(160, 205, 255, 0.2);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025)), rgba(0, 0, 0, 0.36);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(30px);
}

.artifact-board::before {
  position: absolute;
  inset: 22px;
  content: "";
  border: 1px solid rgba(160, 205, 255, 0.1);
  border-radius: 22px;
  pointer-events: none;
}

.scanline,
.core-map {
  display: none;
}

.artifact-board article {
  position: absolute;
  width: 60%;
  padding: 18px 20px;
  border: 1px solid rgba(160, 205, 255, 0.18);
  border-radius: 20px;
  background: rgba(2, 8, 18, 0.7);
  color: var(--text);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.artifact-board article:nth-of-type(1) {
  top: 70px;
  left: 42px;
  transform: rotate(-3deg);
}

.artifact-board article:nth-of-type(2) {
  top: 232px;
  right: 42px;
  width: 66%;
  transform: rotate(2deg);
}

.artifact-board article:nth-of-type(3) {
  bottom: 72px;
  left: 70px;
  transform: rotate(-1deg);
}

.artifact-board b {
  color: var(--cyan-soft);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.artifact-board p {
  margin: 12px 0 0;
  color: rgba(245, 247, 251, 0.84);
  line-height: 1.75;
}

.lock-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 7vw, 96px);
  background: transparent;
}

.eyebrow {
  margin: 0 0 16px;
  color: rgba(164, 211, 255, 0.88);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.98;
}

h1,
h2 {
  color: transparent;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: -0.055em;
  background: linear-gradient(180deg, #ffffff 0%, #d9dee7 44%, #7f8793 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

h1 {
  max-width: 760px;
  font-size: clamp(58px, 7vw, 102px);
}

h2 {
  font-size: clamp(42px, 4vw, 66px);
}

h3 {
  color: var(--white);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.lock-copy {
  max-width: 560px;
  margin: 28px 0 34px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.75;
}

.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 460px);
  padding: 5px;
  border: 1px solid rgba(160, 205, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.role-tab {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.role-tab.active {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #ffffff;
  box-shadow: 0 16px 46px rgba(64, 240, 255, 0.24);
}

.login-form {
  width: min(100%, 560px);
  margin-top: 24px;
}

label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 8px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(160, 205, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

input,
select {
  min-height: 52px;
  padding: 0 16px;
}

textarea {
  resize: vertical;
  padding: 14px;
  line-height: 1.7;
}

input::placeholder,
textarea::placeholder {
  color: rgba(139, 150, 167, 0.78);
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(64, 240, 255, 0.22);
  outline-offset: 2px;
}

.password-row button,
.primary-action,
.copy-button {
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #ffffff;
  font-weight: 950;
  padding: 0 18px;
  box-shadow: 0 16px 42px rgba(64, 240, 255, 0.22);
}

.form-message {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--danger);
  font-weight: 800;
}

.lock-foot {
  margin: 20px 0 0;
  color: var(--quiet);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.app-shell {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 48px);
}

.topbar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 24px;
  padding: 24px 28px;
  overflow: hidden;
  border: 1px solid rgba(160, 205, 255, 0.18);
  border-radius: 26px;
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.085), transparent 42%, rgba(64, 240, 255, 0.08)),
    rgba(0, 6, 15, 0.56);
  box-shadow:
    0 26px 90px rgba(0, 0, 0, 0.64),
    0 0 0 1px rgba(64, 240, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(28px);
}

.topbar::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(ellipse at 12% 22%, rgba(160, 205, 255, 0.18), transparent 22rem),
    linear-gradient(90deg, rgba(160, 205, 255, 0.06), transparent 48%, rgba(64, 240, 255, 0.1));
  pointer-events: none;
}

.topbar-grid {
  display: none;
}

.top-subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
}

.top-metrics {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-metrics span {
  display: grid;
  min-width: 92px;
  min-height: 54px;
  place-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(160, 205, 255, 0.14);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--quiet);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.top-metrics b {
  color: var(--cyan-soft);
  font-size: 17px;
}

.top-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(64, 240, 255, 0.3);
  border-radius: 999px;
  background: rgba(64, 240, 255, 0.08);
  color: var(--cyan-soft);
  font-weight: 950;
}

.ghost-action,
.icon-action {
  min-height: 42px;
  border: 1px solid rgba(160, 205, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 850;
  padding: 0 14px;
}

.icon-action {
  width: 42px;
  padding: 0;
  font-size: 18px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 16px;
  margin: 24px 0 16px;
  align-items: start;
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 0 15px;
  border: 1px solid rgba(160, 205, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

.search-box span {
  color: var(--cyan-soft);
  font-size: 21px;
  font-weight: 900;
}

.search-box input {
  min-height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-chip {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(160, 205, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-weight: 850;
}

.filter-chip.active {
  border-color: rgba(64, 240, 255, 0.72);
  background: rgba(64, 240, 255, 0.13);
  color: var(--cyan-soft);
}

.status-line {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
}

.status-line p {
  margin: 0;
}

.copy-toast {
  color: var(--cyan-soft);
}

.network-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.58fr);
  gap: 20px;
  margin-top: 14px;
  align-items: stretch;
}

.network-panel {
  position: relative;
  min-height: 700px;
  overflow: hidden;
  border: 1px solid rgba(160, 205, 255, 0.2);
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(64, 240, 255, 0.18), transparent 29rem),
    radial-gradient(ellipse at 18% 18%, rgba(35, 105, 255, 0.18), transparent 24rem),
    radial-gradient(ellipse at 83% 25%, rgba(64, 240, 255, 0.12), transparent 23rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    #01040a;
  box-shadow:
    0 36px 120px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(64, 240, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -80px 110px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(26px);
}

.network-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(160, 205, 255, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 205, 255, 0.045) 1px, transparent 1px),
    linear-gradient(115deg, transparent 0 48%, rgba(160, 205, 255, 0.12) 49%, transparent 51% 100%);
  background-size: 56px 56px, 56px 56px, 240px 240px;
  mask-image: radial-gradient(ellipse at center, black 0 52%, transparent 82%);
  opacity: 0.78;
}

.network-panel::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 16%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 6px);
  mix-blend-mode: screen;
  opacity: 0.24;
}

.network-hud {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  color: rgba(205, 232, 255, 0.72);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.network-hud span {
  padding: 8px 10px;
  border: 1px solid rgba(160, 205, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 12, 28, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 28px rgba(64, 240, 255, 0.06);
  backdrop-filter: blur(16px);
}

.network-map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 700px;
  display: block;
}

.neural-field {
  opacity: 0.88;
}

.neural-ring {
  fill: transparent;
  stroke: rgba(160, 205, 255, 0.15);
  stroke-width: 1;
  stroke-dasharray: 3 13;
  transform-box: fill-box;
  transform-origin: center;
  filter: url("#nodeGlow");
}

.ring-a {
  stroke: rgba(64, 240, 255, 0.28);
  animation: ringDrift 18s linear infinite;
}

.ring-b {
  stroke-dasharray: 9 18;
  animation: ringDrift 26s linear infinite reverse;
}

.ring-c {
  stroke: rgba(160, 205, 255, 0.08);
  stroke-dasharray: 2 20;
  animation: ringDrift 34s linear infinite;
}

.axis-line {
  stroke: rgba(160, 205, 255, 0.08);
  stroke-width: 1;
  stroke-dasharray: 5 13;
}

.core-link {
  fill: none;
  stroke: var(--node-color);
  stroke-linecap: round;
  stroke-opacity: 0.23;
  stroke-width: 1.25;
  filter: url("#nodeGlow");
  animation: linkPulse 4.8s ease-in-out infinite;
  animation-delay: var(--delay);
}

.network-core {
  fill: url("#coreGradient");
  stroke: rgba(200, 242, 255, 0.68);
  stroke-width: 1;
  filter: url("#coreGlow");
}

.network-core.flare {
  fill: rgba(64, 240, 255, 0.08);
  stroke: rgba(64, 240, 255, 0.18);
  stroke-width: 1;
}

.network-core.inner {
  fill: #ffffff;
  stroke: rgba(64, 240, 255, 0.9);
  stroke-width: 2;
}

.network-core.outer {
  fill: transparent;
  stroke: rgba(160, 205, 255, 0.22);
  stroke-dasharray: 4 10;
  animation: ringDrift 16s linear infinite reverse;
}

.core-label {
  fill: rgba(199, 231, 255, 0.66);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-anchor: middle;
}

.network-link {
  fill: none;
  stroke: var(--node-color);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-opacity: 0.3;
  filter: url("#nodeGlow");
  animation: linkPulse 4.4s ease-in-out infinite;
  animation-delay: var(--delay);
}

.network-link.selected {
  stroke-width: 2.4;
  stroke-opacity: 0.78;
}

.network-pulse {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 0 72;
  stroke-opacity: 0.56;
  filter: url("#coreGlow");
  animation: signalTravel 3.5s linear infinite;
  animation-delay: var(--delay);
}

.network-pulse.selected {
  stroke: var(--node-color);
  stroke-width: 3.4;
  stroke-opacity: 0.88;
}

.network-mesh {
  fill: none;
  stroke: var(--node-color);
  stroke-linecap: round;
  stroke-width: 0.8;
  stroke-dasharray: 2 7;
  stroke-opacity: 0.22;
  filter: url("#nodeGlow");
  animation: meshFlicker 5.2s ease-in-out infinite;
  animation-delay: var(--delay);
}

.network-hub .hub-halo {
  fill: color-mix(in srgb, var(--node-color) 12%, transparent);
  stroke: color-mix(in srgb, var(--node-color) 34%, transparent);
  stroke-width: 1;
  filter: url("#nodeGlow");
}

.network-hub .hub-orbit {
  fill: transparent;
  stroke: var(--node-color);
  stroke-width: 1.2;
  stroke-dasharray: 5 8;
  stroke-opacity: 0.58;
  animation: ringDrift 8s linear infinite;
}

.network-hub .hub-core {
  fill: color-mix(in srgb, var(--node-color) 58%, #ffffff 16%);
  stroke: var(--node-color);
  stroke-width: 1.6;
  filter: url("#nodeGlow");
}

.network-hub .hub-label {
  fill: rgba(238, 243, 251, 0.74);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-anchor: middle;
  text-shadow: 0 0 18px rgba(64, 240, 255, 0.38);
}

.network-node text {
  opacity: 0;
  transition: opacity 160ms ease;
}

.network-node:hover text,
.network-node.selected text {
  opacity: 1;
}

.network-node text {
  fill: rgba(248, 252, 255, 0.86);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-anchor: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.82);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.network-node {
  cursor: pointer;
  outline: none;
}

.network-node:focus-visible .node-orbit {
  stroke: #ffffff;
  stroke-opacity: 1;
}

.network-node .node-halo {
  fill: color-mix(in srgb, var(--node-color) 14%, transparent);
  opacity: 0.58;
  filter: url("#nodeGlow");
}

.network-node .node-core {
  fill: color-mix(in srgb, var(--node-color) 82%, #ffffff 8%);
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.2;
  filter: url("#nodeGlow");
  transition: r 160ms ease, fill 160ms ease, stroke-width 160ms ease;
}

.network-node .node-orbit {
  fill: transparent;
  stroke: var(--node-color);
  stroke-width: 1.2;
  stroke-opacity: 0.5;
  stroke-dasharray: 4 8;
  transform-origin: center;
  animation: orbitPulse 3.6s ease-in-out infinite;
  animation-delay: var(--delay);
}

.network-node .node-crosshair {
  stroke: var(--node-color);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-opacity: 0;
  filter: url("#nodeGlow");
  transition: stroke-opacity 160ms ease;
}

.network-node .node-spark {
  fill: rgba(255, 255, 255, 0.92);
  opacity: 0.9;
  pointer-events: none;
}

.network-node.selected .node-core {
  fill: #ffffff;
  stroke: var(--node-color);
  stroke-width: 3.4;
}

.network-node.selected .node-orbit {
  stroke-opacity: 0.9;
  stroke-width: 2;
  stroke-dasharray: 2 5;
}

.network-node.selected .node-crosshair,
.network-node:hover .node-crosshair,
.network-node:focus-visible .node-crosshair {
  stroke-opacity: 0.52;
}

.network-node.selected .node-halo {
  opacity: 0.96;
}

.network-node:hover .node-orbit,
.network-node:focus-visible .node-orbit {
  stroke-opacity: 0.95;
}

.prompt-detail {
  min-width: 0;
}

.prompt-detail .prompt-card {
  display: block;
  width: 100%;
  margin: 0;
  position: sticky;
  top: 18px;
  border-color: rgba(160, 205, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(1, 5, 12, 0.78);
  box-shadow:
    0 30px 95px rgba(0, 0, 0, 0.68),
    0 0 0 1px rgba(64, 240, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.prompt-detail .prompt-body {
  max-height: 420px;
}

.detail-empty {
  min-height: 360px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 28px;
  border: 1px solid rgba(160, 205, 255, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(64, 240, 255, 0.12), transparent 16rem),
    rgba(255, 255, 255, 0.05);
  color: var(--muted);
  text-align: center;
}

.prompt-grid {
  column-count: 3;
  column-gap: 18px;
  margin-top: 12px;
}

.prompt-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid rgba(160, 205, 255, 0.14);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035)), rgba(0, 0, 0, 0.44);
  color: var(--text);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  break-inside: avoid;
  backdrop-filter: blur(18px);
}

.prompt-card::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(135deg, rgba(160, 205, 255, 0.1), transparent 38%);
}

.card-ribbon {
  position: relative;
  z-index: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--accent, var(--blue)), var(--cyan), transparent 88%);
}

.card-inner {
  position: relative;
  z-index: 1;
  padding: 20px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--blue)) 44%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, var(--blue)) 13%, transparent);
  color: color-mix(in srgb, var(--accent, var(--blue)) 70%, white);
  font-size: 12px;
  font-weight: 950;
}

.date-text {
  color: var(--quiet);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
}

.prompt-card h3 {
  color: var(--white);
  font-family: Inter, system-ui, sans-serif;
  font-size: 23px;
  font-weight: 950;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.summary {
  margin: 11px 0 14px;
  color: rgba(220, 228, 239, 0.72);
  line-height: 1.72;
}

.usage-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 14px;
  padding: 10px 11px;
  border: 1px solid rgba(160, 205, 255, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(220, 228, 239, 0.74);
  font-size: 13px;
  line-height: 1.55;
}

.usage-line b {
  flex: 0 0 auto;
  color: var(--cyan-soft);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prompt-body {
  max-height: 280px;
  overflow: auto;
  padding: 15px;
  border: 1px solid rgba(160, 205, 255, 0.11);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.36);
  color: rgba(245, 247, 251, 0.9);
  white-space: pre-wrap;
  line-height: 1.72;
  font-family: "IBM Plex Mono", "Noto Sans Mono", ui-monospace, monospace;
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.tag-row span {
  padding: 5px 8px;
  border: 1px solid rgba(160, 205, 255, 0.11);
  border-radius: 999px;
  color: rgba(220, 228, 239, 0.58);
  font-size: 12px;
  font-weight: 800;
}

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

.copy-button,
.edit-button,
.delete-button {
  min-height: 39px;
  border-radius: var(--radius);
  font-weight: 950;
  padding: 0 12px;
}

.copy-button {
  flex: 1 1 120px;
}

.edit-button {
  border: 1px solid rgba(64, 240, 255, 0.24);
  background: rgba(64, 240, 255, 0.08);
  color: var(--cyan-soft);
}

.delete-button {
  border: 1px solid rgba(255, 126, 114, 0.28);
  background: rgba(255, 126, 114, 0.08);
  color: var(--danger);
}

.empty-state {
  margin-top: 44px;
  padding: 36px;
  border: 1px dashed rgba(160, 205, 255, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
}

.empty-state h3 {
  font-family: Inter, system-ui, sans-serif;
  font-size: 22px;
}

.empty-state p {
  color: var(--muted);
}

.dialog {
  width: min(720px, calc(100vw - 28px));
  border: 1px solid rgba(160, 205, 255, 0.24);
  border-radius: 24px;
  background: rgba(5, 9, 16, 0.96);
  box-shadow: var(--shadow);
  color: var(--text);
}

.small-dialog {
  width: min(520px, calc(100vw - 28px));
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(10px);
}

.dialog form {
  display: grid;
  gap: 16px;
}

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

.close-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(160, 205, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.security-note {
  margin: -4px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

@media (max-width: 1040px) {
  .lock-screen {
    grid-template-columns: 1fr;
  }

  .lock-visual {
    min-height: 44vh;
  }

  .artifact-board {
    min-height: 350px;
    width: min(84%, 560px);
  }

  .artifact-board article {
    width: 58%;
  }

  .lock-panel {
    justify-content: flex-start;
  }

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

  .top-metrics,
  .top-actions {
    justify-content: flex-start;
  }

  .prompt-grid {
    column-count: 2;
  }

  .network-stage {
    grid-template-columns: 1fr;
  }

  .network-panel,
  .network-map {
    min-height: 600px;
  }

  .prompt-detail .prompt-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 760px) {
  body::before,
  body::after {
    width: 86vw;
    height: 58vh;
    filter: blur(58px);
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 40px;
  }

  .lock-copy {
    font-size: 17px;
  }

  .signal-lattice,
  .top-metrics {
    display: none;
  }

  .topbar,
  .toolbar,
  .status-line {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 20px;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .prompt-grid {
    column-count: 1;
  }

  .network-panel,
  .network-map {
    min-height: 500px;
  }

  .network-hud {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    padding: 14px 14px 0;
  }

  .form-grid,
  .password-row {
    grid-template-columns: 1fr;
  }

  .artifact-board article {
    position: static;
    width: 100% !important;
    margin-bottom: 12px;
    transform: none !important;
  }

  .prompt-strip {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .prompt-card,
  .filter-chip,
  .primary-action,
  .ghost-action,
  .icon-action,
  .role-tab,
  .copy-button,
  .edit-button,
  .delete-button {
    transition: transform 170ms ease, box-shadow 170ms ease, background 170ms ease, border-color 170ms ease;
  }

  .prompt-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 86px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(64, 240, 255, 0.12);
  }

  button:hover {
    transform: translateY(-1px);
  }
}

@keyframes linkPulse {
  0%,
  100% {
    stroke-opacity: 0.18;
  }
  50% {
    stroke-opacity: 0.56;
  }
}

@keyframes orbitPulse {
  0%,
  100% {
    stroke-opacity: 0.22;
    scale: 0.94;
  }
  50% {
    stroke-opacity: 0.82;
    scale: 1.08;
  }
}

@keyframes signalTravel {
  0% {
    stroke-dasharray: 0 86;
    stroke-dashoffset: 0;
  }
  14% {
    stroke-dasharray: 22 68;
  }
  100% {
    stroke-dasharray: 0 86;
    stroke-dashoffset: -360;
  }
}

@keyframes ringDrift {
  to {
    stroke-dashoffset: -240;
  }
}

@keyframes meshFlicker {
  0%,
  100% {
    stroke-opacity: 0.12;
  }
  48% {
    stroke-opacity: 0.34;
  }
}

/* Command-deck redesign inspired by cinematic policy dashboards. */
.app-shell {
  position: relative;
  min-height: 100vh;
  padding: 18px 26px 118px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(39, 83, 78, 0.52), transparent 42rem),
    radial-gradient(ellipse at 15% 68%, rgba(70, 135, 235, 0.14), transparent 34rem),
    linear-gradient(115deg, #000000 0 18%, #061312 52%, #000000 100%);
}

.app-shell::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(ellipse at center, black 0 46%, transparent 82%);
}

.app-shell::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 0 52%, rgba(0, 0, 0, 0.84) 100%);
}

.topbar,
.toolbar,
.status-line,
.network-stage,
.empty-state {
  position: relative;
  z-index: 2;
}

.topbar {
  min-height: 66px;
  grid-template-columns: 300px minmax(280px, 1fr) auto;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar::before {
  display: none;
}

.brand-block {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  align-items: center;
}

.brand-block::before {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(238, 211, 154, 0.62);
  border-radius: 14px;
  content: "✦";
  color: #f3d89c;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 28px rgba(245, 210, 141, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  grid-row: 1 / span 2;
}

.brand-block .eyebrow,
.brand-block h2 {
  grid-column: 2;
}

.brand-block .eyebrow {
  margin: 0;
  color: #efd49a;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.topbar h2 {
  color: #ffffff;
  font-size: 18px;
  letter-spacing: 0;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.top-subtitle {
  display: none;
}

.top-metrics {
  justify-self: center;
  justify-content: center;
  padding: 5px;
  border: 1px solid rgba(68, 246, 235, 0.2);
  border-radius: 14px;
  background: rgba(4, 43, 45, 0.76);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.top-metrics span {
  min-width: 76px;
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(64, 240, 255, 0.14), rgba(2, 16, 18, 0.68));
  color: rgba(201, 223, 220, 0.68);
}

.top-metrics b {
  color: #f4dd9d;
}

.role-badge,
.ghost-action,
.icon-action,
.primary-action {
  min-height: 42px;
  border-color: rgba(238, 211, 154, 0.45);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.primary-action {
  background: rgba(0, 0, 0, 0.34);
  color: #f4dd9d;
}

.network-stage {
  display: block;
  min-height: calc(100vh - 86px);
  margin-top: 8px;
}

.network-panel {
  min-height: calc(100vh - 106px);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 43% 45%, rgba(107, 133, 101, 0.2), transparent 34rem),
    radial-gradient(ellipse at 40% 45%, rgba(64, 240, 255, 0.16), transparent 30rem),
    transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.network-panel::before {
  opacity: 0.28;
  background-image:
    radial-gradient(circle, rgba(247, 220, 160, 0.32) 0 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 42px 42px, 84px 84px;
  mask-image: radial-gradient(ellipse at 43% 48%, black 0 36%, transparent 78%);
}

.network-panel::after {
  opacity: 0.16;
}

.network-hud {
  top: 22px;
  left: 8px;
  right: auto;
  flex-direction: column;
  gap: 8px;
  opacity: 0.72;
}

.network-hud span {
  width: max-content;
  padding: 7px 10px;
  border-color: rgba(238, 211, 154, 0.24);
  background: rgba(0, 0, 0, 0.32);
  color: rgba(238, 229, 205, 0.8);
}

.network-map {
  min-height: calc(100vh - 106px);
  transform: translateX(-58px);
}

.prompt-detail {
  position: absolute;
  top: 76px;
  right: 0;
  z-index: 5;
  width: min(440px, 32vw);
}

.prompt-detail .prompt-card {
  position: relative;
  top: auto;
  border: 1px solid rgba(166, 255, 236, 0.18);
  border-radius: 34px;
  background:
    radial-gradient(ellipse at 78% 8%, rgba(153, 255, 229, 0.18), transparent 19rem),
    linear-gradient(140deg, rgba(255, 255, 255, 0.12), rgba(6, 26, 25, 0.66) 44%, rgba(0, 0, 0, 0.92)),
    rgba(4, 16, 17, 0.88);
  box-shadow:
    0 36px 120px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px);
}

.prompt-detail .prompt-card::after {
  background: linear-gradient(120deg, rgba(238, 211, 154, 0.14), transparent 34%, rgba(64, 240, 255, 0.08));
}

.prompt-detail .card-ribbon {
  height: 2px;
  background: linear-gradient(90deg, #f3d89c, var(--accent, var(--cyan)), transparent);
}

.prompt-detail .card-inner {
  padding: 24px;
}

.prompt-detail .prompt-card h3 {
  font-size: 28px;
  line-height: 1.18;
}

.prompt-detail .summary {
  color: rgba(232, 238, 235, 0.74);
  font-size: 16px;
}

.prompt-detail .prompt-body {
  max-height: 330px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.44);
}

.toolbar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  width: min(880px, calc(100vw - 52px));
  transform: translateX(-50%);
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1.55fr);
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(166, 255, 236, 0.34);
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 85% 100%, rgba(64, 240, 255, 0.24), transparent 18rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(4, 38, 39, 0.72));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7), 0 0 38px rgba(64, 240, 255, 0.24);
  backdrop-filter: blur(24px);
}

.search-box {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.search-box span {
  color: #0c2927;
}

.search-box input {
  color: #071211;
}

.search-box input::placeholder {
  color: rgba(7, 18, 17, 0.54);
}

.category-filters {
  max-height: 50px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: center;
  flex-wrap: nowrap;
}

.filter-chip {
  min-height: 38px;
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.26);
  color: rgba(236, 249, 245, 0.72);
}

.filter-chip.active {
  border-color: rgba(244, 221, 157, 0.74);
  background: rgba(244, 221, 157, 0.16);
  color: #f4dd9d;
}

.status-line {
  position: fixed;
  left: 26px;
  bottom: 28px;
  z-index: 21;
  display: grid;
  min-height: auto;
  gap: 6px;
  color: rgba(238, 229, 205, 0.72);
}

.copy-toast {
  color: #f4dd9d;
}

.core-beam {
  fill: none;
  stroke: var(--node-color);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-opacity: 0.18;
  filter: url("#coreGlow");
  animation: beamBreathe 4.8s ease-in-out infinite;
  animation-delay: var(--delay);
}

.core-link {
  stroke: color-mix(in srgb, var(--node-color) 60%, #f4dd9d 40%);
  stroke-width: 2;
  stroke-opacity: 0.52;
}

.network-link {
  stroke-width: 1.05;
  stroke-opacity: 0.42;
}

.network-pulse {
  stroke: #f4dd9d;
  stroke-width: 2.6;
  stroke-opacity: 0.5;
}

.network-mesh {
  stroke-width: 0.7;
  stroke-opacity: 0.18;
}

.network-core {
  stroke: rgba(244, 221, 157, 0.78);
}

.network-core.flare {
  fill: rgba(244, 221, 157, 0.14);
  stroke: rgba(244, 221, 157, 0.2);
}

.network-core.inner {
  fill: #f4dd9d;
  stroke: #ffffff;
}

.core-label {
  fill: rgba(244, 221, 157, 0.76);
  font-size: 13px;
}

.neural-ring {
  stroke: rgba(244, 221, 157, 0.13);
}

.ring-a {
  stroke: rgba(64, 240, 255, 0.22);
}

.network-hub .hub-halo {
  fill: color-mix(in srgb, var(--node-color) 14%, transparent);
  stroke: color-mix(in srgb, var(--node-color) 34%, #f4dd9d 20%);
}

.network-hub .hub-core {
  fill: color-mix(in srgb, var(--node-color) 52%, #f4dd9d 28%);
  stroke: rgba(255, 255, 255, 0.85);
}

.network-hub .hub-label,
.network-hub .hub-count {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  text-anchor: start;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.9);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.network-hub .hub-label {
  fill: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 800;
}

.network-hub .hub-count {
  fill: rgba(244, 221, 157, 0.76);
  font-size: 11px;
  font-weight: 700;
}

.network-node .node-core {
  fill: color-mix(in srgb, var(--node-color) 60%, #f4dd9d 16%);
  stroke: rgba(255, 255, 255, 0.9);
}

.network-node .node-halo {
  fill: color-mix(in srgb, var(--node-color) 15%, #f4dd9d 8%);
}

.network-node.selected .node-core {
  fill: #ffffff;
  stroke: #f4dd9d;
}

@keyframes beamBreathe {
  0%,
  100% {
    stroke-opacity: 0.12;
  }
  50% {
    stroke-opacity: 0.34;
  }
}

@media (max-width: 1040px) {
  .app-shell {
    overflow: visible;
    padding: 18px 18px 120px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .top-metrics {
    justify-self: start;
  }

  .network-stage {
    display: grid;
    gap: 16px;
  }

  .network-panel,
  .network-map {
    min-height: 620px;
  }

  .network-map {
    transform: none;
  }

  .prompt-detail {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
  }

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

  .status-line {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: 10px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 14px 14px 140px;
  }

  .brand-block {
    grid-template-columns: 38px 1fr;
  }

  .brand-block::before {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .topbar h2 {
    font-size: 17px;
  }

  .network-panel,
  .network-map {
    min-height: 520px;
  }

  .network-hud {
    display: none;
  }

  .prompt-detail .prompt-card h3 {
    font-size: 24px;
  }

  .toolbar {
    bottom: 12px;
    width: calc(100vw - 24px);
    border-radius: 22px;
  }

  .category-filters {
    overflow-x: auto;
  }
}

/* Studio reset: premium prompt library, not a sci-fi dashboard toy. */
body {
  background:
    radial-gradient(ellipse at 18% 0%, rgba(160, 205, 255, 0.18), transparent 34rem),
    radial-gradient(ellipse at 92% 8%, rgba(114, 230, 209, 0.11), transparent 30rem),
    #030404;
}

body::before,
body::after {
  opacity: 0.35;
}

.app-shell {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  min-height: 100vh;
  padding: 24px;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24rem),
    radial-gradient(ellipse at 50% 46%, rgba(37, 60, 56, 0.52), transparent 42rem),
    #030404;
}

.app-shell::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, black, transparent 88%);
  opacity: 0.6;
}

.app-shell::after {
  background: radial-gradient(ellipse at center, transparent 0 54%, rgba(0, 0, 0, 0.76) 100%);
}

.topbar {
  grid-template-columns: minmax(260px, 1fr) auto auto;
  min-height: 72px;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(232, 220, 186, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.34);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.brand-block {
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 6px 12px;
  min-width: 0;
}

.brand-block::before {
  width: 42px;
  height: 42px;
  border-color: rgba(232, 205, 139, 0.46);
  border-radius: 12px;
  color: #ead08a;
  content: "✣";
}

.brand-block .eyebrow {
  color: rgba(232, 205, 139, 0.82);
  font-size: 11px;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.topbar h2 {
  color: #f7f4ea;
  font-size: 21px;
  line-height: 1.05;
  white-space: nowrap;
}

.top-metrics {
  justify-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.top-metrics span {
  min-width: 88px;
  min-height: 44px;
  border: 1px solid rgba(232, 220, 186, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.top-metrics b {
  color: #ead08a;
}

.top-actions {
  justify-content: flex-end;
}

.role-badge,
.ghost-action,
.icon-action,
.primary-action {
  min-height: 40px;
  border: 1px solid rgba(232, 220, 186, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(247, 244, 234, 0.9);
}

.primary-action {
  background: linear-gradient(135deg, rgba(234, 208, 138, 0.22), rgba(114, 230, 209, 0.12));
  color: #fff8dd;
}

.toolbar {
  position: relative;
  left: auto;
  bottom: auto;
  width: 100%;
  transform: none;
  grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
  align-items: center;
  margin: 18px 0 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.search-box {
  min-height: 52px;
  border: 1px solid rgba(232, 220, 186, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.search-box span {
  color: #ead08a;
}

.search-box input {
  color: #f4f0e7;
}

.search-box input::placeholder {
  color: rgba(244, 240, 231, 0.42);
}

.category-filters {
  max-height: none;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
}

.filter-chip {
  min-height: 38px;
  border: 1px solid rgba(232, 220, 186, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(247, 244, 234, 0.58);
}

.filter-chip.active {
  border-color: rgba(234, 208, 138, 0.66);
  background: rgba(234, 208, 138, 0.13);
  color: #ead08a;
}

.status-line {
  position: relative;
  left: auto;
  bottom: auto;
  display: flex;
  min-height: 28px;
  margin: 0 0 10px;
  color: rgba(247, 244, 234, 0.42);
}

.network-stage {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(480px, 1.08fr);
  gap: 18px;
  min-height: 0;
  margin-top: 0;
}

.network-panel {
  min-height: 650px;
  border: 1px solid rgba(232, 220, 186, 0.12);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(114, 230, 209, 0.09), transparent 22rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.34);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

.network-panel::before {
  opacity: 0.42;
  background-image:
    radial-gradient(circle, rgba(232, 220, 186, 0.19) 0 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 36px 36px, 72px 72px, 72px 72px;
  mask-image: radial-gradient(ellipse at center, black 0 55%, transparent 86%);
}

.network-panel::after {
  opacity: 0.08;
}

.network-hud {
  top: 18px;
  left: 18px;
  right: 18px;
  flex-direction: row;
}

.network-hud span {
  border-color: rgba(232, 220, 186, 0.13);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(247, 244, 234, 0.48);
}

.network-map {
  min-height: 650px;
  transform: none;
}

.atlas-contour {
  fill: none;
  stroke: rgba(232, 220, 186, 0.12);
  stroke-width: 1;
  stroke-dasharray: 5 12;
}

.atlas-contour.faint {
  stroke: rgba(114, 230, 209, 0.11);
}

.atlas-kicker,
.atlas-title {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.16em;
}

.atlas-kicker {
  fill: rgba(234, 208, 138, 0.62);
  font-size: 10px;
  font-weight: 700;
}

.atlas-title {
  fill: rgba(247, 244, 234, 0.9);
  font-family: Inter, system-ui, sans-serif;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
}

.network-link {
  stroke-width: 1;
  stroke-opacity: 0.34;
}

.network-pulse.selected {
  stroke: #ead08a;
  stroke-width: 2.4;
  stroke-opacity: 0.68;
}

.network-mesh {
  stroke-width: 0.75;
  stroke-opacity: 0.16;
}

.network-hub .hub-halo {
  fill: color-mix(in srgb, var(--node-color) 12%, transparent);
  stroke: color-mix(in srgb, var(--node-color) 38%, #ead08a 14%);
}

.network-hub .hub-orbit {
  stroke-opacity: 0.45;
}

.network-hub .hub-core {
  fill: color-mix(in srgb, var(--node-color) 55%, #ead08a 18%);
  stroke: rgba(255, 255, 255, 0.76);
}

.network-hub .hub-label {
  fill: rgba(247, 244, 234, 0.92);
  font-size: 13px;
}

.network-hub .hub-count {
  fill: rgba(234, 208, 138, 0.72);
  font-size: 10px;
}

.network-node text {
  fill: rgba(247, 244, 234, 0.92);
  font-size: 11px;
}

.network-node .node-halo {
  opacity: 0.44;
}

.network-node .node-core {
  stroke-width: 1;
}

.network-node.selected .node-core {
  stroke: #ead08a;
}

.prompt-detail {
  position: relative;
  top: auto;
  right: auto;
  width: auto;
  min-width: 0;
}

.prompt-detail .prompt-card {
  position: sticky;
  top: 18px;
  min-height: 650px;
  border: 1px solid rgba(232, 220, 186, 0.13);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 78% 0%, rgba(234, 208, 138, 0.12), transparent 20rem),
    radial-gradient(ellipse at 0% 50%, rgba(114, 230, 209, 0.08), transparent 24rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.064), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.46);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}

.prompt-detail .card-inner {
  display: grid;
  gap: 14px;
  padding: 30px;
}

.prompt-detail .prompt-card h3 {
  max-width: 760px;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.prompt-detail .summary {
  max-width: 720px;
  margin: 0;
  color: rgba(247, 244, 234, 0.64);
  font-size: 18px;
}

.usage-line {
  border-color: rgba(232, 220, 186, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.usage-line b {
  color: #ead08a;
}

.prompt-detail .prompt-body {
  max-height: 330px;
  border-color: rgba(232, 220, 186, 0.1);
  background: rgba(0, 0, 0, 0.34);
  font-size: 14px;
}

.copy-button {
  background: linear-gradient(135deg, #2f7cff, #35d7e7);
}

@media (max-width: 1120px) {
  .topbar,
  .toolbar,
  .network-stage {
    grid-template-columns: 1fr;
  }

  .top-metrics {
    justify-self: start;
  }

  .network-panel,
  .network-map,
  .prompt-detail .prompt-card {
    min-height: 560px;
  }

  .prompt-detail .prompt-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 14px;
  }

  .topbar {
    padding: 12px;
  }

  .top-actions,
  .top-metrics {
    justify-content: flex-start;
  }

  .toolbar {
    gap: 10px;
  }

  .category-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .network-panel,
  .network-map {
    min-height: 500px;
  }

  .prompt-detail .prompt-card {
    min-height: auto;
  }

  .prompt-detail .card-inner {
    padding: 22px;
  }

  .prompt-detail .prompt-card h3 {
    font-size: 28px;
  }
}

/* Final redesign: quiet premium studio layout. */
.app-shell {
  padding: 18px;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(215, 196, 132, 0.12), transparent 30rem),
    radial-gradient(ellipse at 86% 0%, rgba(111, 227, 193, 0.12), transparent 34rem),
    linear-gradient(180deg, #070807 0%, #020303 100%);
}

.topbar {
  min-height: 64px;
  border-radius: 18px;
}

.topbar h2 {
  font-size: 19px;
}

.top-metrics span {
  min-width: 78px;
}

.toolbar {
  margin: 14px 0 8px;
}

.status-line {
  margin-bottom: 8px;
}

.network-stage {
  grid-template-columns: minmax(300px, 0.72fr) minmax(460px, 1fr) minmax(300px, 0.62fr);
  gap: 14px;
  align-items: stretch;
}

.network-panel,
.prompt-detail .prompt-card,
.prompt-list {
  height: calc(100vh - 168px);
  min-height: 0;
}

.network-panel,
.prompt-detail .prompt-card,
.prompt-list {
  border: 1px solid rgba(232, 220, 186, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.018)),
    rgba(8, 10, 9, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

.network-panel {
  overflow: hidden;
}

.network-map {
  height: 100%;
  min-height: 0;
}

.network-hud {
  align-items: flex-start;
}

.network-hud span {
  text-transform: none;
  letter-spacing: 0.08em;
}

.atlas-kicker {
  display: none;
}

.network-hub .hub-label {
  font-size: 12px;
}

.network-hub .hub-count {
  font-size: 9px;
}

.network-node text {
  display: none;
}

.network-node.selected text,
.network-node:hover text {
  display: block;
}

.prompt-detail .prompt-card {
  position: relative;
  top: auto;
  display: flex;
  overflow: hidden;
}

.prompt-detail .card-inner {
  width: 100%;
  min-height: 0;
  padding: 34px;
  align-content: start;
}

.prompt-detail .prompt-card h3 {
  font-size: 42px;
  letter-spacing: -0.035em;
}

.prompt-detail .summary {
  font-size: 18px;
  line-height: 1.7;
}

.prompt-detail .prompt-body {
  max-height: clamp(260px, 38vh, 420px);
}

.prompt-list {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
}

.list-head {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(232, 220, 186, 0.1);
}

.list-head .eyebrow {
  margin-bottom: 8px;
  color: rgba(234, 208, 138, 0.74);
}

.list-head h3 {
  color: #f7f4ea;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.list-items {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding-top: 14px;
  padding-right: 4px;
}

.list-item {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(232, 220, 186, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: #f7f4ea;
  text-align: left;
  box-shadow: none;
}

.list-item.selected {
  border-color: color-mix(in srgb, var(--accent) 58%, #ead08a 22%);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), rgba(255, 255, 255, 0.045));
}

.list-category {
  color: color-mix(in srgb, var(--accent) 70%, #ffffff 20%);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.list-item strong {
  font-size: 16px;
  line-height: 1.25;
}

.list-summary {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(247, 244, 234, 0.52);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 1180px) {
  .app-shell {
    height: auto;
    overflow: visible;
  }

  .network-stage {
    grid-template-columns: minmax(280px, 0.86fr) minmax(420px, 1.14fr);
  }

  .prompt-list {
    grid-column: 1 / -1;
    height: auto;
    min-height: 360px;
  }

  .list-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .network-stage {
    grid-template-columns: 1fr;
  }

  .network-panel,
  .network-map {
    min-height: 430px;
  }

  .prompt-detail .prompt-card,
  .prompt-list {
    min-height: auto;
  }

  .prompt-detail .card-inner {
    padding: 22px;
  }

  .prompt-detail .prompt-card h3 {
    font-size: 30px;
  }

  .list-items {
    grid-template-columns: 1fr;
  }
}

/* Return to a clean masonry prompt wall. */
.app-shell {
  height: auto;
  min-height: 100vh;
  overflow: visible;
  padding: 24px;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(160, 205, 255, 0.16), transparent 32rem),
    radial-gradient(ellipse at 86% 6%, rgba(114, 230, 209, 0.12), transparent 34rem),
    linear-gradient(180deg, #070807 0%, #020303 100%);
}

.topbar {
  min-height: 72px;
  border-radius: 22px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 16px;
  margin: 22px 0 12px;
}

.status-line {
  margin-bottom: 14px;
}

.prompt-grid {
  column-count: 3;
  column-gap: 18px;
  margin-top: 0;
}

.prompt-grid .prompt-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  border: 1px solid rgba(232, 220, 186, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 92% 0%, color-mix(in srgb, var(--accent, #72e6d1) 12%, transparent), transparent 14rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.066), rgba(255, 255, 255, 0.022)),
    rgba(8, 10, 9, 0.78);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  break-inside: avoid;
  backdrop-filter: blur(18px);
}

.prompt-grid .card-inner {
  padding: 20px;
}

.ghost-action:disabled,
.icon-action:disabled,
.primary-action:disabled {
  cursor: wait;
  opacity: 0.58;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(160, 205, 255, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(64, 240, 255, 0.32), rgba(70, 135, 235, 0.16)),
    rgba(6, 10, 14, 0.86);
  color: #f7fbff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.55), 0 0 24px rgba(64, 240, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.96);
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease;
  backdrop-filter: blur(16px);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  border-color: rgba(64, 240, 255, 0.58);
  transform: translateY(-2px) scale(1.02);
}

@media (max-width: 720px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

.prompt-grid .prompt-card h3 {
  color: #f7f4ea;
  font-size: 23px;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.prompt-grid .summary {
  color: rgba(247, 244, 234, 0.62);
}

.prompt-grid .prompt-body {
  max-height: 260px;
  border-color: rgba(232, 220, 186, 0.1);
  background: rgba(0, 0, 0, 0.34);
}

.prompt-grid .usage-line {
  border-color: rgba(232, 220, 186, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.prompt-grid .usage-line b {
  color: #ead08a;
}

.prompt-grid .copy-button {
  background: linear-gradient(135deg, #2f7cff, #35d7e7);
}

@media (max-width: 1120px) {
  .toolbar {
    grid-template-columns: 1fr;
  }

  .prompt-grid {
    column-count: 2;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 14px;
  }

  .prompt-grid {
    column-count: 1;
  }

  .category-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}
