:root {
  color-scheme: light dark;
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --ink: #1C1F2A;
  --muted: #5A5E6E;
  --line: #E4DFD6;
  --red: #E63329;
  --yellow: #FFC81E;
  --cyan: #0BB8D4;
  --accent: #0A7E92;

  /* Buttons carry their own pair. --accent is tuned to be READ on the page
     background; in dark mode it becomes a bright cyan that white text cannot
     sit on (1.84 to 1). A button needs a fill and an ink chosen together. */
  --btn-bg: var(--accent);
  --btn-ink: #FFFFFF;
  --btn2-bg: var(--ink);
  --btn2-ink: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161D;
    --surface: #1C1F28;
    --ink: #ECE9E2;
    --muted: #9A9EAE;
    --line: #2C3040;
    --accent: #3FD0E8;
    /* Bright fill, dark ink. The usual dark-mode button, and 9.81 to 1. */
    --btn-bg: #3FD0E8;
    --btn-ink: #14161D;
    --btn2-bg: #2C3040;
    --btn2-ink: #FFFFFF;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
}
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: inherit;
}
.bars { display: flex; gap: 4px; }
.bars span { width: 26px; height: 6px; border-radius: 2px; }
.brand b {
  font: 600 1.12rem/1 Georgia, "Times New Roman", serif;
  letter-spacing: .01em;
}
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
}
.site-nav a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 3.25rem 0 2.5rem; max-width: 40rem; }
.hero h1 {
  font: 600 2.1rem/1.2 Georgia, "Times New Roman", serif;
  margin: 0 0 .9rem;
  letter-spacing: -.01em;
}
.hero p { color: var(--muted); margin: 0 0 1rem; font-size: 1.06rem; }

/* ---------- sections ---------- */
section { padding: 2.25rem 0; border-top: 1px solid var(--line); }
section > .wrap > h2 {
  font: 600 1.4rem/1.25 Georgia, "Times New Roman", serif;
  margin: 0 0 .35rem;
}
.shelf-note { color: var(--muted); margin: 0 0 1.6rem; font-size: .96rem; }

/* ---------- book grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.75rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.card { display: flex; flex-direction: column; }
.card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(28,31,42,.09);
}
.card h3 {
  font-size: 1rem;
  line-height: 1.35;
  margin: .85rem 0 .15rem;
  font-weight: 600;
}
.card .by {
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 .45rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.card p.blurb {
  font-size: .9rem;
  color: var(--muted);
  margin: 0 0 .7rem;
  flex: 1;
}
.links { display: flex; flex-wrap: wrap; gap: .4rem .8rem; }
.links a {
  font-size: .9rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.links a:hover { text-decoration: underline; }

/* ---------- free downloads ---------- */
.freebies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.free-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
}
.free-card img {
  width: 76px;
  height: auto;
  align-self: flex-start;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.free-card h3 { font-size: .99rem; margin: 0 0 .3rem; line-height: 1.35; }
.free-card p { font-size: .89rem; color: var(--muted); margin: 0 0 .7rem; }
.free-card .get {
  display: inline-block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.free-card .get:hover { text-decoration: underline; }
.free-body { display: flex; flex-direction: column; }
.free-body p { flex: 1; }

/* ---------- callout ---------- */
.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow);
  border-radius: 7px;
  padding: 1.2rem 1.35rem;
  margin: 0;
}
.callout h2 { font-size: 1.1rem; margin: 0 0 .4rem; }
.callout p { color: var(--muted); margin: 0 0 .6rem; font-size: .95rem; }
.callout p:last-child { margin-bottom: 0; }
.callout a { color: var(--accent); }

/* ---------- lookup table ---------- */
.lookup { width: 100%; border-collapse: collapse; margin: 1.25rem 0 0; font-size: .95rem; }
.lookup th, .lookup td {
  text-align: left;
  padding: .7rem .6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.lookup th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.lookup a { color: var(--accent); text-decoration: none; font-weight: 500; }
.lookup a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding: 2rem 0 2.75rem;
  color: var(--muted);
  font-size: .89rem;
}
.site-foot p { margin: 0 0 .5rem; }
.site-foot a { color: var(--muted); }

