@font-face {
  font-family: Manrope;
  src: url('/assets/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: Newsreader;
  src: url('/assets/newsreader.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
:root {
  font-family: Manrope, system-ui, sans-serif;
  color: #181818;
  background: #fff;
  font-synthesis: none;
  --accent: #a34f12;
  --border: #e2e3e8;
  --muted: #565963;
  --navigation: #2d34be;
  accent-color: var(--navigation);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
::selection {
  color: #181818;
  background: #f0e1d7;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #181818;
  font-weight: 650;
  cursor: pointer;
}
button:hover {
  background: #f5f5f8;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
:focus-visible {
  outline: 3px solid var(--navigation);
  outline-offset: 3px;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.primary:hover {
  background: #8a3f0e;
  border-color: #8a3f0e;
}
.danger {
  color: #a92b20;
  border-color: #edcdc8;
}
.danger:hover {
  background: #fff6f4;
}
.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #181818;
  text-decoration: none;
}
.brand img {
  object-fit: contain;
}
.brand span {
  border-left: 1px solid var(--border);
  padding-left: 24px;
  font-size: 14px;
  font-weight: 650;
}
#session-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.identity {
  max-width: 24ch;
  overflow-wrap: anywhere;
  font-size: 14px;
  color: var(--muted);
}
.workspace {
  max-width: 1480px;
  padding: 48px 40px 72px;
  margin: auto;
}
.signin {
  display: grid;
  place-items: start center;
  padding: clamp(40px, 9vh, 100px) 24px 48px;
}
.signin-panel {
  width: 100%;
  max-width: 420px;
}
h1 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 16px;
  text-wrap: balance;
}
h2 {
  font-size: 18px;
  line-height: 1.4;
  margin: 0 0 16px;
}
p {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.intro {
  color: var(--muted);
  font-size: 15px;
  max-width: 65ch;
  margin: 0 0 28px;
}
.scope-note {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8f8fa;
  font-size: 13px;
  margin: 0 0 32px;
  color: var(--muted);
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
label {
  display: block;
  margin: 20px 0 8px;
  font-size: 14px;
  font-weight: 650;
}
input:not([type='checkbox']) {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #c9cbd3;
  border-radius: 8px;
  color: #181818;
  background: #fff;
  font-size: 16px;
  caret-color: var(--accent);
}
textarea {
  display: block;
  width: 100%;
  min-height: 10rem;
  resize: vertical;
  padding: 12px;
  border: 1px solid #c9cbd3;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
  color: #181818;
  background: #fff;
  caret-color: var(--accent);
}
textarea:read-only,
textarea:disabled {
  background: #f6f6f6;
}
textarea[aria-invalid='true'] {
  border-color: #a92b20;
}
input:disabled {
  background: #f6f6f6;
}
input:user-invalid {
  border-color: #a92b20;
}
.hint,
.help {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 8px 0 16px;
}
.help {
  margin-top: 24px;
}
.signin-submit {
  width: 100%;
  margin-top: 28px;
}
.text-button {
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding-left: 0;
  color: var(--muted);
  font-size: 13px;
}
.notice {
  padding: 16px 20px;
  margin: 0 0 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #24694c;
  background: #f2faf6;
  font-size: 14px;
}
.notice.error {
  color: #a92b20;
  background: #fff6f4;
  border-color: #edcdc8;
}
.accounts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-heading h2 {
  margin: 0;
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  scrollbar-color: var(--muted) #f5f5f8;
  scrollbar-width: thin;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 13px;
  text-align: left;
}
th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
  max-width: 300px;
}
thead {
  color: var(--muted);
  background: #f8f8fa;
}
thead th {
  font-weight: 600;
}
tbody th {
  font-weight: 650;
}
tbody tr:last-child > * {
  border-bottom: 0;
}
.account-username {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-top: 5px;
}
.status-active {
  color: #24694c;
}
.status-disabled {
  color: var(--muted);
}
.create-panel {
  padding-left: 32px;
  border-left: 1px solid var(--border);
}
.create-panel button[type='submit'] {
  width: 100%;
  margin-top: 12px;
}
.checkbox {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  line-height: 1.5;
  cursor: pointer;
}
input[type='checkbox'] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.manage-panel {
  margin-top: 32px;
  padding: 24px;
  background: #f8f8fa;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.manage-panel input[type='password'] {
  max-width: 420px;
  display: block;
}
.disable-form {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.disable-form legend {
  font-weight: 650;
}
.disable-form p {
  font-size: 14px;
  color: var(--muted);
  max-width: 65ch;
}
.skip-link {
  position: absolute;
  top: 8px;
  left: 16px;
  transform: translateY(-160%);
  padding: 12px;
  background: #fff;
  color: var(--navigation);
  z-index: 2;
}
.skip-link:focus {
  transform: translateY(0);
}
.sr-only {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.noscript {
  margin: 24px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1023px) {
  .accounts-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .create-panel {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 32px 0 0;
    max-width: 560px;
  }
}
@media (max-width: 639px) {
  .topbar {
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .brand {
    gap: 16px;
  }
  .brand span {
    padding-left: 16px;
    font-size: 12px;
  }
  .brand img {
    width: 112px;
  }
  .workspace {
    padding: 32px 20px 48px;
  }
  .signin {
    padding: 40px 20px;
  }
  #session-actions {
    width: 100%;
    justify-content: space-between;
  }
  button,
  label,
  .hint {
    font-size: 16px;
  }
  .manage-panel {
    padding: 20px;
  }
  .section-heading {
    align-items: start;
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background-color 150ms ease-out;
  }
}

#versions-content {
  margin-block: 2rem 3rem;
}
#version-create {
  max-width: 36rem;
  margin-block: 1.5rem;
}
.version-row {
  border-block-start: 1px solid var(--border);
  padding-block: 1.5rem;
}
.version-row h3 {
  font-size: 1.25rem;
  margin-block: 0 1rem;
}
.version-row dl {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
}
.version-row dt {
  color: var(--muted);
}
.version-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.version-row fieldset {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 0.75rem;
  margin-block-start: 1rem;
}
.version-row form {
  flex-basis: 100%;
  max-width: 36rem;
}
.version-row form button {
  margin-block-start: 0.75rem;
}
.version-chat {
  margin-block-start: 1.5rem;
}
.version-chat summary {
  min-height: 44px;
  padding-block: 0.75rem;
  cursor: pointer;
  font-weight: 650;
}
.version-chat h4 {
  margin-block: 1.5rem 0.75rem;
  font-size: 1rem;
}
.version-row .chat-controls {
  display: block;
}
.chat-reload {
  margin-inline-start: 0.5rem;
}
.chat-history {
  margin-block-start: 1.5rem;
}
.chat-history ol {
  padding-inline-start: 1.5rem;
}
.chat-history li {
  padding-block: 0.5rem 1rem;
  border-block-end: 1px solid var(--border);
}
.chat-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .version-row dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }
  .version-row dd {
    margin-block-end: 0.75rem;
  }
}

.agent-history {
  padding-inline-start: 1.5rem;
}
.agent-history li {
  padding-block: 0.5rem 1rem;
  border-block-end: 1px solid var(--border);
}
#agent-budget-content {
  max-width: 70ch;
  margin-block: 2rem;
}

.version-editor {
  display: grid;
  grid-template-columns: minmax(20rem, 0.9fr) minmax(0, 1.3fr);
  gap: 2rem;
  align-items: start;
  padding-block-start: 1rem;
}
.editor-conversation,
.preview-pane {
  min-width: 0;
}
.preview-pane {
  border-inline-start: 1px solid var(--border);
  padding-inline-start: 2rem;
}
.preview-pane .section-heading h4 {
  margin: 0;
}
.preview-pane .notice {
  margin-block-end: 1rem;
}
.preview-viewport {
  background: #f8f8fa;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
}

.preview-width {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.preview-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block: 0.75rem;
}

.preview-selection p,
.selection-context {
  flex-basis: 100%;
  margin: 0;
}

.selection-context {
  max-height: 15rem;
  overflow: auto;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.preview-viewport:empty {
  display: none;
}
.preview-frame {
  display: block;
  width: 100%;
  height: 65vh;
  min-height: 25rem;
  border: 0;
  background: #fff;
}
@media (max-width: 1023px) {
  .version-editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .preview-pane {
    border-inline-start: 0;
    border-block-start: 1px solid var(--border);
    padding-inline-start: 0;
    padding-block-start: 1.5rem;
  }
}
