:root {
  color-scheme: dark;
  --bg: #050506;
  --bg-raised: #09090c;
  --panel: rgba(15, 15, 19, .9);
  --panel-strong: #111116;
  --panel-soft: #17171d;
  --line: rgba(255, 255, 255, .085);
  --line-strong: rgba(255, 255, 255, .14);
  --line-red: rgba(255, 48, 72, .34);
  --text: #f4f1f2;
  --text-soft: #c9c5c8;
  --muted: #74727a;
  --muted-dark: #4d4b52;
  --accent: #ff3048;
  --accent-bright: #ff6173;
  --accent-deep: #8c0b1e;
  --good: #55d998;
  --warn: #f4b54b;
  --shadow: 0 28px 90px rgba(0, 0, 0, .52);
  --shadow-soft: 0 16px 42px rgba(0, 0, 0, .28);
  --topbar: 76px;
  --sidebar: 188px;
  --radius: 2px;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-family: var(--font-ui);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 76% 20%, rgba(143, 8, 29, .13), transparent 31rem),
    radial-gradient(circle at 22% 88%, rgba(94, 3, 18, .11), transparent 28rem),
    linear-gradient(135deg, #030304 0%, #08080a 48%, #040405 100%);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .014) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .78), transparent 88%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .78), transparent 88%);
}

::selection {
  background: rgba(255, 48, 72, .32);
  color: #fff;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
}

* {
  scrollbar-color: #3b3940 #0b0b0e;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: #0b0b0e;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid #0b0b0e;
  background: #3b3940;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 50%;
  padding: 10px 14px;
  transform: translate(-50%, -160%);
  border: 1px solid var(--accent);
  background: #0d0d11;
  color: #fff;
  font-size: 11px;
  letter-spacing: .08em;
  text-decoration: none;
  transition: transform .18s ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .11;
  pointer-events: none;
}

.ambient-one {
  top: 7%;
  right: -220px;
  background: #ff002b;
}

.ambient-two {
  bottom: -330px;
  left: 16%;
  background: #850018;
}

.scanlines {
  position: fixed;
  z-index: 90;
  inset: 0;
  opacity: .028;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 3px,
    rgba(255, 255, 255, .2) 4px
  );
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  height: var(--topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 22px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 48, 72, .025), transparent 24%),
    rgba(6, 6, 8, .88);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  backdrop-filter: blur(20px) saturate(120%);
}

.topbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  width: min(34vw, 440px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 48, 72, .52));
  content: "";
}

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

.identity-copy {
  min-width: 0;
}

.identity-kicker {
  display: none;
}

.identity strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .34em;
  line-height: 1;
}

.identity small {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: #5f5d65;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .16em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mark {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  isolation: isolate;
  clip-path: polygon(50% 0, 91% 23%, 91% 77%, 50% 100%, 9% 77%, 9% 23%);
  background: linear-gradient(145deg, var(--accent-bright), #65000f 68%);
  filter: drop-shadow(0 0 14px rgba(255, 48, 72, .22));
}

.mark::before {
  position: absolute;
  z-index: -1;
  inset: -15px;
  border: 1px solid rgba(255, 48, 72, .15);
  border-radius: 50%;
  content: "";
  animation: mark-orbit 12s linear infinite;
}

.mark::after {
  position: absolute;
  z-index: 0;
  inset: 2px;
  clip-path: inherit;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 97, 115, .09), transparent 55%),
    #09090c;
  content: "";
}

.mark span {
  position: relative;
  z-index: 1;
  color: var(--accent-bright);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  text-shadow: 0 0 16px rgba(255, 48, 72, .55);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 11px;
}

.status-chip {
  position: relative;
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .022), rgba(255, 255, 255, .004));
}

.status-chip::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 38%;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: .18;
}

.status-chip i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(244, 181, 75, .05), 0 0 10px rgba(244, 181, 75, .48);
}

.status-chip span {
  color: #9b989f;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .13em;
  white-space: nowrap;
}

.status-chip.online {
  color: var(--good);
  border-color: rgba(85, 217, 152, .16);
}

.status-chip.online i {
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(85, 217, 152, .05), 0 0 11px rgba(85, 217, 152, .52);
}

.status-chip.offline {
  color: var(--accent);
  border-color: rgba(255, 48, 72, .24);
}

.status-chip.offline i {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 48, 72, .06), 0 0 11px rgba(255, 48, 72, .52);
}

.clock-block {
  min-width: 74px;
  display: grid;
  gap: 2px;
  padding: 0 4px;
}

.clock-block > span {
  color: #45434a;
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: .15em;
}

.topbar time {
  color: #aaa7ae;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
}

.icon-button,
.ghost-button,
.primary-button {
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: #74727a;
  font-size: 18px;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.icon-button:hover {
  border-color: var(--line);
  background: rgba(255, 48, 72, .06);
  color: var(--accent-bright);
  transform: rotate(12deg);
}

.ghost-button {
  min-height: 34px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .01);
  color: #9b989f;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .13em;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.ghost-button:hover {
  border-color: var(--line-red);
  background: rgba(255, 48, 72, .045);
  color: #fff;
}

