/* Printable word search page.
   Palette and type lifted from marketing/index.html so the printables read as
   the same product, not a bolt-on. Screen earns the visit; print is the deliverable. */

:root {
  --app-bg:      #F4F2EB;
  --card-bg:     #FFFFFF;
  --text-dark:   #1C1C1E;
  --text-gray:   #8E8E93;
  --accent-blue: #0A7AFF;
  --accent-gold: #F2C047;
  --accent-navy: #1C2841;
  --accent-red:  #D23756;
  --tint-gold:   #FEF7E6;
  --tint-red:    #FDE8EC;
  --tint-blue:   #E6F2FF;
  --rule:        #E2DED2;
  --max:         46rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--app-bg);
  color: var(--text-dark);
  font: 16px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  -webkit-text-size-adjust: 100%;
}

h1, h2, .wordmark, .actions button, .cta .button {
  font-family: "Poppins", -apple-system, sans-serif;
}

.print-only { display: none; }

/* ---------- chrome ---------- */

header.site {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.5rem;
}
.wordmark {
  font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em;
  color: var(--text-dark); text-decoration: none;
}
.get-app {
  font-size: .875rem; font-weight: 600; text-decoration: none;
  color: #fff; background: var(--text-dark);
  padding: .5rem 1.1rem; border-radius: 999px;
}

.crumbs {
  max-width: var(--max); margin: .5rem auto 0; padding: 0 1.5rem;
  font-size: .8125rem; color: var(--text-gray);
}
.crumbs a { color: var(--text-gray); text-decoration: none; }
.crumbs a:hover { color: var(--accent-blue); }

main { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem 4rem; }

/* ---------- the sheet ---------- */

.sheet {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  margin-top: 1rem;
  box-shadow: 0 1px 2px rgba(28,40,65,.05), 0 8px 24px rgba(28,40,65,.06);
}

