@font-face {
  font-family: "Prana Serif";
  src: url("../vendor/fonts/cormorant-garamond-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Prana Serif";
  src: url("../vendor/fonts/cormorant-garamond-600-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Prana Sans";
  src: url("../vendor/fonts/josefin-sans-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Prana Devanagari";
  src: url("../vendor/fonts/noto-serif-devanagari.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Material Symbols Rounded";
  src: url("../vendor/fonts/material-symbols-rounded.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
}

:root {
  --paper: #f5f0e7;
  --paper-bright: #fbf8f2;
  --paper-deep: #e9dfcf;
  --paper-warm: #efe4d4;
  --ink: #17130f;
  --ink-soft: #665f56;
  --ink-faint: #92887b;
  --night: #080908;
  --night-2: #0f110f;
  --night-3: #151713;
  --cream: #f6f0e5;
  --night-text: rgba(246, 240, 229, 0.68);
  --night-faint: rgba(246, 240, 229, 0.36);
  --line: rgba(23, 19, 15, 0.14);
  --line-soft: rgba(23, 19, 15, 0.08);
  --night-line: rgba(229, 198, 145, 0.15);
  --night-line-strong: rgba(229, 198, 145, 0.3);
  --ember: #b75d35;
  --ember-light: #e4a073;
  --gold: #b68442;
  --gold-light: #e0bf82;
  --teal: #137e73;
  --teal-light: #69c2b6;
  --indigo: #555b91;
  --danger: #a84432;
  --serif: "Prana Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Prana Sans", "Avenir Next", Avenir, Arial, sans-serif;
  --deva: "Prana Devanagari", "Noto Serif Devanagari", serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --rail-width: 270px;
  --rail-collapsed: 80px;
  --evidence-width: 360px;
  --header-height: 72px;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --shadow-large: 0 30px 100px rgba(4, 5, 4, 0.3);
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

html {
  background: var(--night);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 14px/1.55 var(--body);
}

button,
textarea,
input,
a {
  font: inherit;
}

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

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.52;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(183, 93, 53, 0.22);
}

:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

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

.material-symbols {
  font-family: "Material Symbols Rounded";
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 18px;
  top: -80px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--night);
  text-decoration: none;
}

.skip-link:focus {
  top: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--ember);
  font: 600 9px/1.2 var(--sans);
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  transition: color 180ms, border-color 180ms, background 180ms, transform 180ms;
}

.icon-button:hover {
  border-color: rgba(183, 93, 53, 0.38);
  background: rgba(183, 93, 53, 0.06);
  color: var(--ember);
}

.app-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  background: var(--paper);
  transition: grid-template-columns 420ms var(--ease);
}

body.rail-collapsed .app-shell {
  grid-template-columns: var(--rail-collapsed) minmax(0, 1fr);
}

body.evidence-open .app-shell,
.app-shell:has(#evidencePanel:not([hidden])) {
  grid-template-columns: var(--rail-width) minmax(0, 1fr) var(--evidence-width);
}

body.rail-collapsed.evidence-open .app-shell,
body.rail-collapsed .app-shell:has(#evidencePanel:not([hidden])) {
  grid-template-columns: var(--rail-collapsed) minmax(0, 1fr) var(--evidence-width);
}

/* Left rail */
.left-rail {
  position: relative;
  z-index: 40;
  min-width: 0;
  overflow: hidden;
  color: var(--cream);
  border-right: 1px solid var(--night-line);
  background:
    radial-gradient(circle at 18% 8%, rgba(183, 93, 53, 0.17), transparent 24%),
    radial-gradient(circle at 85% 88%, rgba(19, 126, 115, 0.08), transparent 28%),
    linear-gradient(160deg, #0b0b09, #070807 65%);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.left-rail::before {
  content: "";
  position: absolute;
  width: 360px;
  aspect-ratio: 1;
  left: -250px;
  top: 160px;
  border: 1px solid rgba(229, 198, 145, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(229, 198, 145, 0.018), 0 0 0 110px rgba(229, 198, 145, 0.012);
  pointer-events: none;
}

.rail-brand {
  min-height: 78px;
  padding: 14px 14px 8px 18px;
  border-bottom: 1px solid rgba(229, 198, 145, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-lockup {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
}

.brand-glyph {
  position: relative;
  flex: none;
  width: 43px;
  height: 43px;
  border: 1px solid var(--night-line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-light);
  font: 23px var(--deva);
  box-shadow: 0 0 24px rgba(183, 93, 53, 0.16);
}

.brand-glyph::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(229, 198, 145, 0.15);
  transform: rotate(45deg);
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--night-faint);
  font: 7px var(--sans);
  letter-spacing: 0.17em;
}

.brand-copy strong {
  font: 20px/0.9 var(--serif);
  letter-spacing: 0.03em;
}

.brand-copy em {
  color: var(--ember-light);
  font-size: 12px;
  font-style: normal;
}

.rail-collapse {
  flex: none;
  width: 38px;
  height: 38px;
  border-color: rgba(229, 198, 145, 0.09);
  color: var(--night-faint);
}

.rail-collapse:hover {
  color: var(--cream);
  border-color: var(--night-line-strong);
  background: rgba(246, 240, 229, 0.05);
}

.new-sitting {
  min-height: 49px;
  margin: 14px 15px 10px;
  padding: 0 15px;
  border: 1px solid rgba(246, 240, 229, 0.92);
  border-radius: 999px;
  background: var(--cream);
  color: var(--night);
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 9px;
  text-align: left;
  white-space: nowrap;
  font: 9px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 220ms, background 220ms;
}

.new-sitting:hover {
  transform: translateY(-2px);
  background: #f1d7aa;
}

.new-sitting kbd {
  color: rgba(10, 10, 8, 0.45);
  font: 8px var(--sans);
}

.rail-scroll {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 10px 20px;
  scrollbar-width: none;
}

.rail-scroll::-webkit-scrollbar {
  display: none;
}

.rail-label {
  margin: 18px 10px 8px;
  color: rgba(246, 240, 229, 0.3);
  font: 7px var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.primary-nav {
  display: grid;
  gap: 2px;
}

.nav-item {
  position: relative;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(246, 240, 229, 0.55);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  text-align: left;
  white-space: nowrap;
  transition: background 180ms, color 180ms;
}

.nav-item:hover {
  background: rgba(246, 240, 229, 0.045);
  color: var(--cream);
}

.nav-item.is-active {
  background: rgba(183, 93, 53, 0.14);
  color: var(--cream);
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 2px;
  height: 24px;
  background: var(--ember-light);
}

.nav-item .material-symbols {
  color: var(--gold-light);
  font-size: 18px;
}

.nav-item > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
}

.nav-item i {
  color: rgba(246, 240, 229, 0.28);
  font-size: 8px;
  font-style: normal;
}

.nav-item .nav-live {
  padding: 3px 5px;
  border-radius: 999px;
  background: rgba(19, 126, 115, 0.15);
  color: #6ec3b8;
  font: 6px var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-section-head {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rail-section-head .rail-label {
  margin-top: 0;
}

.quiet-button {
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--night-faint);
  letter-spacing: 0.12em;
}

#recentList {
  display: grid;
  gap: 2px;
}

.recent-empty {
  margin: 8px 11px;
  color: rgba(246, 240, 229, 0.27);
  font-size: 9px;
}

.recent-item {
  width: 100%;
  padding: 12px 11px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--cream);
  display: grid;
  gap: 3px;
  text-align: left;
  transition: background 180ms;
}

.recent-item:hover,
.recent-item.is-current {
  background: rgba(246, 240, 229, 0.04);
}

.recent-item span {
  color: var(--ember-light);
  font: 6px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.recent-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 12px/1.3 var(--serif);
}

.recent-item small {
  color: rgba(246, 240, 229, 0.3);
  font-size: 8px;
}

.rail-footer {
  position: relative;
  z-index: 5;
  padding: 9px 10px 12px;
  border-top: 1px solid rgba(229, 198, 145, 0.08);
  background: rgba(7, 8, 7, 0.84);
  backdrop-filter: blur(16px);
  display: grid;
  gap: 5px;
}

.engine-status,
.user-card {
  min-width: 0;
  min-height: 52px;
  padding: 7px 9px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--cream);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  text-align: left;
}

.engine-status {
  border: 1px solid rgba(229, 198, 145, 0.08);
  background: rgba(246, 240, 229, 0.025);
}

.engine-orb {
  width: 27px;
  height: 27px;
  border: 1px solid rgba(19, 176, 160, 0.35);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.engine-orb::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ec4b5;
  box-shadow: 0 0 11px #4ec4b5;
}

.engine-status > span:nth-child(2),
.user-card > span:nth-child(2),
.user-menu-heading > span:last-child {
  min-width: 0;
  display: grid;
}

.engine-status b,
.user-card b,
.user-menu-heading b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 500;
}

.engine-status small,
.user-card small,
.user-menu-heading small {
  overflow: hidden;
  color: var(--night-faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.engine-status > .material-symbols,
.user-card > .material-symbols {
  color: var(--night-faint);
  font-size: 16px;
}

.user-card:hover {
  background: rgba(246, 240, 229, 0.04);
}

.user-avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--night);
  display: grid;
  place-items: center;
  font: 15px var(--deva);
}

.user-menu {
  position: absolute;
  z-index: 80;
  left: 12px;
  bottom: 72px;
  width: calc(100% - 24px);
  padding: 7px;
  border: 1px solid var(--night-line);
  border-radius: 18px;
  background: rgba(20, 22, 19, 0.98);
  box-shadow: var(--shadow-large);
}

.user-menu-heading {
  padding: 10px 9px 12px;
  border-bottom: 1px solid rgba(229, 198, 145, 0.09);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.user-menu > button {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--night-text);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: 11px;
}

.user-menu > button:hover {
  background: rgba(246, 240, 229, 0.05);
  color: var(--cream);
}

body.rail-collapsed .brand-copy,
body.rail-collapsed .new-sitting > span:nth-child(2),
body.rail-collapsed .new-sitting kbd,
body.rail-collapsed .rail-label,
body.rail-collapsed .nav-item > span:nth-child(2),
body.rail-collapsed .nav-item i,
body.rail-collapsed .recent-prompts,
body.rail-collapsed .engine-status > span:nth-child(2),
body.rail-collapsed .engine-status > .material-symbols,
body.rail-collapsed .user-card > span:nth-child(2),
body.rail-collapsed .user-card > .material-symbols {
  display: none;
}

body.rail-collapsed .rail-brand {
  padding-inline: 18px;
  justify-content: center;
}

body.rail-collapsed .rail-collapse {
  display: none;
}

body.rail-collapsed .new-sitting {
  width: 48px;
  height: 48px;
  margin-inline: auto;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
}

body.rail-collapsed .nav-item,
body.rail-collapsed .engine-status,
body.rail-collapsed .user-card {
  grid-template-columns: 1fr;
  place-items: center;
  padding-inline: 0;
}

body.rail-collapsed .rail-scroll {
  padding-inline: 13px;
}

body.rail-collapsed .user-menu {
  position: fixed;
  left: 86px;
  bottom: 14px;
  width: 230px;
}

/* Workspace */
.workspace {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
  display: grid;
  grid-template-rows: var(--header-height) minmax(0, 1fr) auto;
}

.workspace::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: repeating-linear-gradient(112deg, transparent 0 4px, var(--ink) 5px, var(--ink) 5.4px, transparent 6px, transparent 10px);
}

