/* nonogram-puzzles.com: page layout and theme. The board's own styles are in /game/game.css. */
:root {
  --bg: #ffffff; --bg2: #f5f6f9; --fg: #1f2430; --muted: #5d6576; --line: #e3e6ec; --brand: #ff7a59; --acc: #3a6df0; --ok: #1d7f4c;
  --card: #ffffff; --shadow: 0 1px 2px rgba(20, 24, 33, .06), 0 4px 16px rgba(20, 24, 33, .06);
  --np-ink: #1f2430; --np-paper: #ffffff; --np-line: #d5d9e2; --np-line5: #6b7c99; --np-cluebg: #f3f5f9; --np-clue: #1f2430; --np-done: #b3bac8; --np-accent: #3a6df0;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple SD Gothic Neo", "Hiragino Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --dark: 1; } }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] { --ok: #4cc98a; --bg: #14161c; --bg2: #1b1e26; --fg: #e8eaf0; --muted: #a3abbb; --line: #2b303c; --card: #1b1e26; --shadow: none;
    --np-ink: #e8eaf0; --np-paper: #14161c; --np-line: #2f3542; --np-line5: #7f8db0; --np-cluebg: #1c2029; --np-clue: #e8eaf0; --np-done: #59616f; --np-accent: #7aa2ff; color-scheme: dark; }
}
:root[data-theme="dark"] { --ok: #4cc98a; --bg: #14161c; --bg2: #1b1e26; --fg: #e8eaf0; --muted: #a3abbb; --line: #2b303c; --card: #1b1e26; --shadow: none;
  --np-ink: #e8eaf0; --np-paper: #14161c; --np-line: #2f3542; --np-line5: #7f8db0; --np-cluebg: #1c2029; --np-clue: #e8eaf0; --np-done: #59616f; --np-accent: #7aa2ff; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--font); }
a { color: var(--acc); text-underline-offset: 2px; }
img, svg { max-width: 100%; }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* header */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 16px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 700; font-size: 18px; white-space: nowrap; }
.site-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.site-nav a { color: var(--fg); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.site-nav a:hover { background: var(--bg2); }
.site-nav a[aria-current] { background: var(--bg2); font-weight: 700; }
.head-tools { display: flex; gap: 4px; align-items: center; position: relative; }
.icon-btn { display: inline-flex; align-items: center; gap: 4px; height: 40px; min-width: 40px; justify-content: center; border: 0; background: transparent; color: var(--fg); border-radius: 10px; cursor: pointer; padding: 0 8px; font: inherit; font-size: 13px; font-weight: 600; }
.icon-btn:hover { background: var(--bg2); }
.menu-btn { display: none; }
.lang-menu { position: absolute; top: 46px; inset-inline-end: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); max-height: 70vh; overflow: auto; z-index: 30; }
.lang-menu a { padding: 8px 10px; border-radius: 8px; color: var(--fg); text-decoration: none; font-size: 15px; }
.lang-menu a:hover, .lang-menu a[aria-current] { background: var(--bg2); }
/* the nav collapses into the menu below 900px, or whenever its links don't fit on one line (long languages) */
.nav-tight .menu-btn { display: inline-flex; }
.nav-tight .site-nav { position: absolute; top: 58px; left: 0; right: 0; display: none; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; }
.nav-tight .site-nav.open { display: flex; }
.nav-tight .site-nav a { padding: 12px; font-size: 17px; }
.nav-tight .head-tools { margin-inline-start: auto; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .site-nav { position: absolute; top: 58px; left: 0; right: 0; display: none; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; font-size: 17px; }
  .head-tools { margin-inline-start: auto; }
}

/* breadcrumbs + hero */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 12px auto 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-inline-end: 6px; }
.crumbs a { color: var(--muted); }
.hero { padding: 14px 0 6px; }
.hero h1 { font-size: clamp(26px, 4.2vw, 40px); line-height: 1.15; margin: 6px 0 8px; letter-spacing: -.01em; }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 6px; max-width: 70ch; }
.hero-game .lede { font-size: 16px; }
.art-meta { font-size: 14px; margin: 0; }