.primary-button {
  min-height: 38px;
  padding: 11px 18px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent) 42%, #d3152d);
  box-shadow: 0 12px 30px rgba(255, 48, 72, .16);
  color: #fff;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}

.primary-button:hover {
  box-shadow: 0 15px 38px rgba(255, 48, 72, .24);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: var(--topbar);
  bottom: 0;
  left: 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px 14px 20px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 48, 72, .025), transparent 18%),
    rgba(7, 7, 9, .84);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.sidebar::after {
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 26%;
  background: linear-gradient(to bottom, rgba(255, 48, 72, .48), transparent);
  content: "";
}

.sidebar nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  position: relative;
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.nav-item::before {
  position: absolute;
  top: 50%;
  left: -1px;
  width: 2px;
  height: 0;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 48, 72, .48);
  content: "";
  transform: translateY(-50%);
  transition: height .2s ease;
}

.nav-index {
  color: #3c3a40;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .06em;
}

.nav-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.nav-copy strong {
  color: #6e6b73;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .14em;
}

.nav-copy small {
  overflow: hidden;
  color: #414047;
  font-size: 7px;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover {
  border-color: rgba(255, 255, 255, .055);
  background: rgba(255, 255, 255, .018);
  transform: translateX(2px);
}

.nav-item:hover .nav-copy strong {
  color: #b8b5bb;
}

.nav-item.active {
  border-color: rgba(255, 48, 72, .24);
  background:
    linear-gradient(90deg, rgba(255, 48, 72, .13), rgba(255, 48, 72, .018) 78%),
    rgba(255, 255, 255, .01);
}

.nav-item.active::before {
  height: 28px;
}

.nav-item.active .nav-index {
  color: var(--accent);
}

.nav-item.active .nav-copy strong {
  color: #f0edef;
}

.nav-item.active .nav-copy small {
  color: #747179;
}

.sidebar-footer {
  display: grid;
  gap: 4px;
  padding: 14px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .055);
}

.sidebar-footer span {
  color: #414047;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .2em;
}

.sidebar-footer strong {
  color: #807d84;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .1em;
}

.sidebar-footer small {
  margin-top: 8px;
  color: #343238;
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: .12em;
}

.workspace {
  min-height: calc(100vh - var(--topbar));
  min-height: calc(100svh - var(--topbar));
  margin-left: var(--sidebar);
  display: grid;
  grid-template-columns:
    minmax(252px, 19vw)
    minmax(430px, 1fr)
    minmax(276px, 20vw);
  gap: 1px;
  background: var(--line);
}

.core-column,
.chat-column,
.control-column {
  position: relative;
  min-width: 0;
  padding: 24px;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}

.core-column::before,
.control-column::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 48, 72, .055), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, .012), transparent 25%);
  content: "";
  pointer-events: none;
}

.chat-column {
  height: calc(100vh - var(--topbar));
  height: calc(100svh - var(--topbar));
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .011), transparent 14%, transparent 86%, rgba(255, 255, 255, .009)),
    linear-gradient(180deg, #09090c, #060607);
}

.control-column {
  background: #08080a;
}

.section-label {
  position: relative;
  min-height: 25px;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 19px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.section-label::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--accent);
  content: "";
  opacity: .72;
}

.section-label > span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #79767e;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .2em;
  line-height: 1.35;
}

.section-label > span small {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: #424047;
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 400;
  letter-spacing: .11em;
}

.section-label > b {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.4;
  white-space: nowrap;
}

.section-label > b > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

#sessionLabel::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  content: "";
}

.core-column {
  display: flex;
  flex-direction: column;
}

.core-visual {
  position: relative;
  width: min(18vw, 226px);
  min-width: 184px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: clamp(38px, 7vh, 68px) auto 28px;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, .35));
}

.core-visual::before,
.core-visual::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.core-visual::before {
  inset: -11%;
  border: 1px solid rgba(255, 255, 255, .035);
}

.core-visual::after {
  inset: -4%;
  border: 1px solid rgba(255, 48, 72, .075);
  box-shadow: inset 0 0 38px rgba(255, 48, 72, .025);
}

