body{
  margin:1em auto;
  max-width:40em;
  padding:0 .62em 3.24em;
  font:1.2em/1.62 sans-serif;
}
h1,h2,h3 {
  line-height:1.2;
}

a:focus-visible {
  outline: 2px solid #fef08a;
  outline-offset: 2px;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  border: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
  margin: 1rem 0 1.5rem;
}
th, td {
  padding: 0.7rem 0.9rem;
  text-align: left;
}
th {
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom: 1px solid #e7ebf0;
}
td {
  border-bottom: 1px solid #eef1f4;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:nth-child(even) {
  background: #fafbfd;
}

.judge-card {
  border-radius: 0.75rem;
  border: 1px solid #dde3ea;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 6px 16px rgba(0,0,0,0.08);
  padding: 1rem 1rem 1.25rem;
}
.judge-form {
  display: grid;
  gap: 0.95rem;
}
.judge-summary {
  margin: 0.35rem 0 0.6rem;
  color: #475569;
  font-weight: 500;
}
.md-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}
.top-nav {
  margin: 0.25rem 0 1rem;
}
.results-title-link {
  display: inline-block;
  text-decoration: none;
  color: #0f172a;
  border-bottom: 1px solid #cbd5e1;
}
.results-title-link:hover {
  color: #020617;
  border-bottom-color: #94a3b8;
}
.results-subtle-link {
  color: #334155;
  text-decoration: none;
  border-bottom: 1px solid #cbd5e1;
}
.results-subtle-link:hover {
  color: #0f172a;
  border-bottom-color: #94a3b8;
}
.judge-form-actions {
  margin-bottom: 1rem;
}
.judge-index-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.7rem;
}
.judge-index-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  background: #fff;
}
.judge-index-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}
.judge-index-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}
.judge-index-actions {
  margin: 0;
}
.judge-chip-time {
  background: #e2e8f0;
  color: #1e293b;
}
.judge-chip-neutral {
  background: #e2e8f0;
  color: #334155;
}
.md-divider {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 0.25rem 0 0.6rem;
}

.md-select-field {
  display: grid;
  gap: 0.35rem;
}
.md-select-input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #94a3b8;
  border-radius: 0.35rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  color: #111827;
  font: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.md-select-input:hover {
  border-color: #64748b;
}
.md-select-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.md-field {
  position: relative;
  width: 100%;
}
.md-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 12px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid #9e9e9e;
  background: white;
  outline: none;
  transition: border 0.2s ease;
}
.md-field input::-webkit-outer-spin-button,
.md-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.md-field input[type=number] {
  -moz-appearance: textfield;
}
.md-field label {
  position: absolute;
  left: 12px;
  top: 16px;
  font-size: 16px;
  color: #9e9e9e;
  background: white;
  padding: 0 4px;
  pointer-events: none;
  transition: 0.2s ease all;
}
.md-field input:focus {
  border: 2px solid #6200ee;
}
.md-field input:focus + label,
.md-field input:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 12px;
  color: #6200ee;
}
.md-field input:-webkit-autofill,
.md-field input:-webkit-autofill:hover,
.md-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: inherit;
  transition: background-color 9999s ease-in-out 0s;
}

.md-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.md-btn--filled {
  border: 1px solid #2563eb;
  color: #fff;
  background: #2563eb;
}
.md-btn--filled:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}
.md-btn--outlined {
  border: 1px solid #2563eb;
  color: #1d4ed8;
  background: transparent;
}
.md-btn--outlined:hover {
  background: rgba(37, 99, 235, 0.1);
}
.md-btn--text {
  border: 1px solid transparent;
  color: #334155;
  background: transparent;
}
.md-btn--text:hover {
  background: rgba(51, 65, 85, 0.1);
}
a.md-btn,
a.md-btn:visited {
  text-decoration: none;
}
a.md-btn--filled,
a.md-btn--filled:visited {
  color: #fff;
}
a.md-btn--outlined,
a.md-btn--outlined:visited {
  color: #1d4ed8;
}
a.md-btn--text,
a.md-btn--text:visited {
  color: #334155;
}
.md-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.72em;
  font-weight: 600;
  vertical-align: middle;
}
.md-chip--success {
  background: #dcfce7;
  color: #166534;
}

