/* Math Workbench shell layer, part 2: reference bank extras, calculator extras, Access
 * additions (palettes, dyslexia, pointer, focus mode) and print rules. Loaded after
 * wb-shell.css. */

/* ------------------------------------------------------- reference bank extras */
.wbx-ref {
  max-height: 190px;
  overflow: auto;
  padding: 6px 14px 0;
  border-top: 1px solid var(--line-2);
  background: #fafcff;
}
.wbx-ref[hidden],
.dock:not(.open) .wbx-ref {
  display: none;
}
.wbx-ref-section h4 {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wbx-ref-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.wbx-ref-row .formula-card {
  flex: 0 0 220px;
}
.fc-pin {
  position: absolute;
  right: 36px;
  top: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #b45309;
  font-size: 1.1rem;
  cursor: pointer;
}
.fc-pin:hover,
.fc-pin:focus-visible {
  background: rgba(251, 191, 36, 0.25);
  outline: none;
}
.wbx-steps {
  margin-top: 6px;
}
.wbx-steps summary {
  cursor: pointer;
  color: #205fa6;
  font-weight: 800;
}
.wbx-steps ol {
  margin: 4px 0 0;
  padding-left: 20px;
}

/* ------------------------------------------------------------ calculator extras */
.wbx-calc-actions {
  display: flex;
  gap: 6px;
}
.wbx-calc-actions .tbtn {
  width: auto;
  padding: 0 12px;
  font-size: 0.8rem;
}
.wbx-tape {
  border-top: 1px solid var(--line-2);
  padding-top: 6px;
  font-size: 0.85rem;
}
.wbx-tape summary {
  cursor: pointer;
  font-weight: 800;
}
.wbx-tape-list {
  max-height: 120px;
  margin: 6px 0 0;
  padding: 0 0 0 18px;
  overflow: auto;
}
.wbx-tape-list li {
  margin: 3px 0;
}
.wbx-chip {
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
}
.wbx-pressed {
  transform: scale(0.95);
  background: #e7f0f9;
}
.wbx-calc-pane {
  display: grid;
  gap: 10px;
  padding: 12px;
}
.wbx-calc-pane[hidden] {
  display: none;
}
.wbx-calc-fracs {
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  gap: 8px;
  align-items: center;
}
.wbx-calc-frac {
  display: grid;
  gap: 6px;
}
.wbx-calc-field {
  display: grid;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
}
.wbx-calc-out {
  min-height: 44px;
  padding: 10px;
  border-radius: 10px;
  background: #0f1f33;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  text-align: right;
}
[data-calc-off] {
  display: none !important;
}

/* ------------------------------------------------------------ Access additions */
.a11y-text {
  width: 100%;
  margin-top: 6px;
  min-height: 40px;
  padding: 6px 10px;
  box-sizing: border-box;
  border: 2px solid #b8c7d6;
  border-radius: 9px;
  font: inherit;
  font-weight: 700;
}
.a11y-row[hidden] {
  display: none;
}
.a11y-name > span {
  flex: 1;
}
body.a11y-dyslexia,
body.a11y-dyslexia .tbtn,
body.a11y-dyslexia .formula-card,
body.a11y-dyslexia .live-panel,
body.a11y-dyslexia .a11y-panel,
body.a11y-dyslexia .mwr-dialog {
  font-family: "Atkinson Hyperlegible", "Nunito", "Verdana", sans-serif;
  letter-spacing: 0.06em;
  word-spacing: 0.18em;
  text-align: left;
}
body.a11y-dyslexia .textobj,
body.a11y-dyslexia .formula-card,
body.a11y-dyslexia .mwr-dialog p,
body.a11y-dyslexia .mwr-dialog label {
  line-height: 1.75;
}
body.a11y-spacing .mwr-dialog,
body.a11y-spacing .wbx-gate {
  letter-spacing: 0.03em;
  word-spacing: 0.14em;
  line-height: 1.65;
}
body.a11y-contrast .mwr-dialog,
body.a11y-contrast .wbx-gate {
  border-color: #14223a;
}
body.a11y-contrast .mwr-muted,
body.a11y-contrast .wbx-muted {
  color: #33415c;
}
body.a11y-bigui .mwr-btn,
body.a11y-bigui .wbx-gate .tbtn {
  min-height: 52px;
  font-size: 1.05rem;
}
body.a11y-bigptr .rs {
  width: 26px;
  height: 26px;
}
body.a11y-bigptr .obj-tools button,
body.a11y-bigptr .obj-tools .mini-sw {
  min-width: 46px;
  min-height: 46px;
}
body.a11y-bigptr .workspace.cursor-pen,
body.a11y-bigptr .workspace.cursor-erase {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='14' fill='none' stroke='%2314223a' stroke-width='3'/%3E%3Ccircle cx='20' cy='20' r='3' fill='%2314223a'/%3E%3C/svg%3E")
      20 20,
    crosshair;
}
body.a11y-calm .wbx-tour-ring,
body.a11y-calm .wbx-pop {
  transition: none;
}
/* Focus mode: only the board and its tools. */
body.a11y-focus .dock,
body.a11y-focus #bgDock,
body.a11y-focus .wbx-hint-links,
body.a11y-focus .empty-hint .starter-row,
body.a11y-focus .empty-hint .starter-lbl,
body.a11y-focus .wbx-recent,
body.a11y-focus .save-pill {
  display: none !important;
}
body.a11y-focus .wb-toast {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@media print {
  .wbx-gate-bg,
  .wbx-pop,
  .wbx-tour,
  .wbx-tour-ring,
  .wbx-banner,
  .wbx-skip,
  .wbx-ref {
    display: none !important;
  }
}

/* Double number line: the two label boxes were clipped ("top lal", "bottor"). */
.tool-head input.dnl-lab {
  width: 96px;
}

@media (min-width: 721px) and (max-height: 820px) {
  .wbx-recent {
    display: none;
  }
  .wbx-tool {
    max-height: 42px;
  }
}
