/* Learning pages: how to play, guides, techniques, FAQ. */
body { background: var(--card); }
.article { max-width: 760px; margin: 0 auto; padding: 28px 24px 64px; color: var(--ink-2); font-size: 17px; line-height: 1.65; }
.article h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.1; color: var(--ink); margin: 10px 0 16px; }
.article h2 { font-size: 26px; color: var(--ink); margin: 40px 0 12px; }
.article h3 { font-size: 19px; color: var(--ink); margin: 0 0 6px; }
.article h4 { font-family: var(--body); font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.article p { margin: 0 0 14px; }
.article ul, .article ol { margin: 0 0 14px; padding-left: 24px; }
.article li { margin: 7px 0; }
.article a { color: #2F3FA8; text-underline-offset: 3px; }
.article a:hover { color: #1D2870; }
.lead { font-size: 19px; color: var(--ink); background: var(--parchment); border-radius: 16px; padding: 18px 20px; }
.crumbs { font-size: 14px; color: var(--ink-3); }
.crumbs a { color: var(--ink-3); }

.board-fig { margin: 18px 0; display: flex; justify-content: center; }
.board-fig svg { width: 100%; height: auto; display: block; }
.board-fig svg text { font: 700 12px var(--body); fill: #5A6190; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--ink-3); background: var(--parchment); border-radius: 12px; padding: 10px 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 18px; height: 18px; border-radius: 5px; background: #A9B0D3; display: inline-block; position: relative; }
.lg.crown { background: #F5C04A; }
.lg.dot::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #10142A; opacity: .6; }
.lg.ring { box-shadow: inset 0 0 0 3px #F5C04A; }
.lg.x { background: #F7D5DA; }
.lg.x::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; color: #B4122B; font-size: 13px; font-weight: 800; }
.lg.glow { background: #A9B0D3; box-shadow: inset 0 0 0 3px #fff, 0 0 0 1px #A9B0D3; }

.steps { list-style: none; padding: 0; counter-reset: none; }
.steps > li { margin: 0 0 28px; padding: 18px 20px; background: var(--parchment); border-radius: 18px; }
.steps > li p { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 22px 0; }
.article a.card-link { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 18px; background: var(--parchment); color: var(--ink-2); text-decoration: none; font-size: 15px; line-height: 1.45; }
.article a.card-link:hover { background: #E9EBF5; }
.card-link b { font-family: var(--display); font-weight: 800; font-size: 19px; color: var(--ink); line-height: 1.2; }
.lvl { align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lvl.beginner { background: #DDF3E8; color: #146046; }
.lvl.intermediate { background: #FCE3C2; color: #7A4A06; }
.lvl.expert { background: #E6DCFB; color: #4B2A99; }

.try { margin: 44px 0 8px; padding: 22px; border-radius: 22px; background: var(--ink); color: var(--text); }
.article .try h2 { color: var(--text); margin-top: 0; }
.try p { color: var(--text-2); }
.try-board { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.try-board .board { background: #0A0D1E; }
.try-tools { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.article .try-msg { margin: 0; min-height: 3.2em; text-align: center; font-size: 15px; color: var(--text); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 36px; }
.article .pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--parchment); color: var(--ink); text-decoration: none; }
.pager a:last-child { text-align: right; }
.pager small { color: var(--ink-3); font-size: 13px; }

.app-cta { margin-top: 44px; padding: 20px 22px; border-radius: 20px; background: var(--parchment); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.app-cta div { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; font-size: 15px; }
.app-cta b { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--ink); }
.article .app-cta a.btn { color: var(--ink); text-decoration: none; }
.site-footer { flex-wrap: wrap; }

@media (max-width: 640px) {
  .article { padding: 20px 16px 48px; font-size: 16px; }
  .lead { font-size: 17px; padding: 16px; }
  .try { padding: 16px; margin-left: -4px; margin-right: -4px; }
  .steps > li { padding: 14px; }
}

/* Tools: unlimited play and the solver */
.tool { margin: 24px 0 8px; padding: 20px; border-radius: 22px; background: var(--ink); color: var(--text); display: flex; flex-direction: column; gap: 14px; }
.tool-bar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tool-bar label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tool select { font: inherit; font-size: 15px; font-weight: 700; padding: 9px 10px; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--velvet); color: var(--text); }
.tool-time { margin-left: auto; display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: var(--text-2); }
#pInfo { text-transform: capitalize; }
.tool-time b { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--text); font-variant-numeric: tabular-nums; }
.tool-board { max-width: 460px; width: 100%; margin: 0 auto; }
.tool-board .board { background: #0A0D1E; }
.article .tool-msg { margin: 0; min-height: 3.2em; text-align: center; font-size: 15px; color: var(--text); }
.article .tool-msg.bad { color: #F7A8B4; }
.article .tool-step, .article .tool-foot { margin: 0; font-size: 14px; color: var(--text-2); text-align: center; }
.tool-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.tool-check input { width: 18px; height: 18px; accent-color: var(--gold); }
.palette { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.swatch { width: 40px; height: 40px; border-radius: 12px; border: 0; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.swatch.on { outline: 3px solid #fff; outline-offset: 2px; }
.paint-grid { display: grid; gap: 4px; padding: 10px; border-radius: 22px; background: #0A0D1E; aspect-ratio: 1; touch-action: none; user-select: none; -webkit-user-select: none; }
.paint { border: 0; padding: 0; border-radius: 7px; background: #2A3260; min-width: 0; }
@media (max-width: 640px) { .tool { padding: 14px; margin-left: -4px; margin-right: -4px; } .swatch { width: 34px; height: 34px; } }

/* Answers, per-day pages and the archive */
.note { font-size: 15px; background: #FFF6E0; border-radius: 14px; padding: 14px 16px; color: #5A4306; }
.article .note a { color: #5A4306; font-weight: 700; }
.answer-board { margin: 34px 0; padding-top: 6px; border-top: 1px solid var(--rule); }
.answer-board h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.answer-board h2 .lvl { align-self: center; }
.article details { background: var(--parchment); border-radius: 14px; margin: 10px 0; }
.article summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--ink); min-height: 44px; }
.article details[open] summary { border-bottom: 1px solid var(--rule); }
.article details > *:not(summary) { margin-left: 16px; margin-right: 16px; }
.article details > p:first-of-type { margin-top: 14px; }
.day-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.article .day-list li { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--parchment); }
.article .day-list a { text-decoration: none; color: var(--ink); }
.article .day-list a.sub { font-size: 14px; font-weight: 700; color: #2F3FA8; text-decoration: underline; }
.try + .try { margin-top: 18px; }
