:root {
  --ink: #203d36;
  --muted: #697c75;
  --green: #164e40;
  --line: #e1e6de;
  --paper: #fafbf7;
  --lime: #d6ee93;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f3f5ee;
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
summary,
select {
  touch-action: manipulation;
}
button,
summary {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 9px 13px;
}
button:hover {
  background: #edf3e4;
  border-color: #9cae94;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 3px solid #87ac42;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  z-index: 10;
  padding: 14px;
  background: white;
}
.skip-link:focus {
  top: 8px;
}
.studio {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: #123d35;
  color: #ecf1dc;
  padding: 34px 23px;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font:
    700 28px ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: -1px;
}
.brand-ai {
  color: #d9ef9a;
}
.brand small {
  display: block;
  font:
    8px ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 2px;
  color: #b2c7b8;
  margin-top: 5px;
}
.brand-mark {
  border: 1px solid #8ca995;
  border-radius: 12px;
  width: 40px;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 32px;
}
.brand-mark span {
  position: absolute;
  right: -5px;
  top: -10px;
  font-size: 21px;
  color: var(--lime);
}
.sidebar-section {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: #94b1a0;
  margin: 53px 12px 15px;
}
.nav-item {
  display: flex;
  gap: 11px;
  padding: 13px 10px;
  margin-bottom: 7px;
  font-size: 12px;
  border-radius: 7px;
  color: #bed0c2;
}
.nav-item.active {
  background: #2c5144;
  color: #edfacd;
}
.nav-item > span:first-child {
  font-size: 17px;
  line-height: 15px;
}
.nav-dot {
  width: 5px;
  height: 5px;
  background: var(--lime);
  border-radius: 50%;
  margin: auto 0 auto auto;
}
.sidebar-card {
  border: 1px solid #456353;
  border-radius: 12px;
  padding: 19px 15px;
  margin-top: 54px;
  background: linear-gradient(140deg, #214b3d, #143c32);
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  font-weight: 700;
}
.sidebar-card .eyebrow {
  font-size: 8px;
  color: #c8df9f;
}
.sidebar-card h2 {
  font:
    500 24px/1.3 ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: -0.7px;
  margin: 17px 0 11px;
}
.sidebar-card p {
  font-size: 11px;
  line-height: 1.9;
  color: #b8c9bb;
}
.language-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.language-tags span {
  font-size: 9px;
  padding: 5px 7px;
  border: 1px solid #526e54;
  border-radius: 4px;
  color: #d6e6b9;
}
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 50px;
  font-size: 11px;
  color: #d6dfce;
}
.sidebar-bottom small {
  display: block;
  font-size: 9px;
  color: #91b0a0;
  margin-top: 5px;
}
.tiny-orbit {
  font-size: 27px;
  color: #cce4a0;
}
.workspace {
  padding: 0 34px;
  min-width: 0;
}
.topbar {
  height: 75px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dce2d7;
  font-size: 11px;
}
.breadcrumb {
  color: #7a877c;
  display: flex;
  gap: 13px;
}
.breadcrumb strong {
  font-weight: 500;
  color: #304a3a;
}
.environment {
  font-size: 10px;
  background: #e5ebdc;
  border: 1px solid #d7dfca;
  padding: 6px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.environment > span {
  width: 5px;
  height: 5px;
  background: #647e3f;
  border-radius: 50%;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 25px;
}
.workspace-heading .eyebrow {
  color: #788264;
}
.workspace-heading h1 {
  font:
    600 clamp(23px, 2.25vw, 34px) / 1.25 ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: -1.2px;
  margin: 10px 0;
}
.workspace-heading p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.edition {
  font: 9px var(--mono);
  letter-spacing: 1px;
  color: #79816c;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}
.chat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 247px);
  min-height: 580px;
  overflow: hidden;
  box-shadow: 0 7px 22px #28351e04;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.assistant-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}
.avatar {
  display: grid;
  place-items: center;
  background: #e8eedc;
  color: #42643b;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  font-size: 27px;
}
.chat-header h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
}
.chat-header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
#status {
  font: 9px var(--mono);
  border: 1px solid #d4dfc4;
  padding: 5px 8px;
  border-radius: 5px;
  color: #44643d;
}
#status::before {
  content: "●";
  color: #78965b;
  margin-right: 5px;
}
.messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px;
  scrollbar-width: thin;
}
.welcome {
  text-align: center;
  padding: 24px 8px 10px;
}
.welcome-symbol {
  position: relative;
  width: 87px;
  height: 87px;
  margin: 0 auto 26px;
  border: 1px solid #dfe7d0;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.welcome-symbol::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed #c9d8b9;
  border-radius: 50%;
}
.welcome-symbol::after {
  content: "";
  width: 9px;
  height: 9px;
  background: #abc17e;
  position: absolute;
  right: 0;
  top: 18px;
  border: 4px solid var(--paper);
  box-sizing: content-box;
  border-radius: 50%;
}
.welcome-symbol span {
  font-size: 59px;
  line-height: 1;
  color: #76934f;
  transform: rotate(15deg);
}
.welcome > .eyebrow {
  color: #87906e;
  font-size: 8px;
}
.welcome h2 {
  font:
    500 clamp(27px, 3vw, 41px) / 1.15 ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: -1.6px;
  margin: 13px 0 14px;
}
.welcome p {
  font-size: 12px;
  color: #7b8777;
  line-height: 1.8;
}
.prompt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin: 27px auto 0;
  max-width: 480px;
}
.prompt-grid button {
  position: relative;
  text-align: left;
  padding: 15px 26px 15px 13px;
  background: #f1f4e9;
  border-color: #e3e8d6;
  border-radius: 9px;
}
.prompt-grid span {
  font-weight: 500;
  font-size: 11px;
  display: block;
}
.prompt-grid small {
  display: block;
  font-size: 9px;
  color: #7a876e;
  margin-top: 5px;
}
.prompt-grid b {
  position: absolute;
  right: 12px;
  top: 14px;
  color: #758b55;
  font-weight: 400;
}
.composer-area {
  padding: 14px 19px 13px;
  border-top: 1px solid var(--line);
  background: #fffefa;
}
#chatForm {
  display: flex;
  gap: 6px;
  align-items: center;
  border: 1px solid #d4ddc8;
  background: white;
  border-radius: 10px;
  padding: 7px;
}
#messageInput {
  width: 0;
  flex: 1;
  min-width: 50px;
  border: 0;
  outline-offset: 0;
  padding: 8px;
  background: transparent;
  font-size: 12px;
  color: var(--ink);
}
#messageInput::placeholder {
  color: #8b9686;
}
#micButton {
  font-size: 10px;
  border: 0;
  padding: 9px 7px;
  background: transparent;
  color: #667958;
}
#micButton[aria-pressed="true"] {
  background: #fae6dc;
  color: #a63d29;
}
.send-button {
  background: var(--green);
  color: white;
  font-size: 11px;
  border-color: var(--green);
  white-space: nowrap;
}
.send-button:hover {
  background: #25604c;
  color: white;
}
.send-button span {
  margin-left: 7px;
}
.composer-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 8px;
  color: #8b9382;
  margin: 10px 1px 12px;
}
.voice-settings {
  font-size: 10px;
}
.voice-settings summary {
  font-weight: 600;
  color: #5e7352;
}
.voice-settings summary span {
  font-size: 9px;
  color: #909b86;
  float: right;
  font-weight: 400;
}
.voice-controls {
  padding-top: 12px;
  line-height: 1.6;
}
.voice-options {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.voice-options label {
  display: flex;
  align-items: center;
  gap: 4px;
}
.voice-options input {
  accent-color: var(--green);
}
select {
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 5px;
  border-radius: 5px;
  background: white;
  color: var(--ink);
}
.audio-actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}
.audio-actions button {
  font-size: 10px;
  padding: 5px 8px;
}
.voice-controls small,
#voiceStatus {
  color: var(--muted);
  font-size: 10px;
}
audio {
  width: 100%;
  height: 34px;
  margin-top: 8px;
}
.message {
  max-width: 94%;
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 21px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.message::before {
  content: "AASHRAI";
  display: block;
  font: 8px var(--mono);
  letter-spacing: 1.3px;
  color: #7b8b6f;
  margin-bottom: 7px;
}
.message.user {
  margin-left: auto;
  background: #eaf0df;
  padding: 12px 16px;
  border-radius: 12px 12px 2px 12px;
  max-width: 83%;
}
.message.user::before {
  content: "YOU";
  color: #7c8f63;
}
.message.assistant {
  padding: 3px 3px 6px;
}
.message table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: normal;
  display: block;
  overflow-x: auto;
}
.message caption {
  font-weight: 600;
  text-align: left;
}
.message td,
.message th {
  padding: 9px;
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  white-space: pre-wrap;
}
.message details {
  white-space: normal;
  margin-top: 10px;
  font-size: 11px;
}
.message details p {
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
}
.listen-button,
.trace-button {
  font-size: 9px;
  padding: 5px 9px;
  margin: 9px 6px 0 0;
  background: transparent;
  display: inline-block;
}
.trace-button {
  color: #54773b;
}
.inspector {
  background: #fcfdf9;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 23px 21px;
  height: calc(100dvh - 247px);
  min-height: 580px;
  overflow: auto;
  scrollbar-width: thin;
}
.inspector-heading .eyebrow {
  font-size: 8px;
  color: #849174;
  letter-spacing: 1.2px;
}
.inspector h2 {
  font:
    600 21px ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: -0.65px;
  margin: 10px 0;
}
.inspector h2 > span {
  float: right;
  font-size: 19px;
  color: #93a478;
}
.inspector-heading p {
  font-size: 10px;
  color: #8c9581;
  line-height: 1.7;
  margin: 0;
}
.inspector-tabs {
  display: flex;
  background: #edf0e6;
  border-radius: 7px;
  padding: 4px;
  margin: 21px 0 17px;
  gap: 3px;
}
.inspector-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 10px;
  padding: 8px;
}
.inspector-tabs button[aria-pressed="true"] {
  background: #fffefa;
  box-shadow: 0 1px 4px #22331b10;
}
.trace-status {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 11px;
  border: 1px solid #e2e8d8;
  background: #f5f7ef;
  border-radius: 7px;
}
.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8da269;
  flex-shrink: 0;
  margin-top: 5px;
}
.trace-status p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
  color: #718163;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 21px 0 12px;
}
.metrics > div {
  border-right: 1px solid var(--line);
}
.metrics > div:last-child {
  border: 0;
}
.metrics span {
  font-size: 7px;
  letter-spacing: 0.8px;
  color: #8b947e;
  display: block;
}
.metrics strong {
  font:
    500 23px ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: -1px;
  display: block;
  margin-top: 9px;
}
.token-breakdown {
  font: 9px var(--mono);
  color: #7b876d;
  display: flex;
  justify-content: space-between;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.trace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}
