@font-face {
  font-family: "Azu";
  src: url("/afro_test.otf?v=20260824a") format("opentype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #182026;
  --on-ink: #f7f8f5;
  --muted: #5c6870;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --line: #d8ded7;
  --green: #176b52;
  --error: #b71c1c;
  --on-error: #f7f8f5;
  --shadow: 0 16px 40px rgba(24, 32, 38, 0.08);
  --rail: #f1f2ee;
  --ground: none;
}

html[data-theme="sun"] {
  --ink: #2a1f0a;
  --on-ink: #fff8e7;
  --muted: #8a7040;
  --paper: #fff8e7;
  --panel: #fff0d0;
  --line: #f0d48a;
  --green: #e67e22;
  --error: #8b1a10;
  --on-error: #fff8e7;
  --rail: #ffe8b0;
  --ground: linear-gradient(135deg, #f2c14e 0%, #f5a623 38%, #f8e0a0 72%, #fff8e7 100%);
}

html[data-theme="moon"] {
  --ink: #202124;
  --on-ink: #f5f6f7;
  --muted: #5c636b;
  --paper: #f5f6f7;
  --panel: #eceef1;
  --line: #c5cad1;
  --green: #7a8fa6;
  --error: #b71c1c;
  --on-error: #f5f6f7;
  --rail: #e4e6e9;
  --ground: none;
}

html[data-theme="earth"] {
  --ink: #1a1008;
  --on-ink: #e8f5e9;
  --muted: #4a3a28;
  --paper: #e8f5e9;
  --panel: #dcedc8;
  --line: #a5d6a7;
  --green: #1b7a3d;
  --error: #8b1a10;
  --on-error: #e8f5e9;
  --rail: #c8e6c9;
  --ground: linear-gradient(135deg, #3e7a3c 0%, #6b8f4e 38%, #c4b07a 72%, #e8d4a8 100%);
}

html[data-theme="mercury"] {
  --ink: #1c2228;
  --on-ink: #eef1f3;
  --muted: #5a6570;
  --paper: #eef1f3;
  --panel: #e2e6ea;
  --line: #c5ccd4;
  --green: #5c6b7a;
  --error: #b71c1c;
  --on-error: #eef1f3;
  --rail: #d5dbe2;
  --ground: linear-gradient(135deg, #8a93a0 0%, #a8b0a0 38%, #c8d0b8 72%, #e8f0d8 100%);
}

html[data-theme="venus"] {
  --ink: #202124;
  --on-ink: #f7f0f3;
  --muted: #6a5460;
  --paper: #f7f0f3;
  --panel: #f0e6eb;
  --line: #e2c8d2;
  --green: #c45b7a;
  --error: #8b1a10;
  --on-error: #f7f0f3;
  --rail: #e8d8e0;
  --ground: linear-gradient(135deg, #e8c8d4 0%, #eed8e0 38%, #f2eaee 72%, #e8e6e8 100%);
}

html[data-theme="mars"] {
  --ink: #2a0c08;
  --on-ink: #fff0ec;
  --muted: #7a4034;
  --paper: #fff0ec;
  --panel: #ffe0d8;
  --line: #e8a090;
  --green: #b71c1c;
  --error: #5c0a0a;
  --on-error: #fff0ec;
  --rail: #ffd0c4;
  --ground: linear-gradient(135deg, #c0392b 0%, #d35400 38%, #e8a070 72%, #f5e0d0 100%);
}

html[data-theme="jupiter"] {
  --ink: #1a1030;
  --on-ink: #f5f0ff;
  --muted: #5a4878;
  --paper: #f5f0ff;
  --panel: #e8e0f8;
  --line: #c4b0e8;
  --green: #7e57c2;
  --error: #8b1a10;
  --on-error: #f5f0ff;
  --rail: #d8ccf0;
  --ground: linear-gradient(135deg, #5e35b1 0%, #7e57c2 38%, #c4a060 72%, #f5e6c8 100%);
}

html[data-theme="saturn"] {
  color-scheme: dark;
  --ink: #ffffff;
  --on-ink: #1a1a1a;
  --muted: #b0b0b0;
  --paper: #1a1a1a;
  --panel: #1e1e1e;
  --line: #333333;
  --green: #1a73e8;
  --error: #ff8a80;
  --on-error: #1a1a1a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --rail: #2a2a2a;
  --ground: none;
}

html[data-theme="uranus"] {
  --ink: #0a2a30;
  --on-ink: #eefcff;
  --muted: #3a6a70;
  --paper: #eefcff;
  --panel: #d8f4f8;
  --line: #a0e4ec;
  --green: #00838f;
  --error: #b71c1c;
  --on-error: #eefcff;
  --rail: #c0ecf2;
  --ground: linear-gradient(135deg, #00acc1 0%, #26c6da 38%, #80deea 72%, #e0f7fa 100%);
}

html[data-theme="neptune"] {
  --ink: #12182e;
  --on-ink: #f0f2ff;
  --muted: #4a5278;
  --paper: #f0f2ff;
  --panel: #e0e4f8;
  --line: #b0bee8;
  --green: #7e57c2;
  --error: #b71c1c;
  --on-error: #f0f2ff;
  --rail: #d0d6f0;
  --ground: linear-gradient(135deg, #5c6bc0 0%, #7986cb 38%, #b39ddb 72%, #e8eaf6 100%);
}

html[data-theme="pluto"] {
  color-scheme: dark;
  --ink: #f5e6ea;
  --on-ink: #1a0c10;
  --muted: #c4a8b0;
  --paper: #1a0c10;
  --panel: #241018;
  --line: #4a2834;
  --green: #b71c1c;
  --error: #ff8a80;
  --on-error: #1a0c10;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --rail: #3a1c28;
  --ground: linear-gradient(135deg, #6b1528 0%, #4a0e1a 38%, #2a0810 72%, #0a0406 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--ground);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.45;
}

:is(html, body)[data-script="azu"] .script-content,
:is(html, body)[data-script="azu"] .account-chip,
:is(html, body)[data-script="azu"] .signin-form,
:is(html, body)[data-script="azu"] .result-item,
:is(html, body)[data-script="azu"] .msg,
:is(html, body)[data-script="azu"] .hello,
:is(html, body)[data-script="azu"] .new-chat,
:is(html, body)[data-script="azu"] .rail-item,
:is(html, body)[data-script="azu"] .pane-card,
:is(html, body)[data-script="azu"] .profile-card,
:is(html, body)[data-script="azu"] .ticket-bar,
:is(html, body)[data-script="azu"] .thread-item,
:is(html, body)[data-script="azu"] .search,
:is(html, body)[data-script="azu"] .desk-nav,
:is(html, body)[data-script="azu"] .blog,
:is(html, body)[data-script="azu"] .results {
  font-family: "Azu", Georgia, serif;
}

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

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 40px);
}

body.desk-app {
  min-height: 100dvh;
}

.desk-top {
  position: sticky;
  justify-content: flex-end;
  background: transparent;
  pointer-events: none;
}

.desk-top .desk-chrome {
  pointer-events: auto;
}

.desk-top:empty {
  display: none;
  padding: 0;
}

.nav-show-tab {
  display: none;
  appearance: none;
  place-items: center;
  position: fixed;
  z-index: 19;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  box-shadow: var(--shadow);
  cursor: pointer;
}

html.nav-off .nav-show-tab,
#desk-nav[hidden] ~ .nav-show-tab {
  display: grid;
}

.nav-show-tab svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-nav-edge="left"] .nav-show-tab,
html:not([data-nav-edge]) .nav-show-tab {
  left: 0;
  top: 50%;
  width: 18px;
  height: 44px;
  border-left: 0;
  border-radius: 0 9px 9px 0;
  transform: translateY(-50%);
}

html[data-nav-edge="right"] .nav-show-tab {
  right: 0;
  top: 50%;
  width: 18px;
  height: 44px;
  border-right: 0;
  border-radius: 9px 0 0 9px;
  transform: translateY(-50%) rotate(180deg);
}

html[data-nav-edge="top"] .nav-show-tab {
  top: 0;
  left: 50%;
  width: 44px;
  height: 18px;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  transform: translateX(-50%) rotate(90deg);
}

html[data-nav-edge="bottom"] .nav-show-tab {
  bottom: 0;
  left: 50%;
  width: 44px;
  height: 18px;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  transform: translateX(-50%) rotate(-90deg);
}

.nav-show-tab:hover {
  color: var(--ink);
  background: var(--panel);
}

.desk-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.desk {
  display: grid;
  justify-items: center;
  align-content: start;
  visibility: visible;
  min-height: calc(100dvh - 88px);
  padding: 8vh 20px 18vh;
  gap: 18px;
}

.desk-logo,
.desk-logo img {
  width: 72px;
  height: 72px;
}

.desk-nav {
  position: fixed;
  z-index: 18;
  display: flex;
  overflow: visible;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.desk-nav-brand {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
}

.desk-nav-brand img {
  width: 40px;
  height: 40px;
}

.desk-nav-items {
  display: flex;
  gap: 4px;
}

.desk-nav-item,
.desk-nav-hide {
  appearance: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent, var(--ink));
  text-decoration: none;
  cursor: pointer;
}

.desk-nav-item {
  --accent: attr(data-accent);
  color: var(--ink);
}

.desk-nav-item svg,
.desk-nav-hide svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.desk-nav-item .nav-azu-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 1.15rem;
  line-height: 1;
}

.desk-nav-item.is-current {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 14%, transparent);
}

.desk-nav-item:hover,
.desk-nav-hide:hover {
  background: transparent;
  filter: none;
  opacity: 1;
}

.desk-nav-hide {
  color: var(--muted);
}

html.nav-off .desk-nav,
#desk-nav[hidden],
.desk-nav[hidden] {
  display: none !important;
}

html[data-nav-edge="left"] .desk-nav,
html:not([data-nav-edge]) .desk-nav {
  top: 0;
  bottom: 0;
  left: 0;
  width: 80px;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 12px;
  border-radius: 0 18px 18px 0;
}

html[data-nav-edge="right"] .desk-nav {
  top: 0;
  bottom: 0;
  right: 0;
  width: 80px;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 12px;
  border-radius: 18px 0 0 18px;
}

html[data-nav-edge="top"] .desk-nav {
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  flex-direction: row;
  align-items: center;
  padding: 0 16px;
  border-radius: 0 0 18px 18px;
}

html[data-nav-edge="bottom"] .desk-nav {
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  flex-direction: row;
  align-items: center;
  padding: 0 16px;
  border-radius: 18px 18px 0 0;
}

html[data-nav-edge="left"] .desk-nav-items,
html:not([data-nav-edge]) .desk-nav-items,
html[data-nav-edge="right"] .desk-nav-items {
  flex: 1;
  flex-direction: column;
  align-items: center;
  overflow: auto;
}

html[data-nav-edge="top"] .desk-nav-items,
html[data-nav-edge="bottom"] .desk-nav-items {
  flex: 1;
  flex-direction: row;
  align-items: center;
  overflow: auto;
}

html[data-nav-edge="left"] #desk-nav:not([hidden]) ~ .desk,
html:not([data-nav-edge]) #desk-nav:not([hidden]) ~ .desk {
  padding-left: 80px;
}

html[data-nav-edge="right"] #desk-nav:not([hidden]) ~ .desk {
  padding-right: 80px;
}

html[data-nav-edge="top"] #desk-nav:not([hidden]) ~ .desk {
  padding-top: 88px;
}

html[data-nav-edge="bottom"] #desk-nav:not([hidden]) ~ .desk {
  padding-bottom: 24px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(560px, 100%);
  padding: 10px 8px 10px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.1rem;
  outline: none;
}

