/* Perfboard Planner — what only this page has. Tokens, buttons (.btn, .btn-go, .chip), the
   segmented control (.seg), .spec, .notice and the trim marks come from /css/style.css.

   The board view is the artifact: it is what the SVG/PNG export and the print are made from, so it
   sits on paper under registration marks. Parts and the cut list sit either side of it on the bench,
   separated by rules rather than panels. Every class here starts with pb-. */

/* Plain buttons that are styled as list rows or tabs below; the site reset clears their background
   but not the browser's border. */
.pb-fp-pick, .pb-fp-edit, .pb-tab, .pb-step-text, .pb-issue, .pb-menu-list button { border: 0; }

/* ── Job row and tool bar ──────────────────────────────────────────────── */

.pb-job, .pb-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
}
.pb-job { padding-bottom: .625rem; border-bottom: 1px solid var(--rule); }
.pb-bar { padding-block: .625rem; }
.pb-job .chips, .pb-bar .chips { margin: 0; flex-wrap: nowrap; }
.pb-bar > * + * { padding-left: .75rem; border-left: 1px solid var(--rule); }
.pb-file { display: flex; flex-wrap: wrap; gap: .5rem .75rem; margin-left: auto; }
.pb-file > .chips + .chips { padding-left: .75rem; border-left: 1px solid var(--rule); }

.pb-board-name {
    min-width: 0; width: 18ch;
    font-family: var(--cond); font-size: var(--fs-head); font-weight: 600;
    color: var(--ink); background: transparent;
    border: 0; border-bottom: 1px solid transparent; padding: .125rem 0;
    transition: border-color .12s, color .12s;
}
.pb-board-name:hover { border-bottom-color: var(--ink-soft); }
.pb-board-name:focus { outline: none; color: var(--reg); border-bottom-color: var(--reg); }

.chip:disabled { opacity: .4; cursor: not-allowed; }
.chip:disabled:hover { color: var(--ink-soft); border-color: var(--rule); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.pb-bar .seg { margin-top: 0; grid-auto-columns: auto; }
.pb-bar .seg button { padding-inline: .625rem; white-space: nowrap; }

/* Wire colours are content, not decoration: round, in the wire's own colour. */
.pb-swatches { display: flex; flex-wrap: wrap; gap: .3125rem; align-items: center; }
.pb-swatch-btn {
    width: 1.125rem; height: 1.125rem; border-radius: 50%; padding: 0; cursor: pointer;
    border: 1px solid rgba(20, 24, 26, .35);
}
.pb-swatch-btn.is-on { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink); }
.pb-swatch {
    display: inline-block; flex: none; width: .625rem; height: .625rem; margin-right: .375rem;
    border-radius: 50%; border: 1px solid rgba(20, 24, 26, .35); vertical-align: -1px;
}
.pb-swatch-solder { background: #cfd4d8; border-radius: 1px; }

/* The layers drop-down. */
.pb-menu { position: relative; }
.pb-menu > summary { list-style: none; display: inline-flex; align-items: center; }
.pb-menu > summary::-webkit-details-marker { display: none; }
.pb-menu[open] > summary { color: var(--ink); border-color: var(--ink-soft); }
.pb-badge {
    display: inline-block; min-width: 1rem; margin-left: .375rem; padding: 0 .25rem;
    background: var(--ink); color: var(--paper);
    font-size: var(--fs-note); line-height: 1rem; text-align: center;
}
.pb-menu-list {
    position: absolute; left: 0; top: calc(100% + .375rem); z-index: 20;
    min-width: 15rem; padding: .375rem;
    background: var(--paper); border: 1px solid var(--rule);
    box-shadow: 0 14px 30px -18px rgba(20, 24, 26, .45);
}
.pb-menu-list hr { border: 0; border-top: 1px solid var(--paper-rule); margin: .375rem 0; }
.pb-menu-list button {
    display: block; width: 100%; text-align: left; padding: .375rem .5rem; cursor: pointer;
    font-size: var(--fs-label); color: var(--ink-soft);
}
.pb-menu-list button:hover { color: var(--reg); }
.pb-check {
    display: flex; align-items: center; gap: .5rem; padding: .3125rem .5rem;
    font-size: var(--fs-label); white-space: nowrap; cursor: pointer;
}
.pb-check:hover { background: var(--ground); }
.pb-check input { margin: 0; accent-color: var(--ink); }

/* ── Workspace ─────────────────────────────────────────────────────────── */

.pb-workspace {
    display: grid;
    grid-template-columns: 12.5rem minmax(0, 1fr) 21rem;
    height: max(32rem, calc(100vh - 19.5rem));
    border-top: 1px solid var(--rule);
}
.pb-panel { min-width: 0; min-height: 0; overflow: auto; }
.pb-parts { padding: 1rem 1.25rem 1rem 0; border-right: 1px solid var(--rule); }
.pb-side { display: flex; flex-direction: column; overflow: hidden; border-left: 1px solid var(--rule); }

.pb-panel h2 {
    font-family: var(--cond); font-size: var(--fs-group); font-weight: 600;
    padding-bottom: .5rem; margin-bottom: .5rem; border-bottom: 1px solid var(--rule);
}

/* The board, on paper, with the trim marks at the corners of the view. */
.pb-bench {
    display: grid; grid-template-rows: minmax(0, 1fr) auto;
    min-width: 0; min-height: 0;
    padding: 1.25rem;
}
.pb-board-wrap {
    position: relative; min-height: 0; overflow: hidden;
    background:
        linear-gradient(var(--paper-rule) 1px, transparent 1px) 0 0 / 100% 2.5rem,
        linear-gradient(90deg, var(--paper-rule) 1px, transparent 1px) 0 0 / 2.5rem 100%,
        var(--paper);
}
.pb-board-svg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    touch-action: none; cursor: default; user-select: none; -webkit-user-select: none;
}
.pb-board-svg:focus-visible { outline-offset: -2px; }
.pb-board-svg[data-tool="routed"], .pb-board-svg[data-tool="direct"], .pb-board-svg[data-tool="bridge"] { cursor: crosshair; }
.pb-board-svg[data-tool="place"] { cursor: copy; }

