:root {
  color-scheme: light;
  --bg: #ffffff;
  --sidebar: #f1f6ff;
  --ink: #142d4e;
  --muted: #5a6d85;
  --line: #dce6f3;
  --accent: #1d4ed8;
  --pale: #edf4ff;
  --surface: #ffffff;
  --amber: #2563eb;
  --danger: #a94035;
  --success: #396347;
  font-family:var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:not(:disabled):hover {
  filter: brightness(0.97);
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input,
textarea,
select {
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
a {
  color: var(--accent);
}
.primary {
  padding: 12px 20px;
  min-height: 44px;
  border-radius: 10px;
  background: var(--primary, var(--amber));
  color: var(--on-primary, #fff);
}
.secondary {
  border: 1px solid var(--line);
  padding: 11px 18px;
  border-radius: 10px;
  min-height: 42px;
}
.danger {
  color: var(--danger);
}
.muted,
small {
  color: var(--muted);
}
.small {
  font-size: 12px;
  line-height: 1.8;
}
.icon-button {
  height: 42px;
  min-width: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-size: 23px;
  color: var(--muted);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 276px;
  background: var(--sidebar);
  padding: 30px 20px 14px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 8px 32px;
  color: inherit;
  text-decoration: none;
}
.brand strong {
  font-size: 25px;
  letter-spacing: 3px;
}
.brand > span:last-child {
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--muted);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--primary, var(--amber));
  border-radius: 12px;
  color: var(--pale);
  font-size: 30px;
}
.workspace-picker {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 18px;
  padding: 4px 6px 4px 12px;
}
.workspace-picker select {
  border: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
  height: 42px;
}
.workspace-picker .icon-button {
  font-size: 20px;
  min-width: 30px;
}
.new-chat {
  text-align: center;
  margin-bottom: 16px;
}
.primary-nav {
  display: grid;
  gap: 8px;
}
.primary-nav button {
  text-align: left;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
}
.primary-nav button.selected {
  background: var(--pale);
  color: var(--accent);
}
.recent-label {
  margin: 33px 12px 16px;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
}
#chat-search {
  background: transparent;
  border: 0;
  width: 100%;
  padding: 10px 12px;
  font-size: 12px;
  outline-color: var(--accent);
}
.conversation-list {
  overflow-y: auto;
  flex: 1;
  min-height: 60px;
  margin-top: 8px;
}
.chat-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 5px;
  border-radius: 10px;
  padding: 3px 6px;
}
.chat-row.active {
  background: var(--line);
}
.chat-row > .chat-title {
  flex: 1;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 13px 7px;
  font-size: 12px;
}
.chat-menu {
  min-width: 28px;
  font-size: 20px;
  color: var(--muted);
  border-radius: 6px;
}
.empty-nav {
  padding: 16px 12px;
  font-size: 12px;
  color: var(--muted);
}
.account-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #d4d9ce;
  text-align: left;
  min-height: 70px;
  padding: 16px 4px 2px;
  margin-top: 15px;
}
.account-entry > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.account-entry strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-symbol {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--line);
  font-size: 22px;
}
.main-shell {
  margin-left: 276px;
  height: 100dvh;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 79px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 30px;
}
.heading {
  flex: 1;
  min-width: 0;
}
.heading h1 {
  font-size: 14px;
  margin: 0 0 6px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.heading > span {
  font-size: 11px;
  color: var(--muted);
}
.credit-pill {
  font-size: 11px;
  padding: 11px 14px;
  border-radius: 30px;
  background: var(--sidebar);
  color: var(--accent);
  white-space: nowrap;
}
.topbar .icon-button {
  font-size: 24px;
}
.mobile-only {
  display: none;
}
#main-content {
  flex: 1;
  min-height: 0;
  position: relative;
}
.view {
  height: 100%;
  overflow: auto;
}
.chat-view {
  display: flex;
  flex-direction: column;
  position: relative;
}
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px max(32px, calc((100% - 840px) / 2));
  scroll-behavior: smooth;
}
.messages:empty {
  display: none;
}
.message {
  margin-bottom: 24px;
}
.message-header {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.message-header strong {
  color: var(--ink);
  font-weight: 600;
}
.message-header .copy-message {
  margin-left: auto;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 11px;
}
.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.9;
  user-select: text;
}
.message.user .message-body {
  background: var(--sidebar);
  border-radius: 12px;
  padding: 14px 17px;
}
.message.error .message-body {
  color: var(--danger);
}
.message-files {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.typing {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 0;
}
.welcome {
  max-width: 850px;
  width: 100%;
  padding: 80px 35px 30px;
  margin: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.8px;
  color: var(--muted);
  font-weight: 500;
}
.welcome h2 {
  font-size: 42px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -1.5px;
  margin: 20px 0 14px;
}
.welcome > p {
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
  margin: 0;
}
.start-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
  margin: 34px 0 16px;
}
.suggestions {
  display: flex;
  gap: 12px;
}
.suggestions button {
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  padding: 17px 15px;
  flex: 1;
  min-width: 0;
  background: var(--surface);
}
.suggestions button > span {
  display: block;
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 16px;
}
.suggestions strong {
  font-size: 12px;
  display: block;
  font-weight: 500;
}
.suggestions small {
  font-size: 10px;
  display: block;
  margin-top: 7px;
}
.composer-area {
  padding: 15px max(32px, calc((100% - 860px) / 2)) 16px;
  flex-shrink: 0;
}
.composer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 15px 15px 10px;
  box-shadow: 0 3px 18px #25372a03;
}
#composer-text {
  width: 100%;
  resize: none;
  min-height: 54px;
  max-height: 180px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
  line-height: 1.7;
  padding: 0 2px;
}
#composer-text::placeholder {
  color: var(--muted);
}
.composer-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}
.composer-tools select {
  border: 0;
  outline-color: var(--accent);
  background: transparent;
  max-width: 160px;
  color: var(--accent);
  font-size: 12px;
  padding: 8px 0;
}
.composer-tools select:disabled {
  appearance: none;
  opacity: 1;
}
.composer-tools .icon-button {
  font-size: 25px;
  min-width: 32px;
  height: 32px;
}
.send-hint {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}
.send-button {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: var(--primary, var(--amber));
  color: var(--on-primary, #fff);
  font-size: 26px;
  flex-shrink: 0;
}
.send-button:disabled {
  background: var(--pale);
  color: var(--muted);
  opacity: 1;
}
.send-button.stop {
  font-size: 20px;
  background: var(--pale);
  color: var(--accent);
}
.composer-note {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin: 12px 0 0;
  line-height: 1.5;
}
.draft-attachments {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.attachment {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  background: var(--sidebar);
  color: var(--accent);
  font-size: 11px;
  padding: 5px 9px;
  margin-bottom: 10px;
  max-width: 100%;
}
.attachment > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment button {
  font-size: 17px;
}
.content-view {
  padding: 48px max(32px, calc((100% - 900px) / 2));
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 32px;
}
.section-heading h2 {
  font-size: 27px;
  line-height: 1.5;
  font-weight: 500;
  margin: 16px 0 10px;
}
.section-heading p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.list-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 17px 20px;
  gap: 15px;
  margin-bottom: 12px;
  background: var(--surface);
}
.list-card .details {
  flex: 1;
  min-width: 0;
}
.list-card strong {
  font-size: 13px;
  display: block;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 0;
  line-height: 1.7;
}
.list-card .state {
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
}
.list-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.text-button {
  font-size: 12px;
  padding: 10px 8px;
  color: var(--accent);
  border-radius: 8px;
}
.empty-state {
  padding: 65px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}
.storage-warning {
  padding: 10px 20px;
  background: #fff1db;
  color: #805323;
  font-size: 12px;
  line-height: 1.8;
}
.storage-warning button {
  text-decoration: underline;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 18px 60px #192d1d22;
}
dialog::backdrop {
  background: #17221d66;
}
dialog h2 {
  font-size: 23px;
  margin: 0 0 20px;
  font-weight: 600;
}
dialog p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
dialog form {
  display: grid;
  gap: 16px;
}
dialog label {
  font-size: 12px;
  line-height: 1.7;
  display: block;
}
dialog label > input {
  display: block;
  width: 100%;
  margin-top: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 45px;
  padding: 11px 12px;
  outline-color: var(--accent);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.dialog-error {
  font-size: 12px;
  color: var(--danger);
  line-height: 1.8;
  white-space: pre-wrap;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-heading h2 {
  margin-bottom: 15px;
}
.balances {
  display: flex;
  gap: 15px;
  margin: 24px 0;
}
.balances > div {
  flex: 1;
  min-width: 0;
}
.balances small {
  font-size: 10px;
  display: block;
}
.balances strong {
  display: block;
  font-size: 25px;
  color: var(--accent);
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.rate-card {
  background: var(--sidebar);
  padding: 13px 15px;
  border-radius: 11px;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.9;
  margin-bottom: 13px;
}
.ledger {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
}
.ledger h3 {
  font-size: 13px;
  margin: 0 0 10px;
}
.ledger-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 14px 0;
  font-size: 12px;
}
.ledger-row small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.6;
}
.ledger-amount {
  white-space: nowrap;
  color: var(--accent);
}
.file-preview {
  max-height: 45dvh;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 15px;
  background: var(--pale);
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.8;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--on-primary, #fff);
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 12px;
  max-width: calc(100% - 32px);
  line-height: 1.7;
  z-index: 100;
}
.boot-error {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 32px));
  padding: 25px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 0 0 100vmax #ffffffee;
  z-index: 90;
  font-size: 13px;
  line-height: 1.8;
}
.boot-error p {
  color: var(--muted);
}
@media (min-width: 1500px) {
  .sidebar {
    width: 292px;
  }
  .main-shell {
    margin-left: 292px;
  }
  .welcome {
    max-width: 900px;
  }
  .welcome h2 {
    font-size: 48px;
  }
}
@media (max-height: 780px) and (min-width: 761px) {
  .welcome {
    padding-top: 28px;
    padding-bottom: 10px;
  }
  .welcome h2 {
    font-size: 34px;
    margin: 14px 0 10px;
  }
  .start-label {
    margin-top: 23px;
  }
  .suggestions button {
    padding: 12px;
  }
  .suggestions button > span {
    margin-bottom: 10px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    width: 280px;
    padding-top: 25px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .nav-shade {
    position: fixed;
    inset: 0;
    background: #18251d66;
    z-index: 19;
  }
  .main-shell {
    margin-left: 0;
    height: 100dvh;
    min-height: 0;
  }
  .mobile-only {
    display: inline-grid;
  }
  .topbar {
    height: 77px;
    padding: 12px 14px;
    gap: 7px;
  }
  .topbar .icon-button {
    min-width: 34px;
    font-size: 23px;
  }
  .heading h1 {
    font-size: 14px;
    max-width: 180px;
  }
  .credit-pill {
    font-size: 10px;
    padding: 9px 11px;
  }
  .welcome {
    padding: 35px 24px 16px;
    justify-content: center;
    min-height: 350px;
  }
  .welcome h2 {
    font-size: 34px;
    margin: 19px 0 15px;
  }
  .welcome > p {
    font-size: 12px;
    line-height: 2;
  }
  .start-label {
    margin-top: 30px;
  }
  .suggestions {
    gap: 8px;
  }
  .suggestions button {
    padding: 14px 12px;
  }
  .suggestions button:last-child {
    display: none;
  }
  .suggestions button > span {
    font-size: 20px;
    margin-bottom: 12px;
  }
  .suggestions small {
    font-size: 10px;
  }
  .suggestions strong {
    font-size: 11px;
  }
  .composer-area {
    padding: 10px 14px max(14px, env(safe-area-inset-bottom));
  }
  .composer {
    padding: 13px 13px 8px;
    border-radius: 15px;
  }
  #composer-text {
    font-size: 16px;
    min-height: 50px;
  }
  .send-hint {
    display: none;
  }
  .send-button {
    margin-left: auto;
    width: 39px;
    height: 39px;
  }
  .composer-note {
    font-size: 9px;
    margin-top: 10px;
  }
  .messages {
    padding: 24px 21px;
  }
  .message-body {
    font-size: 14px;
  }
  .content-view {
    padding: 32px 20px;
  }
  .section-heading {
    align-items: flex-start;
    gap: 10px;
  }
  .section-heading h2 {
    font-size: 23px;
  }
  .section-heading > .primary {
    padding: 11px 13px;
    font-size: 12px;
    white-space: nowrap;
    margin-top: 28px;
  }
  .list-card {
    padding: 15px 13px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .list-actions {
    margin-left: auto;
  }
  .list-card strong {
    max-width: 200px;
  }
  .text-button {
    padding: 7px;
    font-size: 11px;
  }
  dialog {
    padding: 22px 20px;
    max-height: calc(100dvh - 32px);
  }
  dialog h2 {
    font-size: 22px;
  }
  .balances {
    gap: 8px;
  }
  .balances strong {
    font-size: 23px;
  }
  .toast {
    bottom: 20px;
    width: max-content;
  }
}
@media (max-width: 350px) {
  .credit-pill {
    max-width: 104px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .heading h1 {
    max-width: 120px;
  }
  .welcome {
    padding: 25px 20px 12px;
  }
  .welcome h2 {
    font-size: 30px;
  }
  .welcome > p {
    font-size: 11px;
  }
  .suggestions small {
    display: none;
  }
  .start-label {
    margin-top: 22px;
  }
  .suggestions button > span {
    margin-bottom: 7px;
  }
  .composer-area {
    padding-left: 12px;
    padding-right: 12px;
  }
  .list-card strong {
    max-width: 160px;
  }
}
@media (max-height: 680px) and (max-width: 760px) {
  .welcome {
    min-height: 0;
    padding: 20px 20px 10px;
    overflow: auto;
  }
  .welcome h2 {
    font-size: 27px;
    margin: 12px 0;
  }
  .welcome > p {
    display: none;
  }
  .start-label {
    margin: 16px 0 10px;
  }
  .suggestions button > span,
  .suggestions small {
    display: none;
  }
  .suggestions button {
    padding: 13px 10px;
  }
  .composer-note {
    margin-top: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.code-row {
  display: flex;
  gap: 10px;
  align-items: end;
}
.code-row label {
  flex: 1;
  min-width: 0;
}
.code-row button {
  flex-shrink: 0;
  margin-bottom: 14px;
}
.account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}
.session-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line, #e4e7df);
}
.session-row div {
  min-width: 0;
}
.session-row small {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 6px;
  color: var(--muted);
}

.skill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}
.skill-filters input {
  flex: 1;
  min-width: 160px;
}
.skill-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin: 22px 0;
}
.skill-card {
  border: 1px solid var(--line, #e8e8e2);
  background: white;
  border-radius: 14px;
  padding: 22px;
}
.skill-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.skill-card p {
  line-height: 1.7;
}
.skill-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.skill-actions small {
  flex-basis: 100%;
}
.skill-installed {
  float: right;
  color: var(--accent);
  font-size: 11px;
  font-weight: 400;
}
.skill-instructions {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 320px;
  overflow: auto;
  padding: 16px;
  background: var(--sidebar);
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.8;
}
.skill-active {
  color: var(--accent);
  font-size: 12px;
  margin: 0 0 8px;
}
.skill-active:empty {
  display: none;
}

#model-select {
  max-width: 170px;
}
@media (max-width: 480px) {
  #model-select {
    max-width: 110px;
  }
}