.core-grid {
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  opacity: .26;
  background-image:
    linear-gradient(rgba(255, 255, 255, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .075) 1px, transparent 1px);
  background-position: center;
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(circle, #000 0 54%, transparent 76%);
  mask-image: radial-gradient(circle, #000 0 54%, transparent 76%);
}

.core-sweep {
  position: absolute;
  z-index: 0;
  inset: 1%;
  border-radius: 50%;
  opacity: .18;
  background: conic-gradient(from 0deg, transparent 0 78%, rgba(255, 48, 72, .42) 91%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle, transparent 0 24%, #000 25% 65%, transparent 66%);
  mask-image: radial-gradient(circle, transparent 0 24%, #000 25% 65%, transparent 66%);
  animation: sweep-rotate 8s linear infinite;
}

.orbit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orbit-a {
  inset: 0;
  border: 1px dashed rgba(255, 48, 72, .27);
  animation: orbit-spin 24s linear infinite;
}

.orbit-b {
  inset: 12%;
  border: 1px solid rgba(255, 255, 255, .105);
  animation: orbit-spin-reverse 17s linear infinite;
}

.orbit-c {
  inset: 25%;
  border: 1px solid rgba(255, 48, 72, .5);
  box-shadow:
    inset 0 0 25px rgba(255, 48, 72, .09),
    0 0 28px rgba(255, 48, 72, .08);
  animation: orbit-breathe 4.2s ease-in-out infinite;
}

.orbit-d {
  inset: 35%;
  border: 1px dashed rgba(255, 255, 255, .15);
  animation: orbit-spin 9s linear infinite;
}

.orbit-a::before,
.orbit-a::after,
.orbit-b::before,
.orbit-b::after {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 4px var(--accent), 0 0 14px rgba(255, 48, 72, .68);
  content: "";
}

.orbit-a::before {
  top: 11%;
  right: 14%;
}

.orbit-a::after {
  bottom: 2%;
  left: 41%;
  width: 3px;
  height: 3px;
  opacity: .72;
}

.orbit-b::before {
  top: 47%;
  right: -3px;
  width: 4px;
  height: 4px;
  background: #dcd9dc;
  box-shadow: 0 0 10px rgba(255, 255, 255, .6);
}

.orbit-b::after {
  bottom: 7%;
  left: 28%;
}

.core-glow {
  position: absolute;
  z-index: 0;
  inset: 32%;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(25px);
  opacity: .18;
  animation: core-breathe 3.2s ease-in-out infinite;
}

.core-aperture {
  position: absolute;
  z-index: 1;
  inset: 34%;
  clip-path: polygon(50% 0, 91% 24%, 91% 76%, 50% 100%, 9% 76%, 9% 24%);
  background:
    linear-gradient(145deg, rgba(255, 97, 115, .2), transparent 50%),
    #101015;
  box-shadow: inset 0 0 0 1px rgba(255, 48, 72, .55);
}

.core-aperture::before {
  position: absolute;
  inset: 4px;
  clip-path: inherit;
  border: 1px solid rgba(255, 255, 255, .065);
  background: radial-gradient(circle, rgba(255, 48, 72, .11), transparent 65%);
  content: "";
}

.core-letter {
  position: relative;
  z-index: 2;
  color: #ff7786;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.1vw, 39px);
  font-weight: 800;
  line-height: 1;
  text-shadow:
    0 0 12px rgba(255, 48, 72, .72),
    0 0 34px rgba(255, 48, 72, .48);
}

.tick {
  position: absolute;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
  transform-origin: right center;
}

.tick::after {
  position: absolute;
  top: -1px;
  right: 0;
  width: 3px;
  height: 3px;
  background: var(--accent);
  content: "";
}

.tick-one {
  top: 34%;
  left: -3px;
  transform: rotate(12deg);
}

.tick-two {
  right: -2px;
  bottom: 33%;
  transform: rotate(168deg);
}

.tick-three {
  bottom: 12%;
  left: 8%;
  transform: rotate(-25deg);
}

.core-node {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #a7a3a8;
  box-shadow: 0 0 8px rgba(255, 255, 255, .52);
}

.node-one {
  top: 5%;
  left: 46%;
}

.node-two {
  right: 6%;
  bottom: 23%;
}

.node-three {
  bottom: 27%;
  left: 3%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.core-caption {
  display: grid;
  gap: 8px;
  margin-bottom: 33px;
  text-align: center;
}

.core-caption > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.core-caption > div > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px rgba(85, 217, 152, .55);
}

.core-caption span {
  color: #e2dee1;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .19em;
}

.core-caption small {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .11em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.core-caption::after {
  height: 10px;
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 0;
  letter-spacing: .14em;
  line-height: 10px;
  content: "";
  opacity: 0;
  transition: opacity .2s ease, font-size .2s ease;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: auto;
}

.telemetry-grid article {
  position: relative;
  min-height: 88px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .022), transparent 52%),
    var(--panel);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .12);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.telemetry-grid article::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 13px;
  height: 13px;
  border-top: 1px solid rgba(255, 48, 72, .28);
  border-right: 1px solid rgba(255, 48, 72, .28);
  content: "";
}

.telemetry-grid article:hover {
  border-color: rgba(255, 48, 72, .18);
  background:
    linear-gradient(135deg, rgba(255, 48, 72, .04), transparent 52%),
    var(--panel);
  transform: translateY(-1px);
}

.telemetry-grid header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.telemetry-grid span {
  color: #5e5b63;
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .14em;
}

.telemetry-grid header small {
  color: #36343a;
  font-family: var(--font-mono);
  font-size: 6px;
}

.telemetry-grid strong {
  display: block;
  margin: 10px 0 12px;
  color: #c9c5ca;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.telemetry-grid article > i {
  display: block;
  height: 2px;
  overflow: hidden;
  background: #27252b;
}

.telemetry-grid article > i > b {
  display: block;
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-bright));
  box-shadow: 0 0 8px rgba(255, 48, 72, .62);
  transition: width .6s ease;
}

