:root { color: #e8e0d5; background: #171616; font-family: Georgia, serif; --ink: #e8e0d5; --muted: #bdb4a8; --line: #4b463f; --panel: #211f1d; --panel-strong: #27221c; --accent: #e1a457; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% 0%, #2a2118 0, #171616 34rem); }
main { max-width: 1040px; margin: 0 auto; min-height: calc(100vh - 60px); padding: 56px 24px 40px; }
header { border-bottom: 1px solid var(--line); margin-bottom: 28px; }
h1 { font-size: clamp(2rem, 6vw, 4rem); margin: 0 0 12px; letter-spacing: -0.04em; }
p { color: var(--muted); line-height: 1.5; }
.eyebrow { color: var(--accent); font: 700 0.75rem/1 ui-monospace, monospace; letter-spacing: 0.12em; }
.lede { max-width: 38rem; font-size: 1.05rem; }
#messages { display: grid; gap: 18px; margin-bottom: 32px; }
article { border-left: 3px solid #6b665e; padding: 12px 16px; background: #211f1d; }
article.assistant { border-color: #e1a457; background: #27221c; }
article strong, label, button { font-family: ui-monospace, monospace; }
pre { white-space: pre-wrap; font: 0.95rem/1.55 ui-monospace, monospace; margin: 10px 0 0; color: #ded6cb; }
input, select, textarea { width: 100%; padding: 12px; border: 1px solid #686056; border-radius: 2px; background: #111; color: #fff; font: 1rem/1.4 ui-monospace, monospace; }
textarea { margin-top: 8px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
button { border: 0; padding: 12px 18px; background: #e1a457; color: #1c1711; cursor: pointer; font-weight: 700; }
button:disabled { opacity: 0.6; cursor: wait; }
button.button-danger { margin-left: 8px; background: transparent; color: #e98e7e; border: 1px solid #8d4d43; }
button.button-danger:hover { background: #3a211e; }
#status { color: #e1a457; font: 0.85rem ui-monospace, monospace; }
.site-nav { display: flex; gap: 1rem; align-items: center; padding: 0.8rem max(1.2rem, calc((100vw - 1040px) / 2 + 1.2rem)); border-bottom: 1px solid var(--line); background: rgba(23, 22, 22, .9); }
.site-nav a { color: inherit; text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--accent); }
.nav-spacer { flex: 1; }
.site-nav button { cursor: pointer; }
.site-nav form { margin: 0; }
.site-footer { max-width: 1040px; margin: 0 auto; padding: 0 24px 24px; color: #827a70; }
.site-footer small { font: .72rem ui-monospace, monospace; }
.auth-shell { min-height: calc(100vh - 120px); display: grid; place-items: center; }
.auth-card { width: min(100%, 440px); padding: 42px; border: 1px solid var(--line); background: rgba(33, 31, 29, .9); box-shadow: 0 24px 70px rgba(0, 0, 0, .3); }
.auth-card h1 { font-size: clamp(2.4rem, 8vw, 3.5rem); }
.stack-form { display: grid; gap: 9px; }
.stack-form label { margin-top: 8px; color: var(--muted); font-size: .82rem; }
.stack-form button { margin-top: 14px; }
.form-message { min-height: 1.4em; font: .82rem ui-monospace, monospace; }
.error { color: #e98e7e; }
.admin-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.5fr); gap: 20px; margin-bottom: 20px; }
.panel { padding: 26px; margin-bottom: 20px; border: 1px solid var(--line); background: rgba(33, 31, 29, .85); }
.panel-wide { min-width: 0; }
.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.section-heading h2 { margin: 6px 0 20px; }
.section-heading .eyebrow { margin: 0; }
.muted { color: #827a70; font: .75rem ui-monospace, monospace; }
.inline-form { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.inline-form input { max-width: 360px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font: .82rem ui-monospace, monospace; }
th, td { padding: 13px 10px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--accent); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
td { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.status { display: inline-block; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; font: .7rem ui-monospace, monospace; text-transform: uppercase; }
.status-completed { color: #a9d6a4; border-color: #52734f; }
.status-failed { color: #e98e7e; border-color: #8d4d43; }
.status-running { color: var(--accent); border-color: #8e6a3f; }
.run-meta { display: grid; grid-template-columns: 140px 1fr; gap: 10px 20px; margin: 0; font: .8rem ui-monospace, monospace; }
.run-meta dt { color: var(--accent); }
.run-meta dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.event-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; font: .8rem ui-monospace, monospace; }
.event-list li { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.event-list span { color: #827a70; }
.panel-error { border-color: #8d4d43; }
@media (max-width: 720px) {
  main { padding: 36px 16px 28px; }
  .site-nav { padding-inline: 16px; gap: .7rem; font-size: .85rem; }
  .admin-grid { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .page-heading, .section-heading { display: block; }
  .inline-form { display: grid; grid-template-columns: 1fr; }
  .inline-form input { max-width: none; }
  .auth-card { padding: 28px 22px; }
  .run-meta { grid-template-columns: 1fr; gap: 4px; }
  .event-list li { display: grid; gap: 4px; }
}
