:root {
  --bg: #010510;
  --panel: rgb(4 14 31 / 90%);
  --panel-strong: #071a38;
  --field: #020b1d;
  --ink: #eef3ff;
  --muted: #86aee4;
  --line: rgb(40 109 255 / 32%);
  --line-hot: rgb(40 109 255 / 86%);
  --accent: #286dff;
  --accent-2: #174fd8;
  --accent-3: #83a6ff;
  --accent-strong: #dbe6ff;
  --brand-deep: #04132d;
  --brand-glow: rgb(40 109 255 / 34%);
  --brand-royal: rgb(40 109 255 / 30%);
  --warn: #ffd36a;
  --danger: #ff8b77;
  --shadow: 0 38px 130px rgb(0 8 28 / 80%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #000;
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: none;
}

body::before {
  background:
    linear-gradient(rgb(70 118 255 / 2.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(70 118 255 / 2.5%) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
}

body::after {
  background:
    linear-gradient(115deg, transparent 0 30%, rgb(70 118 255 / 3%) 30.4% 30.8%, transparent 31.2% 100%),
    linear-gradient(70deg, transparent 0 62%, rgb(40 109 255 / 3.5%) 62.2% 62.5%, transparent 62.9% 100%);
  opacity: 0.6;
}

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

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.workspace {
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgb(190 205 255 / 8%);
  box-shadow: none;
}

.workspace::after {
  display: none;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border-bottom: 1px solid var(--line);
  background: #000;
}

.brand-block {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 184px;
  height: auto;
  flex: 0 0 auto;
  border: 1px solid var(--line-hot);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgb(40 109 255 / 24%), rgb(23 79 216 / 24%)),
    #05142c;
  box-shadow:
    0 0 52px var(--brand-glow),
    0 0 22px rgb(40 109 255 / 18%),
    inset 0 0 22px rgb(131 166 255 / 16%);
  object-fit: contain;
}

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

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 940px;
  font-size: clamp(24px, 2.45vw, 34px);
  line-height: 1.08;
  white-space: nowrap;
}

h2 {
  color: var(--accent-strong);
  font-size: 14px;
  text-transform: uppercase;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.signal-row span {
  border: 1px solid rgb(40 109 255 / 44%);
  border-radius: 999px;
  padding: 6px 10px;
  color: #d7e4ff;
  background:
    linear-gradient(135deg, rgb(40 109 255 / 13%), rgb(23 79 216 / 8%));
  font-size: 12px;
  font-weight: 800;
}

.status {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 13px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  background:
    linear-gradient(135deg, rgb(40 109 255 / 7%), rgb(23 79 216 / 5%)),
    rgb(2 10 24 / 84%);
  box-shadow: inset 0 0 22px rgb(40 109 255 / 8%);
}

.status.ok {
  color: var(--accent-strong);
  border-color: var(--line-hot);
}

.status.warn {
  color: var(--warn);
  border-color: rgb(255 211 106 / 42%);
}

.top-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.question-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 15px;
  padding: 28px 30px;
  border-bottom: 1px solid var(--line);
  background: #000;
}

.wallet-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgb(40 109 255 / 38%);
  border-radius: 16px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgb(40 109 255 / 13%), rgb(23 79 216 / 8%)),
    rgb(255 255 255 / 2.5%);
}

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

.wallet-panel strong {
  display: block;
  margin-top: 3px;
  color: var(--accent-strong);
  font-size: 28px;
  line-height: 1;
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

label {
  color: var(--ink);
  font-weight: 750;
}

.selector-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 340px));
  gap: 14px;
}

.selector-row label,
.token-grid label {
  display: grid;
  gap: 7px;
}

.selector-row span,
.token-grid span {
  color: var(--muted);
  font-size: 13px;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 5%), rgb(0 0 0 / 22%)),
    var(--field);
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 166px;
  resize: vertical;
  padding: 17px;
  line-height: 1.6;
  box-shadow: inset 0 0 38px rgb(40 109 255 / 8%);
}

