@font-face {
  font-family: Inter;
  src: url(/assets/inter.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --paper: #f6f4ef;
  --ink: #232722;
  --muted: #687064;
  --accent: #c74425;
  --line: #deded5;
  --sage: #e6ecdf;
  --white: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: inherit;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  letter-spacing: -1px;
  font-weight: 650;
  text-decoration: none;
}
.brand img {
  width: 27px;
  height: 27px;
}
.eyebrow {
  font:
    10px ui-monospace,
    monospace;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  color: var(--accent);
  margin: 0 0 15px;
}
.muted {
  color: var(--muted);
  line-height: 1.6;
}
.small {
  font-size: 12px;
}
.btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 17px;
  background: white;
  color: var(--ink);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 500;
}
.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.btn.orange {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn.ghost {
  background: transparent;
}
.btn.danger {
  color: #ad301b;
}
.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.auth-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-story {
  background: #e2e8da;
  padding: 55px 7vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 50px;
}
.auth-story h1 {
  font-size: clamp(48px, 5vw, 84px);
  font-weight: 550;
  letter-spacing: -0.065em;
  line-height: 1.05;
  max-width: 590px;
}
.auth-story h1 span {
  color: var(--accent);
}
.auth-story p {
  line-height: 1.8;
  max-width: 410px;
}
.auth-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
}
.form-wrap {
  width: 100%;
  max-width: 400px;
}
.form-wrap h2 {
  font-size: 35px;
  letter-spacing: -1.5px;
  font-weight: 550;
  margin: 12px 0;
}
.form-stack {
  display: grid;
  gap: 17px;
  margin-top: 25px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
}
input,
select,
textarea {
  border: 1px solid #ccd2c5;
  border-radius: 7px;
  background: white;
  padding: 12px 13px;
  width: 100%;
  min-width: 0;
  color: var(--ink);
}
textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #b9c8ab;
  outline-offset: 0;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.form-error {
  color: #a62d17;
  background: #fff0eb;
  padding: 12px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.6;
}
.form-error:empty {
  display: none;
}
.text-button {
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
}
.app-shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100svh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.sidebar .brand {
  font-size: 21px;
  margin-bottom: 9px;
}
.workspace-label {
  font: 9px monospace;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 9px 0 36px 37px;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav button {
  border: 0;
  background: none;
  text-align: left;
  padding: 12px 14px;
  border-radius: 7px;
  color: #626b5c;
  font-size: 13px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.nav button.active {
  background: var(--sage);
  color: var(--ink);
  font-weight: 600;
}
.nav button span {
  font-family: monospace;
  color: var(--accent);
  font-size: 16px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 25px;
  font-size: 11px;
}
.sidebar-bottom .btn {
  margin-top: 15px;
  width: 100%;
}
.workspace {
  min-width: 0;
}
.topbar {
  padding: 20px 40px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sage);
  display: grid;
  place-items: center;
  font-size: 12px;
}
.identity {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.env {
  font: 10px monospace;
  letter-spacing: 0.4px;
  color: var(--muted);
}
.test-banner {
  padding: 10px 40px;
  background: #fff0db;
  color: #735324;
  font-size: 11px;
  line-height: 1.6;
}
.content {
  padding: 42px;
  max-width: 1500px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}
.page-heading h1 {
  font-size: 42px;
  letter-spacing: -2px;
  font-weight: 550;
  line-height: 1.12;
  margin: 0 0 12px;
}
.page-heading p {
  margin: 0;
  max-width: 640px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat {
  border: 1px solid var(--line);
  padding: 24px;
  background: #fff;
  border-radius: 12px;
}
.stat-label {
  font-size: 11px;
  color: var(--muted);
}
.stat-value {
  font-size: 34px;
  letter-spacing: -1px;
  margin: 14px 0 4px;
}
.stat-foot {
  font-size: 10px;
  color: var(--muted);
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 27px;
  margin-bottom: 20px;
}
.panel h2 {
  font-size: 21px;
  letter-spacing: -0.6px;
  font-weight: 550;
  margin: 0 0 18px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
.panel-header h2 {
  margin: 0;
}
.task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.task-card {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.task-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 20px;
  font: 9px monospace;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.badge {
  font: 10px monospace;
  border-radius: 20px;
  padding: 5px 9px;
  background: var(--sage);
  color: #44563a;
  white-space: nowrap;
}
.badge.warn {
  background: #fff0db;
  color: #735324;
}
.badge.dark {
  background: var(--ink);
  color: white;
}
.task-card h3 {
  font-size: 21px;
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
}
.task-card p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 20px;
  overflow-wrap: anywhere;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.tag {
  font-size: 9px;
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 20px;
}
.task-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.price {
  font-size: 24px;
  letter-spacing: -1px;
}
.price small {
  font-size: 10px;
  letter-spacing: 0;
  color: var(--muted);
}
.empty {
  padding: 45px 20px;
  border: 1px dashed #c7cfbf;
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.empty b {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 550;
  margin-bottom: 8px;
}
.onboarding {
  background: var(--sage);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
}
.onboarding h2 {
  font-weight: 550;
  margin: 0 0 17px;
  font-size: 23px;
}
.checklist {
  display: grid;
  gap: 12px;
  font-size: 12px;
}
.checklist > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.checklist .btn {
  font-size: 11px;
  padding: 7px 12px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.span2 {
  grid-column: 1/-1;
}
.agent-row,
.notification {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.agent-row:first-child,
.notification:first-child {
  border-top: 0;
}
.agent-row h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 550;
}
.code-box {
  background: var(--ink);
  color: #dce8d2;
  padding: 20px;
  border-radius: 8px;
  font: 12px/1.8 monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 350px;
  overflow: auto;
}
.note {
  background: #f0f3eb;
  border-radius: 8px;
  padding: 15px;
  font-size: 11px;
  line-height: 1.7;
  color: #59664e;
  margin: 18px 0;
}
.warning {
  background: #fff0db;
  color: #735324;
}
.chat {
  min-height: 230px;
  max-height: 400px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  margin: 18px 0;
}
.bubble {
  padding: 13px 16px;
  font-size: 13px;
  line-height: 1.7;
  background: #f0f3eb;
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.user {
  background: #e2e9d9;
  margin-left: 20px;
}
.chat-compose {
  display: flex;
  gap: 10px;
}
.chat-compose input {
  flex: 1;
}
.detail-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.detail-copy {
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.detail-grid > div {
  border: 1px solid var(--line);
  padding: 13px;
  border-radius: 7px;
  font-size: 12px;
}
.detail-grid span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}
.timeline {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 20px;
}
.timeline > div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  font-size: 11px;
  margin: 12px 0;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 32px;
  width: min(680px, calc(100vw - 30px));
  max-height: 90svh;
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop {
  background: #20251db3;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 28px;
  letter-spacing: -1px;
  line-height: 1.15;
  font-weight: 550;
  padding-right: 24px;
  margin: 0 0 20px;
}
.close {
  position: absolute;
  right: 15px;
  top: 11px;
  background: none;
  border: 0;
  font-size: 25px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 23px;
  background: var(--ink);
  color: white;
  border-radius: 10px;
  font-size: 12px;
  max-width: 90vw;
  z-index: 20;
  box-shadow: 0 8px 30px #0002;
  display: none;
}
#toast.visible {
  display: block;
}
.loading {
  min-height: 100svh;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.mobile-brand {
  display: none;
}
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-row button {
  font-size: 11px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 20px;
}
.filter-row button.active {
  background: var(--ink);
  color: white;
}
.file-link {
  display: block;
  font-size: 12px;
  margin: 8px 0;
  color: var(--accent);
}
@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 195px 1fr;
  }
  .sidebar {
    padding: 25px 15px;
  }
  .content {
    padding: 30px;
  }
  .topbar {
    padding: 20px 30px;
  }
  .task-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 40px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 18px;
  }
}
@media (max-width: 700px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 30px;
    gap: 15px;
  }
  .auth-story h1 {
    font-size: 42px;
    margin: 20px 0;
  }
  .auth-story > p,
  .auth-story > div:last-child {
    display: none;
  }
  .auth-form {
    padding: 35px 25px;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    margin: 0;
  }
  .workspace-label,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    display: flex;
    overflow: auto;
    gap: 4px;
    margin-top: 20px;
  }
  .nav button {
    padding: 10px;
    font-size: 11px;
    white-space: nowrap;
  }
  .nav button span {
    display: none;
  }
  .topbar {
    padding: 14px 22px;
  }
  .content {
    padding: 28px 20px;
  }
  .test-banner {
    padding: 10px 22px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .page-heading h1 {
    font-size: 34px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat:last-child {
    grid-column: 1/-1;
  }
  .stat-value {
    font-size: 28px;
  }
  .stat-foot {
    font-size: 9px;
  }
  .panel {
    padding: 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span2 {
    grid-column: auto;
  }
  .task-card {
    padding: 20px;
  }
  .agent-row {
    align-items: flex-start;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .checklist > div {
    align-items: flex-start;
  }
  .checklist {
    line-height: 1.6;
  }
  .env {
    font-size: 8px;
  }
  .identity {
    font-size: 10px;
  }
  .code-box {
    font-size: 10px;
  }
  dialog {
    padding: 25px;
  }
  .chat-compose {
    flex-wrap: wrap;
  }
  .chat-compose .btn {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.task-chat { margin: 28px 0; border: 1px solid #ddd8ce; border-radius: 16px; padding: 20px; }
.task-chat-heading,.task-chat-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.task-chat-heading h3 { margin: 0; }
.task-chat-log { display: flex; flex-direction: column; gap: 12px; max-height: 360px; min-height: 90px; overflow-y: auto; overscroll-behavior: contain; padding: 12px 2px; margin-bottom: 14px; }
.task-chat-message { max-width: 90%; padding: 12px 15px; background: #f0eee8; border: 1px solid #e3dfd5; border-radius: 14px 14px 14px 3px; align-self: flex-start; overflow-wrap: anywhere; }
.task-chat-message.mine { background: #e8eee3; border-color: #d4dfcd; border-radius: 14px 14px 3px 14px; align-self: flex-end; }
.task-chat-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 11px; color: #55584f; }
.task-chat-message p { white-space: pre-wrap; margin: 7px 0 0; font-size: 14px; line-height: 1.55; }
.task-chat textarea { min-height: 85px; }
@media(max-width:600px) { .task-chat { padding: 12px; } .task-chat-message { max-width: 96%; } }
