:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #23182a;
  --muted: #6b5f70;
  --line: #e6dfd6;
  --brand: #361f3d;
  --brand-ink: #f6efe2;
  --accent: #b7862a;
  --accent-soft: #f6ead0;
  --link: #6a2f78;
  --new: #2f7a4a;
  --new-soft: #e3f2e8;
  --day: #f1ebe2;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17121a; --surface: #211a25; --ink: #efe8f1; --muted: #a99db0; --line: #362c3b;
    --brand: #2a1830; --brand-ink: #f6efe2; --accent: #e3b45a; --accent-soft: #3a2f1c;
    --link: #d6a8e2; --new: #7fd09b; --new-soft: #1f3527; --day: #2a2230;
  }
}
:root[data-theme="dark"] {
  --bg: #17121a; --surface: #211a25; --ink: #efe8f1; --muted: #a99db0; --line: #362c3b;
  --brand: #2a1830; --brand-ink: #f6efe2; --accent: #e3b45a; --accent-soft: #3a2f1c;
  --link: #d6a8e2; --new: #7fd09b; --new-soft: #1f3527; --day: #2a2230;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; }
a { color: var(--link); }
.page { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; padding-top: 48px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.masthead { background: var(--brand); color: var(--brand-ink); padding: 28px 0 24px; border-bottom: 4px solid var(--accent); }
.brand { font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 700; color: inherit; text-decoration: none; letter-spacing: .3px; }
.narrow .brand { color: var(--brand); font-size: 26px; }
.tagline { margin: 4px 0 0; opacity: .85; }

h1, h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; }
h2 { font-size: 22px; margin: 0 0 6px; }

.signup { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: center; margin: 24px 0; padding: 20px; background: var(--accent-soft); border-radius: 12px; }
.signup p { margin: 0; color: var(--muted); }
#signup { display: flex; flex-wrap: wrap; gap: 10px; }
#signup input[type=email] { flex: 1 1 220px; min-width: 0; }
input, select, button { font: inherit; color: inherit; }
input, select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
button, .button { padding: 10px 18px; border: 0; border-radius: 8px; background: var(--brand); color: var(--brand-ink); cursor: pointer; font-weight: 600; text-decoration: none; display: inline-block; }
button:hover, .button:hover { filter: brightness(1.15); }
.msg { flex-basis: 100%; min-height: 1.5em; margin: 0; font-size: 14px; }
.msg.ok { color: var(--new); }
.msg.err { color: #b3261e; }

.listhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 8px; }
.stats { margin: 0; color: var(--muted); font-size: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); }
.tabs button { background: none; color: var(--muted); border-radius: 8px 8px 0 0; padding: 8px 14px; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 700; margin-bottom: -2px; border-bottom: 3px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.note { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.why { display: block; color: var(--muted); font-size: 12px; }
.intl { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 4px; background: var(--new-soft); color: var(--new); vertical-align: 2px; white-space: nowrap; }
.jobs tr.pin td { background: var(--new-soft); color: var(--new); font-weight: 700; font-size: 13px; padding: 7px 12px; }
.jobs tr.pin td span { font-weight: 400; }
.controls { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 16px; }
.controls label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.controls label.grow { flex: 1 1 260px; }
.controls input, .controls select { width: 100%; color: var(--ink); }

table.jobs { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.jobs th { text-align: left; font-size: 13px; background: var(--surface); border-bottom: 2px solid var(--line); padding: 0; }
.jobs th button { width: 100%; text-align: left; background: none; color: var(--muted); padding: 10px 12px; border-radius: 0; font-weight: 600; }
.jobs th button[aria-sort] { color: var(--ink); }
.jobs th button[aria-sort="ascending"]::after { content: " \2191"; }
.jobs th button[aria-sort="descending"]::after { content: " \2193"; }
.jobs td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
.jobs tr.day td { background: var(--day); font-weight: 700; font-size: 13px; color: var(--muted); padding: 7px 12px; }
.jobs td.when { white-space: nowrap; color: var(--muted); font-size: 14px; }
.jobs .title { font-weight: 600; }
.jobs .sub { display: block; color: var(--muted); font-size: 13px; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--day); color: var(--muted); white-space: nowrap; }
.new { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 4px; background: var(--new-soft); color: var(--new); vertical-align: 2px; }
.empty { color: var(--muted); padding: 20px 0; }
.more { text-align: center; }
.foot { color: var(--muted); font-size: 13px; padding-top: 12px; padding-bottom: 40px; }

@media (max-width: 760px) {
  .brand { font-size: 28px; }
  .signup { grid-template-columns: 1fr; }
  table.jobs, .jobs tbody, .jobs tr, .jobs td { display: block; width: 100%; }
  .jobs thead { display: none; }
  .jobs tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .jobs tr.day { padding: 0; }
  .jobs td { border: 0; padding: 2px 0; }
  .jobs td.when { display: none; }
  .jobs tr.day td { padding: 7px 12px; }
}