input,
select {
  padding: 12px 13px;
}

textarea::placeholder,
input::placeholder {
  color: #5f789e;
}

textarea:focus,
select:focus,
input:focus {
  border-color: var(--line-hot);
  box-shadow:
    0 0 0 3px rgb(40 109 255 / 16%),
    0 0 34px rgb(40 109 255 / 18%),
    inset 0 0 24px rgb(40 109 255 / 8%);
}

.token-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgb(40 109 255 / 8%), rgb(23 79 216 / 5%)),
    rgb(255 255 255 / 2.5%);
  padding: 14px 15px;
}

.token-panel summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 900;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

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

.token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.danger-button {
  border-color: rgb(255 139 119 / 42%);
  color: #ffd0c8;
}

.token-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.refinement-check {
  margin-top: 0;
  border: 1px solid rgb(40 109 255 / 28%);
  border-radius: 14px;
  padding: 12px 13px;
  background:
    linear-gradient(135deg, rgb(40 109 255 / 7%), rgb(23 79 216 / 4%)),
    rgb(255 255 255 / 1.5%);
}

.controls {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

button {
  min-width: 190px;
  border: 1px solid rgb(131 166 255 / 74%);
  border-radius: 14px;
  padding: 13px 24px;
  background:
    linear-gradient(135deg, #8faeff 0%, #286dff 42%, #174fd8 100%);
  color: #021022;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    0 18px 48px rgb(40 109 255 / 38%),
    0 0 34px rgb(40 109 255 / 28%);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  padding: 9px 12px;
  border-color: rgb(40 109 255 / 34%);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 8%), rgb(40 109 255 / 11%)),
    #061733;
  color: var(--accent-strong);
  box-shadow: none;
  text-decoration: none;
}

.secondary-button:hover {
  box-shadow: 0 0 26px rgb(40 109 255 / 20%);
}

.compact-button {
  min-width: auto;
  padding: 8px 11px;
  font-size: 12px;
}

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

button:disabled {
  cursor: wait;
  opacity: 0.64;
  transform: none;
}

.result-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(340px, 0.82fr);
  min-height: 400px;
}

.media-lab {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  background: #000;
}

.media-lab > .box-header {
  padding: 0 30px;
}

.media-panel {
  display: grid;
  gap: 15px;
  padding: 0 30px 28px;
}

.media-selectors {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.internal-media-control {
  display: none !important;
}

.media-options {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 14px;
  align-items: end;
}

.media-options label:not(.inline-check) {
  display: grid;
  gap: 7px;
}

.media-options span {
  color: var(--muted);
  font-size: 13px;
}

.media-estimate {
  display: grid;
  gap: 13px;
  border: 1px solid rgb(40 109 255 / 28%);
  border-radius: 18px;
  padding: 15px;
  background:
    linear-gradient(135deg, rgb(40 109 255 / 6%), rgb(23 79 216 / 3%)),
    rgb(255 255 255 / 1.5%);
}

.estimate-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.estimate-head strong {
  color: var(--accent-strong);
}

.estimate-head p,
.estimate-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.estimate-pill {
  min-width: 140px;
  border: 1px solid rgb(55 129 220 / 24%);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgb(2 10 24 / 52%);
}

.estimate-pill span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.estimate-pill strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}

.estimate-pill.hot {
  border-color: rgb(40 109 255 / 62%);
  box-shadow:
    inset 0 0 22px rgb(40 109 255 / 10%),
    0 0 26px rgb(40 109 255 / 14%);
}

