/* app.css - the drop screen in front of the assembly page (css/view.css is the page itself) */
body.empty > header,
body.empty > main {
  display: none;
}
body:not(.empty) > #drop {
  display: none;
}
/* the landing page, which is the drop screen */
#drop {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  scrollbar-gutter: stable;
} /* (the scrollbar's room kept: the page no longer jumps sideways when it appears) */
#drop > * {
  width: 100%;
  max-width: 1040px;
  padding-left: 20px;
  padding-right: 20px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 18px; /* design-ok: imported Boardsheet scale */
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 14px;
}
.topbar a,
.foot a {
  color: var(--mute);
  text-decoration: none;
}
.topbar a:hover,
.foot a:hover {
  color: var(--accent);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px; /* design-ok: imported Boardsheet scale */
  font-size: 19px; /* design-ok: imported Boardsheet scale */
  letter-spacing: -0.02em;
}
.brand b {
  font-weight: 600;
}
.beta {
  font-size: 10.5px; /* design-ok: imported Boardsheet scale */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 2px;
  padding: 1px 8px; /* design-ok: imported Boardsheet scale */
}
.grow {
  flex: 1;
}
.hero {
  text-align: center;
  padding-top: 34px; /* design-ok: imported Boardsheet scale */
  padding-bottom: 8px;
}
.hero h1 {
  font-size: clamp(30px, 5.2vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0;
  font-weight: 600;
}
.lede {
  max-width: 640px;
  margin: 18px auto 0; /* design-ok: imported Boardsheet scale */
  color: var(--mute);
  font-size: 16.5px; /* design-ok: imported Boardsheet scale */
  line-height: 1.55;
}
.dropcard {
  max-width: 620px;
  margin: 30px auto 0; /* design-ok: imported Boardsheet scale */
  background: var(--panel);
  border: 2px dashed var(--line);
  border-radius: 2px;
  padding: 30px 26px 24px; /* design-ok: imported Boardsheet scale */
  transition:
    border-color 0.15s,
    background 0.15s;
}
.dropicon {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dropcard p {
  margin: 10px 0; /* design-ok: imported Boardsheet scale */
}
.dropcard p.big {
  font-size: 17px; /* design-ok: imported Boardsheet scale */
  margin-top: 6px; /* design-ok: imported Boardsheet scale */
}
.dropcard .sub {
  color: var(--mute);
  font-size: 12.5px; /* design-ok: imported Boardsheet scale */
}
.dropcard .btn {
  padding: 9px 22px; /* design-ok: imported Boardsheet scale */
  font-weight: 600;
}
#drop.over .dropcard {
  border-color: var(--accent);
  background: var(--accent-soft);
}
#drop.busy .dropcard {
  opacity: 0.6;
}
.dropmsg {
  color: var(--bad);
  font-weight: 600;
}
.dirlink {
  margin-left: 10px; /* design-ok: imported Boardsheet scale */
  font-size: 13px; /* design-ok: imported Boardsheet scale */
  color: var(--accent);
}
.fmts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px; /* design-ok: imported Boardsheet scale */
  margin: 14px 0 6px; /* design-ok: imported Boardsheet scale */
}
.fmts span {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px; /* design-ok: imported Boardsheet scale */
  border-radius: 2px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
}
.which {
  font-size: 12.5px; /* design-ok: imported Boardsheet scale */
  color: var(--mute);
  text-align: left;
  max-width: 480px;
  margin: 4px auto 0;
}
.which summary {
  cursor: pointer;
  text-align: center;
  list-style-position: inside;
}
.which ul {
  margin: 8px 0 0;
  padding-left: 18px; /* design-ok: imported Boardsheet scale */
  line-height: 1.6;
}
.which code {
  font-family: var(--mono);
  font-size: 11.5px; /* design-ok: imported Boardsheet scale */
}
.pop p {
  margin: 4px 10px; /* design-ok: imported Boardsheet scale */
  color: var(--mute);
  font-size: 12px;
}
.private {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: center;
  max-width: 620px;
  margin: 14px auto 0; /* design-ok: imported Boardsheet scale */
  color: var(--mute);
  font-size: 13px; /* design-ok: imported Boardsheet scale */
  text-align: left;
}
.private svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px; /* design-ok: imported Boardsheet scale */
  fill: none;
  stroke: var(--ok);
  stroke-width: 2;
  stroke-linecap: round;
}
.feats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; /* design-ok: imported Boardsheet scale */
  padding-top: 44px; /* design-ok: imported Boardsheet scale */
}
.feat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 16px 18px; /* design-ok: imported Boardsheet scale */
}
.feat h3 {
  margin: 0 0 6px; /* design-ok: imported Boardsheet scale */
  font-size: 14px;
  letter-spacing: -0.01em;
}
.feat p {
  margin: 0;
  color: var(--mute);
  font-size: 13.5px; /* design-ok: imported Boardsheet scale */
  line-height: 1.5;
}
.how {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; /* design-ok: imported Boardsheet scale */
  padding-top: 22px; /* design-ok: imported Boardsheet scale */
}
.how div {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
}
.how b {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px; /* design-ok: imported Boardsheet scale */
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px; /* design-ok: imported Boardsheet scale */
  align-items: center;
  margin-top: auto;
  padding-top: 44px; /* design-ok: imported Boardsheet scale */
  padding-bottom: 22px; /* design-ok: imported Boardsheet scale */
  color: var(--mute);
  font-size: 12.5px; /* design-ok: imported Boardsheet scale */
}
.foot .tm {
  flex-basis: 100%;
  font-size: 11.5px; /* design-ok: imported Boardsheet scale */
  opacity: 0.85;
}
@media (max-width: 700px) {
  #drop {
    overflow: auto;
  }
  .hero {
    padding-top: 14px; /* design-ok: imported Boardsheet scale */
  }
  .dropcard {
    padding: 22px 16px 18px; /* design-ok: imported Boardsheet scale */
  }
  .topbar {
    gap: 10px; /* design-ok: imported Boardsheet scale */
  }
  .topbar > * {
    flex-shrink: 1;
    min-width: 0;
  }
}
/* the app header: the brand mark before the board's title; legal links in the More menu */
.hmark {
  width: 26px;
  height: 26px;
  flex: none;
  display: block;
}
.hmark img {
  width: 26px;
  height: 26px;
  display: block;
}
.pop a.lk {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px; /* design-ok: imported Boardsheet scale */
  border-radius: 2px;
  color: var(--ink);
  text-decoration: none;
}
.pop a.lk:hover {
  background: var(--soft);
}
@media (max-width: 700px) {
  .hmark,
  #open-another {
    display: none;
  }
}