.message-stage {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
}

.channel-axis {
  position: absolute;
  z-index: 0;
  top: 12px;
  bottom: 16px;
  left: 16px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(255, 48, 72, .24), rgba(255, 255, 255, .035) 18%, rgba(255, 255, 255, .035) 82%, transparent);
  pointer-events: none;
}

.messages {
  position: relative;
  z-index: 1;
  min-height: 280px;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 10px 26px 0;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.messages:empty::before {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #39373d;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .16em;
  content: "CHANNEL STANDBY";
  transform: translate(-50%, -50%);
}

.message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 13px;
  margin: 0 0 25px;
  animation: message-in .34s ease both;
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.message-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-red);
  background:
    linear-gradient(145deg, rgba(255, 48, 72, .12), rgba(255, 48, 72, .035)),
    #0c0c0f;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
  color: var(--accent-bright);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
}

.message-avatar::after {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 5px;
  height: 5px;
  border: 2px solid #08080b;
  border-radius: 50%;
  background: var(--good);
  content: "";
}

.message-body {
  min-width: 0;
  max-width: min(760px, 96%);
}

.message.user .message-avatar {
  grid-column: 2;
  border-color: #36343b;
  background: linear-gradient(145deg, #24232a, #141419);
  color: #949198;
}

.message.user .message-avatar::after {
  background: #69666e;
}

.message.user .message-body {
  grid-row: 1;
  grid-column: 1;
  justify-self: end;
  text-align: right;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  color: #56545b;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .1em;
}

.message-meta::before {
  width: 12px;
  height: 1px;
  background: rgba(255, 48, 72, .45);
  content: "";
}

.message-meta strong {
  color: #b2afb4;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .15em;
}

.message-meta span {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: #48464d;
}

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

.message.user .message-meta::before {
  order: 4;
  background: #4b4950;
}

.message p {
  max-width: 100%;
  margin: 0;
  color: #cfcbcf;
  font-size: 13px;
  line-height: 1.72;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message.assistant p {
  padding: 2px 13px 2px 0;
}

.message.user p {
  display: inline-block;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, .065);
  border-right: 2px solid #4a474f;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .022), transparent),
    #121217;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
  color: #bbb7bc;
  text-align: left;
}

.message.degraded p {
  padding-left: 13px;
  border-left: 2px solid var(--warn);
  background: linear-gradient(90deg, rgba(244, 181, 75, .04), transparent 45%);
}

.message-detail {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(244, 181, 75, .14);
  background: rgba(244, 181, 75, .035);
  color: #8c7654;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .08em;
}

.message-detail::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--warn);
  content: "";
}

.message-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .055);
  color: #77747b;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.45;
}

.message-sources::before {
  flex: 0 0 100%;
  margin-bottom: 1px;
  color: #59575d;
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .17em;
  content: "QUELLEN";
}

.message-sources > ul,
.message-sources > ol {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.message-sources li {
  min-width: 0;
}

.message-sources a,
.message-sources .message-source,
.message-sources > span {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .075);
  background: rgba(255, 255, 255, .018);
  color: #9a969c;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.message-sources a::before {
  color: var(--accent);
  content: "↗";
}

.message-sources a:hover {
  border-color: var(--line-red);
  background: rgba(255, 48, 72, .045);
  color: #dedadd;
}

.message-sources details {
  flex: 1 1 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .012);
}

.message-sources summary {
  position: relative;
  padding: 8px 31px 8px 10px;
  color: #8b888e;
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .12em;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.message-sources summary::-webkit-details-marker {
  display: none;
}

.message-sources summary::after {
  position: absolute;
  top: 50%;
  right: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  content: "+";
  transform: translateY(-50%);
}

.message-sources details[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  color: #b9b5ba;
}

.message-sources details[open] summary::after {
  content: "−";
}

.message-sources details > :not(summary) {
  margin: 0;
  padding: 9px 10px;
  color: #77747b;
  line-height: 1.55;
}

details.message-sources {
  display: block;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .012);
}

details.message-sources::before {
  display: block;
  margin: 0;
  padding: 9px 10px 7px;
}

details.message-sources > summary {
  border-top: 1px solid rgba(255, 255, 255, .05);
}

details.message-sources > :not(summary) {
  margin: 0;
  padding: 9px 10px;
}

.typing {
  position: relative;
  z-index: 2;
  min-height: 31px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  margin: 0 0 10px 46px;
  padding: 8px 11px;
  border-left: 1px solid rgba(255, 48, 72, .35);
  background: linear-gradient(90deg, rgba(255, 48, 72, .055), transparent);
}

.typing > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 48, 72, .58);
  animation: typing-dot 1s infinite;
}

.typing > span:nth-child(2) {
  animation-delay: .15s;
}

.typing > span:nth-child(3) {
  animation-delay: .3s;
}

