/* ==========================================================================
   LinkedIn answer pages — Mini Sudoku / Patches / Wend
   Shared .la-* structural components + a distinct theme per game:
     body.la-ms  "Inkwell"  — paper white + indigo ink + pen blue
     body.la-pt  "Quilt"    — warm linen + stitched fabric patches
     body.la-wd  "Trail"    — sand + moss green + creek blue
   Page chrome (navbar/footer/cards) inherits style.css.
   ========================================================================== */

:root {
  --la-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

/* Theme palettes ---------------------------------------------------------- */
body.la-ms {
  --la-ink: #26324e;        /* indigo ink       */
  --la-accent: #3b5bdb;     /* pen blue         */
  --la-accent-ink: #2b44a8;
  --la-soft: #eef1fb;       /* washed blue card */
  --la-line: #d8ddf0;
  --la-paper: #fbf9f4;
}
body.la-pt {
  --la-ink: #4a3327;        /* walnut           */
  --la-accent: #c46a3f;     /* terracotta       */
  --la-accent-ink: #9c4f2c;
  --la-soft: #f8efe6;       /* linen card       */
  --la-line: #e8d9c8;
  --la-paper: #faf6f0;
}
body.la-wd {
  --la-ink: #29392f;        /* pine ink         */
  --la-accent: #4d7c5f;     /* moss             */
  --la-accent-ink: #3c6149;
  --la-soft: #edf3ee;       /* fern card        */
  --la-line: #d5e2d8;
  --la-paper: #f9f7f2;
}

/* Page scaffold ------------------------------------------------------------ */
.la-page { max-width: 880px; margin: 0 auto; padding: 20px 16px 56px; }

.la-hero { text-align: center; margin: 8px 0 24px; }
.la-hero .la-eyebrow {
  font: 600 0.78rem/1 var(--la-display);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--la-accent-ink); margin-bottom: 12px;
}
.la-hero h1 {
  font-family: var(--la-display); font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05;
  color: var(--la-ink); margin: 0 0 10px; letter-spacing: -0.01em;
}
.la-hero h1 em { font-style: italic; color: var(--la-accent-ink); }
.la-hero > p { color: #6b6474; max-width: 620px; margin: 0 auto 14px; }
.la-puzzle-num {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: var(--la-soft); border: 1px solid var(--la-line);
  font: 600 0.9rem/1 var(--la-display); color: var(--la-ink);
}

/* Answer box ---------------------------------------------------------------- */
.la-answerbox {
  background: #fff; border: 1px solid var(--la-line); border-radius: 16px;
  padding: 22px; margin: 0 0 26px; box-shadow: 0 2px 10px rgba(30, 25, 40, 0.05);
}
.la-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.la-tag {
  padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; color: #5d5666;
  background: var(--la-soft); border: 1px solid var(--la-line);
}
.la-tag b { color: var(--la-ink); }
.la-tag.is-diff { background: #fbf0e3; color: #9a6a2e; border-color: #f0d9bd; }
.la-trap {
  background: var(--la-paper); border-left: 3px solid var(--la-accent);
  padding: 10px 14px; border-radius: 0 10px 10px 0;
  color: #55495c; font-size: 0.95rem; margin-bottom: 16px;
}
.la-reveal-btn {
  display: block; width: 100%; padding: 14px; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--la-accent), var(--la-accent-ink));
  color: #fff; font: 600 1.05rem/1.2 inherit; cursor: pointer;
}
.la-reveal-btn:hover { filter: brightness(1.07); }
.la-reveal-btn small { display: block; font-weight: 500; font-size: 0.72rem; opacity: 0.85; margin-top: 3px; }
.la-hidden { display: none !important; }

.la-solution { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 18px; }
.la-solution-single { grid-template-columns: 1fr; }
@media (max-width: 600px) { .la-solution { grid-template-columns: 1fr; } }

