/* {{SITE_NAME}} — minimal tool-site theme. No framework, no build step. */
:root {
  --bg: #fafafa;
  --card: #ffffff;
  --ink: #1a1a1a;
  --muted: #666;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --border: #e5e7eb;
  --radius: 12px;
  --maxw: 760px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.nav-links a { margin-left: 1.2rem; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover { color: var(--accent); }
main { max-width: var(--maxw); margin: 0 auto; padding: 0 1.2rem 3rem; }
.hero { text-align: center; padding: 2.6rem 0 1.6rem; }
.hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); margin: 0 0 0.6rem; letter-spacing: -0.02em; }
.hero .sub { color: var(--muted); font-size: 1.05rem; margin: 0; }
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin: 1rem 0 2.2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.content h2 { font-size: 1.35rem; margin: 2rem 0 0.8rem; }
.steps, .features { padding-left: 1.3rem; }
.steps li, .features li { margin-bottom: 0.5rem; }
.privacy-note {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
}
details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.6rem;
}
summary { cursor: pointer; font-weight: 600; }
details p { margin: 0.6rem 0 0.2rem; color: var(--muted); }
/* ---- tool UI primitives ---- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.95rem; }
.field input[type="text"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
.field textarea { min-height: 110px; resize: vertical; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn.secondary { background: #eef2ff; color: var(--accent); }
.result {
  margin-top: 1.2rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 8px;
  word-break: break-word;
}
.result:empty { display: none; }
.hint { font-size: 0.85rem; color: var(--muted); }
.row { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.row .field { flex: 1 1 200px; }
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.6rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--muted); margin: 0 0.4rem; }
.disclaimer { font-size: 0.8rem; }
@media (max-width: 560px) {
  .nav-links a { margin-left: 0.8rem; }
  .tool-card { padding: 1.1rem; }
}
/* ---- SquadChem: FC 27 chemistry calculator ---- */
.team-summary {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.team-score { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.team-score small { font-size: 1.2rem; color: var(--muted); font-weight: 600; }
.team-bar { flex: 1 1 220px; min-width: 180px; }
.team-bar-track {
  height: 14px; background: #eef1f4; border-radius: 999px; overflow: hidden;
}
.team-bar-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #16a34a);
  transition: width 0.35s ease;
}
#team-verdict { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.95rem; }
.manager-row {
  display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: end;
  padding: 0.9rem 1rem; background: #f8fafc;
  border: 1px dashed var(--border); border-radius: 8px; margin-bottom: 1.2rem;
}
.manager-row .field { margin-bottom: 0; flex: 1 1 180px; }
.manager-note { flex-basis: 100%; margin: 0; }
#players { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.2rem; }
.player-row {
  display: grid;
  grid-template-columns: 2rem 1fr 1fr 1fr 1fr 6.8rem 3.2rem;
  gap: 0.5rem; align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.p-num {
  font-weight: 700; color: var(--muted); text-align: center; font-size: 0.9rem;
}
.player-row input[type="text"], .player-row select, .manager-row select {
  width: 100%; padding: 0.5rem 0.55rem; font-size: 0.9rem;
  border: 1px solid var(--border); border-radius: 7px; font-family: inherit;
  background: #fff;
}
.chem-badge {
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.15rem; color: #fff; justify-self: center;
}
.chem-badge.c3 { background: #16a34a; }
.chem-badge.c2 { background: #65a30d; }
.chem-badge.c1 { background: #ea580c; }
.chem-badge.c0 { background: #dc2626; }
.p-advice {
  grid-column: 1 / -1;
  font-size: 0.82rem; color: var(--muted); line-height: 1.45;
}
.p-advice:not(:empty)::before { content: "→ "; color: var(--accent); font-weight: 700; }
.tool-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
table.thresholds {
  width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem;
}
table.thresholds th, table.thresholds td {
  border: 1px solid var(--border); padding: 0.55rem 0.7rem; text-align: center;
}
table.thresholds th { background: #f8fafc; }
table.thresholds td:first-child, table.thresholds th:first-child { text-align: left; font-weight: 600; }
@media (max-width: 720px) {
  .player-row { grid-template-columns: 1.6rem 1fr 1fr 3rem; }
  .player-row .p-nation { grid-column: 2; }
  .player-row .p-league { grid-column: 3; }
  .player-row .p-club { grid-column: 2 / 4; }
  .player-row .chem-badge { grid-column: 4; grid-row: 1; }
  .player-row .p-name { grid-column: 2 / 4; }
  .player-row .p-card { grid-column: 1 / -1; }
  .p-num { grid-row: 1; }
  .team-score { font-size: 2rem; }
}
