:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #050505;
  --panel-2: #0a0a0a;
  --text: #fff;
  --muted: #a8abb0;
  --quiet: #6f737a;
  --line: #1f2023;
  --line-strong: #34363b;
  --silver: #d9dde2;
  --steel: #8f98a3;
  --blue: #b7e7ff;
  --max: 1180px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background: #000;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.9) 42%, rgba(0, 0, 0, 0.58) 100%),
    radial-gradient(circle at 76% 12%, rgba(217, 221, 226, 0.1), transparent 28%),
    radial-gradient(circle at 72% 82%, rgba(183, 231, 255, 0.05), transparent 34%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

::selection {
  background: #fff;
  color: #000;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(18px);
  transition:
    background 220ms ease,
    border-color 220ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  font-size: 0.95rem;
  font-weight: 700;
}

.brand-mark {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: contrast(1.08);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.main-nav a {
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 88svh;
  padding: 112px 32px 58px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #000;
}

.hero-visual {
  position: absolute;
  top: 70px;
  right: 0;
  bottom: 0;
  width: 68%;
  height: calc(100% - 70px);
  object-fit: cover;
  object-position: center right;
  opacity: 0.78;
  mix-blend-mode: screen;
  animation: mapDrift 16s ease-in-out infinite alternate;
}

.hero-shadow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.96) 36%, rgba(0, 0, 0, 0.4) 100%),
    linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0) 48%);
}

.hero-inner,
.section-heading,
.section-grid,
.split-layout,
.capability-grid,
.system-rows,
.contact-layout,
.contact-form {
  width: min(100%, var(--max));
  margin-right: auto;
  margin-left: auto;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-logo {
  width: 94px;
  height: 104px;
  margin-bottom: 24px;
  object-fit: contain;
  filter: contrast(1.08);
}

.eyebrow,
.section-label {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: 5.2rem;
  line-height: 0.94;
  font-weight: 800;
}

.hero-copy {
  max-width: 720px;
  margin: 28px 0 0;
  color: #d8dadd;
  font-size: 1.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  overflow: hidden;
  border-radius: 7px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.button::before {
  flex: 0 0 18px;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  content: "";
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.button-secondary::before,
.contact-form .button::before {
  margin-top: 0;
  transform: rotate(-45deg);
}

.button::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 0;
  content: "";
  background: rgba(255, 255, 255, 0.12);
  transition: height 180ms ease;
}

.button-primary {
  border: 1px solid #fff;
  background: #fff;
  color: #000;
}

.button-primary::after {
  background: #cfd4d9;
}

.button-secondary {
  border: 1px solid var(--line-strong);
  background: rgba(5, 5, 5, 0.94);
  color: #fff;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button:hover::after,
.button:focus-visible::after {
  height: 100%;
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 190px));
  width: min(100%, 570px);
  margin: 58px 0 0;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.72);
}

.hero-stats div {
  min-height: 96px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats dt {
  margin: 0 0 18px;
  color: var(--quiet);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.hero-stats dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.15;
}

.marquee {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #050505;
}

.marquee::before,
.marquee::after {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 12vw;
  pointer-events: none;
  content: "";
}

.marquee::before {
  left: 0;
  background: linear-gradient(90deg, #050505, transparent);
}

.marquee::after {
  right: 0;
  background: linear-gradient(270deg, #050505, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}

.marquee-reverse .marquee-track {
  animation-direction: reverse;
  animation-duration: 30s;
}

.marquee span {
  display: inline-flex;
  align-items: center;
  min-height: 76px;
  padding: 0 34px;
  border-right: 1px solid var(--line);
  color: #f5f5f5;
  font-size: clamp(1.5rem, 4vw, 4.2rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.section {
  position: relative;
  padding: 92px 32px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.9);
}

.section:nth-of-type(odd) {
  background: rgba(4, 4, 4, 0.94);
}

.section h2 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
  line-height: 0.98;
  font-weight: 800;
}

.section-heading {
  margin-bottom: 40px;
}

.section-heading-center {
  max-width: 960px;
  text-align: center;
}

.section-heading-right {
  max-width: 950px;
  margin-right: auto;
  margin-left: auto;
  text-align: right;
}

.section-heading-left {
  text-align: left;
}

.section-lead,
.proof-list p,
.contact-layout p {
  margin: 0;
  color: #d0d2d5;
  font-size: 1.12rem;
}

.section-heading-center .section-lead {
  max-width: 820px;
  margin: 26px auto 0;
}

.manifesto-section {
  padding-top: 110px;
  padding-bottom: 110px;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #000;
}

.capability-card {
  min-height: 340px;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    rgba(8, 8, 8, 0.94);
  transition:
    background 220ms ease,
    transform 220ms ease,
    border-color 220ms ease;
}

.capability-card:hover {
  border-color: var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), transparent 48%),
    #101010;
  transform: translateY(-4px);
}

.card-index,
.row-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 30px;
  margin-bottom: 78px;
  border: 1px solid rgba(216, 221, 226, 0.52);
  border-radius: 999px;
  color: var(--silver);
  font-size: 0.78rem;
  font-weight: 700;
}

.capability-card h3,
.system-row h3,
.tab-panel h3,
.signal-grid h3 {
  margin: 0 0 14px;
  font-size: 1.22rem;
  line-height: 1.2;
}

.capability-card p,
.system-row p,
.tab-panel p,
.check-list,
.signal-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.split-statement {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.055), transparent 34%),
    #030303;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: start;
}

