:root {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f4f4f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid #e4e4e7;
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header-inner {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: #18181b;
  text-decoration: none;
}

.site-brand:hover {
  color: #2563eb;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.1rem;
}

.site-nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #3f3f46;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav-link:hover {
  color: #2563eb;
}

.site-nav-link.is-active {
  color: #1d4ed8;
  font-weight: 600;
  border-bottom-color: #2563eb;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.sub {
  color: #52525b;
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}

.card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

input[type="text"],
select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  font-size: 1rem;
}

button,
.btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

button:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

button.secondary {
  background: #52525b;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}

.form-actions button[type="submit"] {
  margin-top: 0;
}

.mcq label.opt {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  padding: 0.5rem;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.mcq label.opt:hover {
  background: #fafafa;
}

.mcq input {
  margin-top: 0.2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid #e4e4e7;
}

th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #71717a;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #e4e4e7;
  color: #3f3f46;
}

.badge.waiting {
  background: #dbeafe;
  color: #1e40af;
}

.badge.play {
  background: #fef3c7;
  color: #92400e;
}

.badge.done {
  background: #dcfce7;
  color: #166534;
}

.meta {
  font-size: 0.9rem;
  color: #52525b;
  margin-bottom: 1rem;
}

.err {
  color: #b91c1c;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #2563eb;
}

footer.nav {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

footer.nav a {
  color: #2563eb;
}