.workspace-header {
  position: relative;
  z-index: 20;
  min-width: 0;
  height: var(--header-height);
  padding: 0 24px 0 28px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(245, 240, 231, 0.89);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.workspace-identity,
.workspace-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.workspace-identity > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

#workspaceTitle {
  margin: 0;
  color: var(--ember);
  font: 8px var(--sans);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  white-space: nowrap;
}

#workspaceTitle::after {
  content: "";
  width: 28px;
  height: 1px;
  margin-left: 11px;
  background: var(--line);
  display: inline-block;
  vertical-align: middle;
}

#workspaceSubtitle {
  overflow: hidden;
  color: var(--ink-soft);
  font: 17px var(--serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-rail-open {
  display: none;
}

.grounding-chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 7px;
  font: 7px var(--sans);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  white-space: nowrap;
}

.grounding-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(19, 126, 115, 0.1);
}

.workspace-actions .icon-button[aria-pressed="true"] {
  background: var(--paper-deep);
  color: var(--ember);
}

.evidence-toggle {
  min-width: 112px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.evidence-toggle > span:nth-child(2) {
  font: 7px var(--sans);
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.evidence-toggle i {
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font: 7px var(--sans);
}

.evidence-toggle:hover,
.evidence-toggle[aria-expanded="true"] {
  border-color: rgba(183, 93, 53, 0.36);
  color: var(--ember);
}

.scene-stack {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.scene {
  width: 100%;
  height: 100%;
}

/* Home */
.home-scene {
  position: relative;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 56px 34px 70px;
}

.home-scene::before {
  content: "";
  position: fixed;
  width: min(55vw, 800px);
  height: min(55vw, 800px);
  right: -22vw;
  top: -26vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(183, 93, 53, 0.09), transparent 65%);
  pointer-events: none;
}

.home-atmosphere {
  position: absolute;
  width: min(66vh, 620px);
  aspect-ratio: 1;
  right: -12%;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  opacity: 0.72;
  pointer-events: none;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(182, 132, 66, 0.16);
  border-radius: 50%;
}

.orbit-one {
  inset: 4%;
}

.orbit-two {
  inset: 20%;
  border-style: dashed;
  animation: slow-turn 46s linear infinite;
}

.orbit-three {
  inset: 36%;
  border-color: rgba(19, 126, 115, 0.22);
}

.orbit-one::before,
.orbit-one::after,
.orbit-two::before,
.orbit-two::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 58%;
  border: 1px solid rgba(183, 93, 53, 0.17);
  transform: translate(-50%, -50%) rotate(45deg);
}

.orbit-one::after,
.orbit-two::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.home-bindu {
  position: relative;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #fff0cf, #d49b67 18%, #b75d35 43%, #1d0e0a 72%);
  color: var(--cream);
  box-shadow: 0 0 70px rgba(183, 93, 53, 0.34);
  display: grid;
  place-items: center;
  font: 41px var(--deva);
}

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

.home-content {
  position: relative;
  z-index: 2;
  width: min(880px, 100%);
  margin-right: min(15vw, 190px);
}

.home-content h1 {
  margin: 20px 0 24px;
  font: clamp(72px, 9vw, 132px)/0.75 var(--serif);
  letter-spacing: -0.052em;
}

.home-content h1 em {
  color: var(--ember);
  font-weight: 600;
}

.home-intro {
  max-width: 600px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.72;
}

.principle-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.principle-row span {
  padding: 0 16px;
  border-right: 1px solid var(--line);
  color: var(--ink-faint);
  font: 7px var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.principle-row span:first-child {
  padding-left: 0;
}

.principle-row span:last-child {
  border-right: 0;
}

.starter-grid {
  width: min(760px, 100%);
  margin-top: 46px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.starter-grid button {
  min-height: 138px;
  padding: 20px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 242, 0.12);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  transition: background 220ms, color 220ms, transform 220ms;
}

.starter-grid button:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.starter-grid button:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.starter-grid button:hover {
  background: var(--paper-bright);
  transform: translateY(-2px);
}

.starter-grid small {
  color: var(--ember);
  font: 7px var(--sans);
  letter-spacing: 0.15em;
}

.starter-grid strong {
  max-width: 280px;
  font: 22px/1.02 var(--serif);
}

.starter-grid button > span {
  margin-top: auto;
  color: var(--ink-faint);
  font-size: 9px;
}

.starter-grid i {
  margin-left: 5px;
  color: var(--ember);
  font-style: normal;
}

/* Sitting and dynamic turns */
.sitting-scene {
  overflow: hidden;
}

.conversation-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(23, 19, 15, 0.16) transparent;
  scrollbar-width: thin;
}

.conversation-feed {
  width: min(920px, calc(100% - 70px));
  min-height: 100%;
  margin: 0 auto;
  padding: 58px 0 100px;
}

.turn {
  position: relative;
}

.user-turn,
.turn-user {
  max-width: 800px;
  margin: 0 auto 52px;
}

.user-turn > header,
.turn-user > header {
  display: flex;
  align-items: center;
  gap: 11px;
}

.turn-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font: 12px var(--serif);
}

.user-turn > header > span:last-child,
.turn-user > header > span:last-child {
  display: grid;
}

.user-turn header b,
.turn-user header b {
  font-size: 10px;
  font-weight: 600;
}

.user-turn header small,
.turn-user header small {
  color: var(--ink-faint);
  font-size: 8px;
}

