:root {
    --ink: #33241d;
    --muted: #725f52;
    --paper: #fffaf1;
    --surface: #ffffff;
    --brown: #63351f;
    --brown-dark: #3d2117;
    --gold: #e39a2d;
    --line: #bcae9e;
    --blue: #24628d;
    --red: #a33d32;
    --green: #2d7750;
    --shadow: 0 10px 26px rgba(70, 43, 27, .12);
}


* { box-sizing: border-box; }


body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--paper);
}


.ambient-animation {
    position: fixed;
    inset: 0;
    z-index: 18;
    overflow: hidden;
    pointer-events: none;
}


.ambient-firefly {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #ffe87a;
    border-radius: 50%;
    box-shadow: 0 0 5px 2px rgba(255, 230, 91, .7), 0 0 13px 5px rgba(220, 178, 44, .3);
    opacity: .18;
    animation:
        ambient-firefly-drift var(--drift-time) ease-in-out var(--delay) infinite alternate,
        ambient-firefly-glow var(--glow-time) ease-in-out var(--delay) infinite alternate;
}


@keyframes ambient-firefly-drift {
    to { transform: translate3d(var(--drift-x), var(--drift-y), 0); }
}


@keyframes ambient-firefly-glow {
    0%, 30% { opacity: .12; }
    70%, 100% { opacity: .85; }
}


button, input { font: inherit; }


.page-header {
    padding: 18px 22px;
    color: #fff;
    background: var(--color-brand, var(--brown));
    border-bottom: 4px solid var(--color-accent, var(--gold));
}