/* game area */
.game-wrap { margin: 8px 0 24px; }
.np-mount { min-height: calc(min(100vw, 900px) * var(--ar, 1) * .8); }
.daily-head, .game-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.daily-date { margin: 0; font-weight: 600; color: var(--muted); }
.daily-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.daily-tabs button { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 6px 10px; border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 12px; cursor: pointer; font: inherit; line-height: 1.2; }
.daily-tabs button[aria-selected="true"] { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.daily-tabs button.done { background: color-mix(in srgb, #2fa86b 10%, var(--card)); }
.daily-tabs button.done .tab-size::after { content: ' ✓'; color: var(--ok); }
.tab-size { font-weight: 700; font-size: 14px; }
.tab-dim { font-size: 12px; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.chip[aria-pressed="true"], .chip.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, var(--card)); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--bg2); }
.btn-primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--acc) 88%, #000); }
.progress { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.progress div, .stat-tiles div { flex: 1 1 110px; background: var(--bg2); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; }
.progress b, .stat-tiles b { font-size: 20px; }
.progress span, .stat-tiles span { font-size: 13px; color: var(--muted); }
.progress:empty { display: none; }

/* win card */
.np-wincard { margin: 14px auto 0; max-width: 560px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 18px; text-align: center; animation: wc-in .35s ease-out; }
@keyframes wc-in { from { opacity: 0; transform: translateY(8px); } }
.wc-title { font-size: 22px; }
.wc-kicker { color: var(--muted); font-size: 16px; }
.wc-stats { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 6px 0 10px; color: var(--muted); }
.wc-stats b { color: var(--fg); }
.wc-stats em { color: var(--ok); font-style: normal; font-weight: 700; }
.wc-ach { list-style: none; padding: 0; margin: 0 0 10px; }
.ach-new { background: color-mix(in srgb, var(--brand) 12%, var(--card)); border-radius: 10px; padding: 6px 10px; margin: 4px 0; }
.wc-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.wc-credit { font-size: 12px; margin: 10px 0 0; }

/* library */
.lib-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 14px; }
.lib-filters label { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; }
.lib-filters select { height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; font-size: 14px; padding: 0 8px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.lib-card { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 10px 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; font: inherit; }
.lib-card:hover { border-color: var(--acc); }
.lib-q { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 8px; font-weight: 700; color: var(--muted); font-size: 14px;
  background: repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 12.8px), repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12.8px); }
.lib-thumb { width: 64px; height: 64px; color: var(--np-ink); }
.lib-meta { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.25; }

/* prose */
.prose { max-width: 780px; padding-bottom: 40px; }
.prose-sec h2, .faq h2, .related h2 { font-size: 26px; line-height: 1.25; margin: 34px 0 10px; }
.prose h3 { font-size: 20px; margin: 22px 0 6px; }
.prose p, .prose li { max-width: 72ch; }
.prose table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; vertical-align: top; }
.prose th { background: var(--bg2); }
.prose figure { margin: 18px 0; }
.prose figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.prose .note { background: var(--bg2); border-inline-start: 4px solid var(--acc); border-radius: 8px; padding: 10px 14px; }
.toc { background: var(--bg2); border-radius: 12px; padding: 12px 16px; margin: 10px 0 10px; }
.toc ol { margin: 6px 0 0; padding-inline-start: 20px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; margin: 8px 0; background: var(--card); }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.faq details > div { padding-bottom: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 12px 0; }
.card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--fg); text-decoration: none; box-shadow: var(--shadow); }
.card:hover { border-color: var(--acc); }
.card span { font-size: 14px; color: var(--muted); line-height: 1.45; }

/* mini boards drawn in articles (static SVG figures from the build) */
.fig-board { display: block; width: min(100%, 420px); height: auto; margin: 0 auto; }

/* stats */
.stat-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.stat-table { border-collapse: collapse; width: 100%; max-width: 560px; }
.stat-table th, .stat-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; }
.ach-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ach-list li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; opacity: .55; display: flex; flex-direction: column; }
.ach-list li.got { opacity: 1; border-color: var(--brand); }
.ach-list span { font-size: 14px; color: var(--muted); }

/* dialog */
.np-dialog { border: 0; border-radius: 18px; padding: 22px; width: min(560px, 100vw - 24px); max-height: 88vh; background: var(--card); color: var(--fg); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.np-dialog::backdrop { background: rgba(10, 12, 18, .45); }
.np-dialog h2 { margin: 0 0 10px; }
.dlg-x { position: absolute; top: 10px; inset-inline-end: 12px; border: 0; background: transparent; color: var(--fg); font-size: 28px; cursor: pointer; width: 40px; height: 40px; border-radius: 10px; }
.set-list { display: flex; flex-direction: column; }
.set-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.set-row span { display: flex; flex-direction: column; }
.set-row small { color: var(--muted); font-size: 13px; }
.set-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--acc); flex: none; }
.backup { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.backup textarea { flex: 1 1 200px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: 13px/1.4 ui-monospace, monospace; padding: 8px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: var(--bg2); margin-top: 30px; padding: 26px 0 18px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.foot-h { font-size: 15px; margin: 0 0 6px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 4px 0; }
.site-foot a { color: var(--fg); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-base { margin-top: 18px; color: var(--muted); font-size: 13px; }
.foot-base .langs a { margin-inline-end: 10px; color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 20px); }
  .hero { padding-top: 6px; }
  .hero-game .lede { display: none; }   /* phones: the board comes first; the intro is repeated in the copy below */
  .hero h1 { font-size: 24px; margin: 2px 0 6px; }
  .crumbs { display: none; }
  .brand span { font-size: 16px; }
}
@media print {
  .site-head, .site-foot, .crumbs, .game-wrap, .related, .faq, .np-wincard { display: none !important; }
  body { font-size: 12pt; }
}
.fig { margin: 18px 0; text-align: center; }
.fig-line { max-width: 100%; height: auto; }
.mini-play { min-height: 421px; max-width: 420px; margin: 18px auto; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: var(--card); }
.mini-play .np-bar .np-acts .np-b:not([data-a="undo"]):not([data-a="hint"]):not([data-a="restart"]) { display: none; }
.mini-done { text-align: center; font-weight: 700; color: var(--ok); margin: 6px 0 0; }
.game-wrap { display: grid; grid-template-areas: "head" "main" "foot"; gap: 8px; }
.game-headx { grid-area: head; } .game-main { grid-area: main; min-width: 0; } .game-foot { grid-area: foot; }
.game-headx:empty { display: none; }
}