/* js/edit.js: the edit and save dialogs */
dialog.edit {
  max-width: min(860px, calc(100vw - 24px));
  width: 100%;
}
dialog.edit h4 {
  margin: 16px 0 4px;
  font-size: 13px; /* design-ok: imported Boardsheet scale */
}
dialog.edit .sub {
  color: var(--mute);
  font-size: 12px;
}
dialog.edit input {
  padding: 5px 8px; /* design-ok: imported Boardsheet scale */
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg);
  min-width: 0;
  width: 100%;
}
dialog.edit input[type="checkbox"] {
  width: auto;
}
.egrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 12px; /* design-ok: imported Boardsheet scale */
  margin-top: 12px;
}
.ef {
  display: flex;
  flex-direction: column;
  gap: 3px; /* design-ok: imported Boardsheet scale */
  font-size: 12px;
  color: var(--mute);
  margin-top: 8px;
}
.egrid .ef {
  margin-top: 0;
}
.ef.chk {
  flex-direction: row;
  align-items: center;
  gap: 7px; /* design-ok: imported Boardsheet scale */
  color: var(--ink);
  align-self: end;
  padding-bottom: 6px; /* design-ok: imported Boardsheet scale */
}
.tscroll {
  overflow-x: auto;
  margin: 6px 0; /* design-ok: imported Boardsheet scale */
}
table.srcs {
  font-size: 12px;
  min-width: 720px;
}
table.srcs th {
  position: static;
  cursor: default;
  padding: 4px 4px;
}
table.srcs td {
  padding: 3px 4px; /* design-ok: imported Boardsheet scale */
  border: 0;
}
table.srcs td:nth-child(1) {
  width: 15%;
}
table.srcs td:nth-child(2) {
  width: 20%;
}
table.srcs td:nth-child(3) {
  width: 22%;
}
table.srcs td:nth-child(4),
table.srcs td:nth-child(5) {
  width: 9%;
}
dialog.edit .row2 {
  display: flex;
  gap: 8px;
  margin-top: 14px; /* design-ok: imported Boardsheet scale */
  align-items: center;
  flex-wrap: wrap;
}
dialog.edit .row2 form {
  margin: 0;
}
dialog.edit .err {
  color: var(--bad);
  font-weight: 600;
  margin: 10px 0 0; /* design-ok: imported Boardsheet scale */
}
.saves {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.sv {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel);
  padding: 9px 12px; /* design-ok: imported Boardsheet scale */
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sv:hover:not([disabled]) {
  border-color: var(--accent);
}
.sv[disabled] {
  opacity: 0.55;
  cursor: default;
}
.sv b {
  font-family: var(--mono);
  font-size: 13px; /* design-ok: imported Boardsheet scale */
  font-weight: 600;
}
.sv span {
  color: var(--mute);
  font-size: 12px;
}
.danger-t {
  color: var(--bad);
}
.addx {
  display: flex;
  gap: 10px; /* design-ok: imported Boardsheet scale */
  align-items: center;
  padding: 8px 14px 16px; /* design-ok: imported Boardsheet scale */
  flex-wrap: wrap;
}
.addx .sub {
  color: var(--mute);
  font-size: 12px;
}
#extra tbody tr {
  cursor: pointer;
}
#extra tbody tr:hover {
  background: var(--soft);
}