.split-title {
  position: sticky;
  top: 104px;
}

.signal-grid {
  display: grid;
  gap: 12px;
}

.signal-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.78);
  transition:
    border-color 180ms ease,
    transform 180ms ease;
}

.signal-grid article:hover {
  border-color: var(--line-strong);
  transform: translateX(5px);
}

.signal-grid span {
  display: block;
  margin-bottom: 44px;
  color: var(--quiet);
  font-weight: 700;
}

.lab-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 32%),
    #050505;
}

.system-rows {
  border-top: 1px solid var(--line);
}

.system-row {
  display: grid;
  grid-template-columns: 128px minmax(180px, 0.36fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  transition:
    border-color 180ms ease,
    transform 180ms ease;
}

.system-row:hover {
  border-color: var(--line-strong);
  transform: translateX(6px);
}

.system-row .row-code {
  margin: 0;
}

.tabs {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: min(100%, var(--max));
  margin: 0 auto;
  border: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.96);
}

.tab-list {
  display: grid;
  align-content: start;
  border-right: 1px solid var(--line);
}

.tab-button {
  min-height: 62px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.tab-button:hover,
.tab-button:focus-visible,
.tab-button.is-active {
  background: #111;
  color: var(--text);
  outline: none;
}

.tab-button.is-active {
  box-shadow: inset 3px 0 0 #fff;
}

.tab-panels {
  min-height: 398px;
}

.tab-panel {
  padding: 34px;
  animation: panelIn 240ms ease both;
}

.tab-panel h3 {
  max-width: 760px;
  font-size: 2rem;
}

.tab-panel p {
  max-width: 760px;
  font-size: 1.06rem;
}

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

.check-list li {
  position: relative;
  padding-left: 24px;
}

.check-list li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 8px;
  height: 8px;
  content: "";
  background: #fff;
}

.contact-section {
  padding-bottom: 98px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 34%),
    #020202;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 64px;
  align-items: start;
}

.contact-layout h2 {
  max-width: 840px;
  margin-bottom: 24px;
}

.contact-panel {
  display: grid;
  border: 1px solid var(--line);
  background: #080808;
}

.contact-panel a,
.contact-panel span {
  display: block;
  min-height: 58px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  color: #fff;
  overflow-wrap: anywhere;
}

.contact-panel span {
  border-bottom: 0;
  color: var(--quiet);
  font-size: 0.92rem;
}

.contact-panel a:hover,
.contact-panel a:focus-visible {
  background: #fff;
  color: #000;
  outline: none;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.contact-form label {
  display: grid;
  gap: 9px;
}

.contact-form label:nth-child(3) {
  grid-column: 1 / -1;
}

.contact-form span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 54px;
  padding: 15px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.96);
  color: #fff;
  outline: none;
  resize: vertical;
  transition:
    border-color 180ms ease,
    background 180ms ease;
}

.contact-form textarea {
  min-height: 136px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #fff;
  background: #020202;
}

.contact-form .button {
  width: max-content;
  min-width: 214px;
}

.form-status {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 28px 32px 42px;
  color: var(--quiet);
  font-size: 0.92rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
  outline: none;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes mapDrift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(18px, -10px, 0) scale(1.025);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1040px) {
  .hero h1 {
    font-size: 4.1rem;
  }

  .hero-copy {
    font-size: 1.12rem;
  }

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

  .split-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .split-title {
    position: static;
  }

  .system-row {
    grid-template-columns: 96px minmax(160px, 0.42fr) minmax(0, 1fr);
  }

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

  .tab-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tab-button {
    text-align: center;
  }

  .contact-panel {
    width: min(100%, 520px);
  }
}

