/* Notation worksheets: the main page's paper, frame and red pen (../style.css), laid out as a worksheet of cards. */
.crumbs { padding-top: 14px; font-size: 1rem; color: var(--muted); }
.crumbs a { color: var(--ink); }

.nt-setup { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; padding: 14px 0 6px; }
.nt-field { display: grid; gap: 2px; font-size: 1rem; font-weight: 600; }
.nt-field select { font-weight: 400; max-width: 100%; }
.nt-code { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.nt-code .btn { white-space: nowrap; }
.nt-code b { letter-spacing: 0.06em; }
.nt-open { margin: 4px 0 10px; }
.nt-open summary { cursor: pointer; color: var(--accent); min-height: 44px; display: inline-flex; align-items: center; }
.nt-open-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.nt-open-form label { display: grid; gap: 2px; }
.nt-open-form input { width: 9em; text-transform: uppercase; }

.nt-qs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 16px; }
.nt-qs:focus { outline: none; }
.nt-loading { padding: 20px 0; color: var(--muted); }
.nt-q { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; }
.nt-q[data-mark="right"] { border-color: var(--right); }
.nt-q[data-mark="wrong"], .nt-q[data-mark="unread"] { border-color: var(--wrong); }
.nt-qhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 12px; }
.nt-qt { font-size: 1.1rem; margin: 0 0 8px; }
.nt-show { padding: 0; min-height: 44px; }
.nt-qbody { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.nt-bd { max-width: 340px; touch-action: manipulation; }
.nt-board .sel { fill: #e8c25a; }
.nt-board .ring { fill: none; stroke: var(--accent); stroke-width: 2.6; }
.nt-board .mk { fill: #fff; stroke: #000; stroke-width: 1.4; }
.nt-board text.co { font-family: system-ui, sans-serif; font-weight: 600; }
.nt-board .mkt { fill: #000 !important; font: 700 8px system-ui, sans-serif !important; }
.nt-board .arw { fill: var(--accent); stroke: #fff; stroke-width: 1; stroke-linejoin: round; opacity: 0.92; }
[data-board] { cursor: default; }
.nt-ask { font-weight: 600; margin: 0 0 10px; max-width: 46ch; }
.nt-note, .nt-tip { margin: 0 0 8px; color: var(--muted); }
.nt-prior { margin: 0 0 8px; line-height: 1.7; }
.nt-prior .lab { color: var(--muted); }
.nt-prior .no, .nt-sheet .no { font-weight: 700; margin-right: 2px; font-variant-numeric: tabular-nums; }
.nt-prior .ent { margin-right: 6px; }
.nt-in { display: inline-grid; gap: 2px; margin: 0 10px 8px 0; font-weight: 600; }
.nt-in input { width: 10em; font-weight: 400; }
.nt-in input.sq { width: 4.2em; text-align: center; }
.nt-in input[aria-invalid="true"] { border-color: var(--wrong); }
.nt-row { display: flex; flex-wrap: wrap; align-items: flex-end; }
.nt-sheet { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin: 0 0 10px; }
.nt-sheet .ent { font: inherit; font-variant-numeric: tabular-nums; min-height: 44px; min-width: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); margin-right: 6px; }
.nt-sheet button.ent { cursor: pointer; }
.nt-sheet span.ent { display: inline-flex; align-items: center; border-style: dashed; color: var(--muted); }
/* the picked entry is struck through, as a student crosses out a wrong move (a cross mark would read as a capture) */
.nt-sheet .ent[aria-checked="true"] { border-color: var(--wrong); box-shadow: inset 0 0 0 2px var(--wrong); font-weight: 700; text-decoration: line-through; text-decoration-color: var(--wrong); text-decoration-thickness: 2px; }
.nt-qact { margin-top: 4px; }
.nt-res { margin-top: 8px; max-width: 60ch; }
.nt-res p { margin: 0 0 4px; }
.nt-res .v { font-weight: 700; }
.nt-res .v.right { color: var(--right); }
.nt-res .v.almost { color: var(--ink); }
.nt-res .v.wrong, .nt-res .v.unread { color: var(--wrong); }
.nt-res .why { margin: 0 0 6px; padding-left: 1.2em; }
.nt-res .why li { margin: 2px 0; }
.nt-res .key span { color: var(--muted); }

.nt-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 16px 0 4px; }
.nt-bar .score { margin: 0; }
.nt-actions { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-end; justify-content: space-between; margin: 8px 0; }
.nt-print { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.nt-more { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.nt-tool .history { margin: 8px 0; }

.nt-rules { border-collapse: collapse; width: 100%; margin: 6px 0 12px; font-size: 1rem; }
.nt-rules th, .nt-rules td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }

@media (max-width: 760px) {
  .nt-qbody { grid-template-columns: 1fr; gap: 10px; }
  .nt-bd { max-width: 420px; }
}
@media (max-width: 560px) {
  .nt-q { padding: 12px 10px 14px; margin: 0 -6px; }
  .nt-setup .nt-field { flex: 1 1 100%; }
  .nt-setup .nt-field.nt-small { flex: 0 0 auto; }
  .nt-field select { width: 100%; }
  .nt-rules thead { display: none; }
  .nt-rules tr { display: grid; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .nt-rules td { border: 0; padding: 0; }
  .nt-rules td:first-child { font-weight: 600; }
}

@media print {
  /* two questions per row, two rows per page; a row never splits */
  .nt-pg .prow { display: grid; grid-template-columns: 1fr 1fr; column-gap: 0.35in; break-inside: avoid; page-break-inside: avoid; margin-bottom: 0.14in; }
  .nt-pq { font-size: 10.5pt; }
  .nt-pq h4 { text-align: left; font-size: 11pt; }
  .nt-pq .board { width: 2.6in; margin: 0 auto 2pt; }
  .nt-pq .board text.co { font-weight: 700; }
  .nt-pg.first .nt-pq .board { width: 2.2in; }
  .nt-pq .board .l { fill: #ffffff; }
  .nt-pq .board .d { fill: #c4c4c4; }
  .nt-pq .board .fr { fill: #333333; }
  .nt-pq .board .ring { stroke: #000; stroke-width: 2.8; }
  .nt-pq .board .arw { fill: #000; stroke: #fff; stroke-width: 1.2; opacity: 1; }
  .nt-pq .ask { margin: 4pt 0 3pt; font-size: 10.5pt; }
  .pp-a, .pp-prior, .pp-note, .pp-sheet { margin: 0 0 4pt; font-size: 10.5pt; line-height: 1.45; }
  .pp-a { margin-top: 6pt; }
  .pp-prior b, .pp-sheet b { margin-right: 2pt; }
  .pp-prior .pe { white-space: nowrap; }
  .pp-sheet .pe { margin-right: 6pt; white-space: nowrap; }
  .ln { display: inline-block; border-bottom: 1pt solid #000; height: 1em; vertical-align: -2pt; }
  .nt-pg .instr { padding: 5pt 10pt; margin-bottom: 8pt; }
  .nt-pg .instr p { margin: 0; }
  .nt-key .kblock { break-inside: avoid; margin-bottom: 12pt; }
  .klist { margin: 4pt 0 0; padding-left: 2em; font-size: 10.5pt; columns: 2; column-gap: 0.35in; }
  .klist li { break-inside: avoid; margin: 0 0 4pt; }
  .klist span { color: #222; }
  .kfoot { font-size: 10pt; margin-top: 8pt; }
}
/* notes can name a storage key, one long token: let it wrap at 320 px */
.nt-tool .note { overflow-wrap: anywhere; }

/* the page's text and buttons at 16px (the main page's buttons are 0.95rem) */
.nt-tool .btn, .nt-tool .link, .nt-tool .history, .content .sources { font-size: 1rem; }
.nt-tool .btn[href] { display: inline-flex; align-items: center; text-decoration: none; }
/* a move number stays with its move */
.mvp { display: inline-flex; align-items: center; white-space: nowrap; }
.nt-prior .mvp { margin-right: 6px; }
.nt-howto { margin: 0 0 12px; max-width: 72ch; }
.nt-howto summary { cursor: pointer; color: var(--accent); min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }
.nt-howto p { margin: 0 0 8px; }
.nt-actions:focus { outline: 3px solid var(--focus); outline-offset: 4px; }