.estimate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.estimate-card {
  border: 1px solid rgb(55 129 220 / 22%);
  border-radius: 14px;
  padding: 11px;
  background: rgb(2 10 24 / 48%);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.estimate-card.active {
  border-color: rgb(40 109 255 / 72%);
  box-shadow: 0 0 28px rgb(40 109 255 / 16%);
}

.estimate-card:hover,
.estimate-card:focus-visible {
  border-color: rgb(40 109 255 / 58%);
  outline: none;
  transform: translateY(-1px);
}

.estimate-card span {
  color: var(--accent-3);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.estimate-card strong {
  display: block;
  margin: 5px 0 7px;
  color: var(--ink);
}

.estimate-card p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 12px;
}

.estimate-card .client-price {
  margin-top: 9px;
  color: var(--accent-strong);
  font-size: 18px;
  font-weight: 900;
}

.media-result-grid {
  min-height: 420px;
  border-top: 1px solid var(--line);
}

.box {
  padding: 28px 30px;
}

.answer-box {
  border-right: 1px solid var(--line);
}

.box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.content {
  color: #e2edf8;
  line-height: 1.68;
  white-space: pre-wrap;
}

.box-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.chat-thread {
  display: flex;
  max-height: 620px;
  min-height: 320px;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding-right: 6px;
  white-space: normal;
}

.empty-chat {
  display: grid;
  min-height: 300px;
  place-items: center;
  border: 1px dashed rgb(40 109 255 / 30%);
  border-radius: 18px;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.chat-message {
  display: grid;
  gap: 6px;
  max-width: min(88%, 780px);
}

.chat-message.user {
  justify-self: end;
  align-self: flex-end;
}

.chat-message.assistant {
  justify-self: start;
  align-self: flex-start;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.chat-message.user .chat-meta {
  justify-content: flex-end;
}

.chat-meta time {
  color: rgb(134 174 228 / 72%);
  font-weight: 700;
}

.chat-bubble {
  border: 1px solid rgb(55 129 220 / 26%);
  border-radius: 18px;
  padding: 14px 15px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 4%), rgb(40 109 255 / 4%)),
    rgb(2 10 24 / 62%);
  color: #edf3ff;
  line-height: 1.62;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-message.user .chat-bubble {
  border-color: rgb(40 109 255 / 50%);
  background:
    linear-gradient(135deg, rgb(40 109 255 / 17%), rgb(23 79 216 / 14%)),
    rgb(3 17 38 / 86%);
}

.chat-message.loading .chat-bubble {
  color: var(--muted);
}

.chat-message.error .chat-bubble {
  border-color: rgb(255 139 119 / 34%);
  color: #ffd0c8;
}

.media-output {
  display: grid;
  min-height: 320px;
  place-items: center;
  white-space: normal;
}

.generated-media {
  display: block;
  width: min(100%, 620px);
  max-height: 620px;
  border: 1px solid rgb(40 109 255 / 42%);
  border-radius: 18px;
  object-fit: contain;
  box-shadow:
    0 30px 80px rgb(0 0 0 / 42%),
    0 0 44px rgb(40 109 255 / 18%);
}

.media-job-card {
  width: min(100%, 620px);
  border: 1px solid rgb(40 109 255 / 42%);
  border-radius: 18px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgb(40 109 255 / 13%), rgb(23 79 216 / 5%)),
    rgb(255 255 255 / 3%);
}

.media-job-card strong {
  color: var(--accent-strong);
}

.details {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgb(55 129 220 / 18%);
  padding-bottom: 8px;
}

.detail-row strong {
  color: var(--ink);
  text-align: right;
}

.mock-note {
  border: 1px solid rgb(255 211 106 / 42%);
  border-radius: 14px;
  background: rgb(255 211 106 / 10%);
  color: #ffe0a0;
  padding: 10px 12px;
  line-height: 1.4;
}

.list-block {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid rgb(55 129 220 / 22%);
  border-radius: 16px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgb(40 109 255 / 6%), rgb(23 79 216 / 3%)),
    rgb(255 255 255 / 2.5%);
}

.list-block p {
  margin: 0;
}

.list-block strong {
  color: var(--accent-strong);
}

.source-block a {
  color: var(--accent-3);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.source-block a:hover {
  text-decoration: underline;
}

.server-token-note {
  display: grid;
  gap: 6px;
  border: 1px solid rgb(40 109 255 / 22%);
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgb(40 109 255 / 8%), rgb(255 255 255 / 2%)),
    rgb(255 255 255 / 2%);
}

