:root {
  color-scheme: dark;
  --bg: #11151b;
  --surface: #191f28;
  --line: #2b3441;
  --ink: #eef2f5;
  --muted: #98a6b7;
  --accent: #a8e2cd;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
#app {
  max-width: 920px;
  margin: auto;
  padding: 40px 28px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
.brand {
  font-size: 15px;
  letter-spacing: 0.18em;
  font-weight: 700;
}
.brand span {
  font-weight: 400;
  color: var(--muted);
}
nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
}
h1 {
  font-size: 30px;
  letter-spacing: -0.04em;
  margin: 0 0 10px;
}
p {
  color: var(--muted);
  line-height: 1.7;
}
.input {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--surface);
  margin: 28px 0 16px;
}
textarea {
  resize: vertical;
  min-height: 54px;
  max-height: 240px;
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
}
button,
.button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}
button:hover,
.button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.primary:hover {
  color: var(--bg);
  filter: brightness(1.05);
}
.list {
  display: grid;
  gap: 8px;
}
.option,
.task {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface);
  width: 100%;
}
.option[aria-selected="true"] {
  border-color: var(--accent);
}
.option-text {
  flex: 1;
  min-width: 0;
}
.title {
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.detail {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
}
.icon {
  height: 24px;
  width: 24px;
  flex-shrink: 0;
  color: var(--accent);
}
.result {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  background: var(--surface);
}
.result-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.result-head h2 {
  font-size: 20px;
  margin: 0;
  overflow-wrap: anywhere;
}
pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 65vh;
  overflow: auto;
  color: var(--ink);
}
dl {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  gap: 14px 24px;
  line-height: 1.6;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.description {
  white-space: pre-wrap;
  max-height: 320px;
  overflow: auto;
}
.status {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 10px;
  white-space: nowrap;
  color: var(--muted);
}
.status[data-state="succeeded"] {
  color: var(--accent);
  border-color: #39765e;
}
.status[data-state="failed"],
.error {
  color: #f2a8a8;
}
.empty {
  padding: 48px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
}
.subtle {
  font-size: 13px;
  color: var(--muted);
}
footer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 48px;
}
.file {
  color: var(--accent);
  margin-bottom: 14px;
}
.task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 28px 0 22px;
}
@media (max-width: 600px) {
  #app {
    padding: 24px 16px;
  }
  header {
    margin-bottom: 34px;
  }
  .input {
    padding: 12px;
  }
  .result {
    padding: 18px;
  }
  h1 {
    font-size: 26px;
  }
  dl {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  dd {
    margin-bottom: 10px;
  }
}

/* The workspace starts with an explorable catalog; input narrows the actions. */
.input:focus-within {
  border-color: var(--accent);
}
.input textarea {
  min-width: 0;
}
.attach-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 9px;
  border-radius: 12px;
}
.tools-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 14px;
}
.tools-heading {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.browse-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.browse-button .ht-icon {
  width: 16px;
  height: 16px;
}
.tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.tool-grid .option {
  align-items: flex-start;
  padding: 20px;
  border-color: var(--line);
}
.tool-grid .option:hover,
.tool-grid .option[aria-selected="true"] {
  border-color: var(--accent);
  background: #1c292b;
}
.tool-grid .ht-icon {
  margin-top: 4px;
}
.tool-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 7px;
}
.file:empty {
  display: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .tool-grid .option {
    padding: 16px;
  }
  .tools-toolbar {
    gap: 10px;
  }
}