.typing small {
  margin-left: 6px;
  color: #5c5960;
  font-family: var(--font-mono);
  font-size: 6px;
  letter-spacing: .13em;
}

.composer {
  position: relative;
  min-height: 68px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 84px;
  align-items: stretch;
  margin-top: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .018), transparent),
    #0d0d11;
  box-shadow: var(--shadow-soft);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.composer::before {
  position: absolute;
  z-index: 2;
  top: -1px;
  left: -1px;
  width: 18px;
  height: 1px;
  background: var(--accent);
  content: "";
}

.composer:focus-within {
  border-color: rgba(255, 48, 72, .44);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, .34),
    0 0 0 1px rgba(255, 48, 72, .035),
    inset 0 0 34px rgba(255, 48, 72, .025);
  transform: translateY(-1px);
}

.voice-button {
  display: grid;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: background .2s ease;
}

.voice-button:hover {
  background: rgba(255, 48, 72, .06);
}

.voice-button.listening {
  background: rgba(255, 48, 72, .12);
  animation: voice-pulse 1.2s infinite;
}

.mic-icon {
  position: relative;
  width: 12px;
  height: 17px;
  border: 1px solid #77747c;
  border-radius: 8px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.mic-icon::before {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 2px;
  height: 5px;
  background: #77747c;
  content: "";
  transform: translateX(-50%);
}

.mic-icon::after {
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 15px;
  height: 8px;
  border: 1px solid #77747c;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  content: "";
  transform: translateX(-50%);
}

.voice-button:hover .mic-icon,
.voice-button.listening .mic-icon {
  border-color: var(--accent-bright);
  box-shadow: 0 0 12px rgba(255, 48, 72, .24);
}

.composer-input {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.composer textarea {
  width: 100%;
  min-height: 66px;
  max-height: 150px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e3dfe2;
  caret-color: var(--accent-bright);
  padding: 16px 84px 18px 16px;
  font-size: 13px;
  line-height: 1.48;
}

.composer textarea::placeholder {
  color: #555259;
}

.composer-meta {
  position: absolute;
  right: 10px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #454249;
  font-family: var(--font-mono);
  font-size: 6px;
  pointer-events: none;
}

.composer-meta kbd {
  padding: 2px 4px;
  border: 1px solid #343239;
  background: rgba(255, 255, 255, .015);
  color: #68656d;
  font: inherit;
}

.composer-meta em {
  font-style: normal;
}

.send-button {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .14), transparent 34%),
    linear-gradient(135deg, var(--accent-bright), var(--accent) 45%, #cf142b);
  color: #fff;
  cursor: pointer;
  transition: filter .2s ease, box-shadow .2s ease;
}

.send-button::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, .18) 46%, transparent 68%);
  content: "";
  transform: translateX(-130%);
  transition: transform .45s ease;
}

.send-button:hover::before {
  transform: translateX(130%);
}

.send-button:hover {
  box-shadow: inset 0 0 20px rgba(255, 255, 255, .09);
  filter: brightness(1.08);
}

.send-button span,
.send-button i {
  position: relative;
}

.send-button span {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .15em;
}

.send-button i {
  font-family: var(--font-mono);
  font-size: 14px;
  font-style: normal;
  line-height: 1;
}

.send-button:disabled {
  filter: grayscale(.25);
  opacity: .42;
}

.quick-actions {
  display: grid;
  gap: 9px;
}

.quick-actions button {
  position: relative;
  min-height: 65px;
  display: grid;
  grid-template-columns: 39px 1fr;
  grid-template-rows: auto auto;
  column-gap: 11px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .022), transparent 55%),
    var(--panel);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.quick-actions button::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 0;
  background: var(--accent);
  content: "";
  transition: height .22s ease;
}

.quick-actions button::after {
  position: absolute;
  top: -31px;
  right: -31px;
  width: 61px;
  height: 61px;
  border: 1px solid transparent;
  border-left-color: rgba(255, 48, 72, .18);
  content: "";
  transform: rotate(45deg);
}

.quick-actions button:hover {
  border-color: rgba(255, 48, 72, .25);
  background:
    linear-gradient(135deg, rgba(255, 48, 72, .055), transparent 58%),
    var(--panel);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
  transform: translateX(-2px);
}

.quick-actions button:hover::before {
  height: 100%;
}

.quick-actions button > span {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  display: grid;
  align-self: center;
  place-items: center;
  border: 1px solid rgba(255, 48, 72, .29);
  background: rgba(255, 48, 72, .025);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7px;
}

.quick-actions strong {
  align-self: end;
  color: #c0bcc1;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .025em;
}

.quick-actions small {
  align-self: start;
  margin-top: 3px;
  color: #5d5a61;
  font-size: 8px;
}

.module-panel {
  margin-top: 27px;
  padding: 17px 14px 6px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 46%),
    rgba(13, 13, 16, .62);
}

.module-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 11px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  color: #656269;
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .15em;
}

.module-header small {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 6px;
}