@media (max-width: 760px) {
  .site-header {
    height: 66px;
    gap: 12px;
    padding: 0 14px;
  }

  .brand span:last-child {
    display: none;
  }

  .main-nav {
    gap: 2px;
    overflow-x: auto;
  }

  .main-nav a {
    padding: 8px 7px;
    font-size: 0.84rem;
  }

  .hero {
    min-height: auto;
    padding: 96px 18px 42px;
  }

  .hero-visual {
    top: 66px;
    width: 100%;
    height: 72%;
    opacity: 0.44;
  }

  .hero-shadow {
    background:
      linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.94) 62%, rgba(0, 0, 0, 0.58) 100%),
      linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.12) 72%);
  }

  .hero h1 {
    font-size: 2.82rem;
    line-height: 1;
  }

  .hero-logo {
    width: 72px;
    height: 82px;
    margin-bottom: 18px;
  }

  .hero-copy {
    margin-top: 22px;
    font-size: 1rem;
  }

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

  .button {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    margin-top: 30px;
  }

  .hero-stats div {
    min-height: 72px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-stats div:last-child {
    border-bottom: 0;
  }

  .hero-stats dt {
    margin-bottom: 8px;
  }

  .marquee span {
    min-height: 58px;
    padding: 0 20px;
  }

  .section {
    padding: 66px 18px;
  }

  .section-heading-right,
  .section-heading-center {
    text-align: left;
  }

  .section-heading-center .section-lead {
    margin-left: 0;
  }

  .section-lead,
  .contact-layout p {
    font-size: 1rem;
  }

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

  .capability-card {
    min-height: 268px;
  }

  .card-index {
    margin-bottom: 48px;
  }

  .system-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .tab-button {
    min-height: 54px;
    padding: 0 12px;
    font-size: 0.92rem;
  }

  .tab-panel {
    padding: 24px;
  }

  .tab-panel h3 {
    font-size: 1.48rem;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-form .button {
    width: 100%;
  }

  .site-footer {
    padding: 24px 18px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Nexora Control */
[hidden] {
  display: none !important;
}

select {
  font: inherit;
}

.has-modal {
  overflow: hidden;
}

.staff-login-button,
.compact-button,
.account-button,
.icon-button,
.text-button,
.toggle-button {
  font: inherit;
}

.staff-login-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.staff-login-button:hover,
.staff-login-button:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #000;
  outline: none;
}

.staff-login-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7df5aa;
  box-shadow: 0 0 0 4px rgba(125, 245, 170, 0.1);
}

.login-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  cursor: default;
}

.login-dialog,
.control-login-card {
  position: relative;
  width: min(100%, 500px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 36%),
    #070707;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
}

.login-dialog {
  padding: 30px;
  animation: loginIn 220ms ease both;
}

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

.login-dialog h2,
.control-login-card h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 0.98;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0a0a0a;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #000;
  outline: none;
}

.login-copy,
.control-login-copy p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.login-form {
  display: grid;
  gap: 13px;
  margin-top: 26px;
}

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

.login-form label > span,
.bot-controls label > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.login-form input,
.management-form input,
.management-form select,
.bot-controls select,
.entity-row-actions select,
.setting-control select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #020202;
  color: #fff;
  outline: none;
}

.login-form input:focus,
.management-form input:focus,
.management-form select:focus,
.bot-controls select:focus,
.entity-row-actions select:focus,
.setting-control select:focus {
  border-color: #fff;
}

.code-input {
  font-size: 1.6rem !important;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-align: center;
}

.text-button {
  justify-self: center;
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.text-button:hover,
.text-button:focus-visible {
  color: #fff;
  outline: none;
}

.login-status {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-status[data-type="success"] {
  color: #a8f7c5;
}

.login-status[data-type="error"] {
  color: #ff9d9d;
}

.login-security {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 0.82rem;
}

.login-security span {
  color: #7df5aa;
}

.control-body {
  min-height: 100svh;
  background: #000;
}

.control-login {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.64)),
    url("assets/nexora-system-map.png") center / cover no-repeat,
    #000;
}

.control-login-card {
  padding: 30px;
}

.control-login-card .brand {
  width: max-content;
  margin-bottom: 56px;
}

.control-login-copy .section-label {
  margin-bottom: 16px;
}

.control-app {
  min-height: 100svh;
}

.control-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: max(0px, env(safe-area-inset-top)) 24px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(18px);
}

.control-account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 10px;
  color: var(--quiet);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.system-online i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7df5aa;
  box-shadow: 0 0 12px rgba(125, 245, 170, 0.55);
}

.account-button {
  display: grid;
  min-width: 160px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #080808;
  color: #fff;
  text-align: left;
}

.account-button span {
  font-size: 0.88rem;
  font-weight: 700;
}

.account-button small {
  color: var(--quiet);
  font-size: 0.72rem;
}

.control-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100svh;
  padding-top: 72px;
}

.control-sidebar {
  position: fixed;
  top: 72px;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 238px;
  border-right: 1px solid var(--line);
  background: #030303;
}

.control-nav {
  display: grid;
  padding: 18px 12px;
}