/* The live length while a wire is drawn: a live value, so it is the one place the cyan fills. */
.pb-readout {
    position: absolute; z-index: 5; pointer-events: none;
    padding: .1875rem .5rem;
    background: var(--reg); color: var(--paper);
    font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--fs-fine);
    white-space: nowrap;
}
.pb-status {
    display: flex; justify-content: space-between; gap: 1.25rem;
    min-height: 1.875rem; padding: .4375rem 0 0;
    font-size: var(--fs-note); color: var(--ink-soft);
}
.pb-status-where { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.pb-status-hint { text-align: right; }

/* ── Parts ─────────────────────────────────────────────────────────────── */

.pb-fp-list li { display: flex; align-items: stretch; }
.pb-fp-list li + li { border-top: 1px solid color-mix(in srgb, var(--rule) 55%, transparent); }
.pb-fp-list li:hover { background: color-mix(in srgb, var(--ground-sunk) 70%, transparent); }
.pb-fp-list li.is-active { background: var(--paper); box-shadow: inset 2px 0 0 var(--ink); }
.pb-fp-pick {
    flex: 1; min-width: 0;
    display: grid; grid-template-columns: 2rem 1fr; grid-template-rows: auto auto; column-gap: .625rem;
    align-items: center; text-align: left; padding: .4375rem .375rem;
    cursor: grab; touch-action: none;
}
.pb-fp-thumb { grid-row: 1 / 3; width: 2rem; height: 2rem; }
.pb-fp-name {
    font-family: var(--cond); font-weight: 600; font-size: var(--fs-label); line-height: 1.25;
    overflow-wrap: anywhere; align-self: end;
}
.pb-fp-meta { font-size: var(--fs-note); color: var(--ink-soft); align-self: start; }
.pb-fp-edit {
    padding: 0 .5rem; cursor: pointer; visibility: hidden;
    font-size: var(--fs-note); color: var(--ink-soft);
}
.pb-fp-list li:hover .pb-fp-edit, .pb-fp-edit:focus-visible { visibility: visible; }
.pb-fp-edit:hover { color: var(--reg); }
.pb-wide { width: 100%; margin-top: .75rem; }

/* ── Side: the selected item, then the tabs ────────────────────────────── */

.pb-selection {
    display: grid; gap: .625rem; flex: none;
    padding: .875rem 0 .875rem 1.25rem;
    border-bottom: 1px solid var(--rule);
}
.pb-selection-head { display: flex; gap: .5rem; align-items: center; }
.pb-selection .seg { margin-top: 0; }
.pb-selection .spec { margin-top: 0; }
.pb-name-input {
    flex: 1; min-width: 0;
    font-family: var(--cond); font-size: var(--fs-head); font-weight: 600;
    background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: .125rem 0;
}
.pb-name-input:hover { border-bottom-color: var(--ink-soft); }
.pb-name-input:focus { outline: none; color: var(--reg); border-bottom-color: var(--reg); }
.pb-name-static { flex: 1; font-family: var(--cond); font-size: var(--fs-head); font-weight: 600; }
.btn.pb-danger { padding: .3125rem .75rem; font-size: var(--fs-label); }
.btn.pb-danger:hover:not(:disabled) { color: var(--alert); border-color: var(--alert); }
.pb-selection .btn { padding: .3125rem .75rem; font-size: var(--fs-label); }

.pb-tabs { display: flex; gap: 1.25rem; flex: none; padding-left: 1.25rem; border-bottom: 1px solid var(--rule); }
.pb-tab {
    padding: .625rem 0 .5rem; margin-bottom: -1px; cursor: pointer;
    font-family: var(--cond); font-size: var(--fs-group); font-weight: 600; color: var(--ink-soft);
    border-bottom: 2px solid transparent;
}
.pb-tab:hover { color: var(--ink); }
.pb-tab.is-on { color: var(--ink); border-bottom-color: var(--ink); }
.pb-tab.has-serious { color: var(--alert); }
.pb-tab-body { flex: 1; min-height: 0; overflow: auto; padding: .875rem 0 1rem 1.25rem; }

.pb-empty, .pb-hint { font-size: var(--fs-fine); line-height: 1.5; color: var(--ink-soft); max-width: 46ch; }
.pb-hint { margin-top: .5rem; }
.pb-muted { color: var(--ink-soft); }

.pb-cut-list { width: 100%; border-collapse: collapse; font-size: var(--fs-fine); }
.pb-cut-list th {
    text-align: left; font-weight: 500; color: var(--ink-soft);
    padding: 0 .375rem .375rem 0; border-bottom: 1px solid var(--rule);
}
.pb-cut-list td {
    padding: .375rem .375rem .375rem 0; white-space: nowrap;
    border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
}
.pb-cut-list .num { text-align: right; padding-right: 0; padding-left: .375rem; }
.pb-cut-list tbody tr { cursor: pointer; }
.pb-cut-list tbody tr:hover { background: color-mix(in srgb, var(--ground-sunk) 70%, transparent); }
.pb-cut-list tbody tr.is-selected { background: var(--paper); box-shadow: inset 2px 0 0 var(--ink); }
.pb-cut-list .has-cross { font-weight: 600; color: var(--ink); }

.pb-totals { margin-top: .75rem; font-size: var(--fs-fine); }
.pb-totals strong { font-weight: 600; }
.pb-totals ul { display: flex; flex-wrap: wrap; gap: .125rem 1rem; margin-top: .25rem; color: var(--ink-soft); }
.pb-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-block: .75rem; }
.pb-row-actions .btn { padding: .375rem .875rem; font-size: var(--fs-label); }
.pb-row-actions .pb-muted { font-size: var(--fs-note); }

