@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/AtkinsonHyperlegible-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #14140f;
  --muted: #3a3a32;
  --paper: #f3ecd8;
  --card: #fffaf0;
  --rule: #cbbf9e;
  --forest: #1c2d1a;
  --forest-hover: #121e11;
  --cream: #f7f1e3;
  --select: #e6b422;
  --found-bg: #1c2d1a;
  --found-fg: #f7f1e3;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 21px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
}
img { max-width: 100%; height: auto; }
a { color: var(--forest); }
a:hover { color: var(--forest-hover); }
.skip {
  position: absolute;
  left: -999px; top: 0;
  background: var(--forest);
  color: var(--cream);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }
header {
  background: var(--forest);
  color: var(--cream);
  padding: 1.25rem 1.25rem 1.4rem;
}
.wrap { width: min(46rem, calc(100% - 2rem)); margin: 0 auto; }
.wide { width: min(52rem, calc(100% - 2rem)); margin: 0 auto; }
.brand {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  font-weight: 700;
}
header h1 {
  margin: 0 0 0.5rem;
  font-size: 2.05rem;
  line-height: 1.2;
}
.lede { margin: 0; font-size: 1.15rem; max-width: 40rem; }
main { padding: 1.6rem 0 3rem; }
h2 { font-size: 1.7rem; margin: 0 0 0.75rem; line-height: 1.25; }
h3 { font-size: 1.3rem; margin: 0 0 0.4rem; line-height: 1.3; }
p { margin: 0 0 1rem; }

.puzzle-panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.1rem 1.1rem 1.4rem;
  margin: 0 0 2.2rem;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.75rem;
  align-items: center;
  margin: 0 0 1rem;
}
.toolbar label { font-weight: 700; }
.toolbar select, .toolbar button {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  min-height: 3rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 2px solid var(--forest);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.toolbar button.primary, .btn {
  background: var(--forest);
  color: var(--cream) !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.7rem 1.15rem;
  border-radius: 8px;
  border: 2px solid var(--forest);
  min-height: 3rem;
  text-align: center;
  display: inline-block;
  cursor: pointer;
  font-family: inherit;
}
.toolbar button.primary:hover, .btn:hover, .toolbar button:hover {
  background: var(--forest-hover);
  border-color: var(--forest-hover);
  color: var(--cream);
}
.toolbar button:hover { color: var(--cream); }
.toolbar select:hover { background: var(--cream); }
.toolbar button:focus-visible,
.toolbar select:focus-visible,
.btn:focus-visible {
  outline: 3px solid #e6b422;
  outline-offset: 3px;
}
.status {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  min-height: 1.5em;
}
.how {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.board-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
@media (min-width: 820px) {
  .board-wrap { grid-template-columns: minmax(0, 1fr) 14rem; align-items: start; }
}

#grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  width: min(100%, 32rem);
  margin: 0 auto;
  border: 3px solid var(--ink);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  background: #fff;
}
.cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  background: #fff;
  border: 1px solid #1a1a12;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 420px) {
  .cell { font-size: 22px; }
}
.cell.selecting { background: var(--select); color: #14140f; }
.cell.found { background: var(--found-bg); color: var(--found-fg); }
.cell.found.selecting { background: #3a5a36; color: var(--found-fg); }

.word-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.word-list li {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--rule);
}
.word-list li.found {
  text-decoration: line-through;
  color: var(--forest);
}
.word-list h3 { margin-bottom: 0.5rem; }

.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.25rem 0 2rem;
}
@media (min-width: 760px) {
  .products { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.15rem 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.card p { margin: 0; }
.price {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--forest);
  margin: 0;
}
.price small {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.15rem;
}
.meta { color: var(--muted); font-size: 1rem; }
.btn { margin-top: auto; }
.pricing {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.2rem;
  margin: 0 0 2rem;
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
th, td {
  text-align: left;
  padding: 0.65rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th { font-weight: 700; }
.rate-note, footer { color: var(--muted); }
footer {
  padding: 1.5rem 0 2.2rem;
  border-top: 1px solid var(--rule);
  font-size: 1rem;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; }

@media print {
  header, .toolbar, .products, .pricing, footer, .how { display: none !important; }
  body, .puzzle-panel { background: #fff; color: #000; border: 0; box-shadow: none; }
  .puzzle-panel { padding: 0; }
  .status { display: block; }
  #grid { border: 3px solid #000; width: 6.4in; }
  .cell { border-color: #000; color: #000; background: #fff; font-size: 22pt; }
  .cell.found { background: #ddd; color: #000; }
  .word-list li { color: #000; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
