@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");
:root {
  color-scheme: dark;
  --bg: #0d1011;
  --panel: #151a1b;
  --border: #293234;
  --text: #e8efeb;
  --muted: #86918d;
  --lime: #d0efa1;
  --cyan: #86d8d0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px "DM Sans",
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
button:hover {
  filter: brightness(1.2);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
a {
  color: inherit;
}
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--lime);
  font-size: 29px;
}
.brand strong {
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--text);
}
.brand > span {
  font:
    9px "IBM Plex Mono",
    monospace;
  letter-spacing: 2px;
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: 18px;
  margin-left: 8px;
}
.top-status {
  display: flex;
  align-items: center;
  gap: 24px;
  font:
    10px "IBM Plex Mono",
    monospace;
  color: var(--muted);
}
#connection {
  color: var(--lime);
  font-size: 9px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #46573b;
  border-radius: 50%;
  color: var(--lime);
}
.desk {
  max-width: 1900px;
  margin: auto;
  padding: 20px 30px 12px;
  display: grid;
  grid-template-columns: 1fr 1.12fr 1.12fr;
  grid-template-rows:
    62px minmax(195px, 1fr) minmax(155px, 0.8fr) minmax(150px, 0.85fr)
    20px;
  gap: 14px;
  height: calc(100dvh - 64px);
}
.titlebar {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.eyebrow {
  font:
    9px "IBM Plex Mono",
    monospace;
  color: var(--muted);
  letter-spacing: 2px;
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 500;
  margin: 8px 0 0;
}
h1 span {
  color: var(--lime);
}
.primary {
  padding: 13px 18px;
  border-radius: 5px;
  background: var(--lime);
  color: #25331e;
  font-size: 12px;
  font-weight: 600;
}
.primary span {
  margin-left: 20px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 17px;
  gap: 8px;
  font:
    9px "IBM Plex Mono",
    monospace;
  letter-spacing: 1px;
  color: #b1beb7;
  flex-shrink: 0;
}
.panel-head em {
  font:
    8px "IBM Plex Mono",
    monospace;
  color: var(--muted);
  margin-left: 10px;
}
.tag {
  font:
    8px "IBM Plex Mono",
    monospace;
  color: var(--lime);
  border: 1px solid #45553a;
  border-radius: 3px;
  padding: 3px 6px;
  white-space: nowrap;
}
.text-button {
  color: #b0c2b0;
  font:
    9px "IBM Plex Mono",
    monospace;
  white-space: nowrap;
}
.core {
  grid-column: 1;
  grid-row: 2/4;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 30%, #263f342e, transparent 65%),
    var(--panel);
}
.neural {
  position: relative;
  flex: 1;
  min-height: 100px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.orb {
  width: clamp(100px, 10vw, 180px);
  height: clamp(100px, 10vw, 180px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 2;
  background: radial-gradient(
    circle at 35% 25%,
    #cde9c5,
    #5d9680 26%,
    #213f39 60%,
    #111b1c 80%
  );
  box-shadow:
    inset -15px -10px 30px #04110d,
    0 0 70px #7bdbac1c;
  animation: pulse 7s ease-in-out infinite;
}
.orb span {
  color: #dcffb7;
  font-size: clamp(50px, 6vw, 95px);
  text-shadow: 0 0 25px #b4ee88;
}
.ring {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  max-width: 290px;
  border: 1px solid #82b6a22b;
  border-radius: 50%;
  transform: rotateX(60deg) rotate(-25deg);
}
.r2 {
  transform: rotateY(60deg) rotate(30deg);
  border-style: dashed;
}
.r3 {
  width: 82%;
  max-width: 340px;
  border-color: #81b69916;
  transform: none;
}
.crosshair {
  position: absolute;
  background: #6a9c8020;
}
.horizontal {
  width: 90%;
  height: 1px;
}
.vertical {
  height: 90%;
  width: 1px;
}
.core-coordinate {
  position: absolute;
  left: 20px;
  bottom: 20px;
  font:
    8px "IBM Plex Mono",
    monospace;
  color: #657e70;
}
.core-intro {
  padding: 10px 27px 22px;
}
.core-intro h2 {
  font-size: clamp(24px, 2.5vw, 40px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -1px;
  margin: 12px 0;
}
.core-intro p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
}
.engine {
  margin: 0 20px 16px;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
  font:
    10px "IBM Plex Mono",
    monospace;
}
.engine b {
  font-weight: 400;
}
.engine small {
  display: block;
  font-size: 7px;
  color: var(--muted);
  margin-top: 5px;
}
.engine > span:last-child {
  margin-left: auto;
  color: var(--lime);
}
.dot {
  background: var(--lime);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}
.chat {
  grid-column: 2/4;
  grid-row: 3/5;
  display: flex;
  flex-direction: column;
  background: linear-gradient(130deg, #18201e, #151a1b 55%);
}
#messages {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 10px 24px;
  scrollbar-width: thin;
  scrollbar-color: #43544a transparent;
}
.welcome {
  text-align: center;
  padding: 20px 0;
}
.welcome > span {
  font-size: 33px;
  color: var(--lime);
}
.welcome h2 {
  font-size: 23px;
  font-weight: 400;
  margin: 16px 0 8px;
}
.welcome p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}
.message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.8;
  padding-bottom: 20px;
}
.message b {
  display: block;
  color: var(--lime);
  font:
    9px "IBM Plex Mono",
    monospace;
  margin-bottom: 7px;
}
.message.user {
  background: #202926;
  padding: 12px 15px;
  margin: 8px 0 20px;
  border-radius: 6px;
}
.message.user b {
  color: var(--cyan);
}
.suggestions {
  display: flex;
  gap: 8px;
  padding: 8px 20px;
  flex-shrink: 0;
}
.suggestions button {
  font-size: 10px;
  color: #bdcbbf;
  border: 1px solid #39483c;
  border-radius: 20px;
  padding: 7px 12px;
}
#chat-form {
  display: flex;
  align-items: center;
  margin: 0 20px;
  border: 1px solid #4b5d48;
  border-radius: 7px;
  padding: 7px;
  background: #0d1411;
  flex-shrink: 0;
}
textarea {
  resize: none;
  width: 100%;
  background: none;
  color: var(--text);
  border: 0;
  padding: 8px;
  font-size: 12px;
  height: 48px;
}
.send {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  color: #25331e;
  background: var(--lime);
  border-radius: 5px;
  font-size: 24px;
}
.chat-caption {
  display: flex;
  justify-content: space-between;
  font:
    7px "IBM Plex Mono",
    monospace;
  color: #7a8c7f;
  padding: 10px 22px;
}
.market {
  display: flex;
  flex-direction: column;
}
.btc {
  grid-column: 2;
  grid-row: 2;
}
.peso {
  grid-column: 3;
  grid-row: 2;
}
.coin,
.peso-icon {
  font-style: normal;
  color: #dfb483;
  margin-right: 5px;
}
.peso-icon {
  color: var(--cyan);
}
.quote {
  padding: 0 17px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.quote strong {
  font-size: clamp(23px, 2.1vw, 34px);
  font-weight: 500;
  letter-spacing: -1px;
}
.quote > span {
  color: var(--lime);
  font:
    9px "IBM Plex Mono",
    monospace;
}
.quote .negative {
  color: #f0a399;
}
.quote-sub {
  padding: 5px 17px 0;
  color: var(--muted);
  font-size: 10px;
}
.chart-wrap {
  flex: 1;
  min-height: 35px;
  margin: 8px 17px 0;
  position: relative;
}
.chart-wrap svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  background: #111a18ec;
  padding: 5px 8px;
  border: 1px solid #506452;
  border-radius: 4px;
  font:
    9px "IBM Plex Mono",
    monospace;
  pointer-events: none;
  display: none;
  white-space: nowrap;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  font:
    7px "IBM Plex Mono",
    monospace;
  color: var(--muted);
  margin: 6px 17px;
}
.data-source {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font:
    7px "IBM Plex Mono",
    monospace;
  color: var(--muted);
  padding: 8px 17px;
  border-top: 1px solid var(--border);
}
.data-source a {
  color: #a2b3a6;
  text-decoration: none;
}
.market.error .quote-sub {
  color: #eab2a4;
}
.weather {
  grid-column: 1;
  grid-row: 4;
  display: flex;
  flex-direction: column;
}
.weather-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 17px;
  flex: 1;
}
.weather-body strong {
  font-size: 38px;
  font-weight: 400;
  color: var(--lime);
}
#city-form {
  display: flex;
}
#city {
  width: 145px;
  background: none;
  color: var(--text);
  border: 0;
  padding: 0;
  font-size: 16px;
}
#weather-description {
  color: var(--muted);
  font-size: 10px;
  padding-top: 7px;
}
.weather-details {
  display: flex;
  justify-content: space-between;
  padding: 12px 17px;
  font:
    7px "IBM Plex Mono",
    monospace;
  color: var(--muted);
}
.weather-details b {
  color: #c4d2c5;
  font-weight: 400;
  margin-left: 5px;
}
.news {
  grid-column: 1/3;
  grid-row: 5;
  display: none;
}
.activity {
  grid-column: 3;
  grid-row: 5;
  display: none;
}
footer {
  grid-column: 1/-1;
  grid-row: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font:
    7px "IBM Plex Mono",
    monospace;
  letter-spacing: 1px;
  color: #7b887e;
}
footer > div {
  display: flex;
  gap: 20px;
}
.connected {
  color: var(--lime);
}
/* The news and log are switchable drawers; the desk stays within one screen. */
.drawer {
  position: fixed;
  inset: 100px 6vw 55px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: #151b19;
  box-shadow: 0 25px 100px #000b;
}
.drawer .panel-head {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
#articles,
#events {
  overflow: auto;
  padding: 8px 20px;
  min-height: 0;
}
#articles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}
.article {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.article small {
  font:
    9px "IBM Plex Mono",
    monospace;
  color: var(--lime);
}
.article a {
  display: block;
  font-size: 16px;
  line-height: 1.5;
  margin: 8px 0;
  text-decoration: none;
}
.article p,
.article time {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.event {
  padding: 14px 5px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.event small {
  color: var(--muted);
  font:
    9px "IBM Plex Mono",
    monospace;
  margin-left: 15px;
}
.desk-tabs {
  display: flex;
  gap: 6px;
  margin-left: auto;
  margin-right: 24px;
}
.desk-tabs button {
  padding: 7px 10px;
  font:
    10px "IBM Plex Mono",
    monospace;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
}
.desk-tabs button.active {
  color: var(--lime);
  border-color: #576e46;
}
.busy .orb {
  animation: pulse 1.2s infinite;
}
.busy .r3 {
  border-color: #c3efa366;
}
@keyframes pulse {
  50% {
    box-shadow:
      inset -15px -10px 30px #04110d,
      0 0 70px #a3e89540;
    transform: scale(1.04);
  }
}
@media (min-width: 900px) {
  body {
    height: 100dvh;
    overflow: hidden;
  }
}
@media (min-width: 900px) and (max-height: 780px) {
  .topbar {
    height: 52px;
  }
  .desk {
    height: calc(100dvh - 52px);
    padding: 12px 20px 8px;
    grid-template-rows:
      48px minmax(175px, 1fr) minmax(125px, 0.7fr) minmax(115px, 0.7fr)
      16px;
    gap: 10px;
  }
  h1 {
    font-size: 24px;
  }
  .core-intro {
    padding: 5px 22px 12px;
  }
  .core-intro h2 {
    font-size: 28px;
  }
  .core-intro p {
    font-size: 11px;
  }
  .engine {
    margin-bottom: 12px;
  }
  .welcome {
    padding: 5px;
  }
  .welcome h2 {
    font-size: 19px;
    margin: 8px 0;
  }
  .welcome > span {
    font-size: 25px;
  }
  .suggestions {
    padding-top: 4px;
  }
  .panel-head {
    padding: 11px 15px;
  }
  .data-source {
    font-size: 6px;
  }
  .weather-body strong {
    font-size: 30px;
  }
  .weather-details {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}
@media (max-width: 1150px) {
  .brand > span {
    display: none;
  }
  .quote {
    gap: 7px;
  }
  .panel-head em {
    display: none;
  }
  .data-source {
    flex-wrap: wrap;
  }
  .core-intro h2 {
    font-size: 28px;
  }
}
@media (max-width: 899px) {
  .topbar {
    padding: 0 16px;
  }
  .top-status {
    gap: 10px;
  }
  .top-status #connection {
    display: none;
  }
  .desk {
    height: auto;
    padding: 20px 16px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 230px 150px 440px auto;
  }
  .titlebar {
    gap: 10px;
  }
  h1 {
    font-size: 23px;
  }
  .eyebrow {
    font-size: 7px;
  }
  .primary {
    padding: 11px;
    font-size: 10px;
  }
  .core {
    grid-column: 1;
    grid-row: 2/4;
  }
  .btc {
    grid-column: 2;
    grid-row: 2;
  }
  .peso {
    grid-column: 2;
    grid-row: 3;
  }
  .chat {
    grid-column: 1/-1;
    grid-row: 4;
  }
  .weather {
    grid-column: 1/-1;
    grid-row: 5;
    min-height: 145px;
  }
  footer {
    grid-row: 6;
    gap: 14px;
    flex-wrap: wrap;
  }
  .brand {
    gap: 7px;
  }
  .brand strong {
    font-size: 17px;
  }
  .desk-tabs {
    margin-right: 5px;
    gap: 3px;
  }
  .desk-tabs button {
    font-size: 8px;
    padding: 7px;
  }
  .topbar {
    gap: 8px;
  }
  .avatar {
    display: none;
  }
  .drawer {
    inset: 80px 12px 25px;
  }
  #articles {
    grid-template-columns: 1fr;
  }
  .quote strong {
    font-size: 24px;
  }
  .peso .quote-sub {
    display: none;
  }
}
@media (max-width: 520px) {
  .top-status {
    display: none;
  }
  .titlebar {
    align-items: flex-start;
  }
  .primary span {
    display: none;
  }
  .desk {
    gap: 10px;
  }
  .core-intro {
    padding: 10px 15px 18px;
  }
  .core-intro h2 {
    font-size: 26px;
  }
  .core-intro p {
    font-size: 10px;
  }
  .engine {
    margin: 0 12px 16px;
    font-size: 9px;
  }
  .engine small {
    font-size: 6px;
  }
  .panel-head {
    font-size: 8px;
    padding: 12px;
  }
  .market .text-button {
    font-size: 8px;
  }
  .quote {
    padding: 0 12px;
  }
  .quote strong {
    font-size: 22px;
  }
  .quote-sub {
    padding-left: 12px;
    font-size: 9px;
  }
  .data-source {
    padding: 7px 12px;
    font-size: 6px;
  }
  .market .panel-head > span {
    font-size: 7px;
  }
  .core-coordinate {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}
/* Persistent news and activity panels. */
.news {
  display: flex;
  flex-direction: column;
  grid-column: 3;
  grid-row: 3/5;
}
.activity {
  display: flex;
  flex-direction: column;
  grid-column: 1;
  grid-row: 4;
}
.chat {
  grid-column: 2;
  grid-row: 3/5;
}
.core {
  grid-column: 1;
  grid-row: 2;
}
.weather {
  grid-column: 1;
  grid-row: 3;
}
.core-intro {
  padding: 0 18px 8px;
  text-align: center;
}
.core-intro .eyebrow,
.core-intro p {
  display: none;
}
.core-intro h2 {
  font-size: 18px;
  margin: 0;
}
.core-intro h2 br {
  display: none;
}
.engine {
  padding-top: 8px;
  margin: 0 15px 10px;
}
.neural {
  min-height: 45px;
}
.orb {
  width: 85px;
  height: 85px;
}
.orb span {
  font-size: 48px;
}
.ring {
  max-width: 145px;
}
.r3 {
  max-width: 175px;
}
.core-coordinate {
  bottom: 8px;
}
#articles {
  display: block;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 16px;
  scrollbar-width: thin;
}
#events {
  flex: 1;
  min-height: 0;
  padding: 0 15px;
  scrollbar-width: thin;
}
.event {
  padding: 9px 0;
  font-size: 10px;
  line-height: 1.5;
}
.event small {
  display: block;
  margin: 4px 0 0;
  font-size: 8px;
}
.article {
  padding: 13px 0;
}
.article a {
  font-size: 13px;
  margin: 7px 0;
}
.article p {
  font-size: 11px;
  line-height: 1.6;
  margin: 6px 0;
}
.article time {
  font:
    8px "IBM Plex Mono",
    monospace;
}
.article small {
  font-size: 8px;
  color: #e9b19a;
}
.news-notice {
  padding: 0 16px 12px;
  color: #dab49c;
  font:
    9px/1.7 "IBM Plex Mono",
    monospace;
  border-bottom: 1px solid var(--border);
}
.news-notice small {
  color: var(--muted);
  font-size: 8px;
}
.priority-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #e9b19a;
  border-radius: 50%;
  margin-right: 5px;
}
.news .panel-head em {
  display: none;
}
#locate {
  padding: 6px 0 0;
  font-size: 8px;
}
@media (min-width: 900px) {
  .desk {
    grid-template-columns: 0.85fr 1.25fr 1fr;
  }
}
@media (max-width: 899px) {
  .desk {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 220px 190px 420px 380px auto;
  }
  .core {
    grid-column: 1;
    grid-row: 2;
  }
  .btc {
    grid-column: 2;
    grid-row: 2;
  }
  .peso {
    grid-column: 2;
    grid-row: 3;
  }
  .weather {
    grid-column: 1;
    grid-row: 3;
    min-height: 0;
  }
  .chat {
    grid-column: 1/-1;
    grid-row: 4;
  }
  .news {
    grid-column: 1;
    grid-row: 5;
  }
  .activity {
    grid-column: 2;
    grid-row: 5;
  }
  footer {
    grid-row: 6;
  }
}
@media (max-width: 520px) {
  .desk {
    grid-template-rows: auto 210px 190px 420px 400px 200px auto;
  }
  .news {
    grid-column: 1/-1;
    grid-row: 5;
  }
  .activity {
    grid-column: 1/-1;
    grid-row: 6;
  }
  footer {
    grid-row: 7;
  }
  .weather-details {
    flex-wrap: wrap;
    gap: 7px;
  }
  #city {
    width: 100px;
    font-size: 14px;
  }
}
/* Original signal heartbeat: all geometry scales inside its own viewBox. */
.heartbeat-scene {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0 12px;
}
.heartbeat {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 200px;
  overflow: visible;
}
.pulse-shell {
  transform-origin: 210px 90px;
  animation: signal-breathe 5s ease-in-out infinite;
}
.pulse-flow {
  animation: signal-flow 4s linear infinite;
  filter: drop-shadow(0 0 3px #c4ed97);
}
.pulse-center {
  animation: signal-center 4s ease-in-out infinite;
}
.pulse-trace {
  filter: drop-shadow(0 0 4px #abdca955);
}
.busy .pulse-flow {
  animation-duration: 1.1s;
  stroke-dasharray: 18 82;
}
.busy .pulse-shell {
  animation-duration: 1.1s;
}
.busy .pulse-center {
  animation-duration: 1.1s;
}
.core .panel-head,
.core-intro,
.engine {
  flex-shrink: 0;
}
.core-intro h2 {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.2px;
}
.engine {
  padding-top: 8px;
  margin-bottom: 10px;
}
@keyframes signal-flow {
  to {
    stroke-dashoffset: -100;
  }
}
@keyframes signal-breathe {
  50% {
    transform: scale(1.04);
    opacity: 0.6;
  }
}
@keyframes signal-center {
  45%,
  55% {
    opacity: 0.4;
    r: 2;
  }
  50% {
    opacity: 1;
    r: 5;
  }
}
/* Short screens keep each region accessible instead of cropping its contents. */
@media (min-width: 900px) and (max-height: 640px) {
  body {
    overflow: auto;
    height: auto;
  }
  .desk {
    height: auto;
    min-height: 650px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-shell,
  .pulse-flow,
  .pulse-center {
    animation: none !important;
  }
}
/* Expanded intelligence sphere with a compact weather strip. */
.left-stack {
  grid-column: 1;
  grid-row: 2/5;
  display: grid;
  grid-template-rows: minmax(240px, 1fr) 104px minmax(95px, 0.35fr);
  gap: 14px;
  min-height: 0;
}
.left-stack .core,
.left-stack .weather,
.left-stack .activity {
  grid-column: auto;
  grid-row: auto;
}
.sphere-scene {
  flex: 1;
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, #274c3730, transparent 68%);
}
#nexus-sphere {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.sphere-caption {
  position: absolute;
  bottom: 6px;
  left: 15px;
  font:
    6px "IBM Plex Mono",
    monospace;
  letter-spacing: 1.8px;
  color: #7a9b86;
}
.sphere-layer {
  transform-origin: 250px 250px;
  animation: sphere-drift 65s linear infinite;
}
.sphere-layer.reverse {
  animation-direction: reverse;
  animation-duration: 90s;
}
.sphere-nucleus {
  transform-origin: 250px 250px;
  animation: nucleus-beat 3.4s ease-in-out infinite;
}
.busy .sphere-layer {
  animation-duration: 15s;
}
.busy .sphere-nucleus {
  animation-duration: 0.9s;
}
.left-stack .core-intro {
  padding: 3px 15px 7px;
}
.left-stack .engine {
  margin-bottom: 10px;
}
.left-stack .weather {
  position: relative;
}
.left-stack .weather .panel-head {
  padding: 8px 12px 2px;
  font-size: 7px;
}
.left-stack .weather-body {
  padding: 2px 12px;
}
.left-stack .weather-body strong {
  font-size: 27px;
}
.left-stack #city {
  font-size: 13px;
}
.left-stack #weather-description {
  font-size: 9px;
  padding-top: 2px;
}
.left-stack #locate {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 7px;
}
.left-stack .weather-details {
  padding: 5px 12px 8px;
  gap: 12px;
  justify-content: flex-start;
  font-size: 6px;
}
.left-stack .weather-details > span:last-child {
  display: none;
}
.left-stack .activity .panel-head {
  padding: 10px 12px;
  font-size: 8px;
}
@keyframes sphere-drift {
  to {
    transform: rotate(360deg);
  }
}
@keyframes nucleus-beat {
  50% {
    opacity: 0.6;
    transform: scale(0.94);
  }
}
@media (min-width: 900px) {
  .desk {
    grid-template-columns: 1.08fr 1.24fr 1fr;
  }
}
@media (min-width: 900px) and (max-height: 780px) {
  .left-stack {
    grid-template-rows: minmax(220px, 1fr) 94px 95px;
    gap: 10px;
  }
}
@media (max-width: 899px) {
  .desk {
    grid-template-rows: auto 220px 200px 420px 400px auto;
  }
  .left-stack {
    grid-column: 1;
    grid-row: 2/4;
    grid-template-rows: minmax(220px, 1fr) 95px 90px;
    gap: 10px;
  }
  .left-stack .activity .panel-head {
    padding: 7px 10px;
  }
  .left-stack .activity .tag {
    display: none;
  }
}
@media (max-width: 520px) {
  .desk {
    grid-template-rows: auto 245px 235px 420px 400px auto;
  }
  .left-stack {
    grid-template-rows: minmax(235px, 1fr) 108px 110px;
  }
  .left-stack #locate {
    position: static;
  }
  .left-stack .weather-details {
    padding-top: 3px;
  }
  .left-stack .engine {
    font-size: 8px;
  }
  .left-stack .engine small {
    font-size: 5px;
  }
  footer {
    grid-row: 6;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sphere-layer,
  .sphere-nucleus {
    animation: none !important;
  }
}
/* Quiet, lightweight interface: scrolling remains available without scrollbars. */
* {
  scrollbar-width: none !important;
}
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.panel {
  border-color: #28312d;
  border-radius: 12px;
  background: #141a17;
}
.core {
  background: #121914;
}
.sphere-scene {
  background: none;
}
#nexus-sphere {
  overflow: hidden;
}
.nexus-dots {
  animation: dots-breathe 6s ease-in-out infinite;
}
.busy .nexus-dots {
  animation-duration: 1.8s;
}
.page-hidden .nexus-dots {
  animation-play-state: paused;
}
@keyframes dots-breathe {
  50% {
    opacity: 0.58;
  }
}
.awareness-control {
  display: flex;
  align-items: center;
  gap: 14px;
}
#awareness-state {
  font:
    8px "IBM Plex Mono",
    monospace;
  letter-spacing: 0.8px;
  color: #8fa58c;
}
#scan-all {
  padding: 9px 12px;
  border: 1px solid #3a4a38;
  border-radius: 20px;
  color: #c7ddb6;
}
#chat-form {
  border: 1px solid #3b4b3b;
  border-radius: 12px;
  padding: 7px 8px;
  background: #0f1512;
  transition: border-color 0.15s;
}
#chat-form:focus-within {
  border-color: #8eab75;
  box-shadow: 0 0 0 2px #b0d2910c;
}
#prompt,
#prompt:focus,
#prompt:focus-visible {
  outline: none;
  box-shadow: none;
  border: 0;
  background: transparent;
  height: 42px;
  min-height: 0;
}
.send {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 22px;
}
.core-intro h2 {
  font-size: 14px;
  color: #b4c7ad;
}
.engine {
  border-color: #29372d;
}
.engine b {
  font-size: 8px;
  color: #a5b79c;
}
.panel-head {
  letter-spacing: 1.1px;
}
.article a {
  font-weight: 500;
}
@media (max-width: 899px) {
  .awareness-control {
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
  }
  #awareness-state {
    font-size: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nexus-dots {
    animation: none !important;
  }
}
/* A dimensional dot globe with a focused center; only the nucleus animates. */
.nexus-dots {
  animation: none;
}
.sphere-scene {
  background: radial-gradient(ellipse at center, #abc77f08, transparent 62%);
}
.dot-heart {
  transform-origin: 250px 250px;
  animation: heart-settle 5s ease-in-out infinite;
}
.dot-pulse {
  transform-origin: 250px 250px;
  animation: dot-ripple 5s ease-out infinite;
}
.busy .dot-heart,
.busy .dot-pulse {
  animation-duration: 1.5s;
}
.page-hidden .dot-heart,
.page-hidden .dot-pulse {
  animation-play-state: paused;
}
.core .panel-head {
  color: #c5d5bf;
}
.core .tag {
  background: #b6db8510;
  border-color: #516940;
}
.core-intro h2 {
  font-size: 15px;
  letter-spacing: 0.3px;
  color: #d0dfc5;
}
.sphere-caption {
  font-size: 7px;
  letter-spacing: 1.4px;
  color: #8fa685;
}
.left-stack .engine {
  padding-top: 10px;
  margin-left: 16px;
  margin-right: 16px;
}
.engine small {
  color: #83927e;
}
@keyframes heart-settle {
  50% {
    opacity: 0.65;
    transform: scale(0.96);
  }
}
@keyframes dot-ripple {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  25% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: scale(1.65);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dot-heart,
  .dot-pulse {
    animation: none !important;
  }
}
/* Cinematic Nexus hologram. Geometry stays inside a 500-square viewport. */
.sphere-scene {
  background: radial-gradient(ellipse at center, #38533b18, transparent 72%);
}
.sphere-caption {
  display: none;
}
#nexus-sphere {
  padding: 4px;
}
.holo-ring {
  transform-origin: 250px 250px;
  animation: holo-turn 40s linear infinite;
}
.holo-ticks {
  animation-duration: 160s;
}
.band-0 {
  animation-duration: 44s;
}
.band-1 {
  animation-duration: 27s;
  animation-direction: reverse;
}
.band-2 {
  animation-duration: 70s;
}
.band-3 {
  animation-duration: 22s;
  animation-direction: reverse;
}
.holo-cage {
  animation-duration: 90s;
}
.holo-particles {
  animation-duration: 110s;
  animation-direction: reverse;
}
.holo-iris {
  animation-duration: 18s;
}
.holo-sweep {
  animation-duration: 8s;
}
.holo-heart {
  transform-origin: 250px 250px;
  animation: holo-beat 3s ease-in-out infinite;
}
.busy .holo-band {
  animation-duration: 9s;
}
.busy .holo-iris {
  animation-duration: 4s;
}
.busy .holo-sweep {
  animation-duration: 2s;
}
.busy .holo-heart {
  animation-duration: 0.8s;
}
.page-hidden .holo-ring,
.page-hidden .holo-heart {
  animation-play-state: paused;
}
@keyframes holo-turn {
  to {
    transform: rotate(360deg);
  }
}
@keyframes holo-beat {
  50% {
    transform: scale(1.14);
    opacity: 0.65;
  }
}
@media (prefers-reduced-motion: reduce) {
  .holo-ring,
  .holo-heart {
    animation: none !important;
  }
}
/* Refined optical depth and state-driven illumination. */
.core {
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 40%, #203c2d44, transparent 70%), #101813;
  border-color: #354633;
}
.core:before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, #b4e2a508, transparent 40%, #75c6b104);
}
.sphere-scene {
  perspective: 900px;
}
#nexus-sphere {
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.5s ease-out;
  padding: 1px;
}
.holo-cage {
  opacity: 0.22;
}
.holo-filaments {
  animation-duration: 32s;
  animation-direction: reverse;
}
.holo-scan-halo {
  transform-origin: 250px 250px;
  opacity: 0;
  transition: opacity 0.5s;
}
.core[data-mode="scanning"] .holo-scan-halo {
  opacity: 1;
  animation: holo-turn 5s linear infinite;
}
.core[data-mode="scanning"] .holo-heart {
  animation-duration: 1.3s;
}
.core[data-mode="processing"] {
  border-color: #718a55;
}
.core[data-mode="processing"] .sphere-scene {
  background: radial-gradient(ellipse at center, #c0ed9810, transparent 70%);
}
.core[data-mode="standby"] #nexus-sphere {
  opacity: 0.55;
}
.core[data-mode="processing"] .holo-filaments {
  animation-duration: 8s;
}
.core-intro h2 {
  font-size: 16px;
  line-height: 1.3;
  transition: color 0.3s;
}
.left-stack .engine {
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  margin-bottom: 12px;
}
.engine b {
  font:
    8px "IBM Plex Mono",
    monospace;
  letter-spacing: 1px;
  color: #c5d4b8;
}
.engine small {
  font:
    9px/1.5 "DM Sans",
    sans-serif;
  letter-spacing: 0;
  color: #849780;
  margin-top: 4px;
}
.engine > span:last-child {
  font-size: 15px;
  color: #93b880;
}
.core[data-mode="processing"] .engine .dot {
  box-shadow: 0 0 8px #d3f5ac;
}
.page-hidden .holo-scan-halo {
  animation-play-state: paused !important;
}
@media (max-width: 520px) {
  .left-stack .engine small {
    font-size: 8px;
  }
  .core-intro h2 {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #nexus-sphere {
    transform: none !important;
    transition: none;
  }
  .holo-scan-halo {
    animation: none !important;
  }
}
/* Filament sphere inspired by the organic energy reference. */
.core {
  background:
    radial-gradient(ellipse at 50% 43%, #23382422, transparent 68%), #0c130f;
}
.sphere-scene {
  background: none;
}
#nexus-sphere {
  padding: 0;
}
.filament-layer {
  transform-origin: 250px 250px;
  animation: filament-drift 100s linear infinite;
}
.filament-back {
  animation-direction: reverse;
  animation-duration: 140s;
  opacity: 0.65;
}
.filament-inner {
  animation-direction: reverse;
  animation-duration: 48s;
}
.filament-orbit {
  transform-origin: 250px 250px;
  animation: filament-shimmer 5s ease-in-out infinite;
}
.orbit-1 {
  animation-delay: -2.5s;
}
.filament-energy {
  transform-origin: 250px 250px;
  animation: filament-breathe 4s ease-in-out infinite;
}
.filament-sparks {
  animation: filament-shimmer 6s ease-in-out infinite;
}
.core[data-mode="scanning"] .filament-shell {
  animation-duration: 28s;
}
.core[data-mode="processing"] .filament-shell {
  animation-duration: 20s;
}
.core[data-mode="processing"] .filament-inner {
  animation-duration: 12s;
}
.core[data-mode="processing"] .filament-energy {
  animation-duration: 1.1s;
}
.core[data-mode="processing"] .filament-orbit {
  animation-duration: 1.6s;
}
.page-hidden .filament-layer,
.page-hidden .filament-energy,
.page-hidden .filament-orbit,
.page-hidden .filament-sparks {
  animation-play-state: paused;
}
@keyframes filament-drift {
  to {
    transform: rotate(360deg);
  }
}
@keyframes filament-shimmer {
  50% {
    opacity: 0.55;
  }
}
@keyframes filament-breathe {
  50% {
    transform: scale(1.055);
    opacity: 0.65;
  }
}
@media (prefers-reduced-motion: reduce) {
  .filament-layer,
  .filament-energy,
  .filament-orbit,
  .filament-sparks {
    animation: none !important;
  }
}
/* Fixed orientation: source activity changes illumination, never rotation. */
#nexus-sphere {
  transform: none !important;
  transition: opacity 0.6s ease;
}
.core .filament-layer,
.core .filament-orbit,
.core .filament-energy,
.core .filament-sparks {
  animation: none !important;
  transform: none;
}
.core .filament-shell {
  opacity: 0.72;
  transition: opacity 0.5s;
}
.core .filament-inner {
  opacity: 0.75;
  transition: opacity 0.5s;
}
.core .filament-back {
  opacity: 0.4;
}
.core .filament-orbit {
  opacity: 0.6;
  transition: opacity 0.5s;
}
.core .filament-energy {
  opacity: 0.55;
  transition: opacity 0.5s;
}
.core[data-mode="processing"] .filament-shell,
.core[data-mode="scanning"] .filament-shell {
  opacity: 1;
}
.core[data-mode="processing"] .filament-inner,
.core[data-mode="processing"] .filament-energy,
.core[data-mode="scanning"] .filament-energy {
  opacity: 1;
}
.core[data-mode="processing"] .filament-orbit,
.core[data-mode="scanning"] .filament-orbit {
  animation: response-light 2.4s ease-in-out infinite !important;
}
.core[data-mode="processing"] .filament-energy {
  animation: response-light 2.4s ease-in-out infinite !important;
}
@keyframes response-light {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}
.page-hidden .filament-orbit,
.page-hidden .filament-energy {
  animation-play-state: paused !important;
}
@media (prefers-reduced-motion: reduce) {
  .core[data-mode] .filament-orbit,
  .core[data-mode] .filament-energy {
    animation: none !important;
  }
}
/* Centered shell rotation, without crossing orbital bands. */
.core .filament-shell {
  transform-origin: 250px 250px;
  animation: nexus-shell-spin 75s linear infinite !important;
}
.core .filament-back {
  transform-origin: 250px 250px;
  animation: nexus-shell-spin 110s linear infinite reverse !important;
}
.core .filament-inner {
  transform-origin: 250px 250px;
  animation: nexus-shell-spin 95s linear infinite reverse !important;
}
.page-hidden .filament-shell,
.page-hidden .filament-back,
.page-hidden .filament-inner {
  animation-play-state: paused !important;
}
@keyframes nexus-shell-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .core .filament-shell,
  .core .filament-back,
  .core .filament-inner {
    animation: none !important;
  }
}
/* Narrower left column; give the conversation more horizontal space. */
@media (min-width: 900px) {
  .desk {
    grid-template-columns: 0.82fr 1.5fr 1fr;
  }
}
/* Assistant responses: readable Markdown, with tables contained inside chat. */
.message.assistant .message-body {
  white-space: normal;
  line-height: 1.75;
}
.message-body p {
  margin: 0 0 10px;
}
.message-body strong {
  color: #e0ecd7;
  font-weight: 600;
}
.message-body em {
  color: #b7c8b0;
}
.message-body h3,
.message-body h4,
.message-body h5,
.message-body h6 {
  font-size: 14px;
  color: #d4e6c6;
  margin: 16px 0 8px;
}
.message-body ul,
.message-body ol {
  padding-left: 21px;
  margin: 8px 0 14px;
}
.message-body li {
  margin: 5px 0;
}
.message-body a {
  color: var(--cyan);
  text-underline-offset: 3px;
}
.message-body code {
  font:
    11px "IBM Plex Mono",
    monospace;
  padding: 2px 5px;
  border-radius: 4px;
  background: #253126;
  color: #d0e3bf;
}
.message-body pre {
  max-width: 100%;
  overflow: auto;
  background: #0e1511;
  border: 1px solid #2c3a2d;
  padding: 12px;
  border-radius: 6px;
  white-space: pre;
}
.message-body pre code {
  padding: 0;
  background: none;
}
.message-body hr {
  border: 0;
  border-top: 1px solid #334031;
  margin: 16px 0;
}
.message-body blockquote {
  border-left: 2px solid #718c56;
  padding-left: 12px;
  margin: 10px 0;
  color: #a7b99f;
}
.reply-table {
  max-width: 100%;
  overflow-x: auto;
  margin: 12px 0 16px;
  border: 1px solid #35432f;
  border-radius: 7px;
}
.reply-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.6;
}
.reply-table th,
.reply-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #2e3b2c;
  min-width: 100px;
  vertical-align: top;
}
.reply-table th {
  background: #263321;
  color: #d3e7bd;
  font-size: 10px;
  font-weight: 600;
}
.reply-table tr:last-child td {
  border-bottom: 0;
}
.reply-table tbody tr:nth-child(even) {
  background: #b2d58c04;
}
#chat-form {
  margin-top: 8px;
}