.page-header-inner {
    width: min(1320px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


.page-header h1 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.8rem); }
.page-header p { margin: 5px 0 0; color: #f3dfce; font-size: .92rem; }
.mockup-badge { padding: 7px 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: .8rem; white-space: nowrap; }
.back-link { display: inline-block; margin-bottom: 8px; color: #fff; font-size: .88rem; font-weight: 700; text-underline-offset: 3px; }
.puzzle-author-credit { margin: -7px 22px 18px; color: var(--muted); font-size: .75rem; text-align: right; }
.print-site-credit { display: none; }


.puzzle-page {
    width: min(1380px, 100%);
    margin: 0 auto;
}


.story-panel {
    margin: 22px 22px 0;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(280px, .82fr) minmax(420px, 1.5fr);
    gap: 22px;
    align-items: center;
}


.story-copy { order: 1; }
.story-copy h2 { margin: 0 0 9px; color: var(--brown-dark); font-size: clamp(1.35rem, 2.7vw, 2rem); }
.story-label { margin: 0 0 5px; color: var(--green); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.story-text { margin: 0; color: var(--muted); font-family: Georgia, 'Times New Roman', serif; font-size: 1rem; line-height: 1.55; }


.story-illustration {
    order: 2;
    margin: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d8cabc;
    border-radius: 10px;
}


.story-illustration img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(1);
}


.story-illustration img.full-color { filter: none; }


.workspace {
    width: min(1380px, 100%);
    margin: 0 auto;
    padding: 22px;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}


.panel {
    background: var(--surface);
    border: 1px solid #dfd4c8;
    border-radius: 14px;
    box-shadow: var(--shadow);
}


.clue-panel {
    position: sticky;
    top: 18px;
    padding: 18px;
}


.clue-panel h2, .board-panel h2 { margin: 0; font-size: 1.15rem; }
.panel-note { margin: 7px 0 16px; color: var(--muted); font-size: .88rem; line-height: 1.45; }


.clue-list { display: grid; gap: 10px; }


.clue {
    padding: 10px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 9px;
    align-items: start;
    background: #fffaf2;
    border: 1px solid #eadac7;
    border-radius: 9px;
    line-height: 1.35;
    font-size: .9rem;
}


.clue:has(input:checked) { opacity: .55; text-decoration: line-through; }
.clue input { width: 18px; height: 18px; margin: 0; accent-color: var(--brown); }


.puzzle-help-link {
    width: 100%;
    margin-top: 14px;
    padding: 10px 8px 4px;
    color: var(--brown);
    background: transparent;
    border: 0;
    border-top: 1px dashed #d8c5af;
    font: inherit;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}


.puzzle-help-link:hover { color: var(--green); }
.puzzle-help-link[hidden] { display: none; }


.help-intro { margin: 0 0 14px; color: var(--muted); line-height: 1.5; }
.hint-stack { display: grid; gap: 10px; }
.hint-card {
    position: relative;
    margin: 0;
    padding: 13px 14px 13px 46px;
    background: #fffaf2;
    border: 1px solid #eadac7;
    border-radius: 10px;
    line-height: 1.45;
}
.hint-number {
    position: absolute;
    top: 11px;
    left: 12px;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--green);
    border-radius: 50%;
    font-size: .78rem;
    font-weight: 900;
}
.help-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.hint-button { color: #fff; background: var(--green); border-color: var(--green); }
.hint-button:hover:not(:disabled) { color: #fff; background: #315f3a; }
.spoiler-button { color: #7c351b; background: #fff1e8; border-color: #d8792e; }
.spoiler-warning {
    margin-top: 16px;
    padding: 16px;
    text-align: center;
    background: #fff5d6;
    border: 2px solid var(--gold);
    border-radius: 12px;
}
.spoiler-warning-icon { display: block; margin-bottom: 5px; font-size: 2rem; }
.spoiler-warning h3 { margin: 0 0 7px; font-size: 1.05rem; }
.spoiler-warning p { margin: 0; line-height: 1.45; }
.solution-content h3 { margin: 18px 0 9px; color: var(--brown-dark); }
.solution-content h3:first-child { margin-top: 0; }
.solution-table-wrap { overflow-x: auto; }
.solution-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.solution-table th, .solution-table td { padding: 9px 8px; text-align: left; border: 1px solid #dfd4c8; }
.solution-table th { color: #fff; background: var(--brown); }
.solution-table tbody tr:nth-child(even) { background: #fffaf2; }
.solution-steps { margin: 0; padding-left: 24px; display: grid; gap: 9px; line-height: 1.45; }
.solution-print-sheet { display: none; }


.board-panel { min-width: 0; padding: 18px; overflow: hidden; }


.board-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}


.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}


/* Retired marking-mode buttons remain in older generated pages. The shared
   engine now cycles each cell directly, so those controls stay hidden. */
.tool-button { display: none; }


.tool-button, .action-button, .focus-button, .dialog-close {
    min-height: 40px;
    padding: 8px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cdbdad;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}


.action-button:disabled { opacity: .45; cursor: default; }
.action-button:hover:not(:disabled), .tool-button:hover, .focus-button:hover, .dialog-close:hover { background-color: #f7ead9; }
.submit-button { color: #fff; background: var(--green); border-color: var(--green); }
.submit-button:hover:not(:disabled) { color: #fff; background: #315f3a; }
.test-hoorah-button { color: var(--brown-dark); background: #fff5d6; border-color: var(--gold); }
.test-fail-button { color: #7c351b; background: #fff1e8; border-color: #d8792e; }


#status {
    min-height: 22px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: .9rem;
}


.final-question {
    margin-top: 18px;
    padding: 15px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, .42fr);
    gap: 7px 16px;
    align-items: center;
    background: #fff8e8;
    border: 2px solid var(--gold);
    border-radius: 10px;
}


.final-question h2 { grid-column: 1 / -1; color: var(--brown-dark); }
.final-question label { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; line-height: 1.4; }
.final-answer-input {
    width: 100%;
    min-height: 42px;
    padding: 8px 11px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #bca991;
    border-radius: 7px;
}
.final-answer-input:focus { outline: 3px solid color-mix(in srgb, var(--gold) 35%, transparent); outline-offset: 1px; }
.final-question-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .82rem; }


.overview-viewport { width: 100%; overflow: hidden; }
.overview-sizer { position: relative; }


.matrix-layout {
    width: 626px;
    display: grid;
    grid-template-columns: 26px 120px repeat(15, 32px);
    grid-template-rows: 28px 104px repeat(15, 32px);
    gap: 0;
    transform-origin: top left;
}


.overview-group-title {
    display: grid;
    place-items: center;
    color: var(--brown-dark);
    background: #f6eadb;
    border: 0;
    border-top: 2px solid var(--ink);
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}


.overview-column-item {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--muted);
    background: #fff;
    border-right: 1px solid var(--line);
    border-bottom: 2px solid var(--ink);
    font-size: .67rem;
    font-weight: 700;
    white-space: nowrap;
}


.overview-column-item span {
    display: block;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}


.overview-column-item.group-start { border-left: 0; }
.overview-group-title.outer-left,
.overview-column-item.outer-left { border-left: 2px solid var(--ink); }
.overview-column-item.group-end { border-right: 2px solid var(--ink); }


.overview-row-title {
    display: grid;
    place-items: center;
    color: var(--brown-dark);
    background: #f6eadb;
    border: 0;
    border-left: 2px solid var(--ink);
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}


.overview-row-title span {
    display: block;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}


.overview-row-item {
    padding-right: 7px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    color: var(--muted);
    background: #fff;
    border-right: 2px solid var(--ink);
    border-bottom: 1px solid var(--line);
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}


.overview-row-item.group-start { border-top: 0; }
.overview-row-title.outer-top,
.overview-row-item.outer-top { border-top: 2px solid var(--ink); }
.overview-row-item.group-end { border-bottom: 2px solid var(--ink); }


.matrix-card {
    width: 264px;
    padding: 8px;
    background: #fff;
    border: 2px solid #b8aa9c;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(70, 43, 27, .08);
}


.matrix-card.active-matrix { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227,154,45,.24); }


.matrix-title {
    min-height: 31px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--brown-dark);
    font-size: .82rem;
    font-weight: 800;
}


.focus-button { min-height: 28px; padding: 3px 7px; font-size: .75rem; }


.matrix-table {
    display: grid;
    grid-template-columns: 82px repeat(5, 32px);
    grid-template-rows: 54px repeat(5, 32px);
}


.corner-label {
    display: flex;
    align-items: end;
    padding: 0 4px 5px 0;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
}


.column-label {
    position: relative;
    overflow: visible;
}


.column-label span {
    position: absolute;
    left: 16px;
    bottom: 3px;
    width: 70px;
    color: var(--muted);
    font-size: .67rem;
    font-weight: 700;
    white-space: nowrap;
    transform: rotate(-52deg);
    transform-origin: left bottom;
}


.row-label {
    padding: 0 7px 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}


.grid-cell {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--blue);
    background: #fff;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
}


.grid-cell.first-row { border-top: 2px solid var(--ink); }
.grid-cell.first-col { border-left: 2px solid var(--ink); }
.grid-cell.last-row { border-bottom: 2px solid var(--ink); }
.grid-cell.last-col { border-right: 2px solid var(--ink); }
.grid-cell:hover { background: #fff1d8; }
.grid-cell.mark-x { color: var(--red); background: #fff7f5; }
.grid-cell.mark-match { color: #fff; background: var(--green); }
.grid-cell.auto-mark { color: #9c776f; background: #f8efec; }


.matrix-layout .grid-cell { border-top: 0; border-left: 0; }
.matrix-layout .grid-cell.first-row,
.matrix-layout .grid-cell.first-col { border-top: 0; border-left: 0; }
.matrix-layout .grid-cell.last-row { border-bottom: 2px solid var(--ink); }
.matrix-layout .grid-cell.last-col { border-right: 2px solid var(--ink); }


dialog {
    width: min(620px, calc(100% - 20px));
    max-height: calc(100dvh - 20px);
    padding: 0;
    color: var(--ink);
    background: var(--paper);
    border: 0;
    border-radius: 15px;
    box-shadow: 0 24px 70px rgba(30,18,12,.35);
}


dialog::backdrop { background: rgba(35,22,15,.62); }


.dialog-header {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
    background: var(--brown);
    border-bottom: 3px solid var(--gold);
}


.dialog-header h2 { margin: 0; font-size: 1.1rem; }
.dialog-close { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.35); }
.dialog-body { padding: 14px; overflow: auto; }
.dialog-toolbar { justify-content: flex-start; margin-bottom: 12px; }
.focus-grid-wrap { display: flex; justify-content: center; overflow: auto; }


.focus-matrix .matrix-card { width: 100%; max-width: 480px; border: 0; box-shadow: none; }
.focus-matrix .matrix-title { display: none; }
.focus-matrix .matrix-table { grid-template-columns: 120px repeat(5, minmax(48px, 64px)); grid-template-rows: 78px repeat(5, minmax(48px, 64px)); }
.focus-matrix .grid-cell { width: 100%; height: 100%; min-width: 48px; min-height: 48px; font-size: 1.45rem; }
.focus-matrix .row-label { font-size: .9rem; }
.focus-matrix .column-label span { left: 25px; bottom: 5px; width: 95px; font-size: .82rem; }
.focus-matrix .corner-label { font-size: .78rem; }


.mobile-tip { display: none; }


body.celebrating { overflow: hidden; }


.celebration {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow: hidden;
    background: rgba(43, 25, 14, .72);
}


.celebration[hidden] { display: none; }


.celebration-card {
    position: relative;
    z-index: 2;
    width: min(430px, 100%);
    padding: 38px 28px 30px;
    text-align: center;
    background: var(--paper);
    border: 4px solid var(--gold);
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(20, 10, 4, .45);
    animation: hoorah-pop .55s cubic-bezier(.2, .85, .25, 1.25) both;
}


.celebration-star {
    width: 70px;
    height: 70px;
    margin: -76px auto 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--gold);
    border: 5px solid var(--paper);
    border-radius: 50%;
    font-size: 2rem;
    box-shadow: 0 6px 18px rgba(65, 35, 10, .25);
}


.celebration-kicker {
    margin: 0 0 4px;
    color: var(--green);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}


.celebration-card h2 { margin: 0; color: var(--brown-dark); font-size: clamp(2.4rem, 10vw, 4rem); line-height: 1; }
.celebration-card p:last-of-type { margin: 12px 0 22px; font-size: 1.05rem; }
.celebration-card .action-button { min-width: 130px; color: #fff; background: var(--brown); border-color: var(--brown); }


.celebration.is-failure .confetti-layer,
.celebration.is-failure .balloon { display: none; }
.celebration.is-failure .celebration-card { border-color: #d8792e; animation: try-again-wobble .65s ease both; }
.celebration.is-failure .celebration-star { background: #d8792e; }
.celebration.is-failure .celebration-kicker { color: #a64b23; }
.celebration.is-failure .celebration-card .action-button { background: #a64b23; border-color: #a64b23; }


.confetti-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti-piece {
    position: absolute;
    top: -12vh;
    left: var(--left);
    width: var(--width);
    height: var(--height);
    background: var(--color);
    border-radius: 2px;
    animation: confetti-fall var(--duration) linear var(--delay) forwards;
}


.balloon {
    position: absolute;
    z-index: 1;
    bottom: -130px;
    width: 78px;
    height: 96px;
    background: var(--balloon-color);
    border-radius: 50% 50% 48% 48%;
    box-shadow: inset -12px -8px 0 rgba(0,0,0,.08), inset 12px 8px 0 rgba(255,255,255,.14);
    animation: balloon-rise 3.2s ease-out forwards;
}


.balloon::before {
    content: '';
    position: absolute;
    left: 32px;
    bottom: -10px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 12px solid var(--balloon-color);
}


.balloon::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 39px;
    width: 1px;
    height: 130px;
    background: rgba(255,255,255,.7);
}


.balloon-left { left: 8%; --balloon-color: #d9553f; animation-delay: .1s; }
.balloon-right { right: 8%; --balloon-color: #e3a91b; animation-delay: .45s; }


@keyframes hoorah-pop {
    from { opacity: 0; transform: translateY(24px) scale(.75); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}


@keyframes try-again-wobble {
    0% { opacity: 0; transform: translateY(18px) scale(.9); }
    35% { opacity: 1; transform: translateY(0) scale(1) rotate(-2.5deg); }
    52% { transform: rotate(2deg); }
    68% { transform: rotate(-1.2deg); }
    84% { transform: rotate(.6deg); }
    100% { opacity: 1; transform: rotate(0); }
}


@keyframes confetti-fall {
    0% { transform: translate3d(0, -10vh, 0) rotate(0deg); }
    100% { transform: translate3d(var(--drift), 120vh, 0) rotate(var(--turn)); }
}


@keyframes balloon-rise {
    0% { transform: translateY(0) rotate(-4deg); }
    100% { transform: translateY(-92vh) rotate(6deg); }
}


@media (max-width: 980px) {
    .story-panel { grid-template-columns: 1fr; }
    .workspace { grid-template-columns: 1fr; }
    .clue-panel { position: static; }
    .clue-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


@media (max-width: 680px) {
    .page-header { padding: 14px; }
    .page-header-inner { align-items: flex-start; }
    .page-header p { display: none; }
    .story-panel { margin: 10px 10px 0; padding: 12px; gap: 13px; }
    .story-text { font-size: .95rem; }
    .workspace { padding: 10px; gap: 12px; }
    .panel { border-radius: 10px; }
    .clue-panel, .board-panel { padding: 12px; }
    .clue-list { grid-template-columns: 1fr; }
    .board-heading { display: block; }
    .toolbar { justify-content: flex-start; margin-top: 12px; }
    .mobile-tip { display: block; margin: 6px 0 12px; color: var(--brown); font-weight: 700; font-size: .85rem; }
    .overview-viewport { touch-action: manipulation; }
    .matrix-layout .grid-cell { cursor: zoom-in; }
    .final-question { grid-template-columns: 1fr; }
    .final-question h2, .final-question-note { grid-column: 1; }
}


@media (max-width: 430px) {
    .focus-matrix .matrix-table { grid-template-columns: 120px repeat(5, minmax(43px, 1fr)); grid-template-rows: 68px repeat(5, 48px); }
    .focus-matrix .grid-cell { min-width: 43px; min-height: 48px; }
    .focus-matrix .row-label { font-size: .78rem; }
    .focus-matrix .column-label span { left: 20px; width: 82px; font-size: .74rem; }
    .mockup-badge { display: none; }
}


@media (prefers-reduced-motion: reduce) {
    .celebration-card,
    .celebration.is-failure .celebration-card { animation: none; }
    .confetti-layer, .balloon { display: none; }
    .ambient-animation { display: none; }
}


@page { size: Letter portrait; margin: .35in; }


@media print {
    body.site-frame { display: block; height: auto; min-height: 0; overflow: visible; }
    #site-header, #site-footer, .back-link { display: none !important; }
    .site-main { overflow: visible; }
    * { box-shadow: none !important; }
    html, body { margin: 0; padding: 0; background: #fff; }
    body { color: #000; font-family: Arial, Helvetica, sans-serif; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .page-header, .toolbar, #status, .mobile-tip, dialog, .celebration, .ambient-animation, .panel-note, .puzzle-author-credit, .puzzle-help-link, .skip-link { display: none !important; }
    .puzzle-page { width: 100%; margin: 0; }
    .panel { border: 0; border-radius: 0; }


    .story-panel {
        margin: 0 0 .05in;
        padding: 0 0 .04in;
        display: block;
        overflow: hidden;
        border-bottom: 1.5px solid #000;
        break-inside: avoid;
    }


    .story-label { margin-bottom: 2px; color: #000; font-size: 7.5pt; }
    .story-copy { display: block; }
    .story-copy h2 { margin: 0 0 3px; color: #000; font-size: 16pt; }
    .story-text { color: #000; font-size: 8pt; line-height: 1.16; }
    .story-illustration {
        float: right;
        width: 2.25in;
        height: auto;
        margin: 0 0 .04in .16in;
        border: 1px solid #000;
        border-radius: 0;
    }
    .story-illustration img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }


    .workspace { width: 100%; padding: 0; display: block; }
    .clue-panel { position: static; padding: 0; margin: 0 0 .06in; }
    .clue-panel h2, .board-panel h2 { margin: 0 0 4px; color: #000; font-size: 11pt; }
    .clue-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
    .clue { min-height: 0; padding: 1px 0; gap: 5px; color: #000; background: #fff; border: 0; border-radius: 0; font-size: 7.8pt; line-height: 1.14; }
    .clue:has(input:checked) { opacity: 1; text-decoration: none; }
    .clue input { width: 11px; height: 11px; margin-top: 1px; appearance: none; border: 1px solid #000; }


    .board-panel { padding: 0; overflow: visible; }
    .board-heading { margin: 0; }
    .overview-viewport { width: 100%; overflow: visible; }
    .overview-sizer { width: 514px !important; height: 502px !important; margin: 0 auto; }
    .matrix-layout { transform: scale(.82) !important; transform-origin: top left; }
    body.has-final-question .overview-sizer { width: 476px !important; height: 465px !important; }
    body.has-final-question .matrix-layout { transform: scale(.76) !important; }
    .matrix-layout .grid-cell { color: transparent !important; background: #fff !important; }
    .overview-group-title, .overview-row-title { color: #000; background: #fff; }
    .overview-column-item, .overview-row-item { color: #000; background: #fff; }
    .final-question {
        margin: .03in 0 0;
        padding: .04in 0 0;
        display: grid;
        grid-template-columns: 1fr 1.7in;
        gap: 2px .12in;
        color: #000;
        background: #fff;
        border: 0;
        border-top: 1px solid #000;
        border-radius: 0;
        break-inside: avoid;
    }
    .final-question h2 { grid-column: 1 / -1; margin: 0; color: #000; font-size: 9pt; }
    .final-question label { font-family: Arial, Helvetica, sans-serif; font-size: 8pt; line-height: 1.15; }
    .final-answer-input {
        min-height: 0;
        padding: 0;
        color: transparent;
        background: #fff;
        border: 0;
        border-bottom: 1px solid #000;
        border-radius: 0;
    }
    .final-answer-input::placeholder { color: transparent; }
    .final-question-note { display: none; }
    .print-site-credit {
        display: block;
        margin: .08in 0 0;
        color: #555;
        font-size: 8pt;
        text-align: center;
    }
    body.printing-solution .site-main,
    body.printing-solution > .print-site-credit { display: none !important; }
    body.printing-solution .solution-print-sheet {
        display: block !important;
        width: 100%;
        padding: 0;
        color: #000;
    }
    .solution-print-sheet h1 { margin: 0 0 3px; font-size: 18pt; }
    .solution-print-sheet .solution-print-label { margin: 0 0 .18in; font-size: 10pt; font-weight: 700; }
    .solution-print-sheet .solution-content h3 { color: #000; break-after: avoid; }
    .solution-print-sheet .solution-table-wrap { overflow: visible; }
    .solution-print-sheet .solution-table { font-size: 9pt; }
    .solution-print-sheet .solution-table th {
        color: #000;
        background: #fff;
        border: 1px solid #000;
    }
    .solution-print-sheet .solution-table td { border: 1px solid #000; }
    .solution-print-sheet .solution-steps { font-size: 10pt; line-height: 1.35; }
    .solution-print-sheet .solution-steps li { break-inside: avoid; margin-bottom: 7px; }
    .solution-print-sheet .solution-print-credit {
        margin-top: .18in;
        color: #555;
        font-size: 8pt;
        text-align: center;
    }
}
