:root {
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  color: #212525;
  background: #f4f3f0;
  --ink: #212525;
  --muted: #5d6260;
  --line: #d8dbd5;
  --paper: #fcfcfa;
  --accent: #204e45;
  --accent-light: #d7e9df;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
.shell { width: min(77rem, 100% - 3rem); margin: 0 auto; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 4rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: flex; gap: 1rem; align-items: center; color: var(--ink); text-decoration: none; font-size: .86rem; letter-spacing: .09em; font-weight: 700; }
.brand span { padding-left: 1rem; border-left: 1px solid var(--line); color: var(--muted); font-weight: 500; letter-spacing: 0; }
main { padding: 3.7rem 0 4rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: Georgia, serif; font-size: clamp(2.5rem, 7vw, 4.6rem); line-height: 1; font-weight: 400; letter-spacing: -.055em; }
h2 { font-size: 1.45rem; letter-spacing: -.035em; }
h3 { font-size: 1.08rem; line-height: 1.3; }
p { line-height: 1.55; }
.intro, .section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.intro { margin-bottom: 3.2rem; }
.intro p, .login-copy > p { margin-top: .85rem; color: var(--muted); }
.section { margin-bottom: 2.6rem; }
.section-head { align-items: center; margin-bottom: .9rem; }
.section-head p { color: var(--muted); font-size: .875rem; text-align: end; }
a { color: var(--accent); text-underline-offset: .2em; }
button, .button, input, select { font: inherit; }
button, .button { border: 1px solid transparent; border-radius: .4rem; background: var(--accent); color: white; padding: .58rem .86rem; cursor: pointer; text-decoration: none; font-weight: 600; line-height: 1.4; white-space: nowrap; }
button:hover, .button:hover { background: #173b35; }
button:disabled { opacity: .55; cursor: default; }
.quiet { background: transparent; border-color: var(--line); color: var(--ink); }
.quiet:hover { background: #e8ede7; }
:focus-visible { outline: 2px solid #7a521e; outline-offset: 3px; }
.job-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .9rem; }
.job { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 1.15rem; display: flex; flex-direction: column; gap: .6rem; min-height: 12rem; }
.job-head, .job-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem .8rem; }
.state { font-size: .82rem; border-radius: 1rem; padding: .16rem .55rem; background: #e9ebe6; font-weight: 650; }
.state[data-state="running"], .state[data-state="complete"] { background: var(--accent-light); color: #153b2d; }
.state[data-state="blocked"], .state[data-state="paused"], .state[data-state="stale"] { background: #f6e8cf; color: #573717; }
.job-figure { font-family: Georgia, serif; font-size: 1.65rem; letter-spacing: -.035em; }
.job-figure:empty { display: none; }
.job-detail { flex: 1; color: var(--muted); min-height: 2.1rem; font-size: .9rem; }
.job-foot { border-top: 1px solid var(--line); padding-top: .65rem; font-size: .8rem; color: var(--muted); }
#status-error, #library-message, #auth-message { color: var(--muted); margin: .65rem 0; }
#status-error { color: #813d24; }
.library { border-block-start: 1px solid var(--line); padding-top: 1.45rem; }
.filters { display: flex; gap: .7rem; flex-wrap: wrap; align-items: end; }
.filters label:first-child { flex: 1 1 16rem; }
label { display: grid; gap: .36rem; font-size: .88rem; font-weight: 650; }
input, select { min-height: 2.6rem; min-width: 0; padding: .53rem .62rem; border: 1px solid #a5aca2; border-radius: .35rem; color: var(--ink); background: white; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 36rem; border-collapse: collapse; text-align: left; background: var(--paper); }
thead { background: #e7eae4; }
th, td { padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
th { font-size: .88rem; }
td { font-size: .91rem; }
td:first-child { width: 42%; overflow-wrap: anywhere; }
td:last-child { text-align: right; }
td button { font-size: .85rem; }
.table-footer { padding-top: .8rem; }
.login { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); border: 1px solid var(--line); margin: 2rem auto; max-width: 52rem; min-height: 25rem; }
.login-art { background: radial-gradient(ellipse at 72% 16%, #89ab92 0%, transparent 53%), radial-gradient(ellipse at 20% 90%, #36564b, #102f2a 72%); }
.login-copy { align-self: center; padding: clamp(1.6rem, 5vw, 3rem); }
.login-copy h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
#auth-form { display: grid; gap: .45rem; margin-top: 1.6rem; }
#auth-form button { margin-top: .35rem; justify-self: start; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 800px) { .job-grid { grid-template-columns: 1fr; } .job { min-height: 10rem; } }
@media (max-width: 560px) {
  .shell { width: calc(100% - 1.6rem); }
  main { padding-top: 2rem; }
  .intro { align-items: start; flex-direction: column; margin-bottom: 2rem; }
  .login { grid-template-columns: 1fr; margin: .5rem auto; }
  .login-art { min-height: 6rem; }
  .section-head p { max-width: 12rem; }
}
