/* A plain page on purpose. The look comes later; nothing here should need undoing when it does. */

:root {
  color-scheme: light dark;
}

body {
  margin: 0;
  font: 1.05rem/1.55 system-ui, sans-serif;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

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

h2 {
  font-size: 1.2rem;
  margin: 2.25rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid;
}

h3 {
  font-size: 1.1rem;
  margin: 1rem 0 0.25rem;
}

.lead {
  font-size: 1.2rem;
}

.small {
  font-size: 0.9rem;
}

.trouble {
  font-weight: bold;
}

.rule {
  border-left: 0.25rem solid;
  padding: 0.25rem 0.75rem;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 1rem 0;
}

fieldset label {
  margin-right: 1.5rem;
}

input:not([type="radio"]) {
  font: inherit;
  padding: 0.4rem;
  width: 16rem;
  max-width: 100%;
  box-sizing: border-box;
}

button {
  font: inherit;
  padding: 0.5rem 0.9rem;
}

button.link {
  padding: 0;
  border: 0;
  background: none;
  color: LinkText;
  text-decoration: underline;
  cursor: pointer;
}

/* The board keeps its own colours in light and dark, so the pieces always read. */
.board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(100%, 26rem);
  aspect-ratio: 1;
  margin: 1rem 0;
  border: 1px solid;
}

.square {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.square.light {
  background: #ececec;
}

.square.dark {
  background: #a8a8a8;
}

/* The pieces are drawn in pieces.js; this is their colour. */
.piece {
  width: 88%;
  height: 88%;
  stroke-width: 3.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.piece.white {
  fill: #fff;
  stroke: #1a1a1a;
}

.piece.black {
  fill: #2e2e2e;
  stroke: #000;
}

.piece .line {
  fill: none;
  stroke-width: 2.5;
}

.piece.black .line {
  stroke: #9a9a9a;
}

.square.picked {
  box-shadow: inset 0 0 0 0.22rem #0b57d0;
}

.square.bad {
  box-shadow: inset 0 0 0 0.22rem #b3261e;
}

.square.good {
  box-shadow: inset 0 0 0 0.22rem #1b6e2c;
}

.square.target::after {
  content: "";
  position: absolute;
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: rgb(0 0 0 / 40%);
}