.server-token-note strong {
  color: var(--accent-strong);
  font-size: 13px;
  text-transform: uppercase;
}

.server-token-note span {
  font-size: 13px;
  line-height: 1.5;
}

.error {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.admin-dashboard {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 28px 30px;
  background:
    linear-gradient(135deg, rgb(40 109 255 / 5%), rgb(23 79 216 / 2%)),
    #000;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-summary article {
  border: 1px solid rgb(40 109 255 / 28%);
  border-radius: 16px;
  padding: 13px;
  background: rgb(2 10 24 / 58%);
}

.admin-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--accent-strong);
  font-size: 19px;
}

.admin-log {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 6px;
}

.admin-event {
  border: 1px solid rgb(40 109 255 / 26%);
  border-radius: 18px;
  padding: 15px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 3%), rgb(40 109 255 / 4%)),
    rgb(2 10 24 / 62%);
}

.admin-event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-event-head strong {
  color: var(--accent-strong);
}

.admin-event-head span,
.admin-event p {
  color: var(--muted);
  font-size: 12px;
}

.admin-event p {
  margin: 9px 0 0;
  line-height: 1.5;
}

.admin-event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.admin-event-grid span {
  border: 1px solid rgb(55 129 220 / 18%);
  border-radius: 12px;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 12px;
  background: rgb(0 0 0 / 24%);
}

.admin-event-grid strong {
  color: var(--ink);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.login-card {
  width: min(100%, 500px);
  border: 1px solid rgb(40 109 255 / 28%);
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 28px 90px rgb(0 0 0 / 72%);
  background:
    radial-gradient(circle at 18% 0%, rgb(40 109 255 / 18%), transparent 34%),
    linear-gradient(145deg, rgb(255 255 255 / 7%), rgb(255 255 255 / 2%)),
    #02040a;
}

.login-logo {
  display: block;
  width: 128px;
  height: auto;
  margin-bottom: 18px;
  border: 1px solid rgb(40 109 255 / 34%);
  border-radius: 18px;
  object-fit: contain;
  box-shadow: 0 18px 46px rgb(40 109 255 / 28%);
}

.login-card h1 {
  margin: 6px 0 10px;
  color: var(--ink);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 0.95;
  white-space: normal;
}

.login-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 18px;
  border: 1px solid rgb(40 109 255 / 22%);
  border-radius: 18px;
  padding: 6px;
  background: rgb(0 0 0 / 36%);
}

.auth-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 13px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
}

.auth-switch button.active {
  color: #020716;
  background:
    linear-gradient(135deg, #dbe6ff 0%, #7aa1ff 38%, #286dff 100%);
  box-shadow: 0 12px 34px rgb(40 109 255 / 26%);
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: grid;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form.auth-panel {
  display: none;
}

.login-form.auth-panel.active {
  display: grid;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.login-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  border: 1px solid rgb(55 129 220 / 26%);
  border-radius: 16px;
  padding: 14px 15px;
  color: var(--ink);
  background: rgb(255 255 255 / 5%);
  outline: 0;
}

.login-form input:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px rgb(40 109 255 / 14%);
}

.login-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-back {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.login-back:hover {
  text-decoration: underline;
}

.landing-body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 22% 6%, rgb(40 109 255 / 20%), transparent 28%),
    radial-gradient(circle at 82% 18%, rgb(131 166 255 / 10%), transparent 26%),
    radial-gradient(circle at 50% 110%, rgb(23 79 216 / 12%), transparent 32%),
    #000;
}

.landing-body::before,
.landing-body::after {
  display: block;
}

.landing-shell {
  width: min(1180px, calc(100% - 34px));
  margin: 0 auto;
  padding: 22px 0 34px;
}

.landing-nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid rgb(40 109 255 / 24%);
  border-radius: 24px;
  padding: 12px 14px;
  background: rgb(0 0 0 / 72%);
  box-shadow: 0 18px 60px rgb(0 0 0 / 46%);
  backdrop-filter: blur(18px);
}