@media (max-width: 600px) {
  .hero { padding: 2.25rem 0 1.75rem; }
  .hero h1 { font-size: 1.68rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1.4rem 1rem; }
  .site-nav { gap: 1.1rem; }
}

/* ---------- clickable covers and titles ---------- */
.cover-link {
  display: block;
  text-decoration: none;
  border-radius: 5px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.cover-link:hover { transform: translateY(-3px); }
.cover-link:hover img { box-shadow: 0 7px 20px rgba(28,31,42,.19); }
.cover-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.title-link {
  color: inherit;
  text-decoration: none;
}
.title-link:hover { color: var(--accent); }
.title-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* the free-download boxes sit side by side, so the link is the flex child now */
.free-card > .cover-link { flex: 0 0 auto; align-self: flex-start; }

/* ---------- not published yet ---------- */
.coming-cover {
  aspect-ratio: 2 / 3;
  border: 2px dashed var(--line);
  border-radius: 5px;
  background: var(--surface);
  display: grid;
  place-items: center;
  text-align: center;
}
.coming-cover span {
  font: 600 .88rem/1.4 Georgia, "Times New Roman", serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- companion download pages ---- */
.bonus-hero { text-align: center; }
.dl-panel {
  display: flex;
  gap: 1.6rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 0 0 2.4rem;
}
.dl-cover {
  flex: 0 0 150px;
  width: 150px;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 3px 12px rgba(28,31,42,.14);
}
.dl-body { flex: 1 1 auto; }
.dl-body h2 { margin: .1rem 0 .5rem; font-size: 1.22rem; }
/* ".links a.dl-btn" is here on purpose. ".links a" is (0,1,1) and beats ".dl-btn"
   at (0,1,0), so without it the button label takes the link colour and renders
   teal on teal, i.e. invisible. Do not simplify this back to ".dl-btn". */
.dl-btn, .links a.dl-btn, .optin-btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-ink);
  text-decoration: none;
  font-weight: 600;
  padding: .82rem 1.5rem;
  border-radius: 6px;
  transition: transform .14s ease, box-shadow .14s ease;
}
.dl-btn:hover, .links a.dl-btn:hover, .optin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(28,31,42,.22);
}
.optin-btn { background: var(--btn2-bg); color: var(--btn2-ink); }
.dl-fine { font-size: .86rem; color: var(--muted); margin: .7rem 0 0; }
.optin {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 1.4rem 1.5rem;
  margin: 0 0 2.4rem;
}
.optin h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.shelf-intro { color: var(--muted); margin: -.4rem 0 1.2rem; max-width: 62ch; }
@media (max-width: 560px) {
  .dl-panel { flex-direction: column; align-items: center; text-align: center; }
  .dl-cover { flex: 0 0 auto; width: 170px; }
}

/* ---- "See inside" button and the sample-page viewer ---- */
.peek {
  font: inherit;
  font-size: .92rem;
  color: var(--accent);
  background: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .18rem .6rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s ease, border-color .14s ease;
}
.peek:hover { background: var(--surface); border-color: var(--accent); }
.peeker {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(16,18,26,.88);
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  gap: .5rem 0;
  padding: .75rem;
}
.peeker[hidden] { display: none; }
.peeker-bar {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #fff;
  font-weight: 600;
  padding: 0 .3rem;
}
#peek-close {
  font: inherit;
  font-size: 1.9rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0 .3rem;
}
#peek-img {
  grid-column: 2;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.peek-nav {
  font: inherit;
  font-size: 2.4rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
  padding: .4rem .6rem;
  opacity: .75;
}
.peek-nav:hover { opacity: 1; }
#peek-count {
  grid-column: 1 / -1;
  color: #cfd3dd;
  font-size: .86rem;
  margin: 0;
}
@media (max-width: 560px) {
  .peek-nav { font-size: 1.8rem; padding: .3rem .25rem; }
  #peek-img { max-height: 70vh; }
}