/* Ruffo home: one task surface, followed by the user's actual work. */
.brand { gap: 11px; padding-bottom: 30px; }
.brand strong { font-size: 27px; letter-spacing: -1.1px; font-weight: 700; }
.brand-mark { background: none; border-radius: 11px; }
.primary { background: var(--primary, var(--amber)); }
.primary-nav button.selected { color: var(--accent); background: var(--pale); }
.account-entry { border-color: var(--line); }
.topbar { border-bottom-color: transparent; }
.chat-view.is-home { overflow-y: auto; display: block; padding: clamp(32px, 7vh, 80px) 0 40px; }
.is-home .welcome { width: 100%; max-width: 800px; margin: 0 auto; padding: 0 24px 27px; text-align: center; align-items: center; min-height: 0; }
.hero-mark { display: block; margin: 0 auto 20px; }
.is-home .eyebrow { font-size: 12px; letter-spacing: 0.2px; color: var(--muted); }
.is-home .welcome h2 { font-size: clamp(27px, 3vw, 39px); font-weight: 600; line-height: 1.4; letter-spacing: -1.3px; margin: 16px 0 12px; }
.is-home .welcome > p { display: block; font-size: 13px; line-height: 1.9; }
.is-home .composer-area { max-width: 800px; padding: 0 28px; margin: 0 auto; }
.composer { border-color: var(--line); border-radius: 19px; padding: 18px 17px 12px; box-shadow: 0 5px 22px #142d4e08; }
.composer:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 3px #3b82f61f; }
#composer-text { min-height: 68px; }
#composer-text::placeholder { color: var(--muted); }
.send-button { background: var(--primary, var(--amber)); color: var(--on-primary, #fff); border-radius: 12px; }
.send-button:disabled { background: var(--pale); color: var(--muted); }
.composer-tools select { color: var(--ink); }
.composer-note { color: var(--muted); font-size: 10px; }
.home-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 16px auto 0; padding: 0 20px; }
.home-actions button { font-size: 11px; color: var(--muted); padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px; }
.home-actions button:hover { background: var(--sidebar); color: var(--ink); }
.home-context { max-width: 800px; margin: 38px auto 0; padding: 0 28px; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.home-section-heading h3 { font-size: 12px; font-weight: 600; margin: 0; }
.home-section-heading button { color: var(--muted); padding: 8px 0 8px 12px; font-size: 11px; }
.home-work { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 17px 0; border-top: 1px solid var(--line); }
.home-work:hover { background: #edf4ff99; }
.work-symbol { color: var(--muted); font-size: 17px; width: 22px; text-align: center; }
.work-detail { flex: 1; min-width: 0; }
.work-detail strong { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-detail small { display: block; font-size: 10px; margin-top: 6px; }
.work-status { color: var(--muted); font-size: 10px; white-space: nowrap; }
.work-status.running { color: var(--accent); }
.work-status.failed { color: var(--danger); }
.home-empty { font-size: 12px; color: var(--muted); padding: 22px 0; border-top: 1px solid var(--line); margin: 0; }
@media (max-width: 760px) {
  .chat-view.is-home { padding-top: 32px; }
  .is-home .welcome { padding: 0 20px 24px; }
  .is-home .composer-area, .home-context { padding-left: 16px; padding-right: 16px; }
  .is-home .welcome > p { font-size: 12px; max-width: 280px; }
  .composer-tools { gap: 4px; flex-wrap: wrap; }
  .send-hint { display: none; }
  .send-button { margin-left: auto; }
  .home-context { margin-top: 28px; }
  .topbar { gap: 5px; padding-left: 10px; padding-right: 10px; }
}
@media (max-height: 680px) { .chat-view.is-home { padding-top: 22px; } .hero-mark { width: 44px; height: 44px; margin-bottom: 14px; } }

.tripo-panel { max-width: 560px; }
.tripo-panel .muted { color: var(--muted, var(--muted)); font-size: 13px; line-height: 1.7; }
.tripo-connect { display: grid; gap: 14px; margin: 22px 0 12px; }
.tripo-connect label { display: grid; gap: 7px; }
.tripo-connect select { min-height: 40px; width: 100%; }
.tripo-billing { padding: 12px 0; border-bottom: 1px solid var(--line); }
.tripo-task { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 12px 0; overflow-wrap: anywhere; }
.tripo-task p { margin: 8px 0; }
.tripo-task small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 12px; }
.tripo-task progress { width: 100%; height: 4px; accent-color: #6c7852; }
.tripo-preview { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: 8px; background: var(--sidebar); margin: 12px 0; }
.tripo-connection { margin: 22px 0 12px; }
.tripo-panel h2 { margin: 0 0 12px; }
.tripo-panel p { margin: 10px 0; }
.tripo-panel .tripo-connect { margin: 14px 0 10px; gap: 10px; }
.tripo-connect select { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: var(--surface); font: inherit; }
.tripo-panel .dialog-actions { margin-top: 16px; }

.dashboard { max-width: 800px; margin: 28px auto 0; padding: 0 28px; }
.dashboard-heading { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.dashboard-heading h3 { flex:1; font-size:13px; font-weight:600; margin:0; }
.dashboard-heading button { font-size:11px; padding:6px; }
.dashboard-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.dashboard-panel { min-width:0; border:1px solid var(--line); border-radius:12px; background:var(--paper,var(--surface)); }
.dashboard-panel > header { display:flex; align-items:center; padding:8px 12px; gap:8px; height:42px; }
.dashboard-panel > header strong { flex:1; font-size:12px; font-weight:500; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.dashboard-menu { position:relative; }
.dashboard-menu summary { list-style:none; cursor:pointer; color:var(--muted); padding:0 5px; }
.dashboard-menu summary::-webkit-details-marker { display:none; }
.dashboard-menu[open] { z-index:2; }
.dashboard-menu[open] summary { background:var(--sidebar); }
.dashboard-menu-items { position:absolute; top:calc(100% + 5px); right:0; width:108px; padding:4px; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:0 5px 20px #142d4e12; }
.dashboard-menu-items > button { display:block; width:100%; text-align:left; border:0; border-radius:5px; padding:7px 10px; font-size:12px; }
.dashboard-menu-items > button:hover { background:var(--sidebar); }
.dashboard-html { display:block; width:100%; border:0; border-radius:0 0 12px 12px; background:var(--surface); }
.dashboard-card-text { padding:16px; white-space:pre-wrap; overflow-wrap:anywhere; overflow:auto; font-size:13px; line-height:1.8; margin:0; }
.dashboard-status { font-size:12px; color:var(--muted); padding:14px 0; border-top:1px solid var(--line); }
.dashboard-dialog { width:min(640px,calc(100vw - 32px)); max-height:90dvh; overflow:auto; padding:24px; }
.dashboard-dialog h2 { font-size:18px; margin:0 0 20px; }
.dashboard-dialog label { display:block; font-size:12px; margin:12px 0; }
.dashboard-dialog input, .dashboard-dialog select, .dashboard-dialog textarea { display:block; width:100%; margin:8px 0 0; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--surface,var(--surface)); color:var(--ink); font:inherit; }
.dashboard-dialog textarea { resize:vertical; font:12px/1.7 ui-monospace,monospace; }
.dashboard-editor-options { display:flex; gap:16px; }
.dashboard-editor-options label { flex:1; }
.dashboard-editor-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:18px; }
.dashboard-error { color:#a53e30; font-size:12px; }
.dashboard-preview { border-radius:8px; overflow:hidden; }
.dashboard-trash-row { display:flex; justify-content:space-between; align-items:center; gap:12px; border-top:1px solid var(--line); padding:10px 0; font-size:13px; }
@media(max-width:760px) { .dashboard { padding:0 16px; } .dashboard-grid { grid-template-columns:1fr; } .dashboard-dialog { padding:18px; } }

.dashboard-tool-link { display:flex; align-items:center; gap:10px; padding:11px 0; color:var(--ink); text-decoration:none; border-bottom:1px solid var(--line); white-space:normal; }
.dashboard-tool-link:last-child { border-bottom:0; }
.dashboard-tool-link > span:first-child { flex:1; min-width:0; }
.dashboard-tool-link strong { display:block; font-size:12px; font-weight:500; }
.dashboard-tool-link small { display:block; font-size:10px; color:var(--muted); margin-top:3px; }
.dashboard-tool-link:hover strong { color:var(--accent); }
.dashboard-link-row { display:flex; align-items:center; gap:8px; }
.dashboard-link-row > div { flex:1; min-width:0; }
.dashboard-link-row > button { flex-shrink:0; }

button.dashboard-tool-link { width:100%; text-align:left; background:transparent; border-radius:0; }
.tool-viewer { width:min(1180px,calc(100vw - 24px)); height:90dvh; max-width:none; max-height:none; padding:0; overflow:hidden; }
.tool-viewer[open] { display:flex; flex-direction:column; }
.tool-viewer > header { display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--line); flex-shrink:0; }
.tool-viewer > header > div { flex:1; min-width:0; }
.tool-viewer strong { display:block; font-size:14px; font-weight:600; }
.tool-viewer small { display:block; color:var(--muted); font-size:11px; margin-top:4px; }
.tool-viewer iframe { flex:1; min-height:0; width:100%; border:0; background:var(--surface); }
.tool-frame-blocked { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:24px; text-align:center; font-size:13px; color:var(--muted); }
.tool-viewer-note { margin:0; padding:8px 16px; color:var(--muted); font-size:10px; border-top:1px solid var(--line); }
@media(max-width:600px){.tool-viewer > header { gap:5px; padding:10px; }.tool-viewer > header .text-button { font-size:10px; padding:5px; }}

/* Decorative ink illustrations load after the workspace becomes interactive. */
.ruffo-illustration,.hero-illustration { display:block; width:172px; height:112px; object-fit:contain; margin:0 auto 12px; }
@media (max-height:640px) { .hero-illustration { width:144px; height:94px; margin-bottom:10px; } }

/* Homepage download and blue/white identity. */
.windows-download{display:inline-flex;align-items:center;gap:8px;margin-top:20px;text-decoration:none;font-weight:600}
.windows-download:hover{background:#1e40af}
.download-meta{display:block;margin-top:9px;font-size:11px;color:var(--muted)}
.is-home .welcome h2{max-width:700px;font-size:clamp(25px,3vw,38px);letter-spacing:-.8px;text-wrap:balance}

.topbar .heading{min-width:0}.topbar .heading h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