.module-row {
  min-height: 33px;
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.module-row:last-child {
  border-bottom: 0;
}

.module-row > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
}

.module-row > i.online {
  background: var(--good);
  box-shadow: 0 0 8px rgba(85, 217, 152, .66);
}

.module-row > i.standby {
  background: var(--warn);
  box-shadow: 0 0 7px rgba(244, 181, 75, .35);
}

.module-row span,
.module-row b {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .08em;
}

.module-row span {
  color: #7a777e;
}

.module-row b {
  color: #56535a;
  font-weight: 500;
}

.security-note {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid rgba(255, 48, 72, .1);
  border-left: 2px solid var(--accent-deep);
  background:
    linear-gradient(90deg, rgba(255, 48, 72, .04), transparent),
    rgba(255, 48, 72, .012);
}

.security-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 48, 72, .2);
  color: rgba(255, 97, 115, .7);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
}

.security-note span {
  color: #858188;
  font-family: var(--font-display);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: .15em;
}

.security-note p {
  margin: 6px 0 0;
  color: #5b585f;
  font-size: 8px;
  line-height: 1.55;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(132, 7, 26, .09), transparent 34rem),
    rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(510px, 100%);
  padding: 25px;
  border: 1px solid var(--line-red);
  background:
    linear-gradient(145deg, rgba(255, 48, 72, .025), transparent 34%),
    #0c0c0f;
  box-shadow: var(--shadow), 0 0 90px rgba(255, 48, 72, .07);
  animation: modal-in .22s ease both;
}

.modal-card::before,
.modal-card::after {
  position: absolute;
  width: 32px;
  height: 32px;
  content: "";
  pointer-events: none;
}

.modal-card::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--accent-bright);
  border-left: 1px solid var(--accent-bright);
}

.modal-card::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--accent-bright);
  border-bottom: 1px solid var(--accent-bright);
}

.modal-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-card header small {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .17em;
}

.modal-card h2 {
  margin: 7px 0 0;
  color: #eeeaec;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -.015em;
}

.modal-card header p {
  margin: 7px 0 0;
  color: #66636a;
  font-size: 9px;
  line-height: 1.5;
}

.modal-card > label:not(.toggle-row) {
  display: grid;
  gap: 8px;
  margin: 0 0 15px;
  color: #7d7981;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .1em;
}

.modal-card input[type="url"],
.modal-card input[type="password"] {
  width: 100%;
  min-height: 43px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  outline: 0;
  background: #08080a;
  color: #dedade;
  font-family: var(--font-mono);
  font-size: 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.modal-card input[type="url"]:focus,
.modal-card input[type="password"]:focus {
  border-color: var(--line-red);
  box-shadow: inset 3px 0 0 rgba(255, 48, 72, .4);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 20px 0 15px;
}

.toggle-row > span {
  display: grid;
  gap: 4px;
}

.toggle-row strong {
  color: #bdb9be;
  font-size: 10px;
}

.toggle-row small {
  color: #5d5a61;
  font-size: 8px;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
}

.toggle-row > i {
  position: relative;
  width: 39px;
  height: 21px;
  flex: 0 0 39px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: #27262c;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.toggle-row > i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #77747c;
  content: "";
  transition: left .2s ease, background .2s ease, box-shadow .2s ease;
}

.toggle-row input:focus-visible + i {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.toggle-row input:checked + i {
  border-color: rgba(255, 48, 72, .2);
  background: rgba(255, 48, 72, .26);
}

.toggle-row input:checked + i::after {
  left: 21px;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent);
}

.modal-hint {
  margin: 18px 0 0;
  padding: 11px 12px;
  border-left: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .012);
  color: #5e5b62;
  font-size: 8px;
  line-height: 1.6;
}

.modal-card footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.form-error {
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 48, 72, .27);
  background: rgba(255, 48, 72, .065);
  color: #e4959f;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  z-index: 120;
  bottom: 28px;
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 11px 15px;
  border: 1px solid var(--line-red);
  background: rgba(13, 13, 16, .96);
  box-shadow: var(--shadow);
  color: #cbc7cb;
  font-size: 9px;
  letter-spacing: .05em;
  text-align: center;
  transform: translateX(-50%);
  animation: toast-in .2s ease both;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  margin: -1px;
  white-space: nowrap;
}

body.ai-thinking .core-visual {
  filter:
    drop-shadow(0 0 18px rgba(255, 48, 72, .2))
    drop-shadow(0 18px 36px rgba(0, 0, 0, .4));
}

body.ai-thinking .core-visual::after {
  animation: thinking-ring 1.45s ease-in-out infinite;
}

body.ai-thinking .core-sweep {
  opacity: .62;
  animation-duration: 1.75s;
}

body.ai-thinking .orbit-a {
  border-color: rgba(255, 48, 72, .54);
  animation-duration: 8s;
}

body.ai-thinking .orbit-b {
  border-color: rgba(255, 255, 255, .2);
  animation-duration: 5.5s;
}

