:root {
  color-scheme: light;
  --bg: #f5f6f0;
  --paper: #fff;
  --ink: #172921;
  --muted: #55665d;
  --line: #dce4da;
  --forest: #193c31;
  --green: #285745;
  --lime: #d4f38b;
  --mono: ui-monospace,"Cascadia Code",Consolas,monospace;
  font-family: "Segoe UI",system-ui,sans-serif;
  background: var(--bg);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 280px;
}

button,textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .65;
}

button:focus-visible,a:focus-visible,textarea:focus-visible {
  outline: 2px solid #49805f;
  outline-offset: 4px;
}

[hidden],.symbols {
  display: none!important;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.top {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px max(24px,calc((100% - 1120px)/2));
  background: #fbfcf8;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--lime);
  background: var(--forest);
  flex: none;
}

.brand-icon svg {
  width: 25px;
  height: 25px;
}

.brand strong,.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: -.025em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font: 9px var(--mono);
  letter-spacing: .09em;
}

.top-tools,.status,.compose-tools,.compose-tools>div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status {
  font-size: 12px;
  color: var(--muted);
  gap: 7px;
}

.status i,.voice-meta i {
  height: 7px;
  width: 7px;
  flex: none;
  border-radius: 50%;
  background: #a06f1f;
}

.status i.ready {
  background: #2e8356;
}

.quiet {
  border: 1px solid #d6e0d5;
  background: var(--paper);
  border-radius: 10px;
  color: var(--ink);
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quiet:hover {
  background: #eef5e9;
  border-color: #b6cdbb;
}

.top-tools .top-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
}

main {
  width: min(100% - 48px,1120px);
  margin: 34px auto 0;
}

.workspace {
  display: grid;
  grid-template-columns: 1.26fr 1fr;
  border: 1px solid #d4dfd4;
  border-radius: 25px;
  overflow: hidden;
  background: #e9efe5;
  box-shadow: 0 12px 28px #233c2610;
}

.hero {
  padding: 33px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(ellipse at 12% 0%,#f5f8ee,transparent 76%);
}

.eyebrow,.voice-meta,.section-heading span,.compose-label {
  font: 10px var(--mono);
  letter-spacing: .12em;
  font-weight: 700;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
}

.eyebrow span {
  width: 18px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  font-size: clamp(38px,5.25vw,72px);
  line-height: 1;
  letter-spacing: -.072em;
  margin: 16px 0 14px;
  font-weight: 750;
}

.hero em {
  color: var(--green);
  font-style: normal;
}

.hero p {
  color: #40564a;
  line-height: 1.58;
  margin: 0;
  max-width: 420px;
  font-size: 15px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #cedbce;
  border-radius: 7px;
  background: #ffffff75;
  color: #345144;
  font-size: 11px;
  font-weight: 650;
}

.hero-tags svg {
  width: 14px;
  height: 14px;
}

/* Voice agent and chat desk */
.agent-page .top {
  background: #132520;
  color: #f2f5ee;
  border-bottom-color: #33483e;
}

.agent-page .top .quiet {
  background: #1d352d;
  border-color: #40574b;
  color: #f1f5eb;
}

.agent-page .top .quiet:hover {
  background: #2b463a;
}

.agent-page .top .status,
.agent-page .brand small {
  color: #b6c6b9;
}

.agent-page .brand-icon {
  background: #294637;
  border: 1px solid #507059;
}

.agent-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
  align-items: start;
  gap: 24px;
}

.chat-workspace {
  min-width: 0;
}

.desk-label {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 0 1px 11px;
  color: var(--green);
  font: 700 10px var(--mono);
  letter-spacing: .1em;
}

.agent-layout .workspace {
  display: block;
  border-radius: 19px;
}

