:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #141413;
  --ink: #e8e5df;
  --muted: #b9b6b0;
  --line: #353532;
  --red: #ff3038;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
::selection {
  background: var(--red);
  color: #050505;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  outline-offset: 5px;
}
*:focus-visible {
  outline: 2px solid var(--red);
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  left: 20px;
  top: -100px;
  z-index: 4;
  background: var(--ink);
  color: #000;
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
header,
main,
footer {
  width: min(1140px, calc(100% - 96px));
  margin: auto;
}
header {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  width: 185px;
  height: auto;
  display: block;
}
nav,
.toolbar {
  display: flex;
  align-items: center;
  gap: 22px;
}
nav a {
  font-size: 13px;
  text-decoration: none;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #615f5b;
  color: var(--ink);
  padding: 11px 22px;
  min-height: 44px;
  border-radius: 100px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.button:hover {
  border-color: var(--ink);
  background: #252522;
}
.button.primary {
  background: var(--red);
  border-color: var(--red);
  color: #050505;
}
.button.primary:hover {
  background: #ff6268;
}
.button.small {
  font-size: 13px;
  padding: 9px 16px;
}
.hero {
  padding: 32px 0 64px;
}
.hero-logo {
  display: block;
  width: 100%;
  max-width: 970px;
  height: auto;
  margin: 0 auto 36px;
}
.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: start;
}
.hero h1 {
  font-size: clamp(34px, 3.8vw, 48px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0;
}
.hero p {
  font-size: 17px;
  line-height: 1.6;
  max-width: 44ch;
  margin: 0 0 22px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.section-title h1,
.section-title h2 {
  margin: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 500;
}
h2 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
.muted,
.fine {
  color: var(--muted);
}
.fine {
  font-size: 12px;
  line-height: 1.5;
}
.mono,
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.status {
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted);
}
.status.ready,
.status.completed {
  color: #9de3b6;
}
.status.failed,
.status.uncertain {
  color: #ffaaa5;
}
.status.running,
.status.queued {
  color: #eacb8b;
}
#console,
#auth-panel {
  padding: 32px 0 54px;
}
#auth-panel {
  max-width: 650px;
  min-height: 450px;
}
#workspace-id {
  margin: 8px 0 0;
  max-width: 45ch;
  overflow-wrap: anywhere;
}
.console-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
}
.agents-panel {
  border-right: 1px solid var(--line);
  padding-right: 30px;
}
.agent-row {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.agent-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.agent-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.agent-row p {
  margin: 6px 0;
  font-size: 12px;
}
.agent-row .button {
  margin-top: 8px;
}
.agent-settings {
  border: 0;
}
.agent-settings summary {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0;
  min-height: 44px;
}
.empty {
  padding: 28px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.empty h3 {
  color: var(--ink);
  margin: 0 0 6px;
}
.empty p {
  margin: 0;
  max-width: 50ch;
}
form {
  margin-top: 20px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 16px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  background: var(--surface);
  border: 1px solid #55534f;
  color: var(--ink);
  border-radius: 12px;
  padding: 11px 13px;
  min-height: 44px;
  caret-color: var(--red);
}
textarea {
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: #aaa7a2;
}
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.form-footer p {
  margin: 0;
  max-width: 34ch;
}
.form-footer button {
  flex-shrink: 0;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 18px;
  padding: 12px;
}
fieldset label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  font-weight: 400;
}
fieldset input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--red);
}
.task-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 20px;
}
.task-toolbar h3 {
  margin: 0;
}
.filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 12px;
}
.filter select {
  margin: 0;
  width: 140px;
  padding: 7px;
  min-height: 44px;
}
.task-row {
  width: 100%;
  background: transparent;
  color: var(--ink);
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 18px 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border-radius: 8px;
}
.task-row:hover {
  background: #141412;
}
.task-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.task-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 45ch;
}
.task-meta {
  text-align: right;
}
#task-detail {
  margin-top: 24px;
  background: var(--surface);
  padding: 24px;
  border-radius: 16px;
}
#task-detail pre {
  white-space: pre-wrap;
  font-size: 13px;
  max-height: 400px;
  overflow: auto;
}
#credential,
#notice {
  background: #211b16;
  padding: 20px;
  margin: 20px 0;
  border-radius: 16px;
}
#credential code {
  display: block;
  word-break: break-all;
  margin: 14px 0;
}
#credential h3 {
  margin: 0 0 8px;
}
#credential > button {
  margin-top: 16px;
}
#notice.error {
  background: #291616;
  color: #ffb5b0;
}
.guide {
  border-top: 1px solid var(--line);
  padding: 8px 0 26px;
}
details {
  border-top: 1px solid var(--line);
}
.guide > details {
  border: 0;
}
.guide > details > summary {
  font-size: 16px;
}
.setup-body {
  padding: 0 0 20px;
  max-width: 720px;
}
summary {
  padding: 18px 0;
  cursor: pointer;
  font-size: 15px;
  min-height: 44px;
}
summary:hover {
  color: var(--red);
}
.details-body {
  max-width: 75ch;
  padding-bottom: 24px;
}
.details-body p {
  color: var(--muted);
}
pre {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  overflow: auto;
  white-space: pre-wrap;
}
.endpoint {
  font-family: ui-monospace, monospace;
}
.steps {
  padding-left: 24px;
  margin: 8px 0 16px;
}
.steps li {
  padding-left: 4px;
  margin-bottom: 18px;
}
.steps pre {
  margin: 10px 0;
}
.install-choice {
  display: flex;
  gap: 22px;
  font-size: 13px;
  margin-top: 8px;
}
.endpoint-row {
  margin-top: 22px;
}
.endpoint-row label {
  margin-bottom: 0;
}
.copy-field {
  display: flex;
  gap: 10px;
  align-items: center;
}
.copy-field input {
  margin: 0;
  min-width: 0;
}
.copy-field button {
  flex-shrink: 0;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  color: var(--muted);
  font-size: 12px;
}
#sign-in {
  margin: 26px 0;
  min-height: 200px;
}
.cl-rootBox,
.cl-cardBox {
  max-width: 100%;
}
.cl-socialButtonsBlockButton {
  min-height: 44px !important;
  color: var(--ink) !important;
  border-color: #55534f !important;
  border-radius: 100px !important;
}
.cl-socialButtonsBlockButtonText {
  color: var(--ink) !important;
}
.cl-formButtonPrimary {
  min-height: 44px !important;
  background: var(--red) !important;
  color: #050505 !important;
  border-radius: 100px !important;
}
.cl-formButtonPrimary:hover {
  background: #ff6268 !important;
}
.cl-formFieldLabel {
  margin-bottom: 0;
}
.cl-footerActionLink {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.cl-socialButtonsProviderIcon__github {
  filter: brightness(0) invert(1);
}
.cl-card {
  border-radius: 16px !important;
}
.cl-rootBox {
  margin: auto;
}
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-thumb {
  background: #55534f;
  border-radius: 100px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
@media (max-width: 900px) {
  header,
  main,
  footer {
    width: calc(100% - 48px);
  }
  .hero-bottom {
    gap: 40px;
  }
  .console-grid {
    grid-template-columns: 270px 1fr;
    gap: 26px;
  }
  .agents-panel {
    padding-right: 20px;
  }
  .task-title {
    max-width: 26ch;
  }
  .section-title {
    flex-wrap: wrap;
  }
}
@media (max-width: 650px) {
  header,
  main,
  footer {
    width: calc(100% - 32px);
  }
  header {
    height: 80px;
  }
  .header-logo {
    width: 150px;
  }
  nav {
    gap: 12px;
  }
  .hero {
    padding: 26px 0 44px;
  }
  .hero-logo {
    margin-bottom: 32px;
  }
  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero h1 {
    font-size: 35px;
  }
  .hero p {
    font-size: 16px;
  }
  .console-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .agents-panel {
    border-right: 0;
    padding-right: 0;
  }
  .form-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .form-footer button {
    width: 100%;
  }
  .task-title {
    max-width: 28ch;
  }
  .task-row {
    grid-template-columns: 1fr;
  }
  .task-meta {
    text-align: left;
    display: flex;
    gap: 14px;
    align-items: center;
  }
  #console {
    padding-top: 26px;
  }
  .toolbar {
    gap: 12px;
  }
  footer {
    flex-wrap: wrap;
  }
  footer nav a {
    font-size: 12px;
  }
  h1 {
    font-size: 28px;
  }
  .filter select {
    width: 125px;
  }
  .copy-field {
    align-items: stretch;
  }
  .copy-field input {
    font-size: 11px;
  }
  .agent-row {
    padding: 16px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
#settings,
#cli-consent,
#oauth-consent {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  max-width: 760px;
}
#settings p,
#cli-consent p,
#oauth-consent p {
  max-width: 65ch;
}
.credential-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.credential-row p {
  margin: 4px 0 0;
}
.danger-settings {
  margin-top: 24px;
}
.danger-settings form {
  max-width: 360px;
}
#cli-consent input {
  max-width: 320px;
  font-size: 20px;
  letter-spacing: 0.12em;
}
#settings-link {
  color: var(--ink);
}

@media (max-width: 650px) {
  .cl-socialButtons {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }
  .cl-socialButtonsBlockButton {
    width: 100% !important;
  }
  .cl-socialButtonsBlockButtonText {
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
  }
}
