/* /needleman-wunsch-algorithm-calculator/, /math-solver-number-line/ and /math-solver-triangle-congruence/. Uses the site tokens from style.css. */
.nw-form label, .nl-form label { display: block; font-size: .9rem; color: var(--ink-2); font-weight: 600; }
.nw-form input, .nl-form input { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font: inherit; font-family: var(--font-mono); font-size: 1.05rem; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-s); box-sizing: border-box; }
.nw-form input:focus, .nl-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.nw-seqs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nw-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.nw-scores input { text-align: center; }
.nw-mode, .nw-samples, .nl-samples, .nl-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.nw-form .chip, .nl-form .chip { max-width: none; white-space: normal; }
.nw-mode .chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); font-weight: 650; }
.nw-form .btn-primary { margin-top: 12px; }
.nw-err { color: #b3261e; font-size: .92rem; margin: 8px 0 0; min-height: 0; }
.nw-err:empty { display: none; }
.nw-out { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.nw-out[hidden], .nw-tblwrap[hidden], .nl-out[hidden] { display: none; }
.nw-score { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.nw-big, .nl-big { font-family: var(--font-display); font-size: 2.3rem; line-height: 1.1; color: var(--accent-deep); }
.nw-sub { margin: 4px 0 8px; }
.nw-aln { margin: 8px 0; padding: 10px 12px; background: var(--paper-2); border-radius: 8px; font-family: var(--font-mono); font-size: 1.05rem; line-height: 1.35; letter-spacing: .08em; overflow-x: auto; max-width: 100%; }
.nw-more { margin: 6px 0; font-size: .92rem; }
.nw-more summary { cursor: pointer; color: var(--ink-2); }
.nw-tblwrap { margin-top: 12px; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.nw-table { border-collapse: collapse; font-family: var(--font-mono); text-align: center; margin: 0 auto; }
.nw-table th { font-weight: 700; color: var(--ink-2); padding: 4px 6px; min-width: 34px; background: var(--paper-2); border: 1px solid var(--line-2); }
.nw-table th.nw-corner { background: transparent; border-color: transparent; }
.nw-c { border: 1px solid var(--line-2); min-width: 40px; height: 40px; padding: 2px 4px; position: relative; vertical-align: middle; background: var(--card); }
.nw-s { display: block; font-size: .98rem; line-height: 1.1; }
.nw-a { display: block; font-size: .66rem; color: var(--ink-3); letter-spacing: 1px; line-height: 1; min-height: .7rem; }
.nw-c.alt { background: var(--green-soft); }
.nw-c.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); font-weight: 700; }
.nw-c.on .nw-a { color: var(--accent-deep); }
.nw-legend { margin: 10px 0 0; }
.nl-row { display: flex; gap: 10px; align-items: stretch; }
.nl-row input { margin-top: 0; flex: 1 1 auto; min-width: 0; }
.nl-row .btn { flex: 0 0 auto; white-space: nowrap; }
.nl-key { min-width: 40px; text-align: center; font-family: var(--font-mono); font-size: 1.05rem; padding: 6px 12px; }
.nl-out { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.nl-fig { margin: 0; }
.nl-svg { display: block; width: 100%; height: auto; max-width: 620px; margin: 0 auto; }
.nl-answer { margin: 8px 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.nl-big { font-size: 1.9rem; overflow-wrap: anywhere; }
.nl-iv { font-family: var(--font-mono); font-size: 1.1rem; color: var(--ink-2); overflow-wrap: anywhere; }
.nl-steps { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: nls; }
.nl-steps li { counter-increment: nls; position: relative; padding: 8px 0 8px 30px; border-top: 1px solid var(--line-2); }
.nl-steps li::before { content: counter(nls); position: absolute; left: 0; top: 9px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-2); color: var(--ink-2); font-size: .8rem; display: grid; place-items: center; }
.nl-steps b { display: block; font-weight: 650; }
.nl-steps span { display: block; font-family: var(--font-mono); font-size: .92rem; overflow-wrap: anywhere; }
.nl-check { margin: 10px 0 0; color: var(--ink-2); }
.nl-axis { stroke: var(--ink-3); stroke-width: 2; }
.nl-axis-head { fill: var(--ink-3); }
.nl-tick { stroke: var(--ink-3); stroke-width: 1.5; }
.nl-txt { fill: var(--ink-2); font-size: 17px; font-family: var(--font-mono); }
.nl-end { fill: var(--accent-deep); font-weight: 700; }
.nl-note { fill: var(--ink-3); font-size: 17px; }
.nl-seg { stroke: var(--accent); stroke-width: 7; stroke-linecap: butt; }
.nl-arrow { fill: var(--accent); }
.nl-pt { fill: var(--accent); stroke: var(--accent); stroke-width: 3; }
.nl-pt.nl-open { fill: var(--card); }
.nl-jump { fill: none; stroke: var(--accent); stroke-width: 3; }
.cp-fig { margin: 16px 0; }
.cp-fig img { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: 8px; }
.cp-fig figcaption { color: var(--ink-3); font-size: .85rem; margin-top: 4px; }
@media (max-width: 520px) {
  .nw-seqs { grid-template-columns: 1fr; }
  .nl-row { flex-direction: column; }
  .nw-c { min-width: 30px; height: 38px; padding: 2px 1px; }
  .nw-table th { min-width: 28px; padding: 3px 2px; }
  .nw-s { font-size: .86rem; }
  .nw-big { font-size: 2rem; }
}

/* /math-solver-triangle-congruence/ */
.tc-tris { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.tc-tri { margin: 0; padding: 10px 12px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); min-width: 0; }
.tc-tri legend { font-weight: 650; padding: 0 6px; color: var(--ink-2); }
.tc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.tc-f span { display: block; font-size: .85rem; color: var(--ink-2); font-weight: 600; }
.tc-f input { display: block; width: 100%; margin-top: 3px; padding: 9px 8px; font: inherit; font-family: var(--font-mono); font-size: 1rem; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-s); box-sizing: border-box; min-width: 0; }
.tc-f input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tc-actions, .tc-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.tc-samples .chip { max-width: none; white-space: normal; }
.tc-hint { margin: 0; }
.tc-out { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.tc-out:empty, .tc-out[hidden] { display: none; }
.tc-verdict { padding: 10px 14px; border-radius: 8px; border-left: 5px solid var(--line); background: var(--paper-2); }
.tc-verdict.tc-yes { border-left-color: var(--accent); }
.tc-verdict.tc-no { border-left-color: #b3261e; }
.tc-verdict.tc-maybe { border-left-color: var(--ink-3); }
.tc-big { margin: 0; font-family: var(--font-display); font-size: 1.9rem; line-height: 1.15; color: var(--accent-deep); overflow-wrap: anywhere; }
.tc-no .tc-big { color: #b3261e; }
.tc-maybe .tc-big { color: var(--ink-2); }
.tc-sub { margin: 4px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.tc-pairs { border-collapse: collapse; margin: 12px 0 0; font-family: var(--font-mono); font-size: .95rem; max-width: 100%; }
.tc-pairs caption { text-align: left; font-family: inherit; font-weight: 650; color: var(--ink-2); padding-bottom: 4px; font-size: .9rem; }
.tc-pairs th, .tc-pairs td { text-align: left; font-weight: 400; padding: 4px 14px 4px 0; border-top: 1px solid var(--line-2); }
.tc-steps { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: tcs; }
.tc-steps li { counter-increment: tcs; position: relative; padding: 8px 0 8px 30px; border-top: 1px solid var(--line-2); }
.tc-steps li::before { content: counter(tcs); position: absolute; left: 0; top: 9px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-2); color: var(--ink-2); font-size: .8rem; display: grid; place-items: center; }
.tc-steps b { display: block; font-weight: 650; }
.tc-steps span { display: block; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .tc-tris { grid-template-columns: 1fr; }
}
