* { box-sizing: border-box; }
body { margin: 0; background: #f3f4f6; color: #202938; font-family: system-ui, sans-serif; line-height: 1.5; }
main { max-width: 960px; margin: 30px auto; padding: 24px; background: white; border-radius: 8px; }
h1 { margin-top: 0; }
.symbols { font-size: .9rem; color: #475569; }
.grid-scroll { overflow-x: auto; margin: 24px 0; padding-bottom: 8px; }
table { border-collapse: collapse; margin: auto; table-layout: fixed; }
caption { text-align: left; margin-bottom: 12px; }
th { font-size: .75rem; color: #475569; min-width: 24px; padding: 4px; }
tbody td { border: 1px solid #a4acb8; min-width: 42px; width: 42px; height: 42px; text-align: center; }
tbody td:nth-child(4n + 2) { border-left: 3px solid #334155; }
tbody td:last-child { border-right: 3px solid #334155; }
tbody tr:nth-child(4n + 1) td { border-top: 3px solid #334155; }
tbody tr:last-child td { border-bottom: 3px solid #334155; }
.given { background: #f1f5f9; font-weight: 700; font-size: .85rem; }
.target td { background: #dce1e8; }
tbody input { display: block; width: 100%; min-width: 0; height: 40px; padding: 0; border: 0; background: transparent; text-align: center; font: 600 .85rem system-ui, sans-serif; text-transform: uppercase; color: #174c98; border-radius: 0; }
input:focus-visible, button:focus-visible, .grid-scroll:focus-visible { outline: 3px solid #2563eb; outline-offset: -3px; }
.answer { border-top: 1px solid #dce1e8; padding-top: 20px; }
label { display: block; font-weight: 700; }
#answer-help { margin: 6px 0 12px; font-size: .9rem; }
#answer { max-width: 100%; width: 580px; padding: 10px; border: 1px solid #788496; border-radius: 4px; font: 1.1rem monospace; text-transform: uppercase; }
button { padding: 12px 18px; border: 0; border-radius: 4px; background: #174c98; color: white; font: inherit; cursor: pointer; }
.message { padding: 12px; background: #eef2ff; border-left: 4px solid #174c98; }
.success { padding: 16px; margin: 20px 0; background: #e7f6ed; border: 1px solid #27844b; border-radius: 4px; }
.success h2 { margin: 0 0 8px; font-size: 1.1rem; }
.success code { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) { main { margin: 0; padding: 16px; border-radius: 0; } button { display: block; margin-top: 12px; width: 100%; } }

.message code { overflow-wrap: anywhere; }