/* the tray: what was added, sorted (js/app.js) */
.tray {
  text-align: left;
  margin: 16px auto 4px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tray[hidden] {
  display: none;
}
.dropcard.has .fmts,
.dropcard.has .which {
  display: none;
}
.trow,
.tadd {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px; /* design-ok: imported Boardsheet scale */
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel);
}
.trow.ok {
  border-color: var(--ok);
  background: var(--ok-soft);
}
.trow.missing {
  border-style: dashed;
}
.trow.warn {
  border-color: var(--warn);
  background: var(--warn-soft);
}
.tico.warn {
  background: var(--warn) !important;
}
.trow .tag.warn {
  vertical-align: 1px;
}
.tadd {
  width: 100%;
  cursor: pointer;
  border-style: dashed;
  color: inherit;
  font: inherit;
  text-align: left;
}
.tadd:hover {
  border-color: var(--accent);
}
.tbody {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.tbody b,
.tadd b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tsub {
  display: block;
  color: var(--mute);
  font-size: 12px;
}
.tico {
  flex: none;
  width: 42px;
  height: 30px;
  border-radius: 2px;
  display: grid;
  place-items: center;
  font: 700 10.5px var(--mono);
  color: var(--tile-ink);
  background: var(--tile-board);
}
.tico.bom {
  background: var(--tile-bom);
}
.tico.src {
  background: var(--tile-src);
}
.tico.m3 {
  background: var(--tile-3d);
}
.trow.missing .tico {
  background: var(--mute);
}
.tother {
  font-size: 12.5px; /* design-ok: imported Boardsheet scale */
  color: var(--mute);
  padding: 0 4px;
}
.tother summary {
  cursor: pointer;
}
.tother p {
  margin: 6px 0; /* design-ok: imported Boardsheet scale */
  overflow-wrap: anywhere;
}
.tgo {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 6px; /* design-ok: imported Boardsheet scale */
}
.tgo .btn {
  padding: 9px 20px; /* design-ok: imported Boardsheet scale */
}
.tgo .btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* messages (#toast): a click or Esc closes them */
#toast {
  cursor: pointer;
  pointer-events: auto;
  padding-right: 30px; /* design-ok: imported Boardsheet scale */
  max-width: min(560px, 92%);
}
#toast::after {
  content: "\00d7";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 16px;
  line-height: 1;
  opacity: 0.75;
}
#toast:hover::after {
  opacity: 1;
}

/* a refresh with a board open: the landing page is not drawn while the board reopens (no jump from one to the other) */
html.reopening body.empty > #drop,
html.reopening body.empty > .taskbar,
html.reopening body.empty > .sheetframe {
  visibility: hidden;
}
html.reopening body.empty::after {
  content: "Reopening your board …";
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--mute);
  font-size: 14px;
}

