:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #111827;
  color: #f3f4f6;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 20rem;
  line-height: 1.5;
}

a {
  color: #bfdbfe;
}

a:hover {
  color: #ffffff;
}

button,
.button-link {
  display: inline-block;
  border: 1px solid #93c5fd;
  border-radius: 0.35rem;
  padding: 0.55rem 0.85rem;
  background: #1d4ed8;
  color: #ffffff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: #1e40af;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.danger {
  border-color: #fca5a5;
  background: #991b1b;
}

button.danger:hover {
  background: #7f1d1d;
}

:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 2;
  padding: 0.6rem;
  background: #ffffff;
  color: #111827;
}

.skip-link:focus {
  left: 0.5rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1rem, calc((100% - 70rem) / 2));
  background: #1f2937;
}

.brand {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.container {
  width: min(70rem, calc(100% - 2rem));
  margin: 2rem auto;
}

.site-footer {
  margin-top: 3rem;
  padding: 1.25rem;
  background: #1f2937;
  text-align: center;
}

.summary-grid,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.summary-card,
.panel {
  border: 1px solid #4b5563;
  border-radius: 0.5rem;
  background: #1f2937;
  padding: 1.25rem;
}

.summary-card {
  display: grid;
  min-width: 12rem;
  color: #ffffff;
  text-decoration: none;
}

.summary-card strong {
  font-size: 2rem;
}

.summary-label,
.muted {
  color: #d1d5db;
}

.panel {
  margin: 1.25rem 0;
}

.details {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: 0.5rem 1rem;
}

.details dt {
  font-weight: 700;
}

.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin: 0.8rem 0;
  max-width: 38rem;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  max-width: 38rem;
}

.form-grid > input:not([type="checkbox"]):not([type="hidden"]),
.form-grid > select {
  width: 100%;
  border: 1px solid #9ca3af;
  border-radius: 0.3rem;
  padding: 0.55rem;
  background: #111827;
  color: #f9fafb;
  font: inherit;
}

.form-grid > button {
  justify-self: start;
}

input[type="text"],
input[type="file"] {
  width: 100%;
  border: 1px solid #9ca3af;
  border-radius: 0.3rem;
  padding: 0.55rem;
  background: #111827;
  color: #f9fafb;
  font: inherit;
}

.pack-options {
  display: grid;
  gap: 0.5rem;
  padding-left: 0;
  list-style: none;
}

.pack-options li,
#priority-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.4rem 0;
}

.priority-actions {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #4b5563;
  padding: 0.65rem;
  text-align: left;
  vertical-align: top;
}

code,
pre {
  overflow-wrap: anywhere;
}

pre {
  border: 1px solid #4b5563;
  border-radius: 0.35rem;
  padding: 0.85rem;
  background: #030712;
  white-space: pre-wrap;
}

.notice {
  border-left: 0.3rem solid #60a5fa;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #1e3a5f;
}

.notice.error {
  border-color: #f87171;
  background: #7f1d1d;
}

[hidden] {
  display: none !important;
}

@media (max-width: 42rem) {
  .details {
    grid-template-columns: 1fr;
  }
}