/* "See inside" gets its own line above the Amazon link, so the Amazon link is
   always the last line of a card and lines up across the whole grid. */
.peek-row { margin: .55rem 0 .35rem; }
.card { display: flex; flex-direction: column; }
.card .links { margin-top: auto; }

/* ---------- blog ---------- */
/* A narrower column than the book shelves. Long text is easier to read when
   the line length stays under about 70 characters. */
.wrap-narrow { max-width: 42rem; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.post-item:first-child { padding-top: .4rem; }
.post-item h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 0 0 .35rem;
}
.post-item h2 a {
  color: var(--ink);
  text-decoration: none;
}
.post-item h2 a:hover { color: var(--accent); text-decoration: underline; }
.post-item p { margin: 0 0 .4rem; }
.post-item p:last-child { margin-bottom: 0; color: var(--muted); }

.post-meta {
  color: var(--muted);
  font-size: .9rem;
  margin: 0 0 1.6rem;
}
.post-back {
  margin: 1.8rem 0 1.2rem;
  font-size: .92rem;
}
.post-back a { color: var(--muted); }

.post h1 {
  font-size: 2rem;
  line-height: 1.22;
  margin: 0 0 .5rem;
}
.post h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.2rem 0 .6rem;
}
.post p { margin: 0 0 1.1rem; }
.post ul, .post ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.post li { margin-bottom: .5rem; }
.post img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.6rem 0;
}
.post a { color: var(--accent); }

/* The free download, placed high in the post. Deliberately quieter than the
   paid offer at the bottom so the two do not compete. Same specificity trick
   as .btn below: ".post a" would otherwise repaint the label. */
.post-grab {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  margin: 1.8rem 0 2.2rem;
}
.post-grab p { margin: 0 0 .8rem; }
.post-grab p:last-child { margin-bottom: 0; }
.post-grab .grab-note {
  color: var(--muted);
  font-size: .9rem;
}

.btn-quiet,
.post a.btn-quiet {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: .6rem 1.1rem;
  border-radius: 6px;
}
.btn-quiet:hover,
.post a.btn-quiet:hover {
  background: var(--btn-bg);
  color: var(--btn-ink);
}

/* The one offer at the end of every post. */
.post-cta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  padding: 1.4rem 1.5rem;
  margin: 2.6rem 0 3.5rem;
}
.post-cta h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
.post-cta p { margin: 0 0 .9rem; }
.post-cta p:last-child { margin-bottom: 0; }

/* Both selectors are needed: ".post a" is more specific than ".btn" alone,
   so inside an article it would otherwise repaint the label teal on teal. */
.btn,
.post a.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-ink);
  text-decoration: none;
  font-weight: 600;
  padding: .7rem 1.2rem;
  border-radius: 6px;
}
.btn:hover, .post a.btn:hover { filter: brightness(1.08); color: var(--btn-ink); }

@media (max-width: 560px) {
  .post h1 { font-size: 1.6rem; }
  .post-item h2 { font-size: 1.2rem; }
}

