:root {
  --paper: #f6f8f5;
  --sheet: #ffffff;
  --ink: #17222c;
  --ink-2: #4a5a64;
  --line: #d9e0db;
  --green: #1f9e57;
  --green-dark: #17814a;
  --amber: #b97900;
  --amber-bg: #fff4d6;
  --red: #b3261e;
  --red-bg: #fdecea;
  --ui: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --num: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 16px/1.5 var(--ui);
  background: var(--paper) url("contours.svg") center top / 1400px auto repeat;
}
a { color: var(--green-dark); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 40px); }
.top img { height: 28px; display: block; }
.top nav { display: flex; align-items: center; gap: 14px; color: var(--ink-2); font-size: 15px; }
.top form { margin: 0; }

main { max-width: 980px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 64px; }
main.narrow { max-width: 440px; padding-top: 6vh; }
h1 { font-size: 30px; font-weight: 600; line-height: 1.2; margin: 0 0 6px; }
h2 { font-size: 20px; font-weight: 600; margin: 34px 0 12px; }
.lede { color: var(--ink-2); margin: 0 0 24px; max-width: 62ch; }

.sheet { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.sheet + .sheet { margin-top: 16px; }

label { display: block; font-weight: 500; font-size: 15px; margin: 0 0 14px; }
label .hint { display: block; font-weight: 400; color: var(--ink-2); font-size: 13.5px; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=number], select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; color: inherit;
  background: #fff; border: 1px solid #c4cec8; border-radius: 8px;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(31, 158, 87, 0.18); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px;
  font: 600 15px var(--ui); border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  background: var(--green); color: #fff;
}
.btn:hover { background: var(--green-dark); }
.btn.quiet { background: #fff; color: var(--ink); border-color: #c4cec8; }
.btn.quiet:hover { background: #eef2ef; }
.btn.danger { background: #fff; color: var(--red); border-color: #e7b9b5; }
.btn.small { height: 32px; padding: 0 11px; font-size: 14px; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: underline; }

.error { background: var(--red-bg); color: var(--red); border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; }
.notice { background: var(--amber-bg); color: #6b4700; border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; }
.ok { background: #e4f5eb; color: #11673a; border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; }

/* job list: rows, not cards */
.jobs { list-style: none; margin: 0; padding: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; }
.jobs li { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--line); }
.jobs li:first-child { border-top: 0; }
.jobs .title { font-size: 19px; font-weight: 600; }
.jobs .meta { color: var(--ink-2); font-size: 14.5px; }
.jobs .status { font: 500 14.5px var(--num); }
.jobs .status.soon { color: var(--amber); }
.jobs .status.ended { color: var(--red); }
.jobs .act { grid-row: 1 / span 3; grid-column: 2; display: flex; gap: 8px; }
.jobs li.ended .title { color: var(--ink-2); }
.empty { padding: 28px 22px; color: var(--ink-2); }

table { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; font-size: 15px; }
th { border-top: 0; font-weight: 600; color: var(--ink-2); background: #fbfcfb; font-size: 14px; }
td.num, td.date { font-family: var(--num); white-space: nowrap; }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 500 13px var(--num); background: #e9eeeb; color: var(--ink-2); }
.tag.ended { background: var(--red-bg); color: var(--red); }
.tag.soon { background: var(--amber-bg); color: var(--amber); }
.tag.live { background: #e4f5eb; color: #11673a; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.inline { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.inline label { margin: 0; }
.secret { font: 600 26px var(--num); letter-spacing: 0.02em; padding: 14px 16px; background: #f1f5f2; border-radius: 8px; user-select: all; }
.copybox { white-space: pre-wrap; font-size: 15px; padding: 14px 16px; background: #f1f5f2; border-radius: 8px; user-select: all; }
footer { text-align: center; color: var(--ink-2); font-size: 13.5px; padding: 0 16px 32px; }

@media (max-width: 640px) {
  .jobs li { grid-template-columns: 1fr; }
  .jobs .act { grid-row: auto; grid-column: 1; }
  .grid2 { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}