.control-nav-button {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.control-nav-button span {
  color: #555;
  font-size: 0.7rem;
}

.control-nav-button:hover,
.control-nav-button:focus-visible,
.control-nav-button.is-active {
  background: #101010;
  color: #fff;
  outline: none;
}

.control-nav-button.is-active {
  box-shadow: inset 2px 0 0 #fff;
}

.control-nav-button.is-active span {
  color: #fff;
}

.control-sidebar-foot {
  display: grid;
  gap: 3px;
  padding: 18px 24px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.control-sidebar-foot small {
  color: var(--quiet);
  font-size: 0.68rem;
  text-transform: none;
}

.control-main {
  grid-column: 2;
  min-width: 0;
  padding: 46px 42px 80px;
}

.control-section {
  width: min(100%, 1340px);
  margin: 0 auto;
  animation: panelIn 220ms ease both;
}

.control-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.control-heading .section-label {
  margin-bottom: 14px;
}

.control-heading h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 0.96;
}

.control-heading h1 span {
  color: var(--muted);
}

.compact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #0a0a0a;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.compact-button:hover,
.compact-button:focus-visible {
  border-color: #fff;
  background: #fff;
  color: #000;
  outline: none;
}

.compact-button-light {
  border-color: #fff;
  background: #fff;
  color: #000;
}

.compact-button-danger:hover,
.compact-button-danger:focus-visible {
  border-color: #ffb2b2;
  background: #ffb2b2;
}

.control-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.control-stat-card {
  display: grid;
  min-height: 178px;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent), #050505;
}

.control-stat-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.control-stat-card strong {
  align-self: end;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.9;
}

.control-stat-card small {
  margin-top: 8px;
  color: var(--quiet);
}

.control-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.control-grid-wide {
  grid-template-columns: 1.25fr 0.75fr;
}

.control-panel,
.entity-card,
.entity-row,
.management-form,
.setting-row {
  border: 1px solid var(--line);
  background: #070707;
}

.control-panel {
  min-height: 320px;
  padding: 26px;
}

.control-intro-panel {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.07), transparent 42%),
    #070707;
}

.panel-index,
.entity-code {
  color: var(--quiet);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.control-panel h2 {
  max-width: 720px;
  margin: 72px 0 14px;
  font-size: clamp(1.7rem, 3vw, 3.1rem);
  line-height: 1;
}

.control-panel p,
.entity-card p,
.entity-row p,
.setting-row p {
  margin: 0;
  color: var(--muted);
}

.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.role-chips span,
.status-pill,
.live-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--silver);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pill.is-online,
.live-badge {
  border-color: rgba(125, 245, 170, 0.35);
  color: #9df9be;
}

.panel-title-row,
.entity-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-title-row h2 {
  margin: 0;
  font-size: 1.35rem;
}

.quick-actions {
  display: grid;
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.quick-actions button {
  min-height: 46px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.quick-actions button::after {
  float: right;
  content: "↗";
}

.quick-actions button:hover,
.quick-actions button:focus-visible {
  color: #fff;
  outline: none;
}

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

.entity-card {
  min-height: 300px;
  padding: 22px;
  transition: border-color 180ms ease, transform 180ms ease;
}

.entity-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.entity-card h2 {
  margin: 72px 0 8px;
  font-size: 1.65rem;
}

.bot-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.bot-controls label {
  display: grid;
  gap: 6px;
}

.bot-controls select,
.entity-row-actions select,
.setting-control select {
  min-height: 40px;
  font-size: 0.82rem;
}

.bot-controls .compact-button {
  grid-column: 1 / -1;
}

.entity-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.entity-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, auto) auto;
  gap: 24px;
  align-items: center;
  min-height: 116px;
  margin-top: -1px;
  padding: 20px;
}

.entity-row-main {
  min-width: 0;
}

.entity-row h2 {
  margin: 8px 0 4px;
  font-size: 1.12rem;
  line-height: 1.25;
}

.news-row h2 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.98rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.entity-row-meta,
.entity-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.entity-row-meta {
  flex-direction: column;
  align-items: flex-start;
}

.entity-row-meta a:hover,
.entity-row-meta a:focus-visible {
  color: #fff;
  outline: none;
}

.entity-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #111;
  font-weight: 800;
}

.staff-row {
  grid-template-columns: auto minmax(260px, 1fr) minmax(190px, auto) auto;
}

.ban-row {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.management-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(170px, 0.8fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 22px;
  padding: 18px;
}

.management-form[data-ban-form] {
  grid-template-columns: minmax(250px, 1.4fr) repeat(3, minmax(160px, 1fr)) auto;
}

.management-field {
  display: grid;
  gap: 6px;
}

.management-field > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.management-form.is-busy {
  opacity: 0.68;
}

.management-form-copy {
  display: grid;
  align-self: center;
}

.management-form-copy span {
  color: var(--quiet);
  font-size: 0.78rem;
}

.settings-layout {
  display: grid;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 96px;
  margin-top: -1px;
  padding: 20px;
}

.setting-row h2 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.setting-control {
  display: flex;
  gap: 8px;
  min-width: 300px;
}

.toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 138px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #090909;
  color: var(--muted);
  font-size: 0.76rem;
  cursor: pointer;
}

.toggle-button span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #555;
}