.landing-mark,
.landing-actions,
.hero-actions {
  display: flex;
  align-items: center;
}

.landing-mark img {
  display: block;
  width: 156px;
  height: auto;
  border-radius: 16px;
}

.landing-nav nav,
.landing-actions,
.hero-actions,
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-nav nav {
  gap: 18px;
  justify-content: center;
}

.landing-nav nav a,
.landing-ghost,
.price-card a {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.landing-nav nav a {
  color: rgb(219 230 255 / 78%);
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid rgb(219 230 255 / 78%);
  border-radius: 999px;
  padding: 0 22px;
  color: #020716;
  background:
    linear-gradient(135deg, #dbe6ff 0%, #7aa1ff 30%, #286dff 72%, #174fd8 100%);
  box-shadow:
    0 22px 70px rgb(40 109 255 / 42%),
    inset 0 1px 0 rgb(255 255 255 / 46%);
  font-size: 14px;
  font-weight: 950;
  text-decoration: none;
}

.landing-cta.small {
  min-height: 38px;
  padding: 0 15px;
  font-size: 12px;
}

.landing-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid rgb(40 109 255 / 32%);
  border-radius: 999px;
  padding: 0 18px;
  background: rgb(255 255 255 / 4%);
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.82fr);
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 128px);
  padding: 72px 0 44px;
}

.hero-copy h1 {
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.88;
  letter-spacing: -0.07em;
  white-space: normal;
}

.hero-lead {
  max-width: 680px;
  margin: 24px 0 26px;
  color: rgb(219 230 255 / 76%);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.hero-trust {
  margin-top: 26px;
}

.hero-trust span {
  border: 1px solid rgb(40 109 255 / 28%);
  border-radius: 999px;
  padding: 8px 11px;
  color: rgb(219 230 255 / 76%);
  background: rgb(255 255 255 / 4%);
  font-size: 12px;
  font-weight: 850;
}

.hero-console {
  position: relative;
  border: 1px solid rgb(40 109 255 / 34%);
  border-radius: 30px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 9%), transparent 24%),
    rgb(2 8 22 / 82%);
  box-shadow:
    0 42px 120px rgb(0 0 0 / 76%),
    0 0 90px rgb(40 109 255 / 18%);
}

.hero-console::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgb(219 230 255 / 38%), transparent 32%, rgb(40 109 255 / 36%));
  filter: blur(18px);
  opacity: 0.36;
}

.console-top {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgb(40 109 255 / 20%);
  padding: 8px 8px 14px;
}

.console-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #286dff;
  box-shadow: 0 0 18px rgb(40 109 255 / 72%);
}

.console-top span:nth-child(2) {
  background: #83a6ff;
}

.console-top span:nth-child(3) {
  background: #dbe6ff;
}