/* ---------- forms (custom pack order) ---------- */
.itl-form { max-width: 40rem; margin: 0 0 3rem; }
.hp { display: none !important; }
.f-lab {
  display: block;
  font-weight: 600;
  font-size: 1.02rem;
  margin: 1.9rem 0 .25rem;
  padding: 0;
}
.f-help { color: var(--muted); font-size: .92rem; margin: 0 0 .6rem; line-height: 1.5; }
.f-in {
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: .7rem .8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  /* Use the site's own variables, never a hardcoded white. Jason, 2026-11-28:
     "I can't see the font." He was in dark mode, where background:#fff with
     color:inherit put near-white --ink text on a white box. Invisible. */
  background: var(--surface);
  color: var(--ink);
}
.f-in::placeholder { color: var(--muted); opacity: 1; }
.f-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.f-area { resize: vertical; line-height: 1.5; }
.f-set { border: 0; padding: 0; margin: 0; min-width: 0; }
.f-opt {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .7rem .85rem;
  margin-top: .5rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  line-height: 1.5;
  font-size: .96rem;
}
.f-opt:hover { border-color: var(--accent); }
.f-opt input { margin-top: .3rem; flex: 0 0 auto; }
.f-opt span { min-width: 0; }
.f-send { margin-top: 2rem; border: 0; cursor: pointer; font: inherit; font-weight: 600; }

/* ---------- stop long unbroken strings pushing the page sideways on a phone ---------- */
/* A grid or flex child defaults to min-width:auto, so it refuses to shrink below its
   content. One unbreakable string, such as a bare URL, then widens the whole document
   and the page scrolls sideways under a thumb. Jason reported exactly that, 2026-11-28. */
.card, .free-card, .free-body, .dl-body, .dl-panel, .wrap > * { min-width: 0; }
.free-card > .cover-link, .dl-panel > * { min-width: 0; }
.free-body, .dl-body { flex: 1 1 0; min-width: 0; }
p, li, h1, h2, h3, .blurb, .shelf-intro, .f-help { overflow-wrap: break-word; }

/* First attempt at the above missed the two things actually causing it, because I
   guessed at the cause instead of measuring. Both found at 390px, 2026-11-28:

   1. The header nav is a flex row with no wrap, so on the homepage, which has the most
      links, it ran 205px past the right edge and dragged the page with it.
   2. The /bonus lookup table prints bare URLs like inktolaunch.com/memorylane. Table
      cells were not in the overflow-wrap rule above, and break-word will not split a
      string with no break opportunity in it. It ran 84px over. */
.site-nav { flex-wrap: wrap; row-gap: .45rem; }
td, th { overflow-wrap: break-word; }
td a { overflow-wrap: break-word; }
table { max-width: 100%; }

@media (max-width: 600px) {
  .lookup thead { display: none; }
  .lookup, .lookup tbody, .lookup tr, .lookup td { display: block; width: 100%; }
  .lookup tr { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .lookup td { border: 0; padding: .1rem 0; }
  .lookup td:first-child { font-weight: 600; font-size: 1.02rem; }
  .lookup td:nth-child(2) { color: var(--muted); }
  .lookup td:nth-child(2)::before { content: "Companion: "; }
  .lookup td:last-child { margin-top: .35rem; font-size: 1.02rem; }
  /* Any other table still gets the old safety net. */
  .wrap table:not(.lookup) { display: block; overflow-x: auto; }
}

/* The how-it-works strip on /custom. Three steps read better side by side on a
   desktop and stacked on a phone, and they need more room than a book card. */
.how-steps { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.how-steps .card h3 { color: var(--accent); }

/* ---------- readable type for an older audience ---------- */
/* Cowork's phone audit, 2026-11-29: body text on the shelves and the free downloads
   ran 14 to 14.4px while the blog runs 16px and reads noticeably better. The people
   buying large print puzzle books are the last audience that should be squinting at
   the shop. The price on /custom was the smallest text on the page at 13.1px, which
   is the one number a buyer is actually looking for. */
.card .by { font-size: .95rem; }
.card p.blurb { font-size: .95rem; line-height: 1.55; }
.free-card p { font-size: .95rem; line-height: 1.5; }
.free-card h3 { font-size: 1.04rem; }
.shelf-note { font-size: 1rem; }
.lookup { font-size: 1rem; }

/* The price is the thing they came for. On the custom page the three size cards put it
   in .by, so it gets its own size and weight there rather than reading as a byline. */
#sizes .card .by { font-size: 1.5rem; font-weight: 700; color: var(--ink); margin: .1rem 0 .5rem; }