/* Length allowances: rail fields, label left and the value in the mono column. */
.pb-settings { margin-top: 1.25rem; }
.pb-settings legend {
    float: left; width: 100%;
    font-family: var(--cond); font-size: var(--fs-group); font-weight: 600;
    padding-bottom: .375rem; border-bottom: 1px solid var(--rule);
}
.pb-setting {
    clear: both;
    display: grid; grid-template-columns: 1fr 4rem 1.5rem; gap: .5rem; align-items: center;
    padding-block: .375rem;
    border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
    font-size: var(--fs-label); color: var(--ink-soft);
}
.pb-setting input {
    width: 100%; text-align: right;
    font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--fs-label); color: var(--ink);
    background: transparent; border: 0; border-bottom: 1px solid transparent; padding: .125rem 0;
}
.pb-setting input:hover { border-bottom-color: var(--ink-soft); }
.pb-setting input:focus { outline: none; color: var(--reg); border-bottom-color: var(--reg); }
.pb-setting .pb-muted { font-family: var(--mono); font-size: var(--fs-note); }

/* Build steps: a real sequence, so they are numbered. */
.pb-progress { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--fs-label); }
.pb-steps { counter-reset: step; margin-block: .5rem; }
.pb-steps li {
    counter-increment: step;
    display: grid; grid-template-columns: 1.125rem 1fr; gap: .5rem; align-items: start;
    padding: .375rem .375rem .375rem 0;
    border-top: 2px solid transparent;
    border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
}
.pb-steps li.is-focus { background: var(--paper); box-shadow: inset 2px 0 0 var(--ink); }
.pb-steps li.is-done .pb-step-text { color: var(--ink-soft); text-decoration: line-through; }
.pb-steps li.pb-drop-here { border-top-color: var(--reg); }
.pb-steps input { margin: .1875rem 0 0; accent-color: var(--ink); }
.pb-step-text { text-align: left; cursor: pointer; font-size: var(--fs-fine); line-height: 1.45; }
.pb-step-text::before { content: counter(step) ". "; font-family: var(--mono); color: var(--ink-soft); }
.pb-step-text:hover { color: var(--reg); }