/* tools: solver, maker, printable */
.tool { margin: 6px auto 20px; }
.sv-in { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sv-in label { display: flex; flex-direction: column; gap: 4px; }
.sv-in small { color: var(--muted); font-size: 13px; }
.sv-in textarea { font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--card); color: var(--fg); resize: vertical; }
.sv-btns, .mk-bar, .pr-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.sv-status, .mk-status { min-height: 1.5em; font-weight: 600; }
.sv-status[data-kind="warn"], .mk-status[data-kind="warn"] { color: #c2410c; }
.mk-status[data-kind="ok"] { color: var(--ok); }
.sv-board-wrap { overflow: auto; }
.sv-grid { display: grid; width: max-content; margin: 8px auto; font-weight: 700; font-size: max(10px, calc(var(--cs) * .5)); }
.sv-cc { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; line-height: 1.1; padding-bottom: 3px; color: var(--np-clue); }
.sv-rc { text-align: end; padding-inline-end: 6px; align-self: center; white-space: nowrap; color: var(--np-clue); }
.sv-c { width: var(--cs); height: var(--cs); border: 1px solid var(--np-line); margin: 0 -1px -1px 0; background: var(--np-paper); position: relative; }
.sv-c.vr { border-right: 2px solid var(--np-line5); }
.sv-c.hr { border-bottom: 2px solid var(--np-line5); }
.sv-c.f { background: var(--np-ink); }
.sv-c.x::after { content: '×'; position: absolute; inset: 0; display: grid; place-items: center; color: #8a93a6; font-size: calc(var(--cs) * .7); line-height: 1; }
.sv-c.new { box-shadow: inset 0 0 0 2px var(--acc); }
.sv-board.done .sv-grid { animation: np-pop .6s ease-out; }
.sv-log { max-height: 260px; overflow: auto; font-size: 14px; background: var(--bg2); border-radius: 12px; padding: 10px 10px 10px 34px; }
.sv-log:empty { display: none; }
.mk-board { display: grid; width: max-content; margin: 10px auto; border: 2px solid var(--np-line5); cursor: crosshair; user-select: none; }
.mk-c { width: var(--cs); height: var(--cs); border-right: 1px solid var(--np-line); border-bottom: 1px solid var(--np-line); background: var(--np-paper); }
.mk-c.vr { border-right: 2px solid var(--np-line5); }
.mk-c.hr { border-bottom: 2px solid var(--np-line5); }
.mk-c.f { background: var(--np-ink); }
.mk-c.amb { box-shadow: inset 0 0 0 2px #f59e0b; background-image: repeating-linear-gradient(45deg, rgba(245, 158, 11, .25) 0 3px, transparent 3px 6px); }
.mk-bar select, .pr-bar select { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; padding: 0 8px; }
.mk-file { cursor: pointer; }
.mk-thr input { vertical-align: middle; }
.mk-share { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-share input { flex: 1 1 260px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--fg); padding: 0 10px; font: 14px ui-monospace, monospace; }
.pr-check { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.pr-page { background: #fff; color: #000; border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 14px 0; }
.pr-head { display: flex; justify-content: space-between; font-size: 13px; border-bottom: 1px solid #ccc; padding-bottom: 6px; margin-bottom: 8px; }
.pr-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.pr-n1 .pr-grid { grid-template-columns: 1fr; }
.pr-n6 .pr-grid { grid-template-columns: repeat(3, 1fr); }
.pr-small { grid-template-columns: repeat(3, 1fr) !important; }
.pr-grid figure { margin: 0; }
.pr-grid figcaption { font-size: 12px; color: #444; margin-bottom: 2px; }
.pr-svg { width: 100%; height: auto; }
.pr-rules { font-size: 11px; color: #444; margin: 10px 0 0; }
.pr-ans h2 { font-size: 16px; margin: 0 0 8px; }
@media (max-width: 700px) { .sv-in { grid-template-columns: 1fr; } }
@media print {
  body.printing > *:not(main), body.printing main > *:not(.tool), body.printing .pr-bar, body.printing .prose, body.printing .hero { display: none !important; }
  body.printing .tool { width: 100%; margin: 0; }
  body.printing .pr-page { border: 0; margin: 0; padding: 0; page-break-after: always; break-after: page; }
}
.tool[data-tool="solver"] { min-height: 640px; }
.tool[data-tool="maker"] { min-height: 620px; }
.tool[data-tool="printable"] { min-height: 900px; }
@media (max-width: 700px) { .tool[data-tool="solver"] { min-height: 900px; } .tool[data-tool="maker"] { min-height: 560px; } .tool[data-tool="printable"] { min-height: 700px; } }
#np-stats { min-height: 700px; }
.lang-menu[hidden] { display: none; }
/* reserve the daily header and the board while today's set loads (no layout shift on slow phones) */
.daily-date:empty { min-height: 1.6em; }
.daily-tabs:empty { min-height: 45px; }
@media (max-width: 600px) { .daily-tabs:empty { min-height: 96px; flex-basis: 100%; } .np-mount { min-height: calc((100vw - 40px) * var(--ar, 1) + 105px); } }
/* daily archive: previous / next day beside the date */
.daily-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 34px; }
.daily-nav .daily-date { padding: 0 4px; }
.dn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); cursor: pointer; }
.dn:disabled { opacity: .35; cursor: default; }
.daily-today { margin-left: 6px; font-weight: 600; font-size: 14px; }
.daily-late { margin: 0; font-size: 13px; color: var(--muted); flex-basis: 100%; }
@media (max-width: 600px) { .daily-nav { flex-basis: 100%; } }


/* the game area: puzzle picker (date + tabs) above, the board centred, progress below */
.game-headx .daily-head, .game-headx .game-head { justify-content: center; }
.game-foot .progress { max-width: 720px; margin-inline: auto; }
@media (min-width: 700px) { .daily-head { flex-wrap: nowrap; gap: 16px; } .daily-head .daily-late { display: none; } .daily-head:has(.daily-late:not([hidden])) { flex-wrap: wrap; } .daily-head:has(.daily-late:not([hidden])) .daily-late { display: block; text-align: center; } }

/* game pages: the board comes first; the page title and intro sit centred under it, above the article */
.game-top { padding-top: 14px; }
.page-intro { text-align: center; margin-block: 28px 4px; }
.page-intro h1 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.15; margin: 0 auto 10px; letter-spacing: -.01em; max-width: 32ch; }
.page-intro .lede { margin-inline: auto; max-width: 62ch; }

/* desktop: the board is sized to the screen height, so reserve about that much while it loads (not the phone formula) */
@media (min-width: 700px) and (pointer: fine) { .np-mount { min-height: min(calc(100vh - 230px), 820px); } }
.np-mount.np-ready { min-height: 0; }

/* solving walkthroughs: a grid of small boards, one per step */
.walk { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.walk .fig { margin: 0; }
.walk .fig-board { width: 100%; height: auto; max-width: 300px; display: block; margin: 0 auto; }
.walk figcaption { font-size: 14px; line-height: 1.45; }
.walk-cap { font-size: 15px; color: var(--muted); margin-top: -4px; }

/* sister sites (tools/sisters.mjs) */
.sis{max-width:1100px;margin:48px auto 8px;padding:0 16px;box-sizing:border-box}
.sis h2{font-size:1.15rem;margin:0 0 12px;line-height:1.3}
.sis-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:12px}
.sis-list li{margin:0;padding:0}
.sis-card{display:flex;gap:12px;align-items:center;height:100%;box-sizing:border-box;padding:12px 14px;border-radius:14px;border:1px solid color-mix(in srgb,currentColor 16%,transparent);background:color-mix(in srgb,currentColor 4%,transparent);color:inherit;text-decoration:none;transition:border-color .15s,transform .15s}
.sis-card:hover{border-color:color-mix(in srgb,currentColor 42%,transparent);transform:translateY(-1px)}
.sis-card:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.sis-i{width:48px;height:48px;border-radius:12px;flex:none;background:center/cover no-repeat}
.sis-t{display:flex;flex-direction:column;min-width:0;line-height:1.3}
.sis-t b{font-size:1rem}
.sis-d{font-size:.88rem;opacity:.82}
.sis-u{font-size:.8rem;opacity:.6;margin-top:2px}
@media (prefers-reduced-motion:reduce){.sis-card{transition:none}.sis-card:hover{transform:none}}