.toggle-button.is-on {
  border-color: rgba(125, 245, 170, 0.4);
  color: #a8f7c5;
}

.toggle-button.is-on span {
  background: #7df5aa;
  box-shadow: 0 0 10px rgba(125, 245, 170, 0.45);
}

.database-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.database-stats .control-stat-card {
  min-height: 150px;
}

.export-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  min-height: 240px;
  margin-top: 14px;
}

.export-panel h2 {
  margin: 50px 0 10px;
}

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

.control-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  padding: 28px;
  border: 1px solid var(--line);
  color: var(--quiet);
}

.control-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #111;
  color: #fff;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
}

.control-toast[data-type="success"] {
  border-color: rgba(125, 245, 170, 0.45);
}

.control-toast[data-type="error"] {
  border-color: rgba(255, 120, 120, 0.5);
}

.heading-actions,
.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-note {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.035), transparent 55%);
  color: var(--muted);
  font-size: 0.82rem;
}

.workflow-note strong {
  color: #fff;
}

.workspace-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.workspace-channels > span {
  display: grid;
  gap: 2px;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.workspace-channels b {
  font-size: 0.78rem;
}

.workspace-channels small {
  overflow: hidden;
  color: var(--quiet);
  font-size: 0.68rem;
  text-overflow: ellipsis;
}

body[data-workspace="support"] .control-stat-card:first-child,
body[data-workspace="editorial"] .control-stat-card:first-child {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.015));
}

.ticket-row.is-urgent {
  box-shadow: inset 3px 0 0 #ff7878;
}

.row-preview {
  width: 76px;
  height: 76px;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: cover;
}

.news-row:has(.row-preview) {
  grid-template-columns: auto minmax(260px, 1fr) minmax(150px, auto) auto;
}

.text-button-danger {
  color: #ff9b9b;
}

.ban-card {
  display: grid;
  gap: 12px;
  margin-top: -1px;
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 55%);
}

.ban-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ban-card h2 {
  margin: 0;
  font-size: 1.16rem;
}

.ban-card > p {
  margin: -5px 0 0;
  color: var(--quiet);
  font-size: 0.78rem;
}

.ban-evidence {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #080808;
}

.ban-evidence > div:first-child > span {
  color: var(--quiet);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ban-evidence p {
  margin: 9px 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.ban-evidence a,
.source-card {
  color: #fff;
  font-size: 0.78rem;
}

.ban-evidence.is-empty {
  display: block;
  color: var(--quiet);
  font-size: 0.78rem;
}

.ban-media,
.news-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.ban-media img,
.ban-media video,
.news-gallery img,
.news-gallery video {
  width: 100%;
  max-height: 280px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #000;
  object-fit: cover;
}

.work-layer[hidden] {
  display: none;
}

.work-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr minmax(580px, 46vw);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.work-layer-backdrop {
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  cursor: default;
}

.work-drawer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid var(--line-strong);
  background: #050505;
  box-shadow: -28px 0 80px rgba(0, 0, 0, 0.7);
  animation: drawerIn 180ms ease-out both;
}

.work-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 100px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.work-drawer-head h2 {
  margin: 4px 0 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.work-drawer-body {
  min-height: 0;
  overscroll-behavior: contain;
  padding: 22px 24px 50px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.drawer-loading,
.drawer-empty {
  padding: 22px;
  border: 1px solid var(--line);
  color: var(--quiet);
}

.drawer-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.drawer-summary > div {
  display: grid;
  gap: 5px;
  padding: 16px;
}

.drawer-summary > div + div {
  border-left: 1px solid var(--line);
}

.drawer-summary span,
.drawer-toolbar label > span,
.reply-form label > span,
.news-edit-form label > span,
.news-create-form label > span {
  color: var(--quiet);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.drawer-summary small {
  color: var(--quiet);
}

.drawer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin-bottom: 24px;
}

.drawer-toolbar label {
  display: grid;
  gap: 6px;
}

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

.conversation h3,
.drawer-related h3 {
  margin: 4px 0 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.message-bubble {
  width: min(88%, 620px);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 4px 12px 12px;
  background: #0b0b0b;
}

.message-bubble.is-staff {
  justify-self: end;
  border-radius: 12px 4px 12px 12px;
  background: #121212;
}

.message-bubble header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--quiet);
  font-size: 0.68rem;
}

.message-bubble strong {
  color: #fff;
}

.message-bubble p {
  margin: 9px 0 0;
  color: #ddd;
  font-size: 0.88rem;
  line-height: 1.52;
}

.message-bubble img,
.message-bubble video {
  width: 100%;
  max-height: 420px;
  margin-top: 10px;
  border-radius: 4px;
  object-fit: contain;
  background: #000;
}

.media-file {
  display: inline-flex;
  margin-top: 10px;
  color: #fff;
}

.reply-form,
.news-edit-form,
.news-create-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.news-review {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #090909;
}

.news-review > span {
  color: var(--quiet);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.news-review > p {
  margin: 0;
  color: #ddd;
  font-size: 0.9rem;
  line-height: 1.58;
}

.generation-state {
  display: grid;
  place-items: center;
  min-height: 60vh;
  padding: 40px;
  text-align: center;
}

.generation-state strong {
  margin-top: 30px;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.generation-state p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.6;
}

.generation-state small {
  color: var(--quiet);
  text-transform: uppercase;
}

.generation-orbit {
  position: relative;
  width: 76px;
  height: 76px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.generation-orbit::before {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.65);
  content: "";
  transform: translateX(-50%);
  transform-origin: 50% 42px;
  animation: generationOrbit 1.35s linear infinite;
}

@keyframes generationOrbit {
  to { transform: translateX(-50%) rotate(360deg); }
}

.reply-form label,
.news-edit-form label,
.news-create-form label {
  display: grid;
  gap: 7px;
}

.reply-form textarea,
.news-edit-form textarea,
.news-create-form textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}

.news-edit-form {
  gap: 16px;
  margin-top: 18px;
  padding-top: 0;
  border-top: 0;
}

.news-create-form {
  gap: 18px;
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
}

.news-editor-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 34%),
    #080808;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.news-editor-card:focus-within {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.news-editor-head,
.news-editor-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
}

