h1 {
  margin-top: 32px;
  margin-bottom: 8px;
  font-size: 2rem;
}

.lede {
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 28px;
  max-width: 60ch;
}

.tool {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.tool__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.tool__controls label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

.tool__controls select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}

.action-btn {
  font: inherit;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}

.action-btn:hover { filter: brightness(1.08); }

.action-btn--secondary {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line);
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 10px;
  min-height: 1.2em;
}

.status {
  margin: 0 0 16px;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.3em;
}

.status--ok { color: #1e8e3e; }
.status--error { color: #c0392b; }

.board {
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  gap: 0;
  border: 2px solid var(--ink);
  width: min(100%, 520px);
  aspect-ratio: 1;
  margin: 0 auto;
  background: var(--ink);
}

.cell {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  text-align: center;
  font: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  background: var(--panel);
  color: var(--ink);
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
}

.cell:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  position: relative;
  z-index: 1;
}

.cell--box-right { border-right: 2px solid var(--ink); }
.cell--box-bottom { border-bottom: 2px solid var(--ink); }

.cell--solved { color: var(--accent); }

.cell--hint {
  color: var(--accent);
  background: #eaf1ff;
}

.cell--error {
  background: #fdecea;
  color: #c0392b;
}

.board--16 .cell { font-size: 0.7rem; }

.faq { margin-top: 48px; max-width: 70ch; }

.faq h2 { font-size: 1.3rem; margin-top: 32px; }

details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

details summary {
  cursor: pointer;
  font-weight: 600;
}

@media (max-width: 480px) {
  .cell { font-size: 0.9rem; }
  .board--16 .cell { font-size: 0.5rem; }
}