/* ---- a line's sources as rows: the distributor (its link), part number, unit price, stock ---- */
.srows {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 2px 10px; /* design-ok: imported Boardsheet scale */
  margin-top: 6px; /* design-ok: imported Boardsheet scale */
  font-size: 12px;
  align-items: baseline;
}
.srow {
  display: contents;
}
.srow > * {
  padding: 4px 0;
}
.srow .dist {
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.srow .dist:hover {
  text-decoration: underline;
}
.srow .pn {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px; /* design-ok: imported Boardsheet scale */
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.srow .u {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.srow .st {
  color: var(--mute);
  white-space: nowrap;
}
.srow.at .u {
  font-weight: 600;
  color: var(--accent);
}
.srow.out > * {
  opacity: 0.55;
}
/* the part's picture and description (Find prices) */
.card.pic {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.card.pic img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  flex: none;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 4px;
}
.card.pic .desc {
  font-size: 12.5px; /* design-ok: imported Boardsheet scale */
  margin: 2px 0 6px; /* design-ok: imported Boardsheet scale */
}
.card.pic .lk {
  font-size: 12px;
  font-weight: 600;
}
.dgrid > .card:has(> .srows) {
  grid-column: span 2;
} /* (four columns of figures want the room) */

/* the demo board's line under the file buttons */
.dropcard .demo {
  margin: 12px 0 0;
  font-size: 13.5px; /* design-ok: imported Boardsheet scale */
  color: var(--mute);
  display: flex;
  gap: 6px; /* design-ok: imported Boardsheet scale */
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
}
.dropcard .demo .lnk {
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dropcard .demo .lnk:disabled {
  color: var(--mute);
  cursor: wait;
  text-decoration: none;
}
.dropcard .demo span {
  font-size: 12px;
}

/* a line's cards: long names (footprints, nets) wrap inside their card instead of running out of it */
.dgrid > .card {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* a part's pins: chips that keep one line each (the full net name on hover), the list scrolling past a few rows */
.pinscard .pins {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 232px;
  overflow-y: auto;
  padding-right: 4px;
}
.pinscard .pin {
  margin: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pinscard .pin.auto span {
  color: var(--mute);
}
.pinscard .nc {
  margin-top: 7px; /* design-ok: imported Boardsheet scale */
}

/* printing the BOM: the table as a list, every line closed (an open line's cards and its highlight are for the screen),
   none of the page's controls */
@media print {
  tr.detail {
    display: none !important;
  }
  tbody tr.sel,
  tbody tr.sel > td {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
  }
  tbody tr.sel td,
  tbody tr.sel .sub,
  tbody tr.sel .mpn {
    color: inherit !important;
  }
  #toast,
  .menu,
  .addx,
  #lookup,
  #order,
  #save-files {
    display: none !important;
  }
}

/* the placing list (js/print.js): drawn in the print dialog's preview and on paper; on screen only inside the preview */
#printout {
  display: none;
}
/* paper is black on white whatever the mood or the dark theme: the page's colours are set back to plain light ones
   inside it, and the table rules of the screen (sticky tinted headers, coloured part numbers, row highlights) undone */
.pdoc {
  --bg: var(--paper-white);
  --panel: var(--paper-white);
  --ink: var(--paper-black);
  --mute: var(--paper-mute);
  --line: var(--paper-rule);
  --soft: var(--paper-soft);
  --accent: var(--paper-black);
  --accent-soft: var(--paper-soft-2);
  --sch-red: var(--paper-black);
  --sch-teal: var(--paper-mute);
  --sch-navy: var(--paper-black);
  --sch-ink: var(--paper-black);
  --sch-faint: var(--paper-rule);
  --sch-fill: var(--paper-white);
  color-scheme: light;
}
:is(.pdoc, #paper) :is(table, thead, tbody, tfoot, tr, th, td) {
  background: none;
  color: inherit;
  text-shadow: none;
  box-shadow: none;
  outline: none;
}
:is(.pdoc, #paper) th {
  position: static;
  cursor: default;
  border-right: 0;
  font-family: inherit;
  z-index: auto;
}
:is(.pdoc, #paper) :is(td, td *) {
  font-family: inherit;
}
:is(.pdoc, #paper) :is(h5, figure, figcaption, section, p, b, span) {
  background: none;
  text-shadow: none;
}
:is(.pdoc, #paper) {
  color: var(--paper-black);
  background: var(--paper-white);
  font:
    9.5pt/1.3 system-ui,
    "Segoe UI",
    sans-serif;
  text-align: left;
}
:is(.pdoc, #paper) .phead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1.5pt solid var(--paper-black);
  padding-bottom: 3pt;
  margin-bottom: 6pt;
}
:is(.pdoc, #paper) .phead b {
  font-size: 13pt;
}
:is(.pdoc, #paper) .phead span {
  font-size: 8.5pt;
  color: var(--paper-mute);
}
:is(.pdoc, #paper) .pboards {
  display: grid;
  gap: 6mm;
  margin: 0 0 8pt;
}
:is(.pdoc, #paper) .pboards.n2 {
  grid-template-columns: 1fr 1fr;
}
:is(.pdoc, #paper) .pboards figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2pt;
}
:is(.pdoc, #paper) .pboards img {
  display: block;
  width: 100%;
  height: 55mm;
  object-fit: contain;
}
:is(.pdoc, #paper) .pboards figcaption {
  font-size: 8pt;
  color: var(--paper-mute);
}
:is(.pdoc, #paper) .pside {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 10pt 0 4pt;
  font-size: 11pt;
  border-bottom: 1pt solid var(--paper-black);
  padding-bottom: 2pt;
}
:is(.pdoc, #paper) .psec:first-of-type .pside {
  margin-top: 4pt;
}
:is(.pdoc, #paper) .pside span {
  font-size: 8.5pt;
  font-weight: 400;
  color: var(--paper-mute);
}
:is(.pdoc, #paper) .pboard {
  margin: 0 0 6pt;
}
:is(.pdoc, #paper) .pboard img {
  display: block;
  width: 100%;
  height: 58mm;
  object-fit: contain;
}
:is(.pdoc, #paper) .psec.pnew {
  break-before: page;
}
:is(.pdoc, #paper) .plist {
  width: 100%;
  border-collapse: collapse;
}
:is(.pdoc, #paper) .plist th {
  text-align: left;
  font-size: 7.5pt;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--paper-mute);
  border-bottom: 1pt solid var(--paper-black);
  padding: 2pt 4pt;
}
:is(.pdoc, #paper) .plist td {
  border-bottom: 0.5pt solid var(--paper-rule);
  padding: 3pt 4pt;
  vertical-align: top;
}
:is(.pdoc, #paper) .plist tr {
  break-inside: avoid;
}
:is(.pdoc, #paper) .plist thead {
  display: table-header-group;
}
:is(.pdoc, #paper) .tick {
  width: 10pt;
}
:is(.pdoc, #paper) .tick::before {
  content: "";
  display: inline-block;
  width: 8pt;
  height: 8pt;
  border: 0.8pt solid var(--paper-black);
  border-radius: 2px;
}
:is(.pdoc, #paper) .n,
:is(.pdoc, #paper) .q {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}
:is(.pdoc, #paper) .refs {
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 600;
  max-width: 40%;
}
:is(.pdoc, #paper) .fp {
  font-size: 8pt;
  color: var(--paper-ink-2);
  overflow-wrap: anywhere;
}
:is(.pdoc, #paper) .mpn {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 8.5pt;
}
:is(.pdoc, #paper) .pdnp,
:is(.pdoc, #paper) .pnone {
  margin-top: 6pt;
  font-size: 8.5pt;
}
:is(.pdoc, #paper) td small {
  display: block;
  font-family: system-ui, "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--paper-mute-2);
  font-size: 7.5pt;
}
:is(.pdoc, #paper) .m {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
:is(.pdoc, #paper) .src {
  font-size: 8.5pt;
}
:is(.pdoc, #paper) .pbomt .refs {
  max-width: 26%;
}
:is(.pdoc, #paper) .pbomt .mpn {
  overflow-wrap: anywhere;
}
:is(.pdoc, #paper) tr.dnp td {
  color: var(--paper-faint);
}
:is(.pdoc, #paper) tfoot td {
  border-top: 1pt solid var(--paper-black);
  border-bottom: 0;
  font-weight: 600;
  padding-top: 4pt;
}
:is(.pdoc, #paper) .psub {
  margin: 12pt 0 3pt;
  font-size: 9pt;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
:is(.pdoc, #paper) {
  width: 100%;
  box-sizing: border-box;
}
@media print {
  html.printing-list body > *:not(#printout) {
    display: none !important;
  }
  html.printing-list body {
    background: var(--paper-white) !important;
  }
  html.printing-list #printout {
    display: block;
  }
}
/* the print dialog: every page on the left, the choices on the right (a browser's print preview), one fixed size */
#print-dlg {
  width: min(1060px, calc(100vw - 24px));
  max-width: none;
  height: min(720px, calc(100vh - 24px));
  padding: 0;
  overflow: hidden;
}
#print-dlg .pwrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  height: 100%;
}
#print-dlg .pvpane {
  position: relative;
  overflow-y: auto;
  background: color-mix(in srgb, var(--mute) 22%, var(--bg));
}
#print-dlg .pvpages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px; /* design-ok: imported Boardsheet scale */
  padding: 22px 28px 30px; /* design-ok: imported Boardsheet scale */
}
#print-dlg .pg {
  position: relative;
  flex: none;
  background: var(--paper-white);
  border: 1px solid var(--line);
  overflow: hidden;
}
#print-dlg .pgin {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  box-sizing: border-box;
  pointer-events: none;
}
#print-dlg .pgclip {
  overflow: hidden;
}
#print-dlg .pgno {
  position: absolute;
  right: 6px;
  bottom: 4px;
  font:
    10px system-ui,
    sans-serif;
  color: var(--paper-faint);
}
#print-dlg .pvmeasure {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  pointer-events: none;
}
#print-dlg .pset {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 16px; /* design-ok: imported Boardsheet scale */
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--panel);
}
#print-dlg .pset h3 {
  margin: 0;
}
#print-dlg .pvinfo {
  color: var(--mute);
  font-size: 12.5px; /* design-ok: imported Boardsheet scale */
  margin: 2px 0 6px; /* design-ok: imported Boardsheet scale */
}
#print-dlg .pset h4 {
  margin: 12px 0 5px; /* design-ok: imported Boardsheet scale */
  font-size: 11px; /* design-ok: imported Boardsheet scale */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mute);
}
#print-dlg .opts {
  display: grid;
  gap: 6px; /* design-ok: imported Boardsheet scale */
}
#print-dlg .opts.two {
  grid-template-columns: 1fr 1fr;
}
#print-dlg .opt {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 7px 9px; /* design-ok: imported Boardsheet scale */
  cursor: pointer;
  font-size: 13px; /* design-ok: imported Boardsheet scale */
}
#print-dlg .opt:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
#print-dlg .opt input {
  flex: none;
  width: auto;
  height: auto;
  margin: 4px 0 0;
  padding: 0;
  accent-color: var(--accent);
}
#print-dlg .opt > span {
  flex: 1;
  min-width: 0;
}
#print-dlg .opt small {
  display: block;
  color: var(--mute);
  font-size: 11.5px; /* design-ok: imported Boardsheet scale */
  margin-top: 1px; /* design-ok: imported Boardsheet scale */
  font-weight: 400;
}
#print-dlg .chk {
  margin-top: 10px; /* design-ok: imported Boardsheet scale */
  font-size: 13px; /* design-ok: imported Boardsheet scale */
}
#print-dlg .pbtns {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 760px) {
  #print-dlg .pwrap {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  #print-dlg .pset {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 52vh;
    padding-bottom: 0;
  }
  #print-dlg .pbtns {
    position: sticky;
    bottom: 0;
    background: var(--panel);
    padding: 10px 0 12px; /* design-ok: imported Boardsheet scale */
    margin-top: 12px;
    border-top: 1px solid var(--line);
  }
}