.news-editor-head {
  border-bottom: 1px solid var(--line);
}

.news-editor-head > div {
  display: grid;
  gap: 3px;
}

.news-editor-head span,
.watermark-compare-title span {
  color: var(--quiet);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.news-editor-head strong {
  font-size: 0.9rem;
}

.news-editor-head small,
.news-editor-meta {
  color: var(--quiet);
  font-size: 0.7rem;
}

.news-editor-field {
  display: block !important;
}

.news-editor-field textarea {
  display: block;
  width: 100%;
  min-height: 350px;
  padding: 22px 20px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #101010, #0a0a0a);
  color: #f3f3f3;
  caret-color: #fff;
  font-size: 0.98rem;
  line-height: 1.72;
  outline: none;
  resize: vertical;
}

.news-editor-field textarea::selection {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
}

.news-editor-meta {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.news-editor-meta b {
  color: #fff;
  font-weight: 800;
}

.news-create-editor {
  margin: 0;
}

.news-select-field,
.news-source-grid label {
  display: grid;
  gap: 8px;
}

.news-select-field > span,
.news-source-grid label > span {
  color: var(--quiet);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.news-select-field select,
.news-source-grid input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #090909;
  color: #f4f4f4;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.news-select-field select:focus,
.news-source-grid input:focus {
  border-color: rgba(255, 255, 255, 0.78);
  background: #050505;
}

.news-source-grid input::placeholder,
.news-editor-field textarea::placeholder {
  color: #555;
}

.news-create-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.035), transparent 34%),
    #080808;
}

.news-create-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.news-create-card-head > div {
  display: grid;
  gap: 3px;
}

.news-create-card-head span {
  color: var(--quiet);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.news-create-card-head strong {
  font-size: 0.9rem;
}

.news-create-card-head small {
  color: var(--quiet);
  font-size: 0.7rem;
}

.news-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.news-source-grid label:first-child {
  grid-column: 1 / -1;
}

.media-uploader {
  display: grid !important;
  place-items: center;
  min-height: 154px;
  margin: 18px;
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
  color: #fff;
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.media-uploader:hover,
.media-uploader:focus-within,
.media-uploader.is-dragging {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.055);
}

.media-uploader.is-dragging {
  transform: scale(0.995);
}

.media-uploader input,
.media-add-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.media-uploader-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 1.35rem;
  font-weight: 300;
}

.media-uploader strong {
  font-size: 0.92rem;
}

.media-uploader small {
  margin-top: 5px;
  color: var(--quiet);
  font-size: 0.72rem;
}

.staged-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.media-uploader-empty {
  grid-column: 1 / -1;
  padding: 12px;
  border-top: 1px solid var(--line);
  color: #555;
  font-size: 0.72rem;
  text-align: center;
}

.staged-image,
.news-media-item {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #030303;
}

.staged-image img,
.staged-image video {
  width: 100%;
  height: 116px;
  object-fit: cover;
  background: #000;
}

.media-type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.staged-image figcaption,
.news-media-item figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 7px 8px 7px 10px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 0.66rem;
}

.staged-image figcaption span,
.news-media-item figcaption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staged-image button,
.news-media-remove {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 130, 130, 0.25);
  border-radius: 4px;
  background: #100909;
  color: #ffb0b0;
  cursor: pointer;
}

.news-create-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0 4px;
}

.news-create-actions > span {
  color: var(--quiet);
  font-size: 0.74rem;
}

.news-create-actions .button {
  gap: 18px;
  min-width: 230px;
}

.news-create-actions .button b {
  font-size: 1.1rem;
}

.news-edit-actions {
  align-items: center;
  padding-top: 2px;
}