.head h1 .glow { color: var(--accent-gold); }
.head h1 {
  font-size: clamp(1.75rem, 5vw, 2.375rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -.025em; margin: 0 0 .4rem;
}
.kicker { margin: 0; color: var(--text-gray); font-size: .9375rem; }

.facts {
  display: flex; flex-wrap: wrap; gap: .5rem;
  list-style: none; margin: 1.1rem 0 0; padding: 0;
  font-size: .8125rem; color: var(--text-gray);
}
.facts li {
  background: var(--tint-gold);
  border-radius: 999px; padding: .3rem .8rem;
}
.facts strong { color: var(--accent-navy); font-weight: 700; }

.intro { color: var(--text-gray); margin: 1.15rem 0 0; }

.actions { margin: 1.6rem 0 2rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.actions button {
  font-size: 1rem; font-weight: 700; cursor: pointer;
  background: var(--text-dark); color: #fff;
  border: 0; border-radius: 999px; padding: .85rem 1.6rem;
  box-shadow: 0 4px 14px rgba(28,28,30,.18);
}
.actions button:hover { background: var(--accent-navy); }
.actions .note { font-size: .8125rem; color: var(--text-gray); }

/* ---------- grid ---------- */

table.grid {
  border-spacing: 2px;
  /* --cols is set per puzzle so the grid stays square from 10x10 to 18x18 */
  --cell: min(2.15rem, calc((100vw - 6rem) / var(--cols, 14)));
  border-collapse: separate;
  table-layout: fixed;
  margin: 0 auto;
  width: calc((var(--cell) + 2px) * var(--cols, 14));
}
table.grid td {
  width: var(--cell); height: var(--cell); padding: 0;
  /* letter tiles, the way they read in the app */
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: linear-gradient(180deg, #FFFDF7 0%, var(--tint-gold) 100%);
  text-align: center; vertical-align: middle;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: calc(var(--cell) * .55);
  font-weight: 500; line-height: 1;
  color: var(--accent-navy);
}
table.grid.answer td { color: var(--text-gray); opacity: .4; font-weight: 400; }

/* ---------- word list ---------- */

.words { margin-top: 2rem; }
.words h2 {
  font-size: 1rem; font-weight: 700; margin: 0 0 .85rem;
  color: var(--accent-navy);
}
.words ul {
  list-style: none; margin: 0; padding: 0;
  columns: 3; column-gap: 1.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .875rem; letter-spacing: .02em;
}
.words li { break-inside: avoid; padding: .22rem 0; display: flex; align-items: center; gap: .55rem; }
.tick {
  width: .75rem; height: .75rem; flex: 0 0 auto;
  border: 1.5px solid var(--rule); border-radius: 3px;
}
@media (max-width: 30rem) { .words ul { columns: 2; } }

/* ---------- brand band: the part that travels ---------- */

.brand-band {
  display: flex; align-items: center; gap: 1.1rem;
  margin-top: 2rem; padding: 1.1rem 1.25rem;
  background: var(--tint-gold); border-radius: 14px;
}
.brand-icon { width: 56px; height: 56px; border-radius: 13px; flex: 0 0 auto; }
.brand-words { flex: 1 1 auto; min-width: 0; }
.brand-name {
  font-family: "Poppins", sans-serif; font-weight: 700;
  margin: 0; font-size: 1rem; letter-spacing: -.01em;
}
.brand-tag { margin: .1rem 0 0; font-size: .8125rem; color: var(--text-gray); }
.brand-urls {
  margin: .45rem 0 0; display: grid;
  grid-template-columns: auto 1fr; gap: .1rem .6rem;
  font-size: .75rem; align-items: baseline;
}
.brand-urls dt { color: var(--text-gray); white-space: nowrap; }
.brand-urls dd {
  margin: 0; font-weight: 600; color: var(--accent-navy);
  word-break: break-all;
}
.brand-qr { flex: 0 0 auto; text-align: center; line-height: 0; }
.brand-qr svg { width: 104px; height: 104px; display: block; }
.brand-qr p { margin: .35rem 0 0; font-size: .6875rem; line-height: 1.3; color: var(--text-gray); }

@media (max-width: 30rem) {
  .brand-band { flex-wrap: wrap; }
  .brand-words { flex-basis: 100%; order: 2; }
}

/* ---------- answers, cta, related ---------- */

.answers { margin-top: 1.75rem; }
.answers summary {
  cursor: pointer; font-weight: 600; font-size: .9375rem;
  color: var(--accent-blue);
}
.answers details[open] summary { margin-bottom: 1.25rem; }

.cta {
  margin-top: 2.5rem; padding: 1.75rem;
  background: var(--accent-navy); border-radius: 20px; color: #fff;
}
.cta h2 { margin: 0 0 .5rem; font-size: 1.25rem; font-weight: 700; }
.cta p { margin: 0 0 1.25rem; color: rgba(255,255,255,.72); }
.cta .button {
  display: inline-block; text-decoration: none; font-weight: 700;
  background: var(--accent-gold); color: var(--accent-navy);
  padding: .8rem 1.5rem; border-radius: 999px;
}

.related { margin-top: 2.5rem; }
.related h2 { font-size: 1rem; font-weight: 700; margin: 0 0 .7rem; }
.related ul { margin: 0; padding-left: 1.15rem; color: var(--text-gray); }
.related li { padding: .2rem 0; }
.related a { color: var(--accent-blue); text-decoration: none; }

.ad-slot { min-height: 90px; margin: 1.5rem 0; }

footer.site {
  padding: 1.5rem; text-align: center;
  font-size: .8125rem; color: var(--text-gray);
}
footer.site a { color: var(--text-gray); }

/* ---------- print: the actual product ---------- */

@media print {
  @page { size: letter portrait; margin: 14mm; }

  /* Paper is always black on white, whatever the screen palette says. */
  :root {
    --app-bg: #fff;      --card-bg: #fff;
    --text-dark: #000;   --text-gray: #444;
    --rule: #000;        --accent-navy: #000;
    --accent-gold: #000; --accent-blue: #000;
    --tint-gold: #fff;
  }

  .no-print { display: none !important; }
  .print-only { display: block; }

  body { background: #fff; color: #000; font-size: 11pt; }
  main { max-width: none; padding: 0; }

  .sheet { background: none; border-radius: 0; box-shadow: none; padding: 0; margin: 0; }

  .head h1 { font-size: 19pt; margin-bottom: 2pt; }
  .kicker  { font-size: 10pt; color: #444; }
  .facts   { margin-top: 6pt; gap: 10pt; }
  .facts li { background: none; padding: 0; font-size: 9pt; color: #444; }
  .facts strong { color: #000; }
  .intro   { display: none; }

  table.grid {
    border-collapse: collapse; border-spacing: 0;
    --cell: min(9mm, calc(150mm / var(--cols, 14)));
    margin: 6mm auto 0;
    page-break-inside: avoid;
  }
  table.grid td,


    border: .4pt solid #000; color: #000; font-weight: 400;
    border-radius: 0; background: none !important;  /* play state is screen-only */
    font-size: calc(var(--cell) * .55); font-weight: 400;
  }

  .words { margin-top: 5mm; page-break-inside: avoid; }
  .words h2 { font-size: 11pt; color: #000; margin-bottom: 2mm; }
  .words ul { columns: 4; font-size: 9.5pt; }
  .words li { padding: 0.4mm 0; gap: 1.6mm; }
  .tick { border: 1pt solid #000; }

  /* The band prints on BOTH sheets - the answer key gets separated from the
     puzzle, and either half should be enough to find the app. */
  .brand-band {
    margin-top: 5mm; padding: 3mm 0 0;
    border-top: .5pt solid #999; border-radius: 0;
    background: none; gap: 6mm;
    page-break-inside: avoid;
  }
  .brand-icon { width: 15mm; height: 15mm; border-radius: 3.5mm; }
  .brand-name { font-size: 12pt; }
  .brand-tag  { font-size: 8.5pt; color: #444; }
  .brand-urls { font-size: 9pt; gap: .3mm 2mm; }
  .brand-urls dt { color: #555; }
  .brand-urls dd { color: #000; }
  .brand-qr svg { width: 28mm; height: 28mm; }
  .brand-qr p { margin-top: 1.5mm; font-size: 7.5pt; color: #333; }

  .print-only { page-break-before: always; }
  .print-only h2 { font-size: 14pt; margin: 0 0 6mm; }

/* ---------- library index ---------- */

.cards {
  list-style: none; margin: 1.75rem 0 0; padding: 0;
  display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.cards .card a {
  display: block; text-decoration: none; color: inherit;
  padding: 1rem 1.1rem; border-radius: 12px;
  background: var(--tint-gold);
}
.cards .card a:hover { background: var(--accent-gold); }
.card-topic {
  display: block; font-family: "Poppins", sans-serif;
  font-weight: 600; font-size: .9375rem;
}
.card-meta { display: block; margin-top: .2rem; font-size: .75rem; color: var(--text-gray); }

@media print {
}