.agent-layout .hero {
  min-height: 276px;
  background: linear-gradient(115deg, #f4f7ef, #e2ebdd);
}

.agent-layout .hero h1 {
  font-size: clamp(34px, 4.2vw, 61px);
}

.voice-panel {
  --signal: #d4f38b;
  position: sticky;
  top: 20px;
  min-width: 0;
  overflow: hidden;
  padding: 19px;
  color: #eef4eb;
  background: #152c25;
  border: 1px solid #3c584b;
  border-radius: 19px;
  box-shadow: 0 13px 26px #152c2522;
}

.voice-panel[data-phase="listening"] {
  --signal: #abefcd;
}

.voice-panel[data-phase="speaking"] {
  --signal: #e3f69c;
}

.voice-meta,
.voice-footer,
.scope-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.voice-meta {
  color: #d3e2d3;
  padding-bottom: 14px;
}

.voice-meta span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.voice-meta i {
  background: var(--signal);
}

.voice-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px 12px 11px;
  border: 1px solid #426154;
  border-radius: 12px;
  background-color: #10231e;
  background-image: linear-gradient(#91b3a215 1px, transparent 1px),
    linear-gradient(90deg, #91b3a215 1px, transparent 1px);
  background-size: 21px 21px;
}

.voice-reticle {
  display: grid;
  place-items: center;
  width: 63px;
  aspect-ratio: 1;
  color: var(--signal);
  background: #1c392e;
  border: 1px solid #658474;
  border-radius: 17px;
  box-shadow: 0 0 calc(8px + 28px * var(--signal-strength, 0)) #c3f7a759;
}

.voice-reticle svg {
  width: 33px;
  height: 33px;
}

.voice-scope {
  display: block;
  width: 100%;
  height: 78px;
  color: var(--signal);
}

.voice-scope path {
  vector-effect: non-scaling-stroke;
}

.scope-axis {
  stroke: #759e8b80;
  stroke-dasharray: 3 5;
}

#voice-wave {
  stroke-width: 2;
}

.scope-label {
  width: 100%;
  color: #bdd2c4;
  font: 10px var(--mono);
  letter-spacing: .06em;
}

.voice-copy {
  min-height: 94px;
  padding: 15px 0 11px;
}

.voice-copy h2 {
  margin: 0 0 5px;
  font-size: 20px;
  letter-spacing: -.025em;
}

.voice-copy p {
  margin: 0;
  color: #c4d5cb;
  font-size: 13px;
  line-height: 1.45;
}

.voice-trigger,
.voice-next {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 9px;
  min-height: 43px;
  border: 1px solid #daf1a9;
  border-radius: 9px;
  background: #d4f38b;
  color: #192c21;
  font-weight: 700;
  font-size: 13px;
}

.voice-trigger:hover {
  background: #e6fbb8;
}

.voice-trigger:focus-visible,
.voice-next:focus-visible {
  outline-color: #e6fbb8;
}

.voice-trigger[aria-pressed="true"],
.voice-next {
  background: #213d32;
  border-color: #638071;
  color: #eff5ee;
}

.voice-next {
  margin-top: 7px;
}

.voice-trigger[aria-pressed="true"]:hover,
.voice-next:hover {
  background: #2c4e3f;
}

.voice-footer {
  padding-top: 12px;
  margin-top: 14px;
  border-top: 1px solid #456155;
  color: #c7d8cd;
  font: 10px var(--mono);
  letter-spacing: .06em;
}

.suggestions {
  margin: 21px 0 12px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-heading h2 {
  font-size: 17px;
  margin: 0;
  letter-spacing: -.025em;
}

.section-heading span {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}

.card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcf9;
  color: var(--ink);
  transition: background .16s,border-color .16s;
}

.card:hover {
  background: #f0f7e9;
  border-color: #acc8b3;
}

.tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 37px;
  height: 37px;
  border-radius: 9px;
  color: var(--green);
  background: #e6efe4;
}

.tile svg {
  width: 18px;
  height: 18px;
}

.card strong,.card small {
  display: block;
}

.card strong {
  font-size: 14px;
}

.card small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.corner {
  margin-left: auto;
  align-self: flex-start;
  color: var(--green);
}

.composer-wrap {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--bg);
  padding: 9px 0 5px;
}

form {
  border: 1px solid #c5d6c7;
  border-radius: 16px;
  background: var(--paper);
  padding: 13px 15px 11px;
  box-shadow: 0 7px 20px #233c2610;
}

form:focus-within {
  border-color: #739c82;
}

.compose-label {
  color: var(--green);
  display: block;
}

textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  max-height: 160px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 0 4px;
  resize: vertical;
}

textarea:focus-visible {
  outline: none;
}

textarea::placeholder {
  color: #65776c;
}

.compose-tools {
  justify-content: space-between;
}

.compose-tools svg {
  width: 17px;
  height: 17px;
}

.compose-tools>div {
  gap: 7px;
}

.attach {
  font-size: 13px;
}

.send {
  border: 1px solid var(--forest);
  background: var(--forest);
  color: #f7f9ef;
  border-radius: 10px;
  width: 39px;
  height: 37px;
  display: grid;
  place-items: center;
}

.send:hover {
  background: var(--green);
}

.mic[aria-pressed=true] {
  color: #822f20;
  border-color: #da9586;
  background: #fff0eb;
}

.fine,.notice {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin: 8px 0;
}

.notice:empty {
  display: none;
}