.watermark-button {
  gap: 8px;
  border-color: rgba(190, 202, 255, 0.42);
  background: linear-gradient(120deg, rgba(127, 147, 255, 0.13), rgba(255, 255, 255, 0.025));
}

.watermark-button span {
  color: #c8d1ff;
  font-size: 1rem;
}

.watermark-button:disabled,
.watermark-button:disabled:hover {
  border-color: var(--line);
  background: #090909;
  color: #666;
  cursor: not-allowed;
  opacity: 0.72;
}

.watermark-button:disabled span {
  color: #666;
}

.watermark-restore {
  min-height: 40px;
  color: #bfc6dc;
  font-size: 0.78rem;
}

.watermark-preview {
  display: grid;
  gap: 16px;
}

.watermark-intro,
.watermark-note {
  margin: 0;
  padding: 15px 17px;
  border: 1px solid var(--line);
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.04), transparent 62%);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.watermark-compare-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #080808;
}

.watermark-compare-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.watermark-compare-title strong {
  font-size: 0.74rem;
}

.watermark-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.watermark-compare-grid figure {
  min-width: 0;
  margin: 0;
  background: #030303;
}

.watermark-compare-grid figure + figure {
  border-left: 1px solid var(--line);
}

.watermark-compare-grid img {
  width: 100%;
  height: 310px;
  object-fit: contain;
  background: #000;
}

.watermark-compare-grid figcaption {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
  text-transform: uppercase;
}

.watermark-note {
  display: grid;
  gap: 5px;
  border-color: rgba(255, 190, 120, 0.24);
}

.watermark-manual-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px;
  border: 1px solid rgba(190, 202, 255, 0.28);
  border-radius: 8px;
  background: linear-gradient(120deg, rgba(127, 147, 255, 0.09), rgba(255, 255, 255, 0.02));
}

.watermark-manual-card > div {
  display: grid;
  gap: 5px;
}

.watermark-manual-card span,
.manual-editor-guide > span {
  color: #98a8e9;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.watermark-manual-card strong {
  font-size: 0.88rem;
}

.watermark-manual-card p,
.manual-editor-guide p,
.manual-editor-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.manual-watermark-editor {
  display: grid;
  gap: 14px;
}

.manual-editor-guide {
  display: grid;
  gap: 6px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.045), transparent 68%);
}

.manual-editor-guide strong {
  font-size: 0.94rem;
}

.manual-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080808;
}

