:root {
  color-scheme: light;
  --bg: #f3f5ef;
  --surface: #fff;
  --ink: #1b2b24;
  --muted: #52635a;
  --accent: #204e3d;
  --border: #dce5dc;
  --green-pale: #e8f4eb;
  --danger: #992e30;
  font: 16px/1.65 Tahoma, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--accent); text-underline-offset: .25em; }
button, .button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; min-height: 42px; }
button:disabled { opacity: .58; cursor: wait; }
:focus-visible { outline: 2px solid #327a60; outline-offset: 3px; }
.top { background: #19392e; color: #fff; }
.top-inner, .wrap { max-width: 1160px; margin: auto; padding-inline: 24px; }
.top-inner { min-height: 66px; display: flex; align-items: center; gap: 30px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: bold; color: #fff; text-decoration: none; white-space: nowrap; }
.mark { display: inline-grid; place-items: center; font: bold 24px/1 Tahoma, sans-serif; color: #19392e; width: 35px; height: 35px; border-radius: 9px; background: #c9e6d3; }
nav { display: flex; align-items: center; gap: 22px; flex: 1; }
nav a { color: #dfede4; text-decoration: none; font-size: .9rem; white-space: nowrap; }
nav a:hover { text-decoration: underline; }
.exit { background: transparent; color: #fff; border: 1px solid #638273; padding-inline: 15px; border-radius: 7px; }
.wrap { padding-block: 35px 52px; }
.heading, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.heading { margin: 0 0 21px; }
.heading p { margin: 0 0 4px; color: var(--muted); font-size: .88rem; }
h1, h2, h3 { margin: 0; line-height: 1.45; }
h1 { font-size: clamp(1.55rem, 3vw, 2.45rem); }
h2 { font-size: 1.22rem; }
h3 { font-size: 1rem; }
p { margin: 8px 0 12px; }
.today { color: var(--accent); font-weight: bold; font-variant-numeric: tabular-nums; background: #e2eee4; border-radius: 7px; padding: 5px 10px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.panel { background: var(--surface); padding: 23px; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 2px 6px #19392e08; scroll-margin-top: 16px; }
.panel > h2 { margin-bottom: 16px; }
.stack { display: grid; gap: 14px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px; }
fieldset { margin: 0; min-width: 0; padding: 0; border: 0; }
legend, label { font-weight: bold; font-size: .92rem; }
label { display: block; min-width: 0; }
label input:not([type=checkbox],[type=radio]), label select { margin-top: 5px; }
input:not([type=checkbox],[type=radio]), select, textarea { display: block; width: 100%; padding: 8px 10px; background: #fcfdfb; color: var(--ink); border: 1px solid #cdd9ce; border-radius: 7px; min-height: 44px; }
textarea { min-height: 66px; resize: vertical; }
select { text-overflow: ellipsis; }
small { color: var(--muted); font-size: .82rem; display: block; }
.notice { padding: 11px 15px; background: #fcf5e1; border: 1px solid #ecdfb0; border-radius: 9px; margin: 0 0 14px; font-size: .9rem; }
.primary, .secondary, .danger, .link-button { border-radius: 8px; padding: 7px 14px; font-weight: bold; }
.primary { display: inline-grid; place-items: center; background: var(--accent); color: white; border: 1px solid var(--accent); text-decoration: none; }
.primary:hover { background: #193d30; }
.secondary { background: #eff5ef; border: 1px solid var(--border); color: var(--accent); }
.link-button { background: transparent; border: 0; color: var(--accent); text-decoration: underline; }
.danger { background: #fff1f1; border: 1px solid #efcccc; color: var(--danger); }
.dates, .choices { display: flex; gap: 6px; flex-wrap: wrap; margin-block: 7px; }
.date-chip, .choices label { background: white; border: 1px solid #d5e0d5; border-radius: 7px; color: var(--accent); padding: 5px 8px; font-size: .81rem; }
.date-chip[aria-pressed=true], .choices label:has(input:checked) { background: var(--green-pale); border-color: #84ad94; }
.date-chip b { display: block; }
.choices label { display: flex; align-items: center; min-height: 42px; gap: 5px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); margin: 0; width: 17px; height: 17px; }
.inline { display: flex; align-items: center; gap: 8px; }
details { margin-top: 10px; }
summary { color: var(--accent); cursor: pointer; font-size: .88rem; }
.action-form { margin-top: 9px; }
.account { border-bottom: 1px solid var(--border); padding-block: 11px; }
.account:first-child { padding-top: 0; }
.account-id, .job-date { display: inline-block; font-variant-numeric: tabular-nums; }
.captcha { display: block; margin-block: 5px; min-height: 28px; max-width: 100%; border: 1px solid var(--border); }
.add-account { margin-top: 16px; }
.activity { margin-top: 16px; }
.activity > .section-title { margin-bottom: 11px; }
.job { display: grid; grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr); gap: 18px; border-top: 1px solid var(--border); padding-block: 12px; }
.job-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; font-size: .86rem; color: var(--muted); margin-block: 3px; }
.job-actions { border-inline-start: 1px solid var(--border); padding-inline-start: 12px; }
.status { display: inline-block; background: #edf1ed; color: #395044; border-radius: 18px; padding: 3px 8px; font-size: .77rem; font-weight: bold; white-space: nowrap; }
.status.ready, .status.success, .status.dry_run { background: var(--green-pale); color: #235d38; }
.status.error, .status.rejected, .status.invalid, .status.unavailable { background: #fcecec; color: var(--danger); }
.status.unknown, .status.needs_login, .status.needs_payment, .status.challenge { background: #fbf1d7; color: #674910; }
.empty { color: var(--muted); }
.receipt { font-size: .84rem; margin-bottom: 0; }
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-box { width: min(100%, 410px); }
.login-box h1 { margin-top: 10px; }
.login-box p { color: var(--muted); }
.login-box form { margin-top: 20px; }
[hidden] { display: none; }
@media (max-width: 730px) {
  .layout { grid-template-columns: 1fr; }
  .wrap { padding-inline: 12px; padding-top: 22px; }
  .top-inner { gap: 12px; padding-inline: 12px; flex-wrap: wrap; padding-block: 8px; }
  .top-inner nav { order: 2; flex-basis: 100%; gap: 18px; }
  .top-inner form { margin-inline-start: auto; }
  .panel { padding: 15px; }
  .job { grid-template-columns: 1fr; gap: 6px; }
  .job-actions { border: 0; padding: 0; }
  .today { font-size: .8rem; }
  input:not([type=checkbox],[type=radio]), textarea, select { font-size: 16px; }
}