.console-top strong {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.verdict-card {
  display: grid;
  gap: 16px;
  padding: 24px 12px 10px;
}

.mini-label,
.pricing-label {
  margin: 0;
  color: var(--accent-3);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.verdict-card h2 {
  color: var(--ink);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
  text-transform: none;
}

.engine-stack {
  display: grid;
  gap: 9px;
}

.engine-stack article,
.verdict-result,
.landing-metrics article,
.feature-grid article,
.price-card,
.flow-list article {
  border: 1px solid rgb(40 109 255 / 20%);
  background:
    linear-gradient(135deg, rgb(40 109 255 / 8%), rgb(255 255 255 / 3%)),
    rgb(0 0 0 / 34%);
}

.engine-stack article {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-radius: 16px;
  padding: 12px;
}

.engine-stack span,
.verdict-result span,
.price-card span,
.feature-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.engine-stack strong {
  color: var(--accent-strong);
  font-size: 13px;
}

.verdict-result {
  border-color: rgb(131 166 255 / 38%);
  border-radius: 20px;
  padding: 16px;
  box-shadow: inset 0 0 30px rgb(40 109 255 / 8%);
}

.verdict-result p {
  margin: 8px 0 0;
  color: rgb(238 243 255 / 88%);
  line-height: 1.48;
}

.landing-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.landing-metrics article {
  border-radius: 22px;
  padding: 20px;
}

.landing-metrics strong {
  display: block;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.landing-metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.landing-section {
  padding: 78px 0;
}

.section-kicker {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-kicker.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.landing-section h2,
.landing-final h2 {
  color: var(--ink);
  font-size: clamp(36px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-transform: none;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article {
  min-height: 210px;
  border-radius: 26px;
  padding: 22px;
}

.feature-grid h3,
.price-card h3 {
  margin: 18px 0 10px;
  color: var(--accent-strong);
  font-size: 23px;
  line-height: 1;
}

.feature-grid p,
.price-card p {
  margin: 0;
  color: rgb(219 230 255 / 70%);
  line-height: 1.55;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1fr);
  gap: 34px;
  align-items: start;
}

.flow-list {
  display: grid;
  gap: 12px;
}

.flow-list article {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  border-radius: 22px;
  padding: 16px;
}

.flow-list strong {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: #020716;
  background: linear-gradient(135deg, #dbe6ff, #286dff);
  font-size: 22px;
}

.flow-list span {
  color: rgb(219 230 255 / 82%);
  line-height: 1.5;
}

.pricing-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: stretch;
}

.pricing-column {
  display: grid;
  gap: 12px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.price-card {
  border-radius: 26px;
  padding: 22px;
}

.price-card.highlight {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  border-color: rgb(131 166 255 / 42%);
  background:
    radial-gradient(circle at 30% 0%, rgb(40 109 255 / 24%), transparent 42%),
    linear-gradient(135deg, rgb(40 109 255 / 12%), rgb(255 255 255 / 4%)),
    #020814;
}

.price-card.featured {
  border-color: rgb(131 166 255 / 42%);
  box-shadow: inset 0 0 32px rgb(40 109 255 / 10%);
}

.price-card ul {
  display: grid;
  gap: 9px;
  margin: 20px 0;
  padding: 0;
  color: rgb(219 230 255 / 78%);
  list-style: none;
}

.price-card li::before {
  content: "• ";
  color: var(--accent-3);
}

.price-card a {
  margin-top: auto;
}

.landing-final {
  border: 1px solid rgb(40 109 255 / 26%);
  border-radius: 34px;
  margin: 32px 0 18px;
  padding: 54px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgb(40 109 255 / 24%), transparent 42%),
    linear-gradient(135deg, rgb(255 255 255 / 8%), rgb(255 255 255 / 2%)),
    #01040d;
}

.landing-final .landing-cta {
  margin-top: 24px;
}

.landing-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 4px 0;
  color: rgb(134 174 228 / 74%);
  font-size: 12px;
  font-weight: 850;
}

.hero-copy h1 {
  max-width: 720px;
  font-size: clamp(38px, 5.4vw, 74px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-lead {
  max-width: 620px;
  font-size: clamp(16px, 1.55vw, 19px);
}

.landing-section h2,
.landing-final h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.landing-metrics strong {
  font-size: clamp(25px, 3vw, 38px);
}

.verdict-card h2 {
  font-size: clamp(20px, 2.2vw, 29px);
}

.landing-section {
  padding: 64px 0;
}

.app-body {
  --app-gutter: max(14px, calc((100vw - 1420px) / 2));
  --app-sidebar-space: 376px;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgb(40 109 255 / 12%), transparent 26%),
    radial-gradient(circle at 90% 0%, rgb(131 166 255 / 9%), transparent 28%),
    #000;
}

.app-shell {
  display: flex;
  box-sizing: border-box;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  width: min(1420px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 12px;
  overflow: hidden;
}

.app-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgb(40 109 255 / 24%);
  border-radius: 24px;
  padding: 13px 16px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 5%), rgb(40 109 255 / 4%)),
    rgb(0 0 0 / 78%);
  box-shadow: 0 24px 90px rgb(0 0 0 / 55%);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.app-logo {
  display: block;
  width: 124px;
  height: auto;
  border: 1px solid rgb(40 109 255 / 36%);
  border-radius: 16px;
  box-shadow: 0 0 30px rgb(40 109 255 / 18%);
}

.app-topbar h1 {
  max-width: none;
  color: var(--ink);
  font-size: clamp(16px, 1.8vw, 23px);
  line-height: 1.08;
  white-space: normal;
}

.chat-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  margin-top: 16px;
}

.chat-main-panel,
.side-card {
  border: 1px solid rgb(40 109 255 / 24%);
  background:
    linear-gradient(145deg, rgb(255 255 255 / 5%), rgb(255 255 255 / 2%)),
    #02050d;
  box-shadow: 0 26px 90px rgb(0 0 0 / 54%);
}

.chat-main-panel {
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
}

.chat-main-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px 13px;
  border-bottom: 1px solid rgb(40 109 255 / 18%);
}

.chat-main-head h2 {
  color: var(--ink);
  font-size: 18px;
  text-transform: none;
}

.chat-main-panel .chat-thread {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  padding: 24px 20px 150px;
  scroll-behavior: smooth;
}

.chat-main-panel .empty-chat {
  min-height: 100%;
  border-color: rgb(40 109 255 / 22%);
  background:
    radial-gradient(circle at 50% 0%, rgb(40 109 255 / 10%), transparent 42%),
    rgb(255 255 255 / 1.5%);
}

.chat-main-panel .chat-message {
  max-width: min(82%, 780px);
}

.chat-main-panel .chat-bubble {
  border-radius: 22px;
  padding: 15px 17px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 5%), rgb(40 109 255 / 3%)),
    rgb(7 16 32 / 68%);
}