.search button,
.search-go {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  cursor: pointer;
}

.search svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.results {
  width: min(560px, 100%);
}

.dot-menu {
  position: relative;
}

.dot-menu summary {
  list-style: none;
  cursor: pointer;
}

.dot-menu summary::-webkit-details-marker {
  display: none;
}

.dots {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  color: var(--ink);
}

.dots svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.dot-tray {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  width: min(280px, 78vw);
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.dot-menu:not([open]) .dot-tray {
  display: none;
}

.dot-item {
  appearance: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.dot-item:hover,
.dot-item:focus-visible {
  background: transparent;
  filter: none;
  opacity: 1;
}

.dot-item.is-active {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.dot-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.theme-pop {
  position: relative;
}

.theme-pop summary {
  list-style: none;
}

.theme-pop summary::-webkit-details-marker {
  display: none;
}

.theme-pop .theme-planets {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 22;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(220px, 70vw);
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.theme-pop:not([open]) .theme-planets {
  display: none;
}

.script-toggle {
  font-weight: 600;
}

.script-toggle .script-face {
  display: none;
  place-items: center;
}

html:not([data-script="azu"]) .script-toggle .is-alpha,
html[data-script="azu"] .script-toggle .is-azu {
  display: grid;
}

.desk-nav .desk-chrome {
  padding: 4px 0 2px;
}

html[data-nav-edge="left"] .desk-nav .desk-chrome,
html:not([data-nav-edge]) .desk-nav .desk-chrome,
html[data-nav-edge="right"] .desk-nav .desk-chrome {
  flex-direction: column;
}

html[data-nav-edge="top"] .desk-nav .desk-chrome,
html[data-nav-edge="bottom"] .desk-nav .desk-chrome {
  flex-direction: row;
  margin-left: 8px;
}

.desk-profile .profile-card {
  left: auto;
  right: 0;
  bottom: auto;
  top: calc(100% + 10px);
}

html:not([data-nav="off"])[data-nav-edge="left"] .desk-nav .profile-card,
html:not([data-nav="off"]):not([data-nav-edge]) .desk-nav .profile-card,
html:not([data-nav="off"])[data-nav-edge="left"] .desk-nav .dot-tray,
html:not([data-nav="off"]):not([data-nav-edge]) .desk-nav .dot-tray,
html:not([data-nav="off"])[data-nav-edge="left"] .desk-nav .theme-pop .theme-planets,
html:not([data-nav="off"]):not([data-nav-edge]) .desk-nav .theme-pop .theme-planets {
  left: calc(100% + 10px);
  right: auto;
  top: auto;
  bottom: 0;
}

html:not([data-nav="off"])[data-nav-edge="right"] .desk-nav .profile-card,
html:not([data-nav="off"])[data-nav-edge="right"] .desk-nav .dot-tray,
html:not([data-nav="off"])[data-nav-edge="right"] .desk-nav .theme-pop .theme-planets {
  right: calc(100% + 10px);
  left: auto;
  top: auto;
  bottom: 0;
}

html:not([data-nav="off"])[data-nav-edge="top"] .desk-nav .profile-card,
html:not([data-nav="off"])[data-nav-edge="top"] .desk-nav .dot-tray,
html:not([data-nav="off"])[data-nav-edge="top"] .desk-nav .theme-pop .theme-planets {
  top: calc(100% + 10px);
  bottom: auto;
  right: 0;
  left: auto;
}

html:not([data-nav="off"])[data-nav-edge="bottom"] .desk-nav .profile-card,
html:not([data-nav="off"])[data-nav-edge="bottom"] .desk-nav .dot-tray,
html:not([data-nav="off"])[data-nav-edge="bottom"] .desk-nav .theme-pop .theme-planets {
  bottom: calc(100% + 10px);
  top: auto;
  right: 0;
  left: auto;
}

.rail-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
}

.rail-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.rail-scrim {
  display: none;
}

.top-start,
.top-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.script-switcher,
.orb-menu {
  position: relative;
}

.script-switcher summary,
.orb-menu summary {
  list-style: none;
  cursor: pointer;
}

.script-switcher summary::-webkit-details-marker,
.orb-menu summary::-webkit-details-marker {
  display: none;
}

.brand {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.brand img {
  display: block;
  width: 42px;
  height: 42px;
}

.script-symbol,
.orb {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
}

.script-symbol {
  font-size: 1.25rem;
}

.azu-letter,
:is(html, body)[data-script="azu"] .script-symbol {
  font-family: "Azu", Georgia, serif;
}

.script-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.script-switcher:not([open]) .script-menu,
.orb-menu:not([open]) .orb-tray {
  display: none;
}

.script-option {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.2rem;
}

.script-option.is-active {
  background: var(--ink);
  color: white;
}

.orb span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ink);
}

.orb-tray {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  display: flex;
  gap: 8px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.orb-item {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px dashed var(--line);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.55rem;
  letter-spacing: 0.02em;
}

a.orb-item {
  border-style: solid;
}

html.chat-app,
body.chat-app {
  height: 100dvh;
  overflow: hidden;
}

body.chat-app {
  display: flex;
  flex-direction: column;
}

.app {
  display: flex;
  flex: 1;
  min-height: 0;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 260px;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: var(--rail);
  position: relative;
}

.stage-toggle {
  display: none;
}

.rail-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rail-collapse {
  margin-left: auto;
}

.rail-collapse {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
}

.rail-collapse svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

html.rail-slim .rail-collapse svg {
  transform: rotate(180deg);
}

html.rail-slim .rail {
  width: 72px;
  align-items: center;
}

html.rail-slim .rail-label,
html.rail-slim .rail-agents,
html.rail-slim .threads {
  display: none;
}

.rail-brand {
  width: 32px;
  height: 32px;
  margin: 0;
}

.rail-brand img {
  width: 32px;
  height: 32px;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-item,
.new-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.rail-item.is-current,
.new-chat.is-current,
.thread-item.is-current {
  background: var(--panel);
}

.rail-ico {
  width: 1.2rem;
  text-align: center;
  color: var(--muted);
}

.rail-agents {
  margin: 12px 4px 0;
}

.rail-agents h2,
.kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-item {
  margin: 0;
  padding: 4px 6px;
  color: var(--ink);
  font-size: 0.9rem;
}

.pane {
  flex: 1;
  overflow: auto;
  padding: 28px 20px;
}

.pane-card {
  width: min(640px, 100%);
  margin: 8vh auto 0;
  padding: 22px 22px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.pane-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.pane-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.pair-code {
  font-size: 2rem;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.cmd,
.file-view {
  overflow: auto;
  padding: 10px 12px;
  background: var(--paper);
  border-radius: 10px;
  font-size: 0.85rem;
}

.files {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.files button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.view {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.view.is-current {
  display: flex;
}

.threads {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
}

.thread-item {
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-item.is-current {
  background: var(--panel);
}

.stage {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.thread {
  flex: 1;
  overflow: auto;
  padding: 12px 16px 8px;
}

.hello {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 12vh 0 8vh;
  color: var(--ink);
}

.hello h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  text-align: center;
}

.msg {
  width: min(720px, 100%);
  margin: 0 auto 14px;
}

.msg.user .msg-body {
  margin-left: auto;
  width: fit-content;
  max-width: 85%;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 18px 18px 6px 18px;
}

.msg.support .msg-body {
  padding: 12px 4px;
}

.msg-body h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.msg-body p,
.escalate {
  margin: 0 0 8px;
  color: var(--muted);
}

.escalate a,
.escalate .js-person,
button.js-person {
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.msg.person .msg-body {
  padding: 12px 4px;
}

.escalate.quiet {
  font-size: 0.85rem;
}

.msg.pending .msg-body p {
  letter-spacing: 0.16em;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: min(720px, calc(100% - 24px));
  margin: 0 auto 16px;
  padding: 10px 8px 10px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.composer-plus {
  position: relative;
}

.composer-plus summary {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  list-style: none;
  cursor: pointer;
  color: var(--ink);
}

.composer-plus summary::-webkit-details-marker {
  display: none;
}

.composer-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: grid;
  gap: 4px;
  min-width: 160px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.composer-plus:not([open]) .composer-menu {
  display: none;
}

.composer-menu button,
.composer-menu a {
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  font: inherit;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.composer textarea {
  flex: 1;
  min-width: 0;
  max-height: 160px;
  border: 0;
  resize: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.4;
  outline: none;
}

.composer button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  cursor: pointer;
}

.composer svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.profile-card .signin-form,
.profile-card .note,
.profile-card .account-chip {
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.result-item,
.account-chip,
.signin-form,
.note {
  padding: 16px 18px;
  margin: 0 0 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.result-item h2,
.account-chip strong {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
}

.result-item p,
.note,
.signin-form p {
  margin: 0;
  color: var(--muted);
}

.meter {
  display: block;
  height: 4px;
  margin: 8px 0 0;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.meter > span {
  display: block;
  height: 100%;
  background: var(--green);
}

.signin-form {
  min-width: 0;
}

.rail-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  flex: 0 0 auto;
}

.rail-chrome .dot-tray {
  left: 0;
  right: auto;
  bottom: calc(100% + 10px);
  top: auto;
  justify-content: flex-start;
}

.rail-chrome .theme-pop .theme-planets {
  left: 0;
  right: auto;
  bottom: calc(100% + 8px);
  top: auto;
}

html.rail-slim .rail-chrome {
  flex-direction: column-reverse;
}

.profile-pop {
  position: relative;
}

.profile-pop summary {
  list-style: none;
  cursor: pointer;
}

.profile-pop summary::-webkit-details-marker {
  display: none;
}

.profile-round {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-weight: 600;
}

.profile-card {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 40;
  width: min(280px, 72vw);
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.profile-pop:not([open]) .profile-card {
  display: none;
}

.profile-sheet strong {
  display: block;
  margin: 0 0 8px;
  word-break: break-all;
}

.theme-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0 0;
}

.theme-row button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  cursor: pointer;
}

.theme-row button.is-active {
  background: var(--ink);
  color: var(--on-ink);
}

.theme-planets {
  padding-top: 4px;
}

.planet-chip {
  appearance: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
}

.planet-chip:hover,
.planet-chip:focus-visible {
  filter: none;
  opacity: 1;
  background-color: transparent;
  box-shadow: none;
}

.planet-chip.is-active {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.planet-chip[data-theme="paper"] {
  background: #f7f8f5;
}

.planet-chip[data-theme="sun"] {
  background: linear-gradient(135deg, #f2c14e, #fff8e7);
}
.planet-chip[data-theme="moon"] {
  background: #dce0e4;
}
.planet-chip[data-theme="earth"] {
  background: linear-gradient(135deg, #3e7a3c, #e8d4a8);
}
.planet-chip[data-theme="mercury"] {
  background: linear-gradient(135deg, #8a93a0, #e8f0d8);
}
.planet-chip[data-theme="venus"] {
  background: linear-gradient(135deg, #e8c8d4, #e8e6e8);
}
.planet-chip[data-theme="mars"] {
  background: linear-gradient(135deg, #c0392b, #f5e0d0);
}
.planet-chip[data-theme="jupiter"] {
  background: linear-gradient(135deg, #5e35b1, #f5e6c8);
}
.planet-chip[data-theme="saturn"] {
  background: #111;
}
.planet-chip[data-theme="uranus"] {
  background: linear-gradient(135deg, #00acc1, #e0f7fa);
}
.planet-chip[data-theme="neptune"] {
  background: linear-gradient(135deg, #5c6bc0, #e8eaf6);
}
.planet-chip[data-theme="pluto"] {
  background: linear-gradient(135deg, #6b1528, #0a0406);
}

.ticket-bar {
  padding: 8px 20px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.ticket-list ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

.ticket-list li {
  display: grid;
  gap: 4px;
  margin: 0 0 10px;
  font-size: 0.85rem;
}

.ticket-open {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.signin-form label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.signin-form input {
  width: 100%;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.credit-form {
  margin: 8px 0 0;
}

.credit-form button,
.signin-form button,
.ghost {
  border: 0;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.account-chip {
  min-width: 160px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.register,
.register-box {
  color: var(--muted);
  font-size: 0.85rem;
}

.register-box {
  margin-top: 14px;
}

.register-box summary {
  cursor: pointer;
}

.signin-form select {
  width: 100%;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: transparent;
  color: inherit;
}

.who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.who-icon,
.profile-mark {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.profile-mark {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.profile-name {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.blog {
  width: min(720px, 100%);
}

.blog-feed,
.blog-compose,
.blog-post {
  display: grid;
  gap: 10px;
}

.blog-compose,
.blog-post {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.blog-compose input,
.blog-compose textarea,
.blog-comment textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: transparent;
  color: inherit;
}

.blog-compose button,
.blog-comment button {
  justify-self: start;
  border: 0;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.blog-post h2 {
  margin: 0;
  font-size: 1.25rem;
}

.blog-meta {
  margin: 0;
  color: var(--muted);
}

.blog-image {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 12px;
}

.blog-comments {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.blog-comment-item {
  padding: 8px 0 0;
}

.blog-comment {
  display: grid;
  gap: 8px;
}

@media (max-width: 640px) {
  .rail-toggle,
  .stage-toggle {
    display: grid;
  }

  .stage-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
  }

  .rail {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 30;
    width: min(280px, 86vw);
    box-shadow: var(--shadow);
  }

  .rail.is-open {
    display: flex;
  }

  .rail-scrim.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(24, 32, 38, 0.28);
  }

  .orb-tray {
    flex-wrap: wrap;
    max-width: 180px;
    border-radius: 22px;
  }
}