.pb-issue {
    display: grid; grid-template-columns: 3rem 1fr; gap: .5rem; width: 100%;
    text-align: left; padding: .4375rem .375rem .4375rem 0; cursor: pointer;
    font-size: var(--fs-fine); line-height: 1.45;
    border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
}
.pb-issue:hover { background: color-mix(in srgb, var(--ground-sunk) 70%, transparent); }
.pb-issue-level { font-family: var(--cond); font-weight: 600; }
.pb-issue-error .pb-issue-level { color: var(--alert); }
.pb-issue-warn .pb-issue-level { color: var(--ink); }
.pb-issue-info .pb-issue-level { color: var(--ink-soft); }

/* ── Dialogs ───────────────────────────────────────────────────────────── */

.pb-dialog {
    width: min(28rem, calc(100vw - 2rem)); padding: 1.5rem;
    color: var(--ink); background: var(--ground);
    border: 1px solid var(--rule);
    box-shadow: 0 24px 60px -24px rgba(20, 24, 26, .55);
}
.pb-dialog::backdrop { background: rgba(20, 24, 26, .35); }
.pb-fp-dialog { width: min(52rem, calc(100vw - 2rem)); }
.pb-dialog h2 {
    font-family: var(--cond); font-size: var(--fs-item); font-weight: 700;
    margin-bottom: 1rem;
}
.pb-dialog h3 { font-family: var(--cond); font-size: var(--fs-group); font-weight: 600; margin-bottom: .375rem; }
.pb-dialog input[type="text"], .pb-dialog input[type="number"], .pb-dialog select {
    min-width: 0; padding: .3125rem .5rem;
    background: var(--paper); border: 1px solid var(--rule); border-radius: 0;
    font-size: var(--fs-label);
}
.pb-dialog input[type="number"] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pb-dialog :is(input, select):focus { outline: none; border-color: var(--reg); }
.pb-field-label { display: block; margin-bottom: .1875rem; font-size: var(--fs-label); color: var(--ink-soft); }
.pb-form-row { display: flex; gap: .75rem; margin-bottom: .75rem; }
.pb-form-row label { flex: 1; min-width: 0; }
.pb-form-row label:last-child:not(:first-child) { flex: 0 1 8rem; }
.pb-form-row input, .pb-stack input { width: 100%; }
.pb-stack { display: block; margin-bottom: .75rem; }
.pb-form-error { margin-top: .5rem; color: var(--alert); font-size: var(--fs-fine); }
.pb-dialog-actions { display: flex; gap: .5rem; margin-top: 1.25rem; }
.pb-spacer { flex: 1; }
.pb-preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; margin-bottom: 1rem; }
.pb-preset-row .pb-field-label { margin: 0 .25rem 0 0; }
.pb-preset-row input { width: 4rem; }
.pb-fp-editor { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 1.25rem; }
.pb-fp-canvas .seg { margin: 0 0 .5rem; max-width: 22rem; }
.pb-fp-canvas .chip { margin-bottom: .5rem; }
.pb-fp-grid {
    display: block; width: 100%; max-height: 52vh;
    touch-action: none; cursor: pointer;
    background: var(--paper); box-shadow: 0 0 0 1px var(--rule);
}
.pb-fp-grid[data-mode="body"] { cursor: crosshair; }
.pb-fp-pins { min-width: 0; }
.pb-pin-list { max-height: 46vh; overflow: auto; }
.pb-pin-list li { display: grid; grid-template-columns: 1fr 5rem; gap: .375rem; align-items: center; margin-bottom: .25rem; }
.pb-pin-list input { width: 100%; }
.pb-pin-pos { font-size: var(--fs-fine); color: var(--ink-soft); }