/* the Order dialog's note under the Digi-Key cart */
#order-dlg {
  max-width: min(640px, calc(100vw - 24px));
}
#order-dlg .ohead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
#order-dlg .ohead h3 {
  margin: 0;
}
#order-dlg .olink {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#order-dlg .ocard {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px 14px; /* design-ok: imported Boardsheet scale */
  margin-top: 12px;
  background: var(--panel);
}
#order-dlg .otop {
  display: flex;
  align-items: center;
  gap: 14px; /* design-ok: imported Boardsheet scale */
}
#order-dlg .otop > div {
  flex: 1;
  min-width: 0;
}
#order-dlg .otop h4 {
  margin: 0 0 4px;
  font-size: 14px;
}
#order-dlg .otop p {
  margin: 0;
  color: var(--mute);
  font-size: 12.5px; /* design-ok: imported Boardsheet scale */
}
#order-dlg .otop .btn {
  flex: none;
  white-space: nowrap;
}
#order-dlg .owarn {
  margin-top: 10px; /* design-ok: imported Boardsheet scale */
  padding: 8px 10px; /* design-ok: imported Boardsheet scale */
  border-radius: 2px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 12.5px; /* design-ok: imported Boardsheet scale */
}
#order-dlg .olist {
  margin-top: 8px;
  font-size: 12.5px; /* design-ok: imported Boardsheet scale */
  color: var(--mute);
}
#order-dlg .owarn .olist {
  color: inherit;
}
#order-dlg .olist summary {
  cursor: pointer;
  width: fit-content;
}
#order-dlg .ochips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px; /* design-ok: imported Boardsheet scale */
}
#order-dlg .ochip {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1px 7px; /* design-ok: imported Boardsheet scale */
  font-family: var(--mono);
  font-size: 11.5px; /* design-ok: imported Boardsheet scale */
  color: var(--ink);
  background: var(--bg);
}
#order-dlg .ochip span {
  color: var(--mute);
}
@media (max-width: 560px) {
  #order-dlg .otop {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---- a phone: the header in two rows (the title, progress and menus; then boards and the buying buttons), never wider
   than the screen; the BOM keeps references, value and package (the part number is in a line's detail) ---- */
/* a BOM row: the package under the value, not a column of its own; long values and packages wrap; the source cell
   just its tags */
#rows td.c-src {
  max-width: 120px;
}
#rows td.c-src .tag {
  display: inline-block;
  margin: 1px 3px 1px 0; /* design-ok: imported Boardsheet scale */
}
@media (max-width: 700px) {
  header {
    flex-wrap: wrap !important;
    row-gap: 6px !important; /* design-ok: imported Boardsheet scale */
  }
  header h1 {
    flex: 1 0 calc(100% - 190px) !important;
    order: 0;
  }
  header .stats {
    display: contents;
  }
  header .stat.keep,
  header #m-more,
  header #m-look,
  header .hmark {
    order: 0;
  }
  header .boards,
  header #lookup,
  header #order,
  header #save-files {
    order: 1;
  }
  header #lookup,
  header #order,
  header #save-files {
    flex: 1 1 auto;
    padding-left: 8px;
    padding-right: 8px;
    white-space: nowrap;
  }
  header .boards {
    flex: none;
  }
  header .menu .pop {
    top: auto;
  }
  td.refs {
    width: 34%;
  }
}