@media (prefers-color-scheme: dark){
  body {
    background: #000;
    color: #fff;
  }
  a {
    color: #7dd3fc;
  }
  a:visited {
    color: #c4b5fd;
  }
  a:hover, a:active {
    color: #bae6fd;
  }

  table {
    background: #121212;
    color: #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.7), 0 4px 12px rgba(0,0,0,0.5);
    border: 0;
  }
  th {
    background: #121212;
    color: #f3f4f6;
    border-bottom: 1px solid #2f2f2f;
  }
  td {
    background: #121212;
    color: #e5e7eb;
    border-bottom: 1px solid #2a2a2a;
  }
  tbody tr:nth-child(even),
  tbody tr:nth-child(even) td {
    background: #171717;
  }

  .judge-card {
    background: #121212;
    border-color: #2a2a2a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.7), 0 4px 12px rgba(0,0,0,0.5);
  }

  .md-select-input {
    background: #121212;
    color: #f3f4f6;
    border-color: #4b5563;
    color-scheme: dark;
  }
  .md-select-input:hover {
    border-color: #9ca3af;
  }
  .md-select-input:focus {
    border-color: #7dd3fc;
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.25);
  }

  .md-field input {
    background: #121212;
    color: #f3f4f6;
    border-color: #4b5563;
    caret-color: #7dd3fc;
  }
  .md-field label {
    color: #9ca3af;
    background: #121212;
  }
  .md-field input:focus {
    border: 2px solid #7dd3fc;
  }
  .md-field input:focus + label,
  .md-field input:not(:placeholder-shown) + label {
    color: #7dd3fc;
    background: #121212;
  }

  .md-btn--filled {
    border-color: #7dd3fc;
    background: #7dd3fc;
    color: #0b1220;
  }
  .md-btn--filled:hover {
    border-color: #67c3f0;
    background: #67c3f0;
  }
  .md-btn--outlined {
    border-color: #7dd3fc;
    color: #7dd3fc;
  }
  .md-btn--outlined:hover {
    background: rgba(125, 211, 252, 0.16);
  }
  .md-btn--text {
    color: #d1d5db;
  }
  .md-btn--text:hover {
    background: rgba(209, 213, 219, 0.12);
  }
  /* Ensure global link states don't override button-like links */
  a.md-btn--filled,
  a.md-btn--filled:visited {
    color: #0b1220;
  }
  a.md-btn--outlined,
  a.md-btn--outlined:visited {
    color: #7dd3fc;
  }
  a.md-btn--text,
  a.md-btn--text:visited {
    color: #d1d5db;
  }
  .judge-summary {
    color: #d1d5db;
  }
  .md-divider {
    border-top-color: #2f2f2f;
  }
  .md-chip--success {
    background: #14532d;
    color: #bbf7d0;
  }
  .judge-index-item {
    border-color: #2f2f2f;
    background: #151515;
  }
  .judge-chip-time {
    background: #334155;
    color: #e2e8f0;
  }
  .judge-chip-neutral {
    background: #374151;
    color: #e5e7eb;
  }
  .results-title-link,
  .results-title-link:visited {
    color: #e2e8f0;
    border-bottom-color: #64748b;
  }
  .results-title-link:hover {
    color: #f8fafc;
    border-bottom-color: #94a3b8;
  }
  .results-subtle-link,
  .results-subtle-link:visited {
    color: #cbd5e1;
    border-bottom-color: #64748b;
  }
  .results-subtle-link:hover {
    color: #f1f5f9;
    border-bottom-color: #94a3b8;
  }
}