.pb-toast {
    position: fixed; left: 50%; bottom: 2.75rem; transform: translateX(-50%); z-index: 50;
    width: max-content; max-width: min(35rem, calc(100vw - 2rem));
    margin: 0; background: var(--paper);
    box-shadow: 0 14px 30px -18px rgba(20, 24, 26, .45);
}

/* ── Reference picture: a loose print laid over the bench ──────────────── */

.pb-picture-win {
    position: fixed; z-index: 15; display: flex; flex-direction: column;
    background: var(--paper);
    box-shadow: 0 0 0 1px var(--rule), 0 18px 40px -18px rgba(20, 24, 26, .55);
}
.pb-picture-win.is-dragging { user-select: none; -webkit-user-select: none; }
.pb-picture-bar {
    display: flex; align-items: center; gap: .125rem; padding: .1875rem .25rem .1875rem .625rem;
    cursor: move; touch-action: none;
    background: var(--ground-sunk); border-bottom: 1px solid var(--rule);
}
.pb-picture-title {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-family: var(--cond); font-weight: 600; font-size: var(--fs-label);
}
.pb-picture-btn {
    padding: .125rem .4375rem; cursor: pointer;
    font-family: var(--mono); font-size: var(--fs-note); color: var(--ink-soft);
    border: 1px solid transparent;
}
.pb-picture-btn:hover:not(:disabled) { color: var(--ink); border-color: var(--rule); background: var(--paper); }
.pb-picture-btn:disabled { opacity: .4; cursor: not-allowed; }
.pb-picture-tool.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pb-picture-tool.is-on:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.pb-picture-opacity, .pb-picture-draw {
    display: flex; flex-wrap: wrap; align-items: center; gap: .125rem .375rem;
    padding: .1875rem .5rem;
    background: var(--ground-sunk); border-bottom: 1px solid var(--rule);
    font-size: var(--fs-note); color: var(--ink-soft);
}
.pb-picture-opacity { gap: .5rem; padding-inline: .625rem; }
.pb-picture-range { flex: 1; min-width: 0; accent-color: var(--reg); }
.pb-picture-percent { width: 4ch; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--reg); }
.pb-picture-inks { display: inline-flex; gap: .3125rem; margin-left: .25rem; }
.pb-picture-ink {
    width: 1rem; height: 1rem; border-radius: 50%; padding: 0; cursor: pointer;
    border: 1px solid rgba(20, 24, 26, .35);
}
.pb-picture-ink.is-on { box-shadow: 0 0 0 2px var(--ground-sunk), 0 0 0 3.5px var(--ink); }
.pb-picture-edits { display: inline-flex; gap: .125rem; margin-left: auto; }
.pb-picture-body { position: relative; overflow: hidden; line-height: 0; }
.pb-picture-img { display: block; width: 100%; height: auto; max-width: none; user-select: none; -webkit-user-drag: none; }
.pb-picture-marks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: none; }
.pb-picture-marks[data-tool="pen"], .pb-picture-marks[data-tool="ring"] { pointer-events: auto; cursor: crosshair; }
.pb-picture-marks[data-tool="erase"] { pointer-events: auto; cursor: cell; }
.pb-picture-marks .pb-mark-hit { pointer-events: none; }
.pb-picture-marks[data-tool="erase"] .pb-mark-hit { pointer-events: stroke; }
/* See-through: drop the white backing so the board shows under the picture. */
.pb-picture-win.is-see-through { background: transparent; }
.pb-picture-win.is-see-through .pb-picture-body { outline: 1px dashed var(--rule); outline-offset: -1px; }
.pb-picture-grip {
    position: absolute; right: 0; bottom: 0; width: 1.125rem; height: 1.125rem;
    cursor: nwse-resize; touch-action: none;
    background: linear-gradient(135deg, transparent 50%, var(--ink-soft) 50%, var(--ink-soft) 58%, transparent 58%, transparent 70%, var(--ink-soft) 70%, var(--ink-soft) 78%, transparent 78%);
}
.pb-picture-grip:focus-visible { outline-offset: -2px; }