.chat-main-panel .chat-message.user .chat-bubble {
  background:
    linear-gradient(135deg, rgb(40 109 255 / 28%), rgb(23 79 216 / 18%)),
    rgb(3 17 38 / 92%);
}

.chat-composer {
  position: fixed;
  right: calc(var(--app-gutter) + var(--app-sidebar-space));
  bottom: 16px;
  left: var(--app-gutter);
  z-index: 30;
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  margin: 0;
  border: 1px solid rgb(131 166 255 / 32%);
  border-radius: 28px;
  padding: 12px;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 8%), rgb(40 109 255 / 6%)),
    rgb(0 0 0 / 86%);
  box-shadow:
    0 -18px 48px rgb(0 0 0 / 58%),
    0 22px 70px rgb(0 0 0 / 48%),
    inset 0 0 28px rgb(40 109 255 / 7%);
  backdrop-filter: blur(18px);
}

.chat-composer textarea {
  min-height: 58px;
  max-height: 150px;
  border: 0;
  padding: 9px 12px 4px;
  background: transparent;
  box-shadow: none;
  resize: none;
}

.chat-composer textarea:focus {
  box-shadow: none;
}

.composer-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.composer-settings {
  position: relative;
}

.composer-settings summary {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgb(40 109 255 / 28%);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--accent-strong);
  background: rgb(255 255 255 / 4%);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.composer-settings-grid {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 4;
  display: grid;
  width: min(560px, calc(100vw - 48px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid rgb(40 109 255 / 28%);
  border-radius: 20px;
  padding: 14px;
  background: rgb(1 7 18 / 96%);
  box-shadow: 0 24px 80px rgb(0 0 0 / 70%);
}

.composer-settings-grid label {
  display: grid;
  gap: 7px;
}

.composer-settings-grid span {
  color: var(--muted);
  font-size: 12px;
}

.compact-refinement {
  grid-column: 1 / -1;
  margin-top: 0;
}

.chat-composer button[type="submit"] {
  min-width: 124px;
  border-radius: 999px;
}

.chat-side-panel {
  position: sticky;
  top: 18px;
  display: grid;
  max-height: 100%;
  gap: 14px;
  align-self: start;
  overflow-y: auto;
}

.side-card {
  border-radius: 24px;
  padding: 16px;
}

.side-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.side-card-head strong {
  color: var(--accent-strong);
  font-size: 22px;
  line-height: 1;
  text-align: right;
}

.value-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgb(40 109 255 / 18%);
  border-radius: 16px;
  color: rgb(219 230 255 / 82%);
  font-size: 12px;
}

.value-table tr + tr {
  border-top: 1px solid rgb(40 109 255 / 14%);
}

.value-table th,
.value-table td {
  padding: 10px 9px;
  text-align: left;
}

.value-table th {
  color: var(--muted);
  font-weight: 900;
}

.value-table td {
  color: var(--accent-strong);
  text-align: right;
  font-weight: 850;
}

.compact-wallet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.compact-wallet .secondary-button {
  justify-content: center;
}

.processing-card .details {
  max-height: 460px;
  overflow: auto;
  font-size: 12px;
}

.media-lab-clean {
  margin-top: 16px;
  border: 1px solid rgb(40 109 255 / 20%);
  border-radius: 24px;
  padding-top: 0;
  background: rgb(0 0 0 / 58%);
  box-shadow: 0 24px 80px rgb(0 0 0 / 36%);
}

.media-lab-clean > summary {
  padding: 17px 20px;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 900;
}

.media-lab-clean[open] > summary {
  border-bottom: 1px solid rgb(40 109 255 / 18%);
}

.media-lab-clean .media-panel {
  padding-top: 18px;
}

.site-footer {
  padding: 18px 8px 0;
  color: rgb(134 174 228 / 68%);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: center;
}

@media (max-width: 920px) {
  .app-body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .token-grid,
  .admin-summary,
  .landing-metrics,
  .feature-grid,
  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-event-grid {
    grid-template-columns: 1fr;
  }

  .landing-hero,
  .split-section,
  .pricing-band,
  .chat-workspace {
    grid-template-columns: 1fr;
  }

  .chat-workspace {
    height: auto;
    min-height: 0;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 48px;
  }

  .chat-side-panel {
    position: static;
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 20px, 1240px);
    padding: 10px 0;
  }

  .topbar,
  .controls,
  .wallet-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-items: stretch;
  }

  .brand-block {
    align-items: flex-start;
  }

  h1 {
    white-space: normal;
  }

  .status {
    text-align: left;
  }

  .result-grid,
  .selector-row,
  .token-grid,
  .media-selectors,
  .media-options,
  .estimate-head,
  .estimate-grid,
  .admin-summary,
  .landing-metrics,
  .feature-grid,
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .landing-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .landing-nav {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell {
    width: min(100% - 18px, 1420px);
    padding-top: 9px;
  }

  .app-topbar,
  .app-brand,
  .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .app-logo {
    width: 112px;
  }

  .chat-workspace {
    gap: 10px;
    height: auto;
    min-height: calc(100dvh - 132px);
  }

  .chat-main-panel {
    min-height: calc(100dvh - 170px);
    height: calc(100dvh - 170px);
    border-radius: 22px;
  }

  .chat-main-head {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-main-panel .chat-thread {
    min-height: 0;
    padding: 16px 14px 148px;
  }

  .chat-main-panel .chat-message {
    max-width: 94%;
  }

  .chat-composer {
    right: 10px;
    bottom: 10px;
    left: 10px;
    border-radius: 20px;
  }

  .composer-settings-grid {
    position: static;
    width: 100%;
    grid-template-columns: 1fr;
    margin-top: 10px;
  }

  .chat-composer button[type="submit"] {
    width: 100%;
  }

  .chat-side-panel {
    max-height: none;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .landing-nav nav {
    justify-content: flex-start;
  }

  .landing-actions,
  .hero-actions,
  .landing-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .landing-cta,
  .landing-ghost {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: clamp(36px, 12vw, 56px);
  }

  .landing-section {
    padding: 48px 0;
  }

  .landing-final {
    padding: 34px 22px;
  }

  .answer-box {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