.trace-heading h3 {
  font-size: 11px;
  font-weight: 500;
  margin: 0;
}
.trace-heading > span {
  font: 8px var(--mono);
  color: #8b947e;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 17px 0 20px;
}
.timeline-empty {
  border: 1px dashed #d6dfc6;
  border-radius: 9px;
  padding: 20px 14px;
  font-size: 11px;
  color: #849175;
  line-height: 1.8;
  text-align: center;
}
.trace-event {
  position: relative;
  margin-left: 10px;
  padding: 0 0 19px 20px;
  border-left: 1px solid #dbe3d0;
  font-size: 10px;
  line-height: 1.65;
}
.trace-event::before {
  content: attr(data-index);
  position: absolute;
  left: -9px;
  top: 0;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #e7efd9;
  display: grid;
  place-items: center;
  font: 8px var(--mono);
  color: #647d45;
}
.trace-event:last-child {
  border-color: transparent;
  padding-bottom: 0;
}
.trace-event strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
}
.trace-event .event-kind {
  font: 8px var(--mono);
  color: #7a945c;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.trace-event p {
  margin: 4px 0;
  color: #79876e;
  overflow-wrap: anywhere;
}
.trace-event code {
  font: 9px var(--mono);
  color: #48643d;
  overflow-wrap: anywhere;
}
.trace-explanation {
  font-size: 10px;
  line-height: 1.7;
  color: #7a866d;
  border-left: 2px solid #c9db9f;
  padding: 1px 0 1px 11px;
  white-space: pre-wrap;
}
.raw-trace {
  font-size: 10px;
  margin-top: 19px;
}
.raw-trace summary {
  color: #6c8056;
}
.raw-trace pre {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 250px;
  overflow: auto;
  background: #eef2e6;
  padding: 10px;
  font: 9px/1.7 var(--mono);
}
.total-tokens {
  font: 9px/1.8 var(--mono);
  color: #6b7a5b;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 20px;
}
.scope-note {
  font-size: 9px;
  line-height: 1.8;
  color: #8b947e;
}
.inspector-footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 20px;
  font-size: 9px;
  color: #839172;
}
.inspector-footer span {
  color: #99b16e;
  margin-right: 7px;
}
.concept-label {
  font: 7px var(--mono);
  letter-spacing: 0.5px;
  color: #809367;
}
.flow-map {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 17px 0 24px;
}
.flow-map span {
  font: 10px var(--mono);
  border: 1px solid #dce5d0;
  background: #f1f5e9;
  padding: 9px;
  border-radius: 5px;
}
.flow-map i {
  font-style: normal;
  color: #a1b68a;
}
.lesson {
  display: flex;
  gap: 12px;
  margin: 17px 0;
}
.lesson-number {
  font: 9px var(--mono);
  color: #829660;
  padding-top: 3px;
}
.lesson h3 {
  font-size: 11px;
  margin: 0 0 6px;
  font-weight: 600;
}
.lesson p,
.learning-note p,
.voice-lesson p {
  font-size: 10px;
  line-height: 1.8;
  color: #7c896f;
  margin: 0;
}
.learning-note {
  background: #edf2e2;
  border-radius: 9px;
  padding: 13px;
  margin-top: 20px;
}
.learning-note strong {
  font-size: 10px;
  display: block;
  margin-bottom: 7px;
}
.voice-lesson {
  margin-top: 16px;
  font-size: 10px;
}
.voice-lesson p {
  margin-top: 9px;
}
.workspace-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 8px;
  color: #8f9783;
  padding: 16px 0 20px;
  letter-spacing: 0.2px;
}
@media (min-width: 1600px) {
  .workspace {
    max-width: 1530px;
    width: 100%;
    margin: auto;
  }
  .workbench {
    grid-template-columns: minmax(0, 1fr) 370px;
  }
  .welcome {
    padding-top: 55px;
  }
  .prompt-grid {
    margin-top: 38px;
  }
}
@media (max-width: 1200px) {
  .studio {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .sidebar {
    padding: 29px 16px;
  }
  .brand {
    font-size: 24px;
  }
  .brand small {
    font-size: 6px;
  }
  .workspace {
    padding: 0 20px;
  }
  .workbench {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 14px;
  }
  .inspector {
    padding: 20px 16px;
  }
  .edition {
    display: none;
  }
  .chat-header {
    padding: 17px;
  }
  .messages {
    padding: 17px;
  }
  .composer-footer {
    flex-direction: column;
    gap: 4px;
  }
  .welcome {
    padding-top: 17px;
  }
  .welcome-symbol {
    margin-bottom: 18px;
  }
}
@media (max-width: 1000px) {
  .studio {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .workbench {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .workspace-heading {
    padding-top: 22px;
  }
  .chat,
  .inspector {
    height: calc(100dvh - 230px);
  }
}
@media (max-width: 740px) {
  .workspace {
    padding: 0 14px;
  }
  .topbar {
    height: 58px;
  }
  .environment {
    font-size: 9px;
  }
  .workspace-heading h1 {
    font-size: 25px;
    letter-spacing: -0.7px;
  }
  .workspace-heading p {
    font-size: 11px;
  }
  .workbench {
    grid-template-columns: 1fr;
  }
  .chat {
    height: 660px;
    min-height: 560px;
    max-height: calc(100dvh - 120px);
  }
  .inspector {
    height: auto;
    min-height: 0;
  }
  .welcome h2 {
    font-size: 34px;
  }
  .welcome-symbol {
    width: 65px;
    height: 65px;
    margin-bottom: 16px;
  }
  .welcome-symbol span {
    font-size: 43px;
  }
  .welcome {
    padding: 15px 0;
  }
  .prompt-grid {
    margin-top: 20px;
  }
  .workspace-footer {
    font-size: 7px;
  }
  .chat-header h2 {
    font-size: 12px;
  }
  .composer-area {
    padding: 11px;
  }
  .voice-settings summary span {
    font-size: 8px;
  }
  .scope-note {
    max-width: 420px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .message {
    animation: appear 0.2s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.trace-event p {
  white-space: pre-wrap;
}