/* ── Narrow screens: the board first, parts and lists under it ─────────── */

@media (max-width: 75rem) {
    .pb-workspace { grid-template-columns: 11rem minmax(0, 1fr) 18rem; }
    .pb-status-hint { display: none; }
}
@media (max-width: 60rem) {
    .pb-workspace { grid-template-columns: minmax(0, 1fr); height: auto; }
    .pb-bench { order: -1; height: 70vh; min-height: 22rem; padding: 1rem; }
    .pb-parts, .pb-side { border: 0; border-top: 1px solid var(--rule); padding-right: 0; }
    .pb-side { overflow: visible; }
    .pb-selection, .pb-tab-body, .pb-tabs { padding-left: 0; }
    .pb-fp-editor { grid-template-columns: minmax(0, 1fr); }
    .pb-fp-edit { visibility: visible; }
    .pb-file { margin-left: 0; }
}

/* A phone: the four tools go two by two, and the bar's groups simply wrap without dividers. */
@media (max-width: 30rem) {
    .pb-bar > * + * { padding-left: 0; border-left: 0; }
    .pb-bar .pb-tools { width: 100%; grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
    .pb-bar .pb-tools button:nth-child(odd) { border-left-width: 1px; }
    .pb-bar .pb-tools button:nth-child(n+3) { border-top-width: 0; }
    .pb-bar .pb-tools button.is-on + button { border-left-color: var(--rule); }
}

/* ── Print: only the sheet ─────────────────────────────────────────────── */

#print-sheet { display: none; }
@media print {
    #app, .pb-picture-win { display: none !important; }
    #print-sheet { display: block; font: 10pt/1.4 var(--sans); color: #000; }
    #print-sheet h1 { font-family: var(--cond); font-size: 16pt; font-weight: 700; margin: 0 0 2pt; }
    #print-sheet h2 { font-family: var(--cond); font-size: 12pt; font-weight: 600; margin: 14pt 0 4pt; break-after: avoid; }
    #print-sheet figure { margin: 8pt 0; break-inside: avoid; }
    #print-sheet figure svg { max-width: 100%; height: auto; }
    #print-sheet figcaption { font-size: 9pt; }
    #print-sheet table { border-collapse: collapse; font-family: var(--mono); font-size: 9pt; }
    #print-sheet th, #print-sheet td { border: .5pt solid #777; padding: 2pt 6pt; text-align: left; }
    #print-sheet ol { list-style: decimal; padding-left: 18pt; }
    #print-sheet .pb-print-steps li { margin-bottom: 2pt; }
    #print-sheet .pb-print-box { display: inline-block; width: 8pt; height: 8pt; border: .7pt solid #000; margin-right: 5pt; vertical-align: -1pt; }
}

/* A click focuses the board for the keyboard shortcuts; only keyboard focus draws the ring. */
.pb-board-svg:focus:not(:focus-visible) { outline: none; }