/* Edit line on a phone: each source a small card (distributor, part number; prices, stock, MOQ; link), not a table
   scrolled sideways */
@media (max-width: 700px) {
  table.srcs {
    min-width: 0;
    display: block;
  }
  table.srcs thead {
    display: none;
  }
  table.srcs tbody {
    display: block;
  }
  table.srcs tr.src {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr)) 32px;
    grid-template-areas: "dist dist dist pn pn pn x" "tiers tiers tiers tiers stock moq moq" "url url url url url url url";
    gap: 6px 8px; /* design-ok: imported Boardsheet scale */
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 2px;
  }
  table.srcs td {
    display: block;
    width: auto !important;
    padding: 0;
    min-width: 0;
  }
  table.srcs td input {
    width: 100%;
    box-sizing: border-box;
  }
  table.srcs td:nth-child(1) {
    grid-area: dist;
  }
  table.srcs td:nth-child(2) {
    grid-area: pn;
  }
  table.srcs td:nth-child(3) {
    grid-area: tiers;
  }
  table.srcs td:nth-child(4) {
    grid-area: stock;
  }
  table.srcs td:nth-child(5) {
    grid-area: moq;
  }
  table.srcs td:nth-child(6) {
    grid-area: url;
  }
  table.srcs td:nth-child(7) {
    grid-area: x;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
  }
  table.srcs td::before {
    display: block;
    font-size: 11px; /* design-ok: imported Boardsheet scale */
    color: var(--mute);
    margin-bottom: 4px;
  }
  table.srcs td:nth-child(1)::before {
    content: "Distributor";
  }
  table.srcs td:nth-child(2)::before {
    content: "Part number";
  }
  table.srcs td:nth-child(3)::before {
    content: "Price breaks";
  }
  table.srcs td:nth-child(4)::before {
    content: "Stock";
  }
  table.srcs td:nth-child(5)::before {
    content: "MOQ";
  }
  table.srcs td:nth-child(6)::before {
    content: "Link";
  }
}