.notice {
  color: #704711;
  font-size: 13px;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.file-chip {
  font-size: 12px;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.file-chip img {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 5px;
}

.message {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 16px 19px;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.message.user {
  background: #e6efe3;
  margin-left: min(12%,100px);
}

.message header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.message .answer {
  line-height: 1.65;
}

.message .answer pre {
  white-space: pre-wrap;
}

.message h3,.message h4 {
  margin: 16px 0 4px;
}

.message p {
  margin: 8px 0;
}

.source-link {
  color: var(--green);
  text-underline-offset: .2em;
}

.source-panel {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 10px;
}

.source-panel h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.answer-sources {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
}

.table-wrap {
  overflow-x: auto;
  margin: 12px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

th,td {
  text-align: left;
  border: 1px solid #d1dfd3;
  padding: 8px 12px;
}

th {
  background: #e8f0e5;
}

.flow {
  padding: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  list-style: none;
  counter-reset: step;
}

.flow li {
  background: #edf5e7;
  border: 1px solid #c9dcca;
  padding: 8px 12px;
  border-radius: 8px;
  counter-increment: step;
}

.flow li::before {
  content: counter(step) '. ';
  color: var(--green);
  font-weight: 700;
}

@media (max-width:840px) {
  .hero {
    padding: 26px 24px;
  }
  .hero h1 {
    font-size: clamp(35px,5.8vw,50px);
  }
  .card small {
    font-size: 11px;
  }
}

@media (max-width:650px) {
  .top {
    min-height: 66px;
    padding: 10px 14px;
  }
  main {
    width: calc(100% - 28px);
    margin-top: 15px;
  }
  .workspace {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }
  .hero {
    padding: 20px;
  }
  .hero h1 {
    margin: 10px 0;
    font-size: clamp(34px,9vw,52px);
  }
  .hero p {
    font-size: 13px;
  }
  .hero-tags {
    margin-top: 11px;
  }
  .cards {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .card {
    padding: 8px;
  }
  .suggestions {
    margin-top: 13px;
  }
}

@media (max-width:350px) {
  .brand small {
    display: none;
  }
  .hero h1 {
    font-size: 32px;
  }
  .section-heading span {
    display: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    transition: none!important;
  }
}

.logs-nav {
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
}

.logs-intro {
  padding: 26px;
  border-radius: 18px;
  background: #e9efe5;
  border: 1px solid var(--line);
}

.logs-intro h1 {
  margin: 8px 0;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -.05em;
}

.logs-intro p {
  margin: 0 0 12px;
  color: var(--muted);
}

#logs-connection[data-online="true"] {
  color: var(--green);
}

.logs-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.logs-summary div,
.logs-table-panel {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.logs-summary dt {
  color: var(--muted);
  font-size: 12px;
}

.logs-summary dd {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 700;
}

.logs-table-panel td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.logs-table-panel table {
  min-width: 680px;
}

#logs-empty {
  margin: 16px 0 4px;
  color: var(--muted);
}

.log-state {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 6px;
  background: #edf0ea;
  white-space: nowrap;
  font-size: 12px;
}

.log-state.success {
  background: #e8f4df;
  color: #24533c;
}

.log-state.error {
  background: #fff0ea;
  color: #842d1e;
}

.log-state.running {
  background: #fff4d6;
  color: #755009;
}

@media (max-width: 650px) {
  .logs-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-tools {
    gap: 6px;
  }

  .top-tools .logs-nav {
    padding: 9px 7px;
  }
}


@media (max-width: 800px) {
  .agent-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }

  .voice-panel {
    position: static;
    grid-row: 1;
  }

  .voice-stage {
    padding-top: 12px;
    gap: 7px;
  }

  .voice-reticle {
    width: 43px;
    border-radius: 11px;
  }

  .voice-reticle svg {
    width: 25px;
    height: 25px;
  }

  .voice-scope {
    height: 47px;
  }

  .voice-copy {
    min-height: 0;
  }

  .agent-layout .hero {
    min-height: 0;
  }
}

.brand .brand-emblem {
  display: block;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* JXU chat theme. Shared log styles retain their own palette. */
.agent-page {
  color-scheme: dark;
  --bg: #131710;
  --paper: #1b2118;
  --ink: #f2f0e5;
  --muted: #b5baa8;
  --line: #3e4938;
  --forest: #414d37;
  --green: #c8d8a8;
  --accent: #edc584;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse at 75% 0, #2a3321 0, transparent 46%), var(--bg);
}

.agent-page :is(button, a, textarea):focus-visible {
  outline-color: var(--accent);
}

.agent-page .top {
  background: #131710;
  border-color: var(--line);
}

.agent-page .top .status,
.agent-page .brand small {
  color: var(--muted);
}

.agent-page .top .quiet,
.agent-page .quiet {
  background: #242d20;
  border-color: #4d5944;
  color: var(--ink);
}

.agent-page .top .quiet:hover,
.agent-page .quiet:hover {
  background: #323c2a;
  border-color: #899974;
}

.agent-page .agent-layout {
  width: min(100% - 48px, 1200px);
  grid-template-columns: minmax(0, 1fr) minmax(290px, 352px);
  gap: 22px;
}

.agent-page .desk-label {
  align-items: center;
  color: #c6cbb9;
  padding-bottom: 12px;
}

.agent-page .desk-label span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.agent-page .desk-label i {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

#knowledge-status {
  padding: 5px 8px;
  border: 1px solid #55614b;
  border-radius: 5px;
}

.agent-layout .workspace {
  border-color: #505c43;
  border-radius: 7px;
  border-left: 3px solid var(--accent);
  box-shadow: 0 18px 38px #090d0860;
}

.agent-layout .hero {
  min-height: 265px;
  background:
    radial-gradient(circle at 92% 45%, #b1bd7940 0 2%, transparent 2% 15%, #b1bd7932 15% 15.4%, transparent 15.4% 22%, #b1bd7926 22% 22.4%, transparent 22.4%),
    linear-gradient(#d0dd9512 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, #d0dd9512 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(110deg, #252e1f 28%, #343e28 100%);
}

.agent-page .hero .eyebrow,
.agent-page .hero em {
  color: var(--accent);
}

.agent-page .hero h1 {
  font-size: clamp(33px, 4.2vw, 61px);
}

.agent-page .hero p {
  color: #d0d2bd;
  max-width: 46ch;
}

.agent-page .hero-tags span {
  background: #242b20;
  color: #d7ddc9;
  border-color: #626e52;
}

.agent-page .cards {
  gap: 8px;
}

.agent-page .card {
  align-items: start;
  min-height: 82px;
  border-radius: 7px;
  background: #1b2118;
  border-color: var(--line);
}

.agent-page .card:hover {
  background: #2a3425;
  border-color: #78876a;
}

.agent-page .tile {
  color: var(--accent);
  background: #35402b;
}

.agent-page .composer-wrap {
  background: var(--bg);
}

.agent-page form {
  background: var(--paper);
  border-color: #59664b;
  border-radius: 7px;
}

.agent-page form:focus-within {
  border-color: #aab98d;
}

.agent-page textarea::placeholder {
  color: var(--muted);
}

.agent-page .send,
.agent-page .voice-trigger {
  background: var(--accent);
  border-color: var(--accent);
  color: #25291d;
}

.agent-page .send:hover,
.agent-page .voice-trigger:hover {
  background: #ffe1a2;
}

.agent-page .voice-trigger[aria-pressed="true"],
.agent-page .voice-next {
  background: #343d2b;
  border-color: #859671;
  color: #edf1e1;
}

.agent-page .voice-panel {
  --signal: #c4e994;
  border-radius: 7px;
  background: #1b2118;
  border-color: #4d5944;
  border-top: 2px solid var(--accent);
  box-shadow: 0 14px 30px #090d0860;
}

.agent-page .voice-panel[data-phase="speaking"] {
  --signal: #f4cc76;
}

.agent-page .voice-stage {
  background-color: #131910;
  border-radius: 4px;
  border-color: #536248;
  background-image: linear-gradient(#9eb97925 1px, transparent 1px),
    linear-gradient(90deg, #9eb97925 1px, transparent 1px);
}

.agent-page .voice-reticle {
  color: var(--signal);
  background: #263121;
  border-color: #667d54;
  box-shadow: 0 0 calc(6px + 23px * var(--signal-strength, 0)) #bad99a55;
}

.agent-page :is(.voice-meta, .voice-footer, .scope-label, .voice-copy p) {
  color: #c3ccb5;
}

.agent-page .voice-footer {
  border-color: var(--line);
}

.agent-page .message.user,
.agent-page .flow li {
  background: #293322;
  border-color: #536347;
}

.agent-page th {
  background: #293322;
}

.agent-page :is(th, td) {
  border-color: #536248;
}

.agent-page .notice {
  color: var(--accent);
}

@media (max-width: 800px) {
  .agent-page .agent-layout {
    width: calc(100% - 28px);
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }

  .agent-layout .hero {
    min-height: 0;
  }

  .agent-page .card {
    min-height: 0;
  }
}