.manual-editor-toolbar label,
.manual-editor-toolbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.manual-editor-toolbar label > span,
.manual-editor-toolbar output {
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.manual-editor-toolbar input[type="range"] {
  width: min(220px, 24vw);
  accent-color: #d7defe;
}

.manual-canvas-frame {
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background-color: #030303;
  background-image:
    linear-gradient(45deg, #090909 25%, transparent 25%),
    linear-gradient(-45deg, #090909 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #090909 75%),
    linear-gradient(-45deg, transparent 75%, #090909 75%);
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-size: 18px 18px;
}

.manual-canvas-loading {
  display: grid;
  min-height: 300px;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.manual-canvas-loading.is-error {
  color: #df8f8f;
}

.manual-canvas-stage {
  position: relative;
  width: 100%;
  line-height: 0;
}

.manual-canvas-stage[hidden] {
  display: none;
}

.manual-canvas-stage canvas {
  display: block;
  width: 100%;
  height: auto;
}

.manual-canvas-stage canvas + canvas {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  touch-action: none;
}

.manual-editor-hint {
  padding: 0 3px;
}

.watermark-actions {
  position: sticky;
  bottom: -50px;
  z-index: 2;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(14px);
}

.news-gallery {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.news-media-item img,
.news-media-item video {
  width: 100%;
  height: 230px;
  max-height: none;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: #000;
}

.news-media-empty {
  display: grid;
  place-items: center;
  min-height: 92px;
  margin-bottom: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  color: #555;
  font-size: 0.78rem;
}

.news-media-manager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.035), transparent 70%);
}

.news-media-manager > div {
  display: grid;
  gap: 3px;
}

.news-media-manager > div > span {
  color: var(--quiet);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.news-media-manager > div > strong {
  font-size: 0.86rem;
}

.news-media-manager > div > small {
  color: var(--quiet);
  font-size: 0.68rem;
}

.media-add-button {
  gap: 7px;
  cursor: pointer;
}

@media (max-width: 620px) {
  .news-editor-head,
  .news-editor-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .news-editor-field textarea {
    min-height: 320px;
    padding: 18px 16px;
    font-size: 0.94rem;
  }

  .watermark-compare-grid {
    grid-template-columns: 1fr;
  }

  .watermark-compare-grid figure + figure {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .watermark-compare-grid img {
    height: 280px;
  }

  .watermark-manual-card,
  .manual-editor-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .watermark-manual-card .compact-button {
    width: 100%;
  }

  .manual-editor-toolbar label {
    justify-content: space-between;
  }

  .manual-editor-toolbar input[type="range"] {
    width: 100%;
  }

  .manual-editor-toolbar > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-source-grid {
    grid-template-columns: 1fr;
  }

  .news-create-actions,
  .news-media-manager {
    align-items: stretch;
    flex-direction: column;
  }

  .news-create-actions .button,
  .media-add-button {
    width: 100%;
  }
}

.drawer-related {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.drawer-related > div,
.source-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #090909;
}

.drawer-related span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-card {
  margin: 14px 0;
}

.source-card span {
  color: var(--quiet);
}

.news-gallery {
  margin-bottom: 14px;
}

body.work-layer-open {
  overflow: hidden;
}

@keyframes drawerIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes loginIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1180px) {
  .entity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .management-form,
  .management-form[data-ban-form] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .management-form-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .control-topbar {
    height: 64px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .control-topbar .brand span:last-child,
  .system-online,
  .account-button small {
    display: none;
  }

  .account-button {
    min-width: 0;
  }

  .control-layout {
    display: block;
    padding-top: 64px;
  }

  .control-sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    display: block;
    width: auto;
    padding: 0 max(4px, env(safe-area-inset-right)) max(0px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    overflow-x: auto;
    border-top: 1px solid var(--line);
    border-right: 0;
    background: rgba(3, 3, 3, 0.96);
    backdrop-filter: blur(18px);
  }

  .control-nav {
    display: flex;
    width: max-content;
    min-width: 100%;
    padding: 5px 4px;
  }

  .control-nav-button {
    display: flex;
    flex: 1 0 78px;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    min-width: 78px;
    min-height: 54px;
    padding: 4px 8px;
    font-size: 0.68rem;
    text-align: center;
  }

  .control-nav-button.is-active {
    box-shadow: inset 0 2px 0 #fff;
  }

  .control-sidebar-foot {
    display: none;
  }

  .control-main {
    padding: 30px 18px calc(94px + env(safe-area-inset-bottom));
  }

  .control-heading {
    align-items: flex-start;
  }

  .control-heading h1 {
    font-size: clamp(2.2rem, 9vw, 4rem);
  }

  .control-stats,
  .database-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-grid-wide {
    grid-template-columns: 1fr;
  }

  .entity-row,
  .staff-row,
  .ban-row,
  .news-row:has(.row-preview) {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .row-preview {
    width: 100%;
    height: 180px;
  }

  .ban-evidence {
    grid-template-columns: 1fr;
  }

  .work-layer {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-layer-backdrop {
    display: none;
  }

  .work-drawer {
    border-left: 0;
  }

  .entity-avatar {
    display: none;
  }

  .entity-row-meta,
  .entity-row-actions {
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .export-panel {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 620px) {
  .site-header .main-nav {
    display: none;
  }

  .staff-login-button {
    margin-left: auto;
  }

  .login-layer {
    align-items: end;
    padding: 0;
  }

  .login-dialog {
    width: 100%;
    padding: 24px 18px max(24px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 12px 12px 0 0;
  }

  .control-login {
    align-items: end;
    padding: 0;
  }

  .control-login-card {
    width: 100%;
    padding: 24px 18px max(24px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 12px 12px 0 0;
  }

  .control-login-card .brand {
    margin-bottom: 42px;
  }

  .control-account {
    gap: 6px;
  }

  .account-button {
    max-width: 132px;
    overflow: hidden;
  }

  .account-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .control-heading {
    display: grid;
  }

  .control-heading .compact-button {
    justify-self: start;
  }

  .control-stats,
  .database-stats,
  .entity-grid {
    grid-template-columns: 1fr;
  }

  .control-stat-card {
    min-height: 132px;
  }

  .control-panel {
    min-height: auto;
    padding: 20px;
  }

  .control-panel h2 {
    margin-top: 52px;
  }

  .bot-controls,
  .management-form,
  .management-form[data-ban-form] {
    grid-template-columns: 1fr;
  }

  .bot-controls .compact-button,
  .management-form-copy {
    grid-column: auto;
  }

  .entity-row-actions select,
  .entity-row-actions .compact-button,
  .management-form .compact-button {
    flex: 1;
  }

  .setting-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .setting-control {
    width: 100%;
    min-width: 0;
  }

  .control-toast {
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .workflow-note {
    display: grid;
  }

  .heading-actions,
  .drawer-actions,
  .drawer-toolbar {
    width: 100%;
  }

  .heading-actions .compact-button,
  .drawer-actions .compact-button,
  .drawer-toolbar .compact-button,
  .drawer-toolbar label {
    flex: 1;
  }

  .work-drawer-head,
  .work-drawer-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .drawer-summary {
    grid-template-columns: 1fr;
  }

  .drawer-summary > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .message-bubble {
    width: 94%;
  }

  .ban-card-head,
  .source-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