/* Open on phone (js/phone.js) */
#phone-dlg {
  max-width: min(460px, calc(100vw - 24px));
}
#phone-dlg h3 {
  margin: 0 0 4px;
}
#phone-dlg .pfacts {
  margin: 10px 0 4px; /* design-ok: imported Boardsheet scale */
  padding-left: 18px; /* design-ok: imported Boardsheet scale */
  font-size: 13px; /* design-ok: imported Boardsheet scale */
  display: grid;
  gap: 6px; /* design-ok: imported Boardsheet scale */
}
#phone-dlg .perr {
  color: var(--bad);
  font-size: 13px; /* design-ok: imported Boardsheet scale */
}
#phone-dlg .pqr {
  width: min(260px, 70vw);
  margin: 10px auto 4px; /* design-ok: imported Boardsheet scale */
  padding: 8px;
  background: var(--paper-white);
  border-radius: 2px;
  border: 1px solid var(--line);
}
#phone-dlg .pqr svg {
  display: block;
  width: 100%;
  height: auto;
}
#phone-dlg .pqr.gone {
  opacity: 0.15;
}
#phone-dlg .pc {
  text-align: center;
}
#phone-dlg .plink {
  display: flex;
  gap: 6px; /* design-ok: imported Boardsheet scale */
  margin: 10px 0 6px; /* design-ok: imported Boardsheet scale */
}
#phone-dlg .plink input {
  flex: 1;
  min-width: 0;
  font: 12px var(--mono);
  padding: 6px 8px; /* design-ok: imported Boardsheet scale */
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg);
  color: var(--ink);
}
.pop a.lk small {
  color: var(--mute);
  font-weight: 400;
  margin-left: 8px;
}
#phone-dlg .pnote {
  color: var(--ok);
  font-size: 13px; /* design-ok: imported Boardsheet scale */
  margin: 4px 0;
}

