:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #595959;
  --line: #171717;
  --paper: #f7f3e8;
  --panel: #fffdf6;
  --green: #138a43;
  --red: #b42020;
  --yellow: #ffd84d;
  --blue: #2d6cdf;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.45;
}

a {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

.wrap {
  width: min(1160px, calc(100% - 24px));
  margin: 12px auto 36px;
}

.button,
button {
  border: 2px solid var(--line);
  background: var(--yellow);
  color: var(--ink);
  padding: 9px 12px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--line);
}

button {
  cursor: pointer;
}

.button {
  display: inline-block;
}

.notice,
.panel,
.stats > div {
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--line);
}

.notice {
  padding: 12px 14px;
  margin: 0 0 14px;
}

.notice h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 7vw, 56px);
  line-height: 0.95;
  letter-spacing: 0;
}

.notice p {
  max-width: 78ch;
  margin: 0;
}

.danger {
  background: #ffe0de;
}

.grin {
  background: var(--yellow);
}

.ok {
  background: #dcf7e4;
}

.panel {
  padding: 12px 14px;
  margin-bottom: 14px;
}

h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

code,
pre {
  background: #eee8d8;
  border: 1px solid var(--line);
}

code {
  padding: 1px 4px;
}

pre {
  overflow-x: auto;
  padding: 9px;
  margin: 10px 0 0;
}

.add-form,
.filters {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

label {
  display: block;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
}

.url-field {
  flex: 1 1 560px;
}

.url-field input {
  min-width: min(720px, 100%);
}

.filter-field {
  width: 170px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.stats > div {
  padding: 10px;
}

.stats strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.stats span {
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.pagination.bottom {
  margin: 12px 0 0;
}

.pagination .button {
  padding: 6px 10px;
  margin-left: 6px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  border: 2px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eadfbd;
}

td {
  background: #fffdf6;
}

.url {
  overflow-wrap: anywhere;
}

.url small {
  display: block;
  color: var(--red);
  margin-top: 4px;
}

.pill {
  display: inline-block;
  min-width: 52px;
  border: 2px solid var(--line);
  padding: 2px 8px;
  font-weight: 700;
  text-align: center;
}

.good {
  background: #bdf2cd;
}

.bad {
  background: #ffb7b0;
}

.history {
  white-space: nowrap;
}

.history span {
  display: inline-block;
  width: 8px;
  height: 18px;
  margin-right: 3px;
  border: 1px solid var(--line);
}

.history .up {
  background: var(--green);
}

.history .down {
  background: var(--red);
}

.empty {
  text-align: center;
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .add-form,
  .filters,
  .section-head,
  .pagination,
  footer {
    display: block;
  }

  input,
  select,
  button,
  .button {
    width: 100%;
    margin-top: 8px;
  }
}