.user-turn > blockquote,
.turn-user > blockquote {
  margin: 27px 0 22px;
  font: clamp(30px, 3vw, 44px)/1.05 var(--serif);
  letter-spacing: -0.026em;
}

.turn-context {
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
}

.turn-context .material-symbols {
  color: var(--teal);
  font-size: 16px;
}

.turn-context button {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 8px;
}

.answer-turn,
.turn-answer {
  max-width: 820px;
  margin: 0 auto 70px;
}

.answer-divider {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

.answer-divider span {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}

.answer-divider span:last-child {
  background: linear-gradient(90deg, var(--line), transparent);
}

.answer-divider i {
  color: var(--gold);
  font: 20px var(--deva);
  font-style: normal;
  text-align: center;
}

.answer-signature {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 38px;
}

.answer-orbit {
  position: relative;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(183, 93, 53, 0.28);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.answer-orbit::before,
.answer-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(182, 132, 66, 0.2);
  border-radius: 50%;
}

.answer-orbit::before {
  inset: 8px;
}

.answer-orbit::after {
  inset: 20px;
  background: radial-gradient(circle, rgba(183, 93, 53, 0.2), transparent 65%);
}

.answer-orbit > span {
  position: relative;
  z-index: 2;
  color: var(--ember);
  font: 27px var(--deva);
}

.answer-orbit i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.answer-orbit i:nth-of-type(1) { left: 4px; top: 34px; }
.answer-orbit i:nth-of-type(2) { right: 9px; top: 13px; background: var(--teal); }
.answer-orbit i:nth-of-type(3) { right: 12px; bottom: 11px; background: var(--ember); }

.answer-signature p {
  margin: 6px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.answer-time {
  color: var(--ink-faint);
  font: 7px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.answer-body {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.78;
}

.answer-body > p:first-child,
.answer-body .rmlead {
  color: var(--ink);
  font: 21px/1.58 var(--body);
}

.answer-body h2,
.answer-body h3,
.answer-body h4 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
}

.answer-body h2,
.answer-body h3 {
  margin: 48px 0 18px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  font-size: 34px;
  line-height: 1;
}

.answer-body h4 {
  margin: 30px 0 12px;
  font-size: 24px;
}

.answer-body p {
  margin: 0 0 18px;
}

.answer-body b {
  color: var(--ink);
}

.answer-body em {
  font-family: var(--serif);
  font-size: 1.1em;
}

.answer-body ul,
.answer-body ol {
  margin: 22px 0 28px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.answer-body li {
  min-height: 64px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.answer-body ol {
  counter-reset: answer-list;
}

.answer-body ol > li::before {
  counter-increment: answer-list;
  content: counter(answer-list, decimal-leading-zero);
  flex: none;
  color: var(--ember);
  font: 7px var(--sans);
  letter-spacing: 0.1em;
}

.answer-body ul > li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.7em;
  border-radius: 50%;
  background: var(--gold);
}

.answer-body .rcallout,
.answer-body .rishi-card,
.answer-body .rmantra-box {
  margin: 28px 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ember);
  background: rgba(251, 248, 242, 0.58);
}

.answer-body .rmantra-box {
  color: var(--ember);
  text-align: center;
  font: 24px var(--deva);
}

.answer-body .rishi-card-title {
  color: var(--ink);
  font: 22px var(--serif);
}

.answer-body .rmtable-wrap {
  margin: 28px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.answer-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.answer-body th,
.answer-body td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.answer-body th {
  background: var(--paper-deep);
  color: var(--ink);
  font: 8px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.answer-body sup.rcjump,
.citation {
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid rgba(183, 93, 53, 0.35);
  border-radius: 50%;
  background: rgba(183, 93, 53, 0.07);
  color: var(--ember);
  display: inline-grid;
  place-items: center;
  font: 8px var(--sans);
  line-height: 1;
  vertical-align: super;
  cursor: pointer;
}

.depth-notice {
  margin-top: 22px;
  padding: 12px 16px;
  border-left: 2px solid var(--gold);
  background: rgba(182, 132, 66, 0.08);
  color: var(--ink-soft);
  font-size: 10px;
}

.citations-row,
.answer-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.citations-row button,
.answer-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 9px;
}

.citations-row button:hover,
.answer-actions button:hover {
  border-color: rgba(183, 93, 53, 0.38);
  color: var(--ember);
}

.grounding-confidence {
  margin-top: 20px;
  display: grid;
  grid-template-columns: auto minmax(80px, 150px) auto;
  align-items: center;
  gap: 10px;
  color: var(--ink-faint);
  font: 7px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.grounding-confidence > i {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 19, 15, 0.1);
}

.grounding-confidence > i > b {
  width: var(--confidence, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  display: block;
}

.followup-suggestions,
.answer-followups {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.followup-suggestions > span,
.answer-followups > span {
  margin-right: 6px;
  color: var(--ink-faint);
  font: 7px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.followup-suggestions button,
.answer-followups button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 9px;
}

.followup-suggestions button:hover,
.answer-followups button:hover {
  background: var(--paper-bright);
  color: var(--ember);
}

.answer-footer,
.answer-tools {
  margin-top: 30px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  font-size: 8px;
}

.answer-footer button,
.answer-tools button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  font: 7px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Council output */
.council-turn {
  max-width: 860px;
  margin: 0 auto 70px;
}

.council-turn > header {
  position: relative;
  min-height: 280px;
  padding: 20px 290px 46px 0;
  border-bottom: 1px solid var(--line);
}

.council-turn > header h2 {
  margin: 24px 0 0;
  font: clamp(42px, 5vw, 70px)/0.91 var(--serif);
  letter-spacing: -0.04em;
}

.council-orbit {
  position: absolute;
  right: 20px;
  top: 0;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(183, 93, 53, 0.25);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.council-orbit::before,
.council-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(182, 132, 66, 0.18);
  border-radius: 50%;
}

.council-orbit::before { inset: 24px; }
.council-orbit::after { inset: 58px; border-style: dashed; }
.council-orbit > span { color: var(--ember); font: 43px var(--deva); }

.council-perspectives {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.council-member,
.council-perspectives > article {
  min-height: 300px;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.council-member:last-child,
.council-perspectives > article:last-child {
  border-right: 0;
}

.council-member > span,
.council-perspectives > article > span {
  color: var(--ember);
  font: 7px var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.council-member h3,
.council-perspectives h2 {
  margin: 18px 0 16px;
  font: 31px var(--serif);
}

.council-member p,
.council-perspectives p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.72;
}

.council-synthesis {
  margin-top: 46px;
  padding: 40px;
  border: 1px solid rgba(229, 198, 145, 0.18);
  background:
    radial-gradient(circle at 0 100%, rgba(19, 126, 115, 0.16), transparent 36%),
    linear-gradient(135deg, #0b0c0b, #15140f);
  color: var(--cream);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 38px;
}

.council-synthesis h3 {
  margin: 17px 0 0;
  font: 36px/0.95 var(--serif);
}

.council-synthesis > div:last-child {
  color: var(--night-text);
  font-size: 12px;
  line-height: 1.72;
}

/* Thinking */
.thinking-layer {
  position: absolute;
  z-index: 50;
  inset: 0;
  background: rgba(245, 240, 231, 0.92);
  backdrop-filter: blur(18px);
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.thinking-mandala {
  position: relative;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(183, 93, 53, 0.28);
  border-radius: 50%;
  display: grid;
  place-items: center;
  animation: breathe-field 3.6s ease-in-out infinite;
}

.thinking-mandala::before,
.thinking-mandala::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(182, 132, 66, 0.22);
  border-radius: 50%;
}

.thinking-mandala::before { inset: 14px; }
.thinking-mandala::after { inset: 32px; }
.thinking-mandala span { position: relative; z-index: 2; color: var(--ember); font: 32px var(--deva); }
.thinking-mandala i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.thinking-mandala i:first-of-type { left: 8px; top: 48px; }
.thinking-mandala i:last-of-type { right: 12px; bottom: 23px; background: var(--gold); }
.thinking-layer p { margin: 25px 0 5px; font: 25px var(--serif); }
.thinking-layer small { color: var(--ink-faint); font: 7px var(--sans); letter-spacing: 0.13em; text-transform: uppercase; }

@keyframes breathe-field {
  50% { transform: scale(1.08); box-shadow: 0 0 60px rgba(19, 126, 115, 0.13); }
}

/* Composer */
.composer-dock {
  position: relative;
  z-index: 25;
  padding: 9px 20px 12px;
  border-top: 1px solid var(--line-soft);
  background: rgba(245, 240, 231, 0.94);
  backdrop-filter: blur(22px);
}

.context-bar,
.composer-controls,
.composer,
.composer-note {
  width: min(890px, 100%);
  margin-inline: auto;
}

.context-bar {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.context-bar > button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
}

.context-bar .material-symbols {
  font-size: 15px;
}

.context-bar > span {
  color: var(--ink-faint);
  font: 7px var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.composer-controls {
  position: relative;
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.mode-switch {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(23, 19, 15, 0.035);
  display: flex;
}

.mode-switch button {
  min-height: 29px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 5px;
  font: 7px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mode-switch button.is-active,
.mode-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.mode-switch .material-symbols {
  font-size: 14px;
}

.selector-wrap {
  position: relative;
}

.selector-button {
  min-height: 35px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 7px;
}

.selector-button:hover,
.selector-button[aria-expanded="true"] {
  border-color: rgba(183, 93, 53, 0.36);
  color: var(--ink);
}

.selector-button b {
  font-size: 9px;
  font-weight: 500;
}

.selector-button small {
  color: var(--ember);
  font: 7px var(--sans);
}

.selector-button .material-symbols {
  color: var(--ink-faint);
  font-size: 15px;
}

.selector-mark {
  color: var(--ember);
  font: 16px var(--serif);
}

.depth-orb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(182, 132, 66, 0.1);
}

.selector-menu {
  position: absolute;
  z-index: 90;
  left: 0;
  bottom: calc(100% + 10px);
  width: 300px;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--night-line);
  border-radius: 17px;
  background: rgba(15, 17, 15, 0.985);
  color: var(--cream);
  box-shadow: var(--shadow-large);
}

.selector-menu > button {
  width: 100%;
  min-height: 56px;
  padding: 9px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--night-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.selector-menu > button:hover,
.selector-menu > button.is-selected {
  background: rgba(246, 240, 229, 0.055);
  color: var(--cream);
}

.selector-menu > button > span {
  min-width: 0;
  display: grid;
}

.sage-menu > button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  justify-content: initial;
}

.sage-menu > button > span:first-child {
  width: 31px;
  height: 31px;
  border: 1px solid var(--night-line);
  border-radius: 50%;
  color: var(--gold-light);
  display: grid;
  place-items: center;
  font: 13px var(--deva);
}

.selector-menu b {
  font-size: 11px;
  font-weight: 500;
}

.selector-menu small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--night-faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selector-menu i {
  flex: none;
  color: var(--gold-light);
  font: 7px var(--sans);
  font-style: normal;
}

.answer-mode-menu {
  left: auto;
  right: 0;
  width: 265px;
}

.composer {
  min-height: 66px;
  padding: 8px 9px 8px 14px;
  border: 1px solid rgba(23, 19, 15, 0.2);
  border-radius: 23px;
  background: var(--paper-bright);
  box-shadow: 0 8px 26px rgba(74, 56, 35, 0.08);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px 48px;
  align-items: end;
  gap: 5px;
  transition: border-color 180ms, box-shadow 180ms;
}

.composer:focus-within {
  border-color: rgba(183, 93, 53, 0.48);
  box-shadow: 0 10px 32px rgba(74, 56, 35, 0.11), 0 0 0 3px rgba(183, 93, 53, 0.06);
}

.composer-glyph {
  align-self: center;
  color: var(--ember);
  font: 20px var(--deva);
}

.composer textarea {
  width: 100%;
  min-height: 42px;
  max-height: 118px;
  padding: 11px 6px 7px;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.composer textarea::placeholder {
  color: var(--ink-faint);
}

.mic-button {
  align-self: center;
  border-color: transparent;
  color: var(--ink-faint);
}

.mic-button[aria-pressed="true"] {
  background: rgba(183, 93, 53, 0.1);
  color: var(--ember);
}

.send-button {
  align-self: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  transition: background 180ms, transform 180ms;
}

.send-button:hover {
  background: var(--ember);
  transform: translateY(-1px);
}

.composer-note {
  min-height: 22px;
  padding: 5px 5px 0;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-size: 7px;
}

.composer-note kbd {
  font: inherit;
}

/* Evidence atelier */
.evidence-panel {
  position: relative;
  z-index: 35;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid var(--night-line);
  background:
    radial-gradient(circle at 100% 0, rgba(183, 93, 53, 0.13), transparent 28%),
    linear-gradient(165deg, var(--night-2), var(--night));
  color: var(--cream);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.evidence-header {
  min-height: 72px;
  padding: 0 14px 0 20px;
  border-bottom: 1px solid rgba(229, 198, 145, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.evidence-header > div {
  display: grid;
}

.evidence-header span {
  font: 17px var(--serif);
}

.evidence-header small {
  color: var(--night-faint);
  font: 6px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.evidence-header .icon-button {
  border-color: var(--night-line);
  color: var(--night-faint);
}

.evidence-tabs {
  min-height: 48px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(229, 198, 145, 0.08);
  display: flex;
}

.evidence-tabs button {
  position: relative;
  flex: 1;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: var(--night-faint);
  font: 7px var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evidence-tabs button::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 1px;
  background: transparent;
}

.evidence-tabs button.is-active,
.evidence-tabs button[aria-selected="true"] {
  color: var(--gold-light);
}

.evidence-tabs button.is-active::after,
.evidence-tabs button[aria-selected="true"]::after {
  background: var(--gold-light);
}

.evidence-tabs i {
  margin-left: 4px;
  font-style: normal;
}

.evidence-body {
  min-height: 0;
  overflow: hidden;
}

.evidence-pane {
  height: 100%;
  overflow-y: auto;
  padding: 24px 18px 40px;
}

.evidence-empty {
  min-height: 350px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.evidence-seal {
  position: relative;
  width: 94px;
  height: 94px;
  border: 1px solid var(--night-line);
  border-radius: 50%;
  color: var(--gold-light);
  display: grid;
  place-items: center;
  font: 31px var(--deva);
}

.evidence-seal::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(229, 198, 145, 0.1);
  transform: rotate(45deg);
}

.evidence-empty p {
  max-width: 235px;
  margin: 24px 0 0;
  color: var(--night-faint);
  font-size: 9px;
  line-height: 1.65;
}

.evidence-empty b {
  display: block;
  margin-bottom: 5px;
  color: var(--night-text);
  font-weight: 500;
}

.source-card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid rgba(229, 198, 145, 0.1);
  background: rgba(246, 240, 229, 0.025);
  transition: border-color 180ms, background 180ms, transform 180ms;
}

.source-card:hover,
.source-card.is-highlighted {
  border-color: rgba(224, 191, 130, 0.35);
  background: rgba(246, 240, 229, 0.04);
}

.source-card.is-highlighted {
  transform: translateX(-3px);
}

.source-card header {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 9px;
}

.source-card header > span:first-child {
  width: 24px;
  height: 24px;
  border: 1px solid var(--night-line);
  border-radius: 50%;
  color: var(--gold-light);
  display: grid;
  place-items: center;
  font: 7px var(--sans);
}

.source-card header > div {
  min-width: 0;
  display: grid;
}

.source-card header small {
  color: var(--ember-light);
  font: 6px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.source-card header b {
  margin-top: 5px;
  font: 17px/1.05 var(--serif);
}

.source-card header a {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(229, 198, 145, 0.1);
  border-radius: 50%;
  color: var(--night-faint);
  display: grid;
  place-items: center;
  text-decoration: none;
}

.source-card header a:hover {
  border-color: var(--night-line-strong);
  color: var(--gold-light);
}

.source-card header .material-symbols {
  font-size: 14px;
}

.source-card > p {
  margin: 16px 0 0;
  color: rgba(246, 240, 229, 0.53);
  font-size: 9px;
  line-height: 1.55;
}

.source-card footer {
  margin-top: 16px;
  padding-top: 11px;
  border-top: 1px solid rgba(229, 198, 145, 0.08);
  color: var(--night-faint);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font: 6px var(--sans);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.consent-heading {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.context-mark {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(19, 160, 148, 0.35);
  border-radius: 50%;
  color: #6cc4b8;
  display: grid;
  place-items: center;
  font: 17px var(--serif);
}

.consent-heading small {
  color: #6cc4b8;
  font: 6px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.consent-heading h2 {
  margin: 4px 0 0;
  font: 25px/0.95 var(--serif);
}

.context-list {
  margin-top: 24px;
  border-top: 1px solid rgba(229, 198, 145, 0.1);
}

.context-list > div {
  min-height: 52px;
  border-bottom: 1px solid rgba(229, 198, 145, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.context-list span {
  color: var(--night-faint);
  font-size: 8px;
}

.context-list b {
  font: 14px var(--serif);
  text-align: right;
}

.context-permission-button {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  padding: 0 14px;
  border: 1px solid var(--night-line);
  background: transparent;
  color: var(--night-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 7px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.privacy-note {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(229, 198, 145, 0.1);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
}

.privacy-note .material-symbols {
  color: var(--gold-light);
  font-size: 18px;
}

.privacy-note p {
  margin: 0;
  color: var(--night-faint);
  font-size: 8px;
  line-height: 1.55;
}

.privacy-note b {
  display: block;
  margin-bottom: 3px;
  color: var(--night-text);
  font-weight: 500;
}

.pipeline-intro {
  margin: 4px 0 24px;
  font: 29px/0.95 var(--serif);
}

.grounding-pipeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.grounding-pipeline li {
  position: relative;
  min-height: 68px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 20px;
  gap: 11px;
  align-items: start;
}

.grounding-pipeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 31px;
  bottom: 3px;
  width: 1px;
  background: rgba(229, 198, 145, 0.14);
}

.grounding-pipeline > li > span {
  position: relative;
  z-index: 1;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(229, 198, 145, 0.16);
  border-radius: 50%;
  background: var(--night-2);
  color: var(--gold-light);
  display: grid;
  place-items: center;
  font: 6px var(--sans);
}

.grounding-pipeline div {
  display: grid;
}

.grounding-pipeline b {
  font: 15px var(--serif);
}

.grounding-pipeline small {
  margin-top: 3px;
  color: var(--night-faint);
  font-size: 7px;
}

.grounding-pipeline i {
  color: var(--teal-light);
  font-size: 16px;
  font-style: normal;
}

.governance-seal {
  margin-top: 18px;
  padding: 24px 20px;
  border: 1px solid rgba(183, 93, 53, 0.22);
  background: radial-gradient(circle at 100% 0, rgba(183, 93, 53, 0.18), transparent 35%);
}

.governance-seal > span {
  color: var(--ember-light);
  font: 18px var(--deva);
}

.governance-seal h2 {
  margin: 16px 0 10px;
  font: 25px/0.95 var(--serif);
}

.governance-seal p {
  margin: 0;
  color: var(--night-faint);
  font-size: 8px;
  line-height: 1.6;
}

/* Overlays */
.overlay {
  position: fixed;
  z-index: 300;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
}

.overlay-dismiss {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
}

.mandala-chamber,
.consent-card,
.feature-gate-card,
.auth-card {
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-large);
}

.chamber-close {
  position: absolute;
  z-index: 5;
  right: 20px;
  top: 20px;
  border-color: var(--night-line);
  color: var(--night-text);
}

.mandala-chamber {
  width: min(1040px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(229, 198, 145, 0.18);
  background:
    radial-gradient(circle at 0 0, rgba(183, 93, 53, 0.18), transparent 30%),
    var(--night);
  color: var(--cream);
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
}

.mandala-chamber > header {
  padding: 70px 48px;
  border-right: 1px solid rgba(229, 198, 145, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mandala-chamber .eyebrow {
  color: var(--gold-light);
}

.mandala-chamber h2 {
  margin: 24px 0;
  font: 61px/0.8 var(--serif);
}

.mandala-chamber h2 em {
  color: var(--ember-light);
}

.mandala-chamber header > p:last-child {
  margin: 0;
  color: var(--night-text);
  font-size: 12px;
  line-height: 1.72;
}

.mandala-grid {
  min-height: 0;
  overflow-y: auto;
  padding: 68px 42px 42px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
}

.mandala-grid button {
  min-height: 112px;
  padding: 13px;
  border: 1px solid rgba(229, 198, 145, 0.09);
  background: rgba(246, 240, 229, 0.018);
  color: var(--night-text);
  display: grid;
  justify-items: start;
  align-content: start;
  text-align: left;
  transition: background 180ms, border-color 180ms, transform 180ms;
}

.mandala-grid button:hover,
.mandala-grid button[aria-selected="true"] {
  border-color: rgba(224, 191, 130, 0.3);
  background: rgba(246, 240, 229, 0.05);
  transform: translateY(-2px);
}

.mandala-grid button > span {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(229, 198, 145, 0.2);
  border-radius: 50%;
  color: var(--gold-light);
  display: grid;
  place-items: center;
  font: 13px var(--deva);
}

.mandala-grid b {
  margin-top: 10px;
  color: var(--cream);
  font: 15px var(--serif);
}

.mandala-grid small {
  margin-top: 2px;
  color: var(--night-faint);
  font-size: 7px;
}

.auth-overlay {
  padding: 0;
  background: rgba(4, 5, 4, 0.86);
  backdrop-filter: blur(18px);
}

.auth-card {
  width: min(980px, calc(100vw - 48px));
  min-height: 600px;
  overflow: hidden;
  border: 1px solid rgba(229, 198, 145, 0.16);
  background: var(--paper);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.auth-threshold {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 72px 66px;
  background:
    radial-gradient(circle at 35% 35%, rgba(183, 93, 53, 0.24), transparent 27%),
    radial-gradient(circle at 85% 90%, rgba(19, 126, 115, 0.18), transparent 30%),
    var(--night);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.auth-threshold::before,
.auth-threshold::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  left: -190px;
  top: -210px;
  border: 1px solid rgba(229, 198, 145, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 72px rgba(229, 198, 145, 0.022), 0 0 0 144px rgba(229, 198, 145, 0.015);
}

.auth-threshold::after {
  width: 220px;
  height: 220px;
  left: auto;
  right: -80px;
  top: auto;
  bottom: -80px;
  box-shadow: none;
  border-color: rgba(19, 160, 148, 0.18);
}

.auth-orbit {
  position: absolute;
  left: 68px;
  top: 58px;
  width: 116px;
  height: 116px;
  border: 1px solid var(--night-line-strong);
  border-radius: 50%;
  color: var(--gold-light);
  display: grid;
  place-items: center;
  font: 42px var(--deva);
}

.auth-orbit::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(229, 198, 145, 0.14);
  transform: rotate(45deg);
}

.auth-threshold h2 {
  margin: 20px 0 25px;
  font: clamp(58px, 6vw, 82px)/0.78 var(--serif);
}

.auth-threshold h2 em {
  color: var(--ember-light);
}

.auth-threshold > p:not(.eyebrow) {
  max-width: 420px;
  margin: 0;
  color: var(--night-text);
  font-size: 13px;
  line-height: 1.7;
}

.auth-principles {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
}

.auth-principles span {
  padding: 0 12px;
  border-right: 1px solid var(--night-line);
  color: var(--night-faint);
  font: 6px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-principles span:first-child { padding-left: 0; }
.auth-principles span:last-child { border-right: 0; }

.auth-form-panel {
  padding: 78px 64px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-kicker {
  margin: 0;
  color: var(--ember);
  font: 7px var(--sans);
  letter-spacing: 0.16em;
}

.auth-form-panel h3 {
  margin: 18px 0 35px;
  font: 37px/0.95 var(--serif);
}

.auth-form-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-faint);
  font: 7px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-form-panel input {
  width: 100%;
  height: 58px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: var(--paper-bright);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 180ms, box-shadow 180ms;
}

.auth-form-panel input:focus {
  border-color: rgba(183, 93, 53, 0.5);
  box-shadow: 0 0 0 3px rgba(183, 93, 53, 0.07);
}

.primary-button,
.secondary-button {
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-decoration: none;
  font: 8px var(--sans);
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.primary-button:hover {
  background: var(--ember);
  border-color: var(--ember);
}

.auth-form-panel .primary-button {
  width: 100%;
  margin-top: 16px;
}

.text-button {
  width: 100%;
  margin-top: 14px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font-size: 9px;
}

.form-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
}

.form-message.is-error {
  color: var(--danger);
}

.form-message.is-success {
  color: var(--teal);
}

.auth-legal {
  margin-top: 24px;
  color: var(--ink-faint);
  font-size: 7px;
  line-height: 1.55;
}

.consent-card,
.feature-gate-card {
  width: min(590px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 58px;
  border: 1px solid var(--night-line);
  background:
    radial-gradient(circle at 100% 0, rgba(19, 126, 115, 0.17), transparent 28%),
    var(--night-2);
  color: var(--cream);
}

.consent-emblem,
.gate-mark {
  width: 74px;
  height: 74px;
  margin-bottom: 34px;
  border: 1px solid rgba(19, 160, 148, 0.36);
  border-radius: 50%;
  color: var(--teal-light);
  display: grid;
  place-items: center;
  font: 22px var(--serif);
}

.consent-card .eyebrow,
.feature-gate-card .eyebrow {
  color: var(--gold-light);
}

.consent-card h2,
.feature-gate-card h2 {
  margin: 22px 0 24px;
  font: clamp(48px, 6vw, 67px)/0.82 var(--serif);
}

.consent-card h2 em,
.feature-gate-card h2 em {
  color: var(--teal-light);
}

.consent-card > p:not(.eyebrow, .form-message),
.feature-gate-card > p:not(.eyebrow) {
  margin: 0;
  color: var(--night-text);
  font-size: 12px;
  line-height: 1.72;
}

.consent-preview {
  margin: 28px 0;
  border-top: 1px solid var(--night-line);
  border-bottom: 1px solid var(--night-line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.consent-preview span {
  min-height: 78px;
  padding: 17px 12px;
  border-right: 1px solid var(--night-line);
  display: grid;
  align-content: center;
  gap: 7px;
}

.consent-preview span:last-child {
  border-right: 0;
}

.consent-preview small {
  color: var(--night-faint);
  font: 6px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.consent-preview b {
  font: 17px var(--serif);
}

.consent-actions {
  display: grid;
  gap: 10px;
}

.consent-card .primary-button,
.feature-gate-card .primary-button {
  border-color: var(--cream);
  background: var(--cream);
  color: var(--night);
}

.secondary-button {
  border-color: var(--night-line);
  background: transparent;
  color: var(--night-text);
}

.feature-gate-card {
  width: min(530px, calc(100vw - 48px));
  text-align: center;
}

.feature-gate-card .chamber-close {
  right: 18px;
  top: 18px;
}

.feature-gate-card .gate-mark {
  margin-inline: auto;
  border-color: var(--night-line-strong);
  color: var(--gold-light);
}

.feature-gate-card .primary-button {
  margin-top: 32px;
}

.toast {
  position: fixed;
  z-index: 500;
  left: 50%;
  bottom: 28px;
  min-width: 210px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(229, 198, 145, 0.22);
  border-radius: 999px;
  background: var(--night-3);
  color: var(--cream);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity 240ms, visibility 240ms, transform 240ms;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Connected v2 states and rich response components */
.sage-menu .sage-glyph {
  border-color: color-mix(in srgb, var(--sage-color, var(--gold-light)) 46%, transparent);
  color: var(--sage-color, var(--gold-light));
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--sage-color, var(--gold-light)) 8%, transparent);
}

.mandala-grid .mandala-sage {
  position: relative;
}

.mandala-grid .mandala-sage > span {
  border-color: color-mix(in srgb, var(--sage-color, var(--gold-light)) 46%, transparent);
  color: var(--sage-color, var(--gold-light));
}

.mandala-grid .mandala-sage > small {
  position: absolute;
  top: 14px;
  right: 14px;
  margin: 0;
  letter-spacing: 0.12em;
}

.mandala-grid .mandala-sage > i {
  margin-top: 3px;
  color: var(--night-faint);
  font: 7px/1.35 var(--body);
  font-style: normal;
}

.depth-option.is-held {
  opacity: 0.58;
}

.depth-option.is-held i {
  color: var(--ember-light);
}

.depth-safety-note {
  margin: 4px 7px 7px;
  padding: 11px 12px;
  border: 1px solid rgba(228, 160, 115, 0.16);
  border-radius: 10px;
  background: rgba(183, 93, 53, 0.08);
  color: var(--night-faint);
  font-size: 8px;
  line-height: 1.55;
}

.streaming-cursor {
  width: 5px;
  height: 1em;
  margin-left: 3px;
  border-radius: 999px;
  background: var(--ember);
  display: inline-block;
  vertical-align: -0.08em;
  animation: rishi-cursor 850ms steps(1, end) infinite;
}

@keyframes rishi-cursor {
  50% { opacity: 0.15; }
}

.answer-toolset {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
}

.answer-footer .answer-toolset button,
.answer-tools .answer-toolset button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-faint);
}

.answer-footer .answer-toolset button:hover,
.answer-tools .answer-toolset button:hover,
.answer-toolset button.is-active {
  color: var(--ember);
}

.answer-toolset .material-symbols {
  font-size: 14px;
}

.answer-actions:has(.practice-action) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.action-intro {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: var(--ink-faint);
  font: 7px var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.answer-actions .practice-action {
  min-height: 76px;
  padding: 13px;
  border-radius: 0;
  background: rgba(251, 248, 242, 0.64);
  color: var(--ink);
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  text-align: left;
}

.answer-actions .practice-action:hover {
  border-color: rgba(19, 126, 115, 0.32);
  background: var(--paper-bright);
  color: var(--teal);
}

.practice-action .material-symbols {
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.practice-action > span:nth-child(2) {
  min-width: 0;
  display: grid;
}

.practice-action b {
  font: 14px/1.1 var(--serif);
}

.practice-action small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 7px;
}

.practice-action > i {
  color: var(--teal);
  font-style: normal;
}

.answer-error,
.answer-body.is-error {
  max-width: 760px;
  margin-inline: auto;
  padding: 22px;
  border: 1px solid rgba(168, 68, 50, 0.22);
  background: rgba(168, 68, 50, 0.055);
  color: var(--ink-soft);
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 13px;
}

.answer-body.is-error {
  margin-top: 12px;
}

.answer-error > .material-symbols,
.answer-body.is-error > .material-symbols {
  color: var(--danger);
}

.answer-error b,
.answer-body.is-error b {
  color: var(--ink);
  font: 20px var(--serif);
}

.answer-error p,
.answer-body.is-error p {
  margin: 5px 0 13px;
  font-size: 11px;
}

.answer-error .billing-caution,
.answer-body.is-error .billing-caution {
  display: block;
  max-width: 58ch;
  color: var(--danger);
  font: 9px/1.55 var(--sans);
  letter-spacing: 0.025em;
}

.answer-error button,
.answer-body.is-error button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ember);
  font: 7px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.council-time {
  position: absolute;
  left: 0;
  bottom: 20px;
  color: var(--ink-faint);
  font: 7px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.council-footer {
  max-width: 100%;
}

.context-permission-toggle {
  width: 100%;
  min-height: 70px;
  margin-top: 24px;
  padding: 13px 14px;
  border: 1px solid var(--night-line);
  background: rgba(246, 240, 229, 0.018);
  color: var(--night-text);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.context-permission-toggle:disabled {
  cursor: not-allowed;
}

.context-permission-toggle > span {
  display: grid;
}

.context-permission-toggle b {
  font: 15px var(--serif);
}

.context-permission-toggle small {
  margin-top: 4px;
  color: var(--night-faint);
  font-size: 7px;
  line-height: 1.45;
}

.context-permission-toggle > i {
  position: relative;
  width: 34px;
  height: 18px;
  border: 1px solid var(--night-line-strong);
  border-radius: 999px;
}

.context-permission-toggle > i::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: var(--night-faint);
  transition: transform 180ms var(--ease), background 180ms;
}

.context-permission-toggle.is-on > i {
  border-color: rgba(105, 194, 182, 0.42);
  background: rgba(19, 126, 115, 0.18);
}

.context-permission-toggle.is-on > i::after {
  background: var(--teal-light);
  transform: translateX(16px);
}

.context-list > div {
  padding: 10px 0;
  display: grid;
  grid-template-columns: minmax(74px, 0.8fr) minmax(110px, 1.2fr);
  align-content: center;
  align-items: baseline;
  gap: 2px 12px;
}

.context-list > div > small {
  grid-column: 2;
  color: var(--night-faint);
  font-size: 7px;
  line-height: 1.4;
  text-align: right;
}

.context-list.is-disabled {
  opacity: 0.38;
}

.context-empty-row b {
  color: var(--night-faint);
}

.grounding-score {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--night-line);
  background: rgba(246, 240, 229, 0.025);
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.score-orbit {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(105, 194, 182, 0.35);
  border-radius: 50%;
  color: var(--teal-light);
  display: grid;
  place-items: center;
  font: 15px var(--serif);
}

.grounding-score > div:last-child {
  display: grid;
}

.grounding-score small {
  color: var(--night-faint);
  font: 6px var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.grounding-score b {
  margin-top: 4px;
  color: var(--cream);
  font: 20px var(--serif);
}

.grounding-score p {
  margin: 4px 0 0;
  color: var(--night-faint);
  font-size: 7px;
  line-height: 1.45;
}

.recent-signin {
  width: 100%;
  margin-top: 5px;
  padding: 13px 11px;
  border: 1px solid rgba(229, 198, 145, 0.1);
  border-radius: 12px;
  background: rgba(246, 240, 229, 0.025);
  color: var(--cream);
  display: grid;
  gap: 3px;
  text-align: left;
}

.recent-signin span {
  color: var(--ember-light);
  font: 6px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.recent-signin strong {
  font: 12px var(--serif);
}

.recent-signin small {
  color: var(--night-faint);
  font-size: 7px;
}

.mic-button.is-listening {
  border-color: rgba(183, 93, 53, 0.5);
  background: rgba(183, 93, 53, 0.11);
  color: var(--ember);
  animation: rishi-listening 1.5s var(--ease) infinite;
}

@keyframes rishi-listening {
  50% { box-shadow: 0 0 0 8px rgba(183, 93, 53, 0.06); }
}

.consent-partner-note {
  margin: -10px 0 22px !important;
  color: var(--night-faint) !important;
  font-size: 9px !important;
}

.adult-card .adult-emblem {
  border-color: rgba(212, 106, 138, 0.38);
  color: #d97f9c;
  font-family: "Material Symbols Rounded";
  font-size: 27px;
}

.adult-card h2 em {
  color: #d97f9c;
}

.memory-disclosure {
  margin-top: 22px;
  padding: 15px;
  border: 1px solid var(--night-line);
  background: rgba(246, 240, 229, 0.02);
}

.memory-disclosure > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.memory-disclosure > header > div {
  display: grid;
}

.memory-disclosure > header small {
  color: var(--gold-light);
  font: 6px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.memory-disclosure > header b {
  margin-top: 4px;
  color: var(--cream);
  font: 16px var(--serif);
}

.memory-disclosure > header > span {
  width: 30px;
  height: 30px;
  border: 1px solid var(--night-line);
  border-radius: 50%;
  color: var(--gold-light);
  display: grid;
  place-items: center;
  font: 8px var(--sans);
}

.memory-disclosure > p {
  margin: 11px 0 14px;
  color: var(--night-faint);
  font-size: 7px;
  line-height: 1.55;
}

.memory-items {
  display: grid;
  gap: 6px;
}

.memory-item {
  padding: 10px;
  border: 1px solid rgba(105, 194, 182, 0.15);
  background: rgba(19, 126, 115, 0.055);
}

.memory-item.is-excluded {
  border-color: rgba(229, 198, 145, 0.08);
  background: rgba(246, 240, 229, 0.012);
  opacity: 0.58;
}

.memory-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.memory-item header span,
.memory-item header b,
.memory-item > small,
.memory-overflow {
  font: 6px var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.memory-item header span {
  color: var(--teal-light);
}

.memory-item.is-excluded header span {
  color: var(--night-faint);
}

.memory-item header b {
  color: var(--night-faint);
}

.memory-item p {
  margin: 7px 0 8px;
  color: var(--night-text);
  font-size: 8px;
  line-height: 1.5;
}

.memory-item > small,
.memory-overflow {
  color: var(--night-faint);
}

.memory-empty {
  padding: 12px;
  border: 1px dashed var(--night-line);
  color: var(--night-faint);
  font-size: 8px;
  text-align: center;
}

.memory-overflow {
  margin-top: 10px;
  display: block;
}

/* Data-only visual grammar for Illumined and Absolute responses. */
.rmchart {
  margin: 30px 0;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 242, 0.72);
}

.rmc-title {
  margin: 0 0 20px;
  color: var(--ink);
  font: 24px/1 var(--serif);
}

.rmc-note {
  margin: 17px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-faint);
  font-size: 8px;
}

.rmc-bars {
  display: grid;
  gap: 12px;
}

.rmc-brow {
  display: grid;
  grid-template-columns: minmax(78px, 0.8fr) minmax(100px, 2fr) auto;
  align-items: center;
  gap: 11px;
}

.rmc-blab,
.rmc-bval {
  color: var(--ink-soft);
  font-size: 9px;
}

.rmc-bval {
  color: var(--ink);
  font: 13px var(--serif);
  text-align: right;
}

.rmc-btrack {
  height: 5px;
  overflow: hidden;
  background: var(--paper-deep);
}

.rmc-bfill {
  height: 100%;
  min-width: 2px;
  background: var(--chart-accent, var(--ember));
}

.rmc-tiles,
.rmc-vs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.rmc-tile,
.rmc-vscol {
  min-height: 105px;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--chart-accent, var(--ember));
  background: var(--paper-bright);
}

.rmc-tval {
  color: var(--chart-accent, var(--ember));
  font: 32px/1 var(--serif);
}

.rmc-tval span {
  margin-left: 3px;
  font-size: 12px;
}

.rmc-tlab,
.rmc-vsname {
  margin-top: 10px;
  color: var(--ink-faint);
  font: 7px var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.rmc-vsname {
  margin-top: 0;
  color: var(--chart-accent, var(--ember));
}

.rmc-vstext {
  margin-top: 11px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.rmc-donut {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 26px;
}

.rmc-dial {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 50%;
}

.rmc-dial > i {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: var(--paper-bright);
}

.rmc-legend {
  display: grid;
  gap: 8px;
}

.rmc-leg {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 9px;
}

.rmc-leg > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.rmc-leg b {
  color: var(--ink);
  font: 13px var(--serif);
}

.rmc-c0 { --chart-accent: #a45536; }
.rmc-c1 { --chart-accent: #247c72; }
.rmc-c2 { --chart-accent: #6e6391; }
.rmc-c3 { --chart-accent: #a35a67; }
.rmc-c4 { --chart-accent: #587695; }
.rmc-c5 { --chart-accent: #817541; }

.council-synthesis .rmchart {
  border-color: var(--night-line);
  background: rgba(246, 240, 229, 0.035);
}

.council-synthesis .rmc-title,
.council-synthesis .rmc-bval,
.council-synthesis .rmc-leg b {
  color: var(--cream);
}

.council-synthesis .rmc-tile,
.council-synthesis .rmc-vscol {
  border-color: var(--night-line);
  background: rgba(246, 240, 229, 0.03);
}

.council-synthesis .rmc-dial > i {
  background: var(--night-2);
}

/* Wide-to-compact desktop */
@media (max-width: 1360px) {
  :root {
    --rail-width: 82px;
    --evidence-width: 332px;
  }

  body:not(.rail-open) .brand-copy,
  body:not(.rail-open) .new-sitting > span:nth-child(2),
  body:not(.rail-open) .new-sitting kbd,
  body:not(.rail-open) .rail-label,
  body:not(.rail-open) .nav-item > span:nth-child(2),
  body:not(.rail-open) .nav-item i,
  body:not(.rail-open) .recent-prompts,
  body:not(.rail-open) .engine-status > span:nth-child(2),
  body:not(.rail-open) .engine-status > .material-symbols,
  body:not(.rail-open) .user-card > span:nth-child(2),
  body:not(.rail-open) .user-card > .material-symbols {
    display: none;
  }

  body:not(.rail-open) .rail-brand {
    padding-inline: 18px;
    justify-content: center;
  }

  body:not(.rail-open) .rail-collapse {
    display: none;
  }

  body:not(.rail-open) .new-sitting {
    width: 48px;
    height: 48px;
    margin-inline: auto;
    padding: 0;
    grid-template-columns: 1fr;
    place-items: center;
  }

  body:not(.rail-open) .nav-item,
  body:not(.rail-open) .engine-status,
  body:not(.rail-open) .user-card {
    grid-template-columns: 1fr;
    place-items: center;
    padding-inline: 0;
  }

  body:not(.rail-open) .rail-scroll {
    padding-inline: 13px;
  }

  body:not(.rail-open) .user-menu {
    position: fixed;
    left: 88px;
    bottom: 14px;
    width: 230px;
  }

  .home-content {
    margin-right: min(10vw, 100px);
  }

  .home-atmosphere {
    right: -18%;
  }
}

@media (max-width: 1120px) {
  :root {
    --evidence-width: 0px;
  }

  body.evidence-open .app-shell,
  .app-shell:has(#evidencePanel:not([hidden])),
  body.rail-collapsed.evidence-open .app-shell,
  body.rail-collapsed .app-shell:has(#evidencePanel:not([hidden])) {
    grid-template-columns: var(--rail-width) minmax(0, 1fr);
  }

  .evidence-panel {
    position: fixed;
    z-index: 120;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(380px, 100vw);
    box-shadow: -30px 0 80px rgba(0, 0, 0, 0.28);
  }

  .home-atmosphere {
    opacity: 0.42;
  }

  .answer-mode-wrap {
    display: none;
  }
}

@media (max-width: 820px) {
  :root {
    --rail-width: 0px;
    --rail-collapsed: 0px;
    --header-height: 64px;
  }

  .app-shell,
  body.rail-collapsed .app-shell,
  body.evidence-open .app-shell,
  .app-shell:has(#evidencePanel:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }

  .left-rail {
    position: fixed;
    z-index: 150;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 88vw);
    transform: translateX(-102%);
    box-shadow: 30px 0 80px rgba(0, 0, 0, 0.32);
    transition: transform 350ms var(--ease);
  }

  body.rail-open .left-rail {
    transform: none;
  }

  body.rail-open .brand-copy,
  body.rail-open .new-sitting > span:nth-child(2),
  body.rail-open .new-sitting kbd,
  body.rail-open .rail-label,
  body.rail-open .nav-item > span:nth-child(2),
  body.rail-open .nav-item i,
  body.rail-open .recent-prompts,
  body.rail-open .engine-status > span:nth-child(2),
  body.rail-open .engine-status > .material-symbols,
  body.rail-open .user-card > span:nth-child(2),
  body.rail-open .user-card > .material-symbols {
    display: initial;
  }

  body.rail-open .rail-brand {
    padding: 14px 14px 8px 18px;
    justify-content: space-between;
  }

  body.rail-open .rail-collapse {
    display: grid;
  }

  body.rail-open .new-sitting {
    width: auto;
    height: auto;
    margin: 14px 15px 10px;
    padding: 0 15px;
    grid-template-columns: 22px 1fr auto;
    place-items: initial;
  }

  body.rail-open .nav-item,
  body.rail-open .engine-status,
  body.rail-open .user-card {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    place-items: initial;
    padding-inline: 10px;
  }

  body.rail-open .rail-scroll {
    padding-inline: 10px;
  }

  body.rail-open .user-menu {
    position: absolute;
    left: 12px;
    bottom: 72px;
    width: calc(100% - 24px);
  }

  .mobile-rail-open {
    display: grid;
  }

  .workspace-header {
    padding-inline: 14px;
  }

  #workspaceTitle::after,
  .grounding-chip,
  .workspace-actions > .icon-button {
    display: none;
  }

  #workspaceSubtitle {
    font-size: 14px;
  }

  .home-scene {
    padding: 45px 20px 55px;
    place-items: start;
  }

  .home-content {
    margin: 0;
  }

  .home-atmosphere {
    width: 440px;
    right: -240px;
    top: 37%;
  }

  .home-content h1 {
    font-size: clamp(68px, 20vw, 100px);
  }

  .conversation-feed {
    width: calc(100% - 32px);
    padding-top: 38px;
  }

  .answer-signature {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .answer-orbit {
    width: 58px;
    height: 58px;
  }

  .answer-time {
    display: none;
  }

  .answer-body h2,
  .answer-body h3 {
    font-size: 29px;
  }

  .council-turn > header {
    min-height: auto;
    padding-right: 0;
    padding-bottom: 300px;
  }

  .council-orbit {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 30px;
    transform: translateX(-50%);
  }

  .council-perspectives {
    grid-template-columns: 1fr;
  }

  .council-member,
  .council-perspectives > article {
    min-height: 210px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .council-synthesis {
    grid-template-columns: 1fr;
  }

  .composer-dock {
    padding-inline: 10px;
  }

  .composer-note span:first-child {
    display: none;
  }

  .composer-note {
    justify-content: flex-end;
  }

  .selector-button {
    padding-inline: 8px;
  }

  .depth-button small {
    display: none;
  }

  .mandala-chamber {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 30px);
    overflow-y: auto;
  }

  .mandala-chamber > header {
    padding: 58px 34px 36px;
    border-right: 0;
    border-bottom: 1px solid var(--night-line);
  }

  .mandala-chamber h2 {
    font-size: 52px;
  }

  .mandala-grid {
    overflow: visible;
    padding: 30px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-card {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 28px);
    overflow-y: auto;
  }

  .auth-threshold {
    min-height: 320px;
    padding: 52px 38px 38px;
  }

  .auth-orbit {
    left: auto;
    right: 35px;
    top: 35px;
    width: 82px;
    height: 82px;
    font-size: 30px;
  }

  .auth-threshold h2 {
    font-size: 58px;
  }

  .auth-form-panel {
    padding: 45px 38px;
  }
}

@media (max-width: 560px) {
  .workspace-actions .evidence-toggle {
    min-width: 42px;
    width: 42px;
  }

  .evidence-toggle > span:nth-child(2),
  .evidence-toggle i {
    display: none;
  }

  .home-intro {
    font-size: 14px;
  }

  .principle-row {
    gap: 8px 0;
  }

  .principle-row span {
    width: 50%;
    padding: 0 10px 0 0;
    border-right: 0;
  }

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

  .starter-grid button,
  .starter-grid button:nth-child(odd),
  .starter-grid button:nth-last-child(-n + 2) {
    min-height: 118px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .starter-grid button:last-child {
    border-bottom: 0;
  }

  .user-turn > blockquote,
  .turn-user > blockquote {
    font-size: 30px;
  }

  .answer-body {
    font-size: 14px;
  }

  .answer-footer,
  .answer-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .answer-actions:has(.practice-action) {
    grid-template-columns: 1fr;
  }

  .rmchart {
    padding: 17px;
  }

  .rmc-brow {
    grid-template-columns: minmax(65px, 0.8fr) minmax(80px, 1.4fr) auto;
    gap: 7px;
  }

  .rmc-donut {
    grid-template-columns: 1fr;
  }

  .rmc-dial {
    width: 112px;
    height: 112px;
    margin-inline: auto;
  }

  .council-synthesis {
    padding: 28px;
  }

  .context-bar > span,
  .answer-mode-wrap,
  .sage-button {
    display: none;
  }

  .composer-controls {
    gap: 5px;
  }

  .mode-switch button {
    padding-inline: 7px;
  }

  .composer {
    grid-template-columns: 28px minmax(0, 1fr) 38px 44px;
    padding-left: 11px;
  }

  .evidence-panel {
    width: 100%;
  }

  .overlay {
    padding: 14px;
  }

  .mandala-chamber {
    width: calc(100vw - 28px);
  }

  .mandala-grid {
    padding: 20px;
    grid-template-columns: 1fr 1fr;
  }

  .mandala-grid button {
    min-height: 105px;
  }

  .auth-card {
    width: calc(100vw - 28px);
  }

  .auth-threshold {
    min-height: 270px;
    padding: 42px 28px 30px;
  }

  .auth-threshold h2 {
    font-size: 49px;
  }

  .auth-threshold > p:not(.eyebrow),
  .auth-principles {
    display: none;
  }

  .auth-orbit {
    width: 68px;
    height: 68px;
    font-size: 25px;
  }

  .auth-form-panel {
    padding: 38px 28px;
  }

  .auth-form-panel h3 {
    font-size: 32px;
  }

  .consent-card,
  .feature-gate-card {
    width: calc(100vw - 28px);
    padding: 48px 28px 34px;
  }

  .consent-card h2,
  .feature-gate-card h2 {
    font-size: 48px;
  }

  .consent-preview {
    grid-template-columns: 1fr;
  }

  .consent-preview span {
    min-height: 58px;
    border-right: 0;
    border-bottom: 1px solid var(--night-line);
  }

  .consent-preview span:last-child {
    border-bottom: 0;
  }
}

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

@media (forced-colors: active) {
  .engine-orb::after,
  .grounding-chip i,
  .depth-orb {
    forced-color-adjust: none;
  }
}