/* js/pro.js: the Pro dialog and buttons */
dialog.pro {
  max-width: min(460px, calc(100vw - 24px));
  width: 100%;
}
dialog.pro .pro-price {
  font-size: 16px;
  margin: 4px 0 8px;
}
dialog.pro .pro-list {
  margin: 0 0 12px;
  padding-left: 20px;
  line-height: 1.5;
}
dialog.pro .pro-note,
dialog.pro .pro-why {
  color: var(--mute);
  font-size: 14px;
  margin: 8px 0;
}
dialog.pro .pro-why {
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 8px;
}
dialog.pro .pro-form {
  display: grid;
  gap: 8px;
  margin: 12px 0 8px;
}
dialog.pro .pro-form label {
  font-size: 14px;
  color: var(--mute);
}
dialog.pro .pro-form input {
  font-size: 16px;
  padding: 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg);
  color: var(--ink);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
dialog.pro .btn {
  min-height: 44px;
}
dialog.pro .pro-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}
dialog.pro .pro-acts.end {
  justify-content: flex-end;
}
dialog.pro .pro-msg {
  font-size: 14px;
  margin: 8px 0;
}
dialog.pro .pro-msg.bad {
  color: var(--bad);
}
dialog.pro .pro-restore summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--mute);
  min-height: 44px;
  display: flex;
  align-items: center;
}
[data-pro-btn][hidden] {
  display: none;
}

/* phones (rule 14): every control on the landing page is a 44px tap target */
@media (max-width: 760px), (pointer: coarse) {
  #drop .btn,
  #drop .lookbtn,
  [data-pro-btn] {
    min-height: 44px;
    min-width: 44px;
  }
  .dropcard .demo .lnk {
    min-height: 44px;
    padding: 0 4px;
  }
}
/* phones: the top bar keeps the brand, Go Pro and Look; Privacy and Terms stay in the footer */
@media (max-width: 520px) {
  #drop > .topbar > a {
    display: none;
  }
}
