:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1a2330;
  --muted: #5c6b7a;
  --accent: #0b5cab;
  --accent2: #0a7a62;
  --border: #dfe6ee;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand a {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover { text-decoration: underline; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.card h2 { margin-top: 0; font-size: 1.15rem; }

.muted { color: var(--muted); font-size: 0.95rem; }

.row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .row.two { grid-template-columns: 1fr 1fr; }
}

label { display: block; font-weight: 600; margin-bottom: 0.25rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

textarea { min-height: 110px; resize: vertical; }

.actions { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }

.btn {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-ok {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.alert {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-error { background: #fde8e6; border: 1px solid #f5c2bc; color: #5c1a14; }
.alert-success { background: #e6f6f0; border: 1px solid #bfe8d6; color: #0d3d2f; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th { background: #eef3f8; font-size: 0.85rem; }

tr:last-child td { border-bottom: none; }

.score {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  padding: 1.5rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

h1 { font-size: 1.35rem; margin: 0 0 0.75rem; }

.system-title {
  font-size: clamp(1rem, 3.2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.75rem;
}

.tagline-home {
  margin-bottom: 1.25rem;
  max-width: 52rem;
}

.site-foot-long {
  max-width: 40rem;
  margin: 0.35rem auto 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.stack { display: flex; flex-direction: column; gap: 0.75rem; }