body.ai-thinking .orbit-c {
  border-color: rgba(255, 97, 115, .8);
  animation: thinking-core 1.35s ease-in-out infinite;
}

body.ai-thinking .orbit-d {
  animation-duration: 3.2s;
}

body.ai-thinking .core-glow {
  opacity: .42;
  animation-duration: 1.2s;
}

body.ai-thinking .core-letter {
  animation: thinking-letter 1.1s ease-in-out infinite;
}

body.ai-thinking .core-caption > div > i {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: status-pulse .9s ease-in-out infinite;
}

body.ai-thinking .core-caption::after {
  font-size: 6px;
  content: "NEURAL INFERENCE ACTIVE";
  opacity: 1;
}

body.ai-thinking .chat-column {
  box-shadow: inset 0 1px 0 rgba(255, 48, 72, .13);
}

body.ai-thinking .message-stage {
  border-bottom-color: rgba(255, 48, 72, .13);
}

body.ai-thinking .composer {
  border-color: rgba(255, 48, 72, .2);
}

body.ai-thinking .status-chip.online i {
  animation: status-pulse 1.05s ease-in-out infinite;
}

@keyframes mark-orbit {
  to { transform: rotate(360deg); }
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes orbit-spin-reverse {
  to { transform: rotate(-360deg); }
}

@keyframes sweep-rotate {
  to { transform: rotate(360deg); }
}

@keyframes orbit-breathe {
  50% {
    border-color: rgba(255, 48, 72, .72);
    box-shadow:
      inset 0 0 30px rgba(255, 48, 72, .13),
      0 0 34px rgba(255, 48, 72, .13);
    transform: scale(1.025);
  }
}

@keyframes core-breathe {
  50% {
    opacity: .34;
    transform: scale(1.16);
  }
}

@keyframes typing-dot {
  0%,
  70%,
  100% {
    opacity: .3;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

@keyframes voice-pulse {
  50% {
    box-shadow: inset 0 0 24px rgba(255, 48, 72, .24);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.992);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}

@keyframes thinking-ring {
  0%,
  100% {
    border-color: rgba(255, 48, 72, .09);
    box-shadow: 0 0 0 0 rgba(255, 48, 72, .12);
    transform: scale(.98);
  }
  50% {
    border-color: rgba(255, 48, 72, .38);
    box-shadow: 0 0 0 12px rgba(255, 48, 72, 0);
    transform: scale(1.035);
  }
}

@keyframes thinking-core {
  0%,
  100% {
    box-shadow:
      inset 0 0 22px rgba(255, 48, 72, .11),
      0 0 20px rgba(255, 48, 72, .12);
    transform: scale(.98);
  }
  50% {
    box-shadow:
      inset 0 0 32px rgba(255, 48, 72, .22),
      0 0 42px rgba(255, 48, 72, .28);
    transform: scale(1.05);
  }
}

@keyframes thinking-letter {
  50% {
    color: #fff;
    text-shadow:
      0 0 9px rgba(255, 255, 255, .75),
      0 0 20px rgba(255, 48, 72, .9),
      0 0 48px rgba(255, 48, 72, .62);
    transform: scale(1.08);
  }
}

@keyframes status-pulse {
  50% {
    box-shadow: 0 0 0 6px rgba(255, 48, 72, 0), 0 0 15px rgba(255, 48, 72, .72);
    transform: scale(1.12);
  }
}

@media (min-width: 1540px) {
  :root {
    --sidebar: 202px;
  }

  .workspace {
    grid-template-columns: minmax(285px, 19vw) minmax(520px, 1fr) minmax(300px, 19vw);
  }

  .core-column,
  .chat-column,
  .control-column {
    padding: 28px;
  }

  .core-visual {
    width: min(17vw, 250px);
  }

  .message p {
    font-size: 13.5px;
  }
}

@media (max-width: 1260px) {
  :root {
    --sidebar: 154px;
  }

  .workspace {
    grid-template-columns: minmax(228px, .72fr) minmax(420px, 1.6fr);
  }

  .chat-column {
    height: auto;
    min-height: calc(100vh - var(--topbar));
    min-height: calc(100svh - var(--topbar));
  }

  .control-column {
    grid-column: 1 / 3;
    display: grid;
    grid-template-columns: 1.35fr 1fr .9fr;
    gap: 18px;
    align-items: start;
  }

  .control-column > .section-label {
    grid-column: 1 / 4;
    margin-bottom: 0;
  }

  .module-panel,
  .security-note {
    margin-top: 0;
  }

  .quick-actions {
    grid-template-columns: 1fr 1fr;
  }

  .security-note {
    grid-template-columns: 30px 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar: 68px;
    --sidebar: 0px;
  }

  .topbar {
    height: var(--topbar);
    padding: 0 14px;
  }

  .identity small,
  .clock-block {
    display: none;
  }

  .sidebar {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 62px;
    display: block;
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    border: 0;
    border-top: 1px solid var(--line);
    background: rgba(7, 7, 9, .94);
  }

  .sidebar::after,
  .sidebar-footer {
    display: none;
  }

  .sidebar nav {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .nav-item {
    min-height: 48px;
    grid-template-columns: auto auto;
    justify-content: center;
    padding: 7px;
    text-align: center;
  }

  .nav-item::before {
    top: auto;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    transition: width .2s ease;
  }

  .nav-item.active::before {
    width: 38%;
    height: 2px;
  }

  .nav-item:hover {
    transform: none;
  }

  .nav-copy {
    display: block;
  }

  .nav-copy small {
    display: none;
  }

  .workspace {
    margin-left: 0;
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
  }

  .core-column,
  .chat-column,
  .control-column {
    grid-column: 1;
    padding: 20px;
  }

  .chat-column {
    order: 1;
    min-height: calc(100vh - var(--topbar) - 62px);
    min-height: calc(100svh - var(--topbar) - 62px);
  }

  .core-column {
    order: 2;
    display: grid;
    grid-template-columns: minmax(180px, .7fr) minmax(260px, 1fr);
    gap: 16px 24px;
    align-items: center;
  }

  .core-column > .section-label {
    grid-column: 1 / 3;
  }

  .core-visual {
    width: 190px;
    min-width: 190px;
    margin: 12px auto;
  }

  .core-caption {
    margin: 0;
    text-align: left;
  }

  .core-caption > div {
    justify-content: flex-start;
  }

  .telemetry-grid {
    grid-column: 1 / 3;
    margin-top: 8px;
  }

  .control-column {
    order: 3;
    grid-template-columns: 1fr 1fr;
  }

  .control-column > .section-label {
    grid-column: 1 / 3;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .security-note {
    grid-column: 1 / 3;
  }

  .messages {
    min-height: 360px;
  }
}

@media (max-width: 610px) {
  .topbar {
    gap: 10px;
  }

  .identity {
    gap: 10px;
  }

  .mark {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  .identity strong {
    font-size: 13px;
    letter-spacing: .24em;
  }

  .topbar-status {
    gap: 5px;
  }

  .topbar-status .ghost-button {
    display: none;
  }

  .status-chip {
    min-width: 34px;
    min-height: 34px;
    justify-content: center;
    padding: 7px;
  }

  .status-chip span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .nav-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .nav-index {
    display: none;
  }

  .nav-copy strong {
    font-size: 8px;
  }

  .core-column,
  .chat-column,
  .control-column {
    padding: 16px;
  }

  .section-label {
    margin-bottom: 15px;
  }

  .section-label > span {
    font-size: 7px;
    letter-spacing: .16em;
  }

  .section-label > span small {
    display: none;
  }

  .section-label > b {
    max-width: 42%;
    overflow: hidden;
    font-size: 6px;
    text-overflow: ellipsis;
  }

  .chat-column {
    min-height: calc(100svh - var(--topbar) - 62px);
  }

  .messages {
    min-height: 340px;
    padding-top: 12px;
  }

  .channel-axis {
    left: 14px;
  }

  .message {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 22px;
  }

  .message.user {
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  .message-avatar {
    width: 30px;
    height: 30px;
  }

  .message-body {
    max-width: 100%;
  }

  .message p {
    font-size: 12.5px;
    line-height: 1.65;
  }

  .message.user p {
    padding: 10px 12px;
  }

  .message-meta {
    flex-wrap: wrap;
    gap: 6px;
  }

  .typing {
    margin-left: 40px;
  }

  .composer {
    min-height: 64px;
    grid-template-columns: 46px minmax(0, 1fr) 64px;
    margin-top: 12px;
  }

  .composer textarea {
    min-height: 62px;
    padding: 15px 12px;
    font-size: 12px;
  }

  .composer-meta {
    display: none;
  }

  .send-button span {
    font-size: 7px;
  }

  .core-column {
    grid-template-columns: 1fr;
  }

  .core-column > .section-label,
  .telemetry-grid {
    grid-column: 1;
  }

  .core-visual {
    width: 184px;
    min-width: 184px;
    margin: 14px auto 10px;
  }

  .core-caption {
    margin-bottom: 12px;
    text-align: center;
  }

  .core-caption > div {
    justify-content: center;
  }

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

  .control-column > .section-label,
  .security-note {
    grid-column: 1;
  }

  .modal-card {
    padding: 19px;
  }

  .modal-card h2 {
    font-size: 20px;
  }

  .modal-card footer {
    flex-direction: column-reverse;
  }

  .modal-card footer button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .identity strong {
    font-size: 12px;
    letter-spacing: .18em;
  }

  .mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .telemetry-grid {
    gap: 7px;
  }

  .telemetry-grid article {
    padding: 11px;
  }

  .message-meta span {
    display: none;
  }

  .typing small {
    display: none;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  .core-visual {
    width: 172px;
    min-width: 172px;
    margin: 20px auto 18px;
  }

  .core-caption {
    margin-bottom: 22px;
  }

  .telemetry-grid article {
    min-height: 78px;
  }
}

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

  .composer,
  .nav-item,
  .quick-actions button {
    transition: none;
  }
}