.la-coords h3 { font: 600 1.05rem/1.3 var(--la-display); color: var(--la-ink); margin: 0 0 10px; }
.la-coord-list { list-style: none; margin: 0 0 14px; padding: 0; }
.la-coord-list li {
  padding: 7px 10px; border-bottom: 1px dashed var(--la-line);
  color: #4b4452; font-size: 0.95rem;
}
.la-coord-list li b { color: var(--la-ink); }
.la-copy {
  padding: 9px 16px; border: 1px solid var(--la-line); border-radius: 9px;
  background: var(--la-soft); color: var(--la-ink); font-weight: 600; cursor: pointer;
}
.la-copy:hover { border-color: var(--la-accent); }
.la-copied { margin-left: 10px; color: #2e7d4f; font-weight: 600; font-size: 0.9rem; }

/* Progressive hints ---------------------------------------------------------- */
.la-hints { display: grid; gap: 10px; }
.la-hint { background: #fff; border: 1px solid var(--la-line); border-radius: 12px; overflow: hidden; }
.la-hint-btn {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 14px 18px; background: none; border: 0; cursor: pointer;
  font: 600 0.98rem/1 inherit; color: var(--la-ink);
}
.la-hint-btn:hover { background: var(--la-paper); }
.la-hint-btn .la-hint-cue { font: 500 0.82rem/1 system-ui; color: var(--la-accent-ink); }
.la-hint-body { padding: 0 18px 16px; color: #4b4452; line-height: 1.6; }

/* Sections / yesterday / FAQ / cross-links ----------------------------------- */
.la-section { margin: 30px 0; }
.la-section h2 {
  font: 600 1.5rem/1.25 var(--la-display); color: var(--la-ink); margin-bottom: 10px;
}
.la-section h3 { color: var(--la-ink); margin: 18px 0 6px; font-size: 1.08rem; }
.la-section p { color: #4b4452; line-height: 1.7; margin-bottom: 10px; }
.la-section ul, .la-section ol { color: #4b4452; line-height: 1.7; margin: 0 0 10px 22px; }

.la-yesterday {
  background: var(--la-soft); border: 1px solid var(--la-line); border-radius: 12px;
  padding: 16px 18px; margin: 22px 0;
}
.la-yesterday h3 { margin: 0 0 6px; font: 600 1.02rem/1.3 var(--la-display); color: var(--la-ink); }
.la-yesterday p { margin: 0; color: #55495c; font-size: 0.95rem; line-height: 1.6; }
.la-yesterday a { color: var(--la-accent-ink); }

.la-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; }
.la-rule-card { background: #fff; border: 1px solid var(--la-line); border-radius: 12px; padding: 14px 16px; }
.la-rule-card .la-rule-n {
  font: 700 0.7rem/1 system-ui; letter-spacing: 0.14em;
  color: var(--la-accent-ink); display: block; margin-bottom: 6px;
}
.la-rule-card h4 { margin: 0 0 4px; color: var(--la-ink); font-size: 0.98rem; }
.la-rule-card p { margin: 0; color: #5d5666; font-size: 0.9rem; line-height: 1.5; }

.la-faq details {
  background: #fff; border: 1px solid var(--la-line); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 8px;
}
.la-faq summary { font-weight: 600; color: var(--la-ink); cursor: pointer; }
.la-faq details p { margin: 8px 0 0; color: #4b4452; line-height: 1.6; }

.la-cross { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.la-cross a {
  padding: 9px 15px; border-radius: 999px; text-decoration: none; font-weight: 600;
  font-size: 0.9rem; color: var(--la-accent-ink);
  background: var(--la-soft); border: 1px solid var(--la-line);
}
.la-cross a:hover { border-color: var(--la-accent); }

/* ==========================================================================
   Mini Sudoku — "Inkwell" solution grid
   ========================================================================== */
.ms-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border: 2.5px solid var(--la-ink); border-radius: 8px; overflow: hidden;
  background: var(--la-paper); aspect-ratio: 1; max-width: 340px;
}
.ms-grid .ms-cell {
  display: flex; align-items: center; justify-content: center;
  font: 600 clamp(1rem, 3.4vw, 1.35rem)/1 var(--la-display);
  color: var(--la-accent-ink);
  border-right: 1px solid var(--la-line); border-bottom: 1px solid var(--la-line);
  animation: ms-ink 0.35s ease both;
}
/* 2×3 box seams: heavier rule after col 3 and after rows 2 & 4 */
.ms-grid .ms-cell.seam-r { border-right: 2.5px solid var(--la-ink); }
.ms-grid .ms-cell.seam-b { border-bottom: 2.5px solid var(--la-ink); }
@keyframes ms-ink { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Patches — "Quilt" step list
   ========================================================================== */
.pt-steps li { display: flex; align-items: baseline; gap: 9px; }
.pt-swatch {
  flex: none; width: 14px; height: 14px; border-radius: 4px;
  background: #cbbfae; border: 1px dashed rgba(0, 0, 0, 0.35);
  transform: translateY(2px);
}

/* ==========================================================================
   Wend — "Trail" word chips
   ========================================================================== */
.wd-words { display: flex; flex-direction: column; gap: 10px; }
.wd-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--la-paper); border: 1px solid var(--la-line);
  border-left: 5px solid var(--wd-c, var(--la-accent));
  border-radius: 10px; padding: 10px 14px;
  animation: wd-slide 0.4s ease both;
}
.wd-chip b {
  font: 600 1.15rem/1 var(--la-display); letter-spacing: 0.08em; color: var(--la-ink);
}
.wd-chip .wd-len,
.la-coord-list .wd-len {
  font-size: 0.78rem; font-weight: 600; color: var(--la-accent-ink);
  background: var(--la-soft); border: 1px solid var(--la-line);
  border-radius: 999px; padding: 3px 9px;
}
@keyframes wd-slide { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
  .ms-grid { max-width: 100%; }
}
