:root {
  color-scheme: light;
  --ink: #0b1220;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --white: #f8fafc;
  --slate: #475569;
  --ice: #93c5fd;
  --line: #dce4ef;
  --panel: #fff;
  --danger: #991b1b;
  --radius: 12px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: default; opacity: .64; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.topbar button:focus-visible { outline-color: var(--ice); }
a { color: var(--blue-dark); }

.topbar { background: var(--ink); color: var(--white); }
.topbar-inner {
  max-width: 1160px;
  min-height: 68px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { font-weight: 760; font-size: .99rem; letter-spacing: .18em; }
.shell { max-width: 1160px; margin: 0 auto; padding: 52px 24px 64px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 3.8vw, 2.4rem); line-height: 1.14; letter-spacing: -.041em; }
h2 { font-size: 1.25rem; letter-spacing: -.025em; }
.intro > div > p, .sign-in > p { margin-top: 10px; color: var(--slate); line-height: 1.5; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }

.sign-in {
  max-width: 470px;
  margin: clamp(20px, 8vh, 85px) auto 0;
  padding: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgb(11 18 32 / 6%);
}
.sign-in h1 { font-size: clamp(1.625rem, 5vw, 2rem); }
.sign-in form { margin-top: 24px; }
.sign-in input { width: 100%; margin-top: 7px; }
.sign-in .button { margin-top: 16px; }
.sign-in .error { margin-top: 14px; }
.startup { color: var(--slate); }

.button {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 13px;
  min-height: 40px;
  font-size: .875rem;
  font-weight: 660;
  line-height: 1.2;
  white-space: nowrap;
}
.button-primary { background: var(--blue); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--blue-dark); }
.button-secondary { border-color: var(--line); background: var(--panel); color: var(--ink); }
.button-secondary:hover:not(:disabled) { background: #edf4ff; border-color: var(--ice); }
.button-quiet { background: transparent; color: var(--blue-dark); }
.button-quiet:hover:not(:disabled) { background: #edf4ff; }
.button-dark { border-color: #3a485c; background: transparent; color: var(--white); }
.button-dark:hover:not(:disabled) { background: #1d293b; }

label { font-size: .875rem; font-weight: 670; }
label span { color: var(--slate); font-weight: 450; margin-left: 6px; }
input, textarea {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid #aebacc;
  border-radius: 7px;
  min-height: 40px;
  padding: 8px 10px;
}
textarea { resize: vertical; }

.queue-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.queue-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 22px;
}
.date-inputs { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.date-inputs input { min-width: 145px; }
.queue-summary { color: var(--slate); font-size: .875rem; padding: 0 0 9px; }
.notice, .error { font-size: .875rem; line-height: 1.45; }
.notice { margin: 0 22px 15px; padding: 10px 12px; color: #184087; background: #eaf3ff; border-radius: 7px; }
.error { color: var(--danger); }
.queue-error { padding: 0 22px 16px; }
.empty-state { color: var(--slate); border-top: 1px solid var(--line); padding: 37px 22px; text-align: center; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 22px; text-align: left; vertical-align: top; }
thead { color: var(--slate); background: #f1f5f9; border-top: 1px solid var(--line); }
th { font-size: .8rem; font-weight: 680; padding-top: 11px; padding-bottom: 11px; }
tbody tr { border-top: 1px solid var(--line); }
.draft-cell { width: 65%; }
.draft-name { font-weight: 680; display: block; line-height: 1.35; overflow-wrap: anywhere; }
.draft-comment { margin-top: 6px; color: var(--slate); font-size: .91rem; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }
.status-cell { min-width: 117px; }
.status {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 9px;
  color: #36465c;
  background: #eef2f8;
  font-size: .75rem;
  font-weight: 680;
}
.status-opened { color: #1e40af; background: #dbeafe; }
.status-posted { color: #166534; background: #dcfce7; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 197px; }
.row-actions .button { min-height: 36px; }
.row-fallback { flex-basis: 100%; font-size: .875rem; padding: 4px 2px; }

dialog { padding: 26px; width: min(515px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
dialog::backdrop { background: rgb(11 18 32 / 52%); }
dialog form { display: grid; gap: 7px; }
dialog h2 { margin-bottom: 10px; }
dialog label:not(:first-of-type) { margin-top: 5px; }
.dialog-actions { margin-top: 9px; display: flex; justify-content: flex-end; gap: 8px; }
.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;
}

@media (max-width: 720px) {
  .topbar-inner { padding: 10px 16px; min-height: 58px; }
  .shell { padding: 32px 16px 45px; }
  .intro { align-items: start; flex-direction: column; }
  .queue-toolbar { padding: 16px; align-items: start; flex-direction: column; }
  .queue-summary { padding-bottom: 0; }
  .notice { margin-inline: 16px; }
  .queue-error { padding-inline: 16px; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  tbody tr { padding: 16px; display: flex; flex-wrap: wrap; gap: 10px 14px; }
  td { padding: 0; }
  .draft-cell { width: 100%; }
  .status-cell { align-self: center; min-width: 0; }
  .row-actions { min-width: 0; }
  .sign-in { padding: 25px; }
}
