/* Shop Quotes (laser + powder) — same look as the Shipping sheets: black top bar, gray shop-floor background, white sheets,
   black header bars, Noto Serif titles, orange action buttons. Stays light like Shipping. Never blue highlights. */
body.pq-page {
  background: #E9E9E6;
  color: #111;
  color-scheme: light;
}
.pq-page .tb-in {
  max-width: 1180px;
}
.pqtop {
  background: #E9E9E6;
  border-bottom: 3px solid var(--look-tab-on, #1F1F1F);
}
.pqtopin {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));
}
.pqtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.pqtabs .tab {
  font: 700 .95rem "Source Sans 3",system-ui,sans-serif;
  letter-spacing: 0;
  text-transform: none;
  min-height: 44px;
  padding: 0 18px;
  margin: 0;
  border: 0;
  border-radius: 4px 4px 0 0;
  background: #D4D4D0;
  color: #111;
  cursor: pointer;
}
.pqtabs .tab[aria-selected="true"] {
  background: var(--look-tab-on-paint, var(--look-tab-on, #1F1F1F));
  color: var(--look-tab-on-text, #fff);
}
.pqtabs .tab[hidden] {
  display: none;
}
.pq-page main .wrap {
  max-width: 1180px;
  padding-block: 16px 72px;
}
.pq {
  display: grid;
  gap: 14px;
  font-family: "Source Sans 3",system-ui,sans-serif;
}
.pq .vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* titles like "FFS Fabricated Parts - Build Order" */
.pqtitle h2,.pqhead h2 {
  font-family: "Noto Serif",Georgia,serif;
  font-weight: 700;
  font-size: 1.45rem;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}
.pqtitle p {
  margin: 4px 0 0;
  color: #333;
  font-family: "Noto Serif",Georgia,serif;
  font-size: .95rem;
}
.pqhead {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

/* inputs + buttons (Shipping style) */
.pq .ein {
  background: #fff;
  color: #111;
  border: 1px solid #8C8C8C;
  border-radius: 4px;
  padding: 8px 10px;
  font: inherit;
  min-height: 40px;
  box-sizing: border-box;
  width: 100%;
}
.pq .ein:focus {
  outline: 2px solid #C2410C;
  outline-offset: -1px;
  border-color: #C2410C;
}
.pq .ein:disabled {
  background: #F3F3F1;
  color: #444;
}
.pq .btn {
  font: 700 .9rem "Source Sans 3",system-ui,sans-serif;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.pq .btn.primary {
  background: var(--look-action-paint, var(--look-action, #C2410C));
  border-color: var(--look-action, #C2410C);
  color: var(--look-action-text, #fff);
}
.pq .btn.sm {
  min-height: 34px;
  font-size: .82rem;
  padding: 0 10px;
}
.pq .btn:focus-visible {
  outline: 3px solid #F59E0B;
  outline-offset: 2px;
}
.pq .linkbtn {
  font: inherit;
  background: none;
  border: 0;
  color: #9A3412;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-weight: 700;
}
.pq .note {
  background: #FFF2CC;
  border: 1px solid #8C8C8C;
  border-left: 4px solid #F59E0B;
  color: #111;
  padding: 10px 12px;
  border-radius: 0;
}
.pq .empty {
  background: #fff;
  border: 1px dashed #BDBDB8;
  color: #555;
  border-radius: 0;
  padding: 24px;
  text-align: center;
}
.pq .grp {
  font: 700 .78rem "Source Sans 3",system-ui,sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7A5A00;
  padding: 6px 0 0;
}
.pq .lvl {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  background: #FFF2CC;
  color: #111;
  border: 1px solid #D9B44A;
}

/* quote list: a sheet with a black header row */
.pqbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.pqsearch {
  flex: 1 1 280px;
}
.pq .pqlist {
  padding: 0;
  background: #fff;
  border: 1px solid #8C8C8C;
  border-radius: 0;
  overflow: hidden;
}
.pqrow {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 80px minmax(0,1fr) 110px 220px 110px;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  font: inherit;
  color: #111;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #B5B5B5;
  padding: 10px 12px;
  cursor: pointer;
}
.pqrow:last-child {
  border-bottom: 0;
}
.pqrow:hover {
  background: #FFF8E6;
}
.pqrow:focus-visible {
  outline: 2px solid #C2410C;
  outline-offset: -2px;
}
.pqrow.pqhdr {
  background: var(--look-head-bg-paint, var(--look-head-bg, #1F1F1F));
  color: var(--look-head-text, #fff);
  font: 700 .78rem "Source Sans 3",system-ui,sans-serif;
  cursor: default;
  padding: 7px 12px;
}
.pqrow.pqhdr:hover {
  background: var(--look-head-bg-paint, var(--look-head-bg, #1F1F1F));
}
.pqrow.pqhdr span:last-child {
  text-align: right;
}
.pqrow small {
  display: block;
  color: #444;
  font-size: .85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pqrow b {
  font-family: "Noto Serif",Georgia,serif;
}
.pqn {
  font-family: "JetBrains Mono",monospace;
  font-weight: 600;
}
.pqd {
  color: #333;
  font-size: .88rem;
  white-space: nowrap;
}
.pqt {
  font-family: "JetBrains Mono",monospace;
  font-weight: 600;
  text-align: right;
}
.pqst {
  justify-self: start;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  background: #D4D4D0;
  color: #111;
  white-space: nowrap;
}
.pqst.c-gray {
  background: #D4D4D0;
  color: #111;
}
.pqst.c-yellow {
  background: #FFF2CC;
  color: #111;
  box-shadow: inset 0 0 0 1px #D9B44A;
}
.pqst.c-orange {
  background: #F8CBAD;
  color: #7C2D12;
}
.pqst.c-green {
  background: #C6EFCE;
  color: #14532D;
}
.pqst.c-red {
  background: #7F1D1D;
  color: #fff;
}
.pqn small {
  display: block;
  font-size: .72rem;
  color: #7A5A00;
}
.pqfilt {
  flex: 0 1 240px;
}
.pqrevrow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #E6E6E3;
  padding: 6px 0;
}
.pqstrow {
  display: grid;
  grid-template-columns: 150px minmax(0,1fr) minmax(0,1.3fr) 110px auto;
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid #E6E6E3;
  padding: 8px 0;
}
.pqstrow>.pqst {
  align-self: center;
  justify-self: start;
}
.pqstbtns {
  display: flex;
  gap: 6px;
}

/* Quote list: the Final amount box */
.pqfinal {
  max-width: 320px;
}

/* Jobs & Profit (and Powder Stock): the row of KPI tiles, and the jobs tables */
/* A row of number boxes. The lines are drawn on each box (v126; before, the dark grid background showed through as a
   black block wherever a row wasn't full). Each box draws its right and bottom line, the row draws the top and left. */
.pqkpis {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
  gap: 0;
  border-top: 2px solid #1F1F1F;
  border-left: 2px solid #1F1F1F;
}
.pqkpis>div {
  background: #fff;
  padding: 10px 14px;
  display: grid;
  gap: 2px;
  min-width: 0;
  border-right: 2px solid #1F1F1F;
  border-bottom: 2px solid #1F1F1F;
}
.pqkpis small {
  font: 700 .75rem "Source Sans 3",system-ui,sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #333;
}
.pqkpis b {
  font-family: "Noto Serif",Georgia,serif;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}
.pq .neg {
  color: #B42318;
}
.pqtw {
  overflow-x: auto;
  margin: 0 -14px;
}
.pqjobs {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 760px;
}
.pqjobs th {
  background: #3A3A3A;
  color: #fff;
  font: 700 .76rem "Source Sans 3",system-ui,sans-serif;
  text-align: left;
  padding: 6px 8px;
}
.pqjobs td {
  border-bottom: 1px solid #B5B5B5;
  padding: 6px 8px;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.pqjobs td small {
  display: block;
  color: #555;
  font-size: .78rem;
}
.pqjobs .r {
  text-align: right;
}
.pqjobs tbody tr {
  cursor: pointer;
}
.pqjobs tbody tr:hover {
  background: #FFF8E6;
}
.pqjobs tfoot td {
  font-weight: 700;
  background: #FFF2CC;
  border-top: 2px solid #1F1F1F;
}

/* editor: white sheets with black header bars */
.pqcard {
  background: #fff;
  border: 1px solid #8C8C8C;
  padding: 0 14px 14px;
  display: grid;
  gap: 10px;
}
.pqcard>h3 {
  margin: 0 -14px;
  background: var(--look-head-bg-paint, var(--look-head-bg, #1F1F1F));
  color: var(--look-head-text, #fff);
  font: 700 .9rem "Source Sans 3",system-ui,sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 8px 14px;
}
.pqgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
  gap: 10px;
}
.pqf {
  display: grid;
  gap: 4px;
  font-size: .82rem;
  font-weight: 700;
  color: #333;
  min-width: 0;
}
.pqf.wide {
  grid-column: span 2;
}
.pqf textarea {
  resize: vertical;
}
.pqchk {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: .88rem;
  font-weight: 600;
  align-self: end;
  padding-bottom: 9px;
}
.pqchk input {
  width: 20px;
  height: 20px;
  accent-color: #C2410C;
}
.pqmuted {
  color: #444;
  font-size: .85rem;
}
.pqmatch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  background: #FFF8E6;
  border: 1px solid #D9B44A;
  padding: 8px 10px;
}

/* each part: a yellow bar like the wave bars, opens to its inputs */
.pqline {
  border: 1px solid #8C8C8C;
  background: #fff;
}
.pqline>summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  background: var(--look-wave-bg-paint, var(--look-wave-bg, #FFF2CC));
  font-family: "Noto Serif",Georgia,serif;
}
.pqline>summary::-webkit-details-marker {
  display: none;
}
.pqline>summary .pqln::before {
  content: "+ ";
  color: #7A5A00;
}
.pqline[open]>summary {
  border-bottom: 1px solid #8C8C8C;
}
.pqline[open]>summary .pqln::before {
  content: "\2212  ";
}
.pqlp {
  font-family: "JetBrains Mono",monospace;
}
.pqlbody {
  padding: 4px 12px 12px;
  display: grid;
  gap: 8px;
}
.pqcoats {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 10px;
}
.pqcoat {
  border: 1px solid #B5B5B5;
  background: #FAFAF8;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(120px,1fr));
  gap: 8px;
  align-items: end;
}
.pqcoat>b {
  grid-column: 1/-1;
  font: 700 .78rem "Source Sans 3",system-ui,sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #333;
}
.pqbd {
  border-top: 1px solid #B5B5B5;
  padding-top: 8px;
  display: grid;
  gap: 2px;
  font-size: .9rem;
}
.pqbd>div {
  display: grid;
  grid-template-columns: 110px minmax(0,1fr) auto;
  gap: 8px;
  align-items: baseline;
}
.pqbd small {
  color: #444;
}
.pqbd b {
  font-family: "JetBrains Mono",monospace;
  font-weight: 600;
}
.pqbdt {
  border-top: 1px dashed #8C8C8C;
  padding-top: 4px;
  margin-top: 2px;
}
.pqlact {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* totals */
.pqtot {
  padding-top: 12px;
}
.pqtot>div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 1rem;
}
.pqtot b {
  font-family: "JetBrains Mono",monospace;
}
.pqtot .sub {
  border-top: 1px solid #B5B5B5;
  padding-top: 6px;
}
.pqchk.inl {
  display: inline-flex;
  padding: 0 0 0 10px;
  font-size: .82rem;
  color: #333;
  vertical-align: middle;
}
.pqtot .big {
  font-family: "Noto Serif",Georgia,serif;
  font-size: 1.35rem;
  font-weight: 700;
  border-top: 3px solid #1F1F1F;
  padding-top: 8px;
}
.pqtot .big b {
  font-family: "Noto Serif",Georgia,serif;
}

/* Editor: the Save / Undo / Print button row */
.pqactions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  position: sticky;
  bottom: 0;
  background: #E9E9E6;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom,0px));
  border-top: 3px solid #1F1F1F;
  z-index: 4;
}

/* Phones: list rows, statuses and tabs stack */
@media (max-width:700px) {
  .pqstrow {
    grid-template-columns: 1fr 1fr;
  }
  .pqstrow>.pqst {
    grid-column: 1/-1;
  }
  .pqrow {
    grid-template-columns: 62px minmax(0,1fr) auto;
  }
  .pqrow .pqd,.pqrow .pqst,.pqrow.pqhdr span:nth-child(3),.pqrow.pqhdr span:nth-child(4) {
    display: none;
  }
  .pqf.wide {
    grid-column: 1/-1;
  }
  .pqbd>div {
    grid-template-columns: 90px minmax(0,1fr) auto;
  }
  .pqtabs {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .pqtabs .tab {
    padding: 0 8px;
    border-radius: 4px 4px 0 0;
  }
}

/* Print: only the quote prints (#pqprint is hidden on screen; Print quote / Print bid fills it) */
.pqprint {
  display: none;
}
@media print {
  body.pq-printing>*:not(#pqprint) {
    display: none!important;
  }
  body.pq-printing>#pqprint {
    display: block!important;
    color: #000;
    background: #fff;
    font-family: "Source Sans 3",Arial,sans-serif;
    font-size: 11pt;
  }
  .pqp {
    max-width: 7.5in;
    margin: 0 auto;
  }
  .pqph {
    display: flex;
    justify-content: space-between;
    border-bottom: 3px solid #000;
    padding-bottom: 8px;
    margin-bottom: 12px;
  }
  .pqph h1 {
    font-family: "Saira Condensed",Arial,sans-serif;
    font-size: 26pt;
    margin: 0;
    letter-spacing: .04em;
  }
  .pqph small {
    color: #333;
  }
  .pqph .r {
    text-align: right;
  }
  .pqpc {
    margin: 0 0 14px;
    line-height: 1.35;
  }
  .pqp table {
    width: 100%;
    border-collapse: collapse;
  }
  .pqp th,.pqp td {
    border-bottom: 1px solid #999;
    padding: 6px 4px;
    text-align: left;
    vertical-align: top;
  }
  .pqp th {
    border-bottom: 2px solid #000;
  }
  .pqp .r {
    text-align: right;
  }
  .pqp tr.st td {
    border-top: 2px solid #000;
  }
  .pqp tfoot td {
    font-weight: 800;
    font-size: 13pt;
    border-top: 2px solid #000;
    border-bottom: 0;
  }
  .pqpn {
    margin-top: 12px;
  }
  .pqpf {
    margin-top: 18px;
    font-size: 9pt;
    color: #333;
  }
  @page {
    size: letter;
    margin: .5in;
  }
}

/* Admin → Powder Quotes access (on the main site) */
.pqacc {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.pqrev {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
}
.pqrev input {
  width: 18px;
  height: 18px;
}

/* Shop Quotes: laser section, type tags, DXF drop zone, laser/powder split */
.ty {
  display: inline-block;
  font: 700 .68rem "Source Sans 3",system-ui,sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}
.ty.l {
  background: #1F1F1F;
  color: #fff;
}
.ty.p {
  background: #F8CBAD;
  color: #7C2D12;
}
.pqhead h2 .ty {
  font-size: .7rem;
  vertical-align: middle;
}
.sqpick {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 12px;
}
.sqpick button {
  display: grid;
  gap: 6px;
  text-align: left;
  font: inherit;
  background: #fff;
  border: 1px solid #8C8C8C;
  border-top: 6px solid #1F1F1F;
  padding: 18px;
  cursor: pointer;
  color: #111;
  min-height: 120px;
}
.sqpick button:nth-child(2) {
  border-top-color: #C2410C;
}
.sqpick button:nth-child(3) {
  border-top: 6px solid;
  border-image: linear-gradient(90deg,#1F1F1F 50%,#C2410C 50%) 1;
}
.sqpick button:hover {
  background: #FFF8E6;
}
.sqpick b {
  font-family: "Noto Serif",Georgia,serif;
  font-size: 1.2rem;
}
.sqpick small {
  color: #444;
  font-size: .92rem;
}
.pqcard>h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.sqsec.p>h3 {
  background: #7C2D12;
}
.hbtn {
  font: 600 .78rem "Source Sans 3",system-ui,sans-serif;
  background: transparent;
  border: 1px solid #777;
  color: #ddd;
  border-radius: 3px;
  padding: 3px 8px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.sqtiers {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 4px;
  padding-top: 12px;
}
.sqtiers.sm {
  grid-template-columns: repeat(3,minmax(0,1fr));
  padding-top: 0;
  max-width: 420px;
}
.pqbar .sqtiers.sm {
  flex: 1 1 300px;
}
.sqtiers button {
  font: 700 .86rem "Source Sans 3",system-ui,sans-serif;
  min-height: 42px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  border-radius: 4px;
  cursor: pointer;
  padding: 0 6px;
}
.sqtiers button[aria-pressed="true"] {
  background: var(--look-action-paint, var(--look-action, #C2410C));
  border-color: var(--look-action, #C2410C);
  color: var(--look-action-text, #fff);
}
.sqdz {
  border: 2px dashed #8C8C8C;
  background: #FAFAF8;
  padding: 16px;
  display: grid;
  gap: 6px;
  justify-items: start;
  cursor: pointer;
}
.sqdz.over {
  border-color: #C2410C;
  background: #FFF8E6;
}
.sqdz>b {
  font-family: "Noto Serif",Georgia,serif;
  font-size: 1.05rem;
}
.sqdz>span {
  color: #444;
  font-size: .9rem;
}
.dxfok {
  display: grid;
  gap: 3px;
  justify-items: start;
}
.dxfok b {
  font-family: "JetBrains Mono",monospace;
}
.dxfok small {
  color: #555;
}
.warnt {
  color: #B42318!important;
  font-weight: 700;
}
.src {
  justify-self: start;
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
}
.src.ok {
  background: #C6EFCE;
  color: #14532D;
}
.src.est {
  background: #FFF2CC;
  color: #111;
  box-shadow: inset 0 0 0 1px #D9B44A;
}
.src.none {
  background: #D4D4D0;
  color: #111;
}
.sqrates {
  border: 1px solid #B5B5B5;
  background: #FAFAF8;
}
.sqrates>summary {
  cursor: pointer;
  padding: 8px 10px;
  font-weight: 700;
  font-size: .9rem;
}
.sqrates>.pqgrid {
  padding: 0 10px 10px;
}
.sqadd {
  justify-self: start;
  border-style: dashed!important;
}
.sqpl {
  border: 1px solid #8C8C8C;
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}
.sqplh {
  display: flex;
  justify-content: space-between;
  margin: 0 -10px;
  padding: 7px 10px;
  background: #FFF2CC;
  font-family: "Noto Serif",Georgia,serif;
  border-bottom: 1px solid #8C8C8C;
}
.sqplh span {
  font-family: "JetBrains Mono",monospace;
  font-weight: 600;
}
.sqsec .note {
  margin-top: 12px;
}
.sqrt {
  min-width: 640px;
}
.sqrt tbody tr {
  cursor: default;
}
.sqrt td small {
  display: block;
}
.pq .ein.sqn {
  min-height: 34px;
  padding: 4px 6px;
  text-align: right;
  max-width: 110px;
  margin-left: auto;
}
.sqst {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sqsplit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #1F1F1F;
  border: 1px solid #1F1F1F;
}
.sqsplit>div {
  background: #fff;
  padding: 10px 14px;
  display: grid;
  gap: 2px;
  position: relative;
  overflow: hidden;
}
.sqsplit small {
  font: 700 .75rem "Source Sans 3",system-ui,sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.sqsplit b {
  font-family: "Noto Serif",Georgia,serif;
  font-size: 1.35rem;
}
.sqsplit span {
  color: #333;
  font-size: .88rem;
}
.sqsplit i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 5px;
  background: #1F1F1F;
}
.sqsplit .p i {
  background: #C2410C;
}
.sqacc {
  background: #fff;
  border: 1px solid #8C8C8C;
}
.sqar {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) 1fr 1fr 130px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #B5B5B5;
}
.sqar.hdr {
  background: var(--look-head-bg-paint, var(--look-head-bg, #1F1F1F));
  color: var(--look-head-text, #fff);
  font-weight: 700;
  font-size: .8rem;
  padding: 7px 12px;
}
.sqar small {
  display: block;
  color: #555;
}
.sqar .sku {
  font-size: .85rem;
  color: #333;
}

/* Phones: tier buttons, the laser/powder split and KPI tiles stack */
@media (max-width:700px) {
  .sqtiers {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .sqar {
    grid-template-columns: 1fr 1fr;
  }
  .sqar>span:first-child {
    grid-column: 1/-1;
  }
  .sqar.hdr {
    display: none;
  }
  .sqsplit {
    grid-template-columns: 1fr;
  }
  .pqkpis {
    grid-template-columns: 1fr 1fr;
  }
  .pqkpis>div:last-child:nth-child(odd) {
    grid-column: 1/-1;
  }
  .sqsort {
    grid-template-columns: 1fr 1fr;
  }
  .sqsort .pqf:first-child {
    grid-column: 1/-1;
  }
  .pqtabs {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}

/* Laser part when the person can't edit: the drop zone and tier buttons look inactive */
.sqdz.off {
  cursor: default;
}
.sqtiers button:disabled {
  opacity: .55;
  cursor: default;
}

/* Rates tab: the add a material / add a shape row */
.sqnewmat {
  align-items: end;
  border-top: 1px solid #B5B5B5;
  padding-top: 10px;
}

/* Printout: section heading rows in the quote table */
@media print {
  body.pq-printing .pqp tr.sec td {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 9.5pt;
    background: #EEE;
    border-bottom: 1px solid #000;
  }
}

/* Undo / Redo buttons: what the next step would undo, in small type */
.pq .btn small.sqwhat {
  display: block;
  font-weight: 600;
  font-size: .7rem;
  color: #555;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}
.pq .btn:disabled {
  opacity: .45;
  cursor: default;
}

/* Statistics page (owners Tony + Brandon only). Green = active, amber = idle, gray = background. */
.stnow {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: 8px;
  padding-top: 12px;
}
.stnow>div {
  border: 1px solid #8C8C8C;
  border-left: 6px solid #9A9A95;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  background: #fff;
}
.stnow>div.st-active {
  border-left-color: #2E7D32;
}
.stnow>div.st-idle {
  border-left-color: #D9A100;
}
.stnow b {
  font-family: "Noto Serif",Georgia,serif;
}
.stnow small {
  color: #555;
}
.stctl {
  align-items: end;
}
.stctl .sqtiers.sm {
  grid-template-columns: repeat(6,minmax(0,1fr));
  max-width: none;
  flex: 1 1 520px;
}
.strt {
  min-width: 980px;
}
.strt tbody tr {
  cursor: pointer;
}
.stbar {
  display: flex;
  height: 10px;
  width: 140px;
  background: #E6E6E3;
  border: 1px solid #B5B5B5;
}
.stbar i,.sttrack i,.stlegend i {
  display: block;
  height: 100%;
}
.stbar i.a,.sttrack i.a,.stlegend i.a {
  background: #2E7D32;
}
.stbar i.i,.sttrack i.i,.stlegend i.i {
  background: #E0B000;
}
.stbar i.h,.sttrack i.h,.stlegend i.h {
  background: #9A9A95;
}
.stlegend {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: .85rem;
  flex-wrap: wrap;
}
.stlegend i {
  width: 14px;
  height: 10px;
  display: inline-block;
  margin-left: 8px;
}
.stlegend i.n {
  background: #F1F1EE;
  border: 1px solid #B5B5B5;
}
.sttl {
  display: grid;
  gap: 6px;
  padding-top: 6px;
  overflow-x: auto;
}
.sttick {
  position: relative;
  height: 16px;
  margin-left: 150px;
  font: 600 .72rem "JetBrains Mono",monospace;
  color: #555;
  min-width: 500px;
}
.sttick span {
  position: absolute;
  transform: translateX(-50%);
}
.strow {
  display: grid;
  grid-template-columns: 140px minmax(500px,1fr);
  gap: 10px;
  align-items: center;
}
.strow b {
  font-family: "Noto Serif",Georgia,serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sttrack {
  position: relative;
  height: 22px;
  background: #F1F1EE;
  border: 1px solid #B5B5B5;
}
.sttrack i {
  position: absolute;
  top: 0;
  bottom: 0;
}

/* Phones: the Statistics period buttons */
@media (max-width:700px) {
  .stctl .sqtiers.sm {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}

/* Steel Jobs: warm stone gray (never blue). Line types: material black, shop orange, field rust, outside amber-brown. */
.ty.s {
  background: #57534E;
  color: #fff;
}
.sqsec.s>h3 {
  background: #44403C;
}
.sqpick button.k-steel {
  border-top-color: #57534E;
}
.sqtiers.sm.sq4 {
  grid-template-columns: repeat(4,minmax(0,1fr));
  max-width: 560px;
}
.sqsplit.s3 {
  grid-template-columns: repeat(3,1fr);
}
.sqsplit .s i {
  background: #57534E;
}
.stl {
  border: 1px solid #8C8C8C;
  border-left: 6px solid #1F1F1F;
  background: #fff;
  padding: 8px 10px;
  display: grid;
  gap: 8px;
}
.stl.c-shop {
  border-left-color: #C2410C;
}
.stl.c-field {
  border-left-color: #7C2D12;
}
.stl.c-out {
  border-left-color: #A16207;
}
.stlh {
  display: grid;
  grid-template-columns: 28px minmax(130px,190px) minmax(0,2fr) minmax(0,1fr);
  gap: 8px;
  align-items: end;
}
.stlh .pqf.wide {
  grid-column: auto;
}
.stn {
  font: 700 .9rem "JetBrains Mono",monospace;
  color: #555;
  padding-bottom: 10px;
}
.stlf {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed #B5B5B5;
  padding-top: 6px;
}
.stc {
  font-size: .9rem;
  color: #333;
}
.stc b {
  font-family: "JetBrains Mono",monospace;
}
.stc small {
  color: #555;
}
.stlact {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pq .btn.sm {
  min-height: 34px;
  padding: 0 10px;
  font-size: .82rem;
}
.stwarn {
  display: inline-block;
  background: #FFF2CC;
  border: 1px solid #D9B44A;
  color: #7A3E00;
  font-size: .8rem;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 3px;
}
.stro {
  min-height: 40px;
  display: flex;
  align-items: center;
  font: 600 .95rem "JetBrains Mono",monospace;
  color: #111;
}
.stadd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sttpl {
  align-items: end;
}
.sjgrp {
  border: 1px solid #B5B5B5;
  background: #FAFAF8;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.sjgrpt {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .9rem;
}
.sjgrpt b {
  font-family: "JetBrains Mono",monospace;
}
.sjgrpt b small {
  font-weight: 600;
  color: #555;
}
.stcost {
  min-width: 0;
}

/* Phones: steel line items and groups stack */
@media (max-width:700px) {
  .stlh {
    grid-template-columns: minmax(0,1fr);
  }
  .stlh>*,.stlh>.pqf.wide {
    grid-column: 1/-1;
  }
  .stn {
    padding: 0;
  }
  .stl .pqgrid,.sjgrp .pqgrid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .stl .pqgrid .pqf.wide,.sjgrp .pqgrid .pqf:first-child {
    grid-column: 1/-1;
  }
  .sqtiers.sm.sq4 {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .sqsplit.s3 {
    grid-template-columns: 1fr;
  }
  .stlf {
    flex-direction: column;
    align-items: stretch;
  }
  .stlact {
    justify-content: flex-end;
  }
}

/* Steel bid printout: scope lists, totals table and signature lines */
@media print {
  body.pq-printing .stp h2 {
    font: 800 12pt "Source Sans 3",Arial,sans-serif;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 2px solid #000;
    margin: 14px 0 6px;
  }
  body.pq-printing .stp h3 {
    font: 700 10.5pt "Source Sans 3",Arial,sans-serif;
    margin: 10px 0 2px;
  }
  body.pq-printing .stp ul {
    margin: 0 0 4px;
    padding-left: 20px;
  }
  body.pq-printing .stp li {
    margin: 1px 0;
  }
  body.pq-printing .stpto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  body.pq-printing .stpto small {
    display: block;
    text-transform: uppercase;
    font-size: 8.5pt;
    letter-spacing: .06em;
    color: #333;
  }
  body.pq-printing .stpt {
    margin-top: 14px;
  }
  body.pq-printing .stpt td {
    font-size: 11.5pt;
  }
  body.pq-printing .stsig {
    display: flex;
    gap: 24px;
    margin-top: 30px;
  }
  body.pq-printing .stsig>div {
    flex: 1;
    border-top: 1px solid #000;
    padding-top: 3px;
    font-size: 9pt;
  }
}
/* Statistics: Owed to ship (unique class names: lq*) */
.pqkpis.lqk .ltot {
  background: #FFF2CC;
}
/* the headline "Owed to ship" box: two boxes wide so the big amount always fits; the number shrinks on narrow screens */
.pqkpis.lqk .ltot {
  grid-column: span 2;
}
.pqkpis.lqk .ltot b {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  white-space: nowrap;
}
.pqkpis b {
  overflow-wrap: anywhere;
}
.pqkpis.lqk>div small:last-child {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: #555;
}
.pqkpis.lqk .lopen {
  background: #F3F3F1;
}
.pqrow>.pqst {
  white-space: normal;
  max-width: 100%;
  line-height: 1.3;
  text-align: center;
}

/* ── Powder Stock tab (Shop Quotes) + on-hand line under a quote's powder coat */
.psrow {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0,1fr) 160px 90px 90px 150px;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  font: inherit;
  color: #111;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #B5B5B5;
  padding: 9px 12px;
  cursor: pointer;
}
.psrow:hover,.psrow.open {
  background: #FFF8E6;
}
.psrow:focus-visible {
  outline: 2px solid #C2410C;
  outline-offset: -2px;
}
.psrow.pqhdr {
  background: var(--look-head-bg-paint, var(--look-head-bg, #1F1F1F));
  color: var(--look-head-text, #fff);
  font: 700 .78rem "Source Sans 3",system-ui,sans-serif;
  cursor: default;
  padding: 7px 12px;
}
.psrow.pqhdr:hover {
  background: var(--look-head-bg-paint, var(--look-head-bg, #1F1F1F));
}
.psrow b {
  font-family: "Noto Serif",Georgia,serif;
}
.psrow small {
  display: block;
  color: #444;
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pst {
  font-family: "JetBrains Mono",monospace;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pst small {
  font-family: "Source Sans 3",system-ui,sans-serif;
  font-weight: 400;
}
.psst {
  display: inline-block;
  font: 700 .68rem "Source Sans 3",system-ui,sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 4px;
  vertical-align: middle;
}
.psst.low {
  background: #FFF2CC;
  color: #111;
  box-shadow: inset 0 0 0 1px #D9B44A;
}
.psst.out {
  background: #7F1D1D;
  color: #fff;
}
.psdet {
  background: #FAFAF8;
  border-bottom: 2px solid #1F1F1F;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.psacts {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 10px;
}
.psact {
  display: flex;
  gap: 8px;
  align-items: end;
}
.psact .pqf {
  flex: 1;
}
.pslog {
  display: grid;
  font-size: .86rem;
}
.pslog>div {
  display: grid;
  grid-template-columns: 170px minmax(0,1fr) 90px 80px;
  gap: 8px;
  border-bottom: 1px solid #E6E6E3;
  padding: 4px 0;
}
.pslog b,.pslog span:last-child {
  font-family: "JetBrains Mono",monospace;
  text-align: right;
  font-weight: 600;
}
.psmob {
  display: none;
  font-style: normal;
}
.psinfo {
  grid-column: 1/-1;
  font-size: .86rem;
  color: #222;
  background: #fff;
  border: 1px solid #D4D4D0;
  border-left: 4px solid #8C8C8C;
  padding: 6px 8px;
}
.psinfo.low {
  border-left-color: #F59E0B;
}
.psinfo.short {
  border-left-color: #B42318;
  background: #FDECEA;
}
.psinfo strong {
  color: #B42318;
}

/* Phones: Powder Stock rows show only color and on hand */
@media (max-width:700px) {
  .psrow {
    grid-template-columns: minmax(0,1fr) auto;
  }
  .psrow>span:nth-child(3),.psrow>span:nth-child(4),.psrow>span:nth-child(5) {
    display: none;
  }
  .psmob {
    display: inline;
  }
  .pslog>div {
    grid-template-columns: minmax(0,1fr) auto auto;
  }
  .pslog>div>span:first-child {
    grid-column: 1/-1;
    color: #555;
  }
}

/* Powder Stock: short for open orders (red), and the filter buttons */
.pst.psneg {
  color: #B42318;
}
.sqtiers.sm.sq5 {
  grid-template-columns: repeat(5,minmax(0,1fr));
  max-width: 760px;
}

/* Powder Stock: the Powder per kit (Steering & Fab) section */
.pskits>summary {
  list-style: none;
  cursor: pointer;
  margin: 0 -14px;
}
.pskits>summary::-webkit-details-marker {
  display: none;
}
.pskits>summary h3 {
  margin: 0;
  background: var(--look-head-bg-paint, var(--look-head-bg, #1F1F1F));
  color: var(--look-head-text, #fff);
  font: 700 .9rem "Source Sans 3",system-ui,sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 8px 14px;
}
.pskits>summary h3::before {
  content: "+ ";
}
.pskits[open]>summary h3::before {
  content: "\2212  ";
}
.pskit {
  display: grid;
  grid-template-columns: minmax(0,1fr) 130px 120px 90px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #E6E6E3;
  padding: 6px 0;
}
.pskit.pqhdr {
  font: 700 .78rem "Source Sans 3",system-ui,sans-serif;
  color: #333;
  border-bottom: 2px solid #1F1F1F;
}
.pskit small {
  display: block;
  color: #555;
  font-size: .8rem;
}
/* Powder weights per product (v111): product · lb for one · No powder button */
.pskit.pswt {
  grid-template-columns: minmax(0,1fr) 130px 130px;
}
.pswt .btn {
  padding: 4px 10px;
  font-size: .85rem;
}
.pswt small.psneg {
  color: #8A1C08;
  font-weight: 600;
}
.pswtneed>h3 {
  margin: 0 0 4px;
}

/* Phones: powder weight rows (the No powder button drops to its own line) */
@media (max-width:700px) {
  .pskit.pswt {
    grid-template-columns: minmax(0,1fr) 100px;
  }
  .pskit.pswt>span:nth-child(3) {
    display: block;
    grid-column: 1 / -1;
  }
}

/* Phones: Powder per kit rows */
@media (max-width:700px) {
  .sqtiers.sm.sq5 {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .pskit {
    grid-template-columns: minmax(0,1fr) 100px;
  }
  .pskit>span:nth-child(3),.pskit>span:nth-child(4) {
    display: none;
  }
}
/* Prismatic order emails list (Powder Stock) */
.psmail .psmrow {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 4px 12px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.psmail .psmrow small {
  display: block;
  color: var(--muted);
  font-size: .85rem;
}
.psmail .psmrow>span:first-child {
  color: var(--muted);
  font-size: .85rem;
}
.psst.ok {
  background: #C6EFCE;
  color: #1E5E36;
}
.psst.bad {
  background: #F8CBAD;
  color: #7A1C12;
}

/* Phones: Prismatic email rows */
@media (max-width:600px) {
  .psmail .psmrow {
    grid-template-columns: 1fr auto;
  }
  .psmail .psmrow>span:first-child {
    grid-column: 1/-1;
  }
}

/* ── Website Requests tab (js/fabreq.js) + Fab Site tab (js/fabsite.js). Same sheet look as the rest of Shop Quotes. */
.frtabn {
  display: inline-block;
  margin-left: 6px;
  background: #C2410C;
  color: #fff;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
  padding: 0 7px;
  line-height: 1.45rem;
  vertical-align: middle;
}
.frtabn[hidden] {
  display: none;
}

/* Phones: the tab says Requests instead of Website Requests; the Powder Stock tab may wrap so its count badge fits */
@media (max-width:760px) {
  .frlong {
    display: none;
  }
  #pqstocktab {
    white-space: normal;
    line-height: 1.15;
    padding: 0 4px;
  }
  #pqstocktab .frtabn {
    margin-left: 3px;
  }
}

/* Website Requests: filters, request cards, photos, decline box */
.pq .frbar0 {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pq .frbar {
  display: flex;
  gap: 14px 26px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.pq .frfg {
  display: grid;
  gap: 6px;
}
.pq .frfg>span {
  font: 700 .75rem "Source Sans 3",system-ui,sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7A5A00;
}
.pq .frchips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.pq .frchip {
  font: 600 .9rem "Source Sans 3",system-ui,sans-serif;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #8C8C8C;
  background: #fff;
  color: #111;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pq .frchip[aria-pressed="true"] {
  background: #1F1F1F;
  border-color: #1F1F1F;
  color: #fff;
}
.pq .frchip:focus-visible {
  outline: 3px solid #F59E0B;
  outline-offset: 2px;
}
.pq .frcount {
  background: #C2410C;
  color: #fff;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
  padding: 0 6px;
  line-height: 1.3rem;
}
.pq .frsheet {
  display: block;
}
.pq .frhead {
  background: var(--look-head-bg-paint, var(--look-head-bg, #1F1F1F));
  color: var(--look-head-text, #fff);
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
}
.pq .frhead h3 {
  margin: 0;
  font: 700 1.05rem "Noto Serif",Georgia,serif;
  text-transform: none;
  letter-spacing: 0;
}
.pq .frhead span {
  font-size: .85rem;
  color: #CFCFCF;
}
.pq .frreq {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 14px;
  padding: 12px;
  border-bottom: 1px solid #B5B5B5;
  background: #fff;
}
.pq .frreq:last-child {
  border-bottom: 0;
}
.pq .frreq.isnew {
  background: #FFF4EC;
  box-shadow: inset 4px 0 0 #C2410C;
}
.pq .frreq.focus {
  outline: 3px solid #F59E0B;
  outline-offset: -3px;
}
.pq .frthumbs {
  display: flex;
  gap: 4px;
  align-items: flex-start;
}
.pq .frph {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid #B5B5B5;
  background: #EFEFEC;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0;
}
.pq .frph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pq .frfb {
  width: 64px;
  height: 64px;
  border: 1px solid #B5B5B5;
  background: #F6F6F4;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 .78rem "Source Sans 3",system-ui,sans-serif;
  color: #555;
}
.pq .frinfo {
  display: grid;
  gap: 5px;
  min-width: 0;
  align-content: start;
}
.pq .frtop {
  display: flex;
  gap: 6px 12px;
  flex-wrap: wrap;
  align-items: center;
}
.pq .frname {
  font-weight: 700;
  font-size: 1.05rem;
}
.pq .frmuted {
  font-size: .85rem;
  color: #555;
}
.pq .frbad {
  color: #9B1C1C;
  font-weight: 600;
}
.pq .frtest {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border: 1px dashed #555;
  border-radius: 3px;
  color: #333;
}
.pq .frkeep {
  font-size: .8rem;
  color: #555;
}
.pq .frkeep.soon {
  color: #9B1C1C;
  font-weight: 700;
}
.pq .frwhat {
  margin: 0;
  color: #333;
}
.pq .frspecs {
  display: flex;
  gap: 2px 14px;
  flex-wrap: wrap;
  font-size: .88rem;
  color: #333;
}
.pq .frspecs b {
  color: #111;
}
.pq .frspecs a {
  color: #9A3412;
  font-weight: 700;
}
.pq .frfiles {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.pq .frcontact {
  display: flex;
  gap: 2px 14px;
  flex-wrap: wrap;
  font-size: .9rem;
  font-weight: 600;
}
.pq .frcontact span {
  user-select: all;
}
.pq .frq {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: .9rem;
  font-weight: 600;
}
.pq .fracts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
}
.pq .frdanger {
  color: #9B1C1C;
  border-color: #9B1C1C;
}
.pq .frrow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.pq .frrow.end {
  justify-content: flex-end;
}
.pq .frtestbox .pqgrid {
  grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
}
.pq .frscrim {
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,.45);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px max(16px,env(safe-area-inset-right,0px)) 16px max(16px,env(safe-area-inset-left,0px));
}
.pq .frmodal {
  background: #fff;
  border: 1px solid #8C8C8C;
  width: 100%;
  max-width: 560px;
  max-height: calc(100% - 32px);
  overflow: auto;
}
.pq .frmbody {
  padding: 14px;
  display: grid;
  gap: 12px;
}
.pq .frmbody textarea {
  min-height: 190px;
  font: inherit;
  line-height: 1.45;
}

/* Phones: request cards stack */
@media (max-width:760px) {
  .pq .frreq {
    grid-template-columns: 1fr;
  }
  .pq .fracts {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }
}

/* Fab Site tab: save state, blocks, alert chips, service and page editors, hours, photos */
.pq .fsstate {
  font-size: .85rem;
  font-weight: 700;
  color: #14632F;
}
.pq .fsstate.dirty {
  color: #C2410C;
}
.pq .fsblock {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}
.pq .fschips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.pq .fschip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #F6F6F4;
  border: 1px solid #8C8C8C;
  border-radius: 16px;
  padding: 2px 4px 2px 12px;
  font-size: .9rem;
  font-weight: 600;
  min-height: 34px;
}
.pq .fschip button {
  background: none;
  border: 0;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.1rem;
  color: #555;
}
.pq .fschip button:hover {
  background: #E6E6E3;
  color: #111;
}
.pq .fsadd {
  max-width: 320px;
}
.pq .fsroute {
  display: grid;
  grid-template-columns: 200px minmax(0,1fr);
  gap: 6px 14px;
  align-items: center;
  border-top: 1px solid #E6E6E3;
  padding-top: 8px;
}
.pq .fsroute span {
  display: grid;
}
.pq .fsroute small {
  color: #555;
}
.pq .fscheck {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
}
.pq .fscheck input {
  width: 18px;
  height: 18px;
  accent-color: #C2410C;
}
.pq .fslight {
  color: #fff;
  text-transform: none;
  letter-spacing: 0;
  font-size: .85rem;
}
.pq .fssvcbar {
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pq .fssvcbar .btn {
  text-transform: none;
  letter-spacing: 0;
  min-height: 0;
  padding: 4px 10px;
}
.pq .fsfull {
  grid-column: 1/-1;
}
.pq .fspgtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 10px;
}
.pq .fspgtabs .btn[aria-pressed="true"] {
  background: #1F1F1F;
  color: #fff;
  border-color: #1F1F1F;
}
.pq .fsfaq {
  border-top: 1px solid #E2DED8;
  padding-top: 10px;
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.pq #fspages > .pqf {
  margin-top: 10px;
}
.pq .fshours {
  display: grid;
  gap: 6px;
}
.pq .fshr {
  display: grid;
  grid-template-columns: 110px 80px 140px auto 140px;
  justify-content: start;
  gap: 8px;
  align-items: center;
}
.pq .fscontact {
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
}
.pq .fsslots {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(170px,1fr));
  gap: 12px;
}
.pq .fsslots.two {
  grid-template-columns: repeat(2,minmax(0,1fr));
  max-width: 420px;
}
.pq .fsslot {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.pq .fsimg {
  aspect-ratio: 4/3;
  max-width: 100%;
  border: 1px solid #B5B5B5;
  background: #EFEFEC;
  background-image: repeating-linear-gradient(135deg,rgba(0,0,0,.05) 0 2px,transparent 2px 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: .8rem;
  font-weight: 700;
  color: #555;
  overflow: hidden;
  padding: 6px;
}
.pq .fsimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pq .fsup,.pq .fsaddph {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pq .fsup input,.pq .fsaddph input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.pq .fsaddph {
  aspect-ratio: 4/3;
  max-width: 100%;
  border: 2px dashed #8C8C8C;
  font-weight: 700;
  color: #555;
  cursor: pointer;
}
.pq .fsba {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #E6E6E3;
}

/* Phones: Fab Site rows stack */
@media (max-width:760px) {
  .pq .fsroute {
    grid-template-columns: 1fr;
  }
  .pq .fshr {
    grid-template-columns: 1fr 1fr;
  }
  .pq .fshr>span {
    display: none;
  }
}

/* ── Fab Site → Website traffic card (js/fabtraffic.js). Bars use the database's action-button color (Admin → Look). */
.pq .fstrbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pq .fstrbar .fspgtabs {
  margin: 0;
}
.pq .fstrtiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.pq .fstrtile {
  border: 1px solid #D5DADE;
  border-radius: 4px;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  background: #F7F8F9;
}
.pq .fstrtile b {
  font: 800 2rem/1 "Saira Condensed", "Arial Narrow", Arial, sans-serif;
}
.pq .fstrtile span {
  font-weight: 700;
}
.pq .fstrtile small {
  color: #5D6670;
}
.pq .fstrchart {
  display: grid;
  gap: 6px;
}
.pq .fstrchartlabel {
  font-weight: 700;
}
.pq .fstrbars {
  height: 160px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  border-bottom: 1px solid #8C8C8C;
  padding-top: 14px;
}
.pq .fstrcol {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}
.pq .fstrcol:hover .fstrbarfill {
  filter: brightness(1.25);
}
.pq .fstrbarfill {
  width: 100%;
  min-height: 1px;
  border-radius: 2px 2px 0 0;
  background: var(--look-action, #1A3FA9);
}
.pq .fstrdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2E7D4F;
  margin-bottom: 3px;
  flex: none;
}
.pq .fstraxis {
  display: flex;
  justify-content: space-between;
  color: #5D6670;
  font-size: .85rem;
}
.pq .fstrlists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.pq .fstrlist h4 {
  margin: 0 0 8px;
}
.pq .fstrlist ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pq .fstrrow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.pq .fstrrow span small {
  display: block;
  color: #5D6670;
  font-size: .8rem;
}
.pq .fstrrow b {
  white-space: nowrap;
}
.pq .fstrrow b small {
  color: #5D6670;
  font-weight: 400;
}
.pq .fstrtrack {
  height: 6px;
  background: #E5E8EB;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 3px;
}
.pq .fstrtrack div {
  height: 100%;
  background: var(--look-action, #1A3FA9);
}
.pq .fstrfoot {
  font-size: .85rem;
}

/* ───────── Statistics page: Sales & money, Team & time, Vendors & POs (js/stats-more.js, v144) ───────── */
.smr-help {
  margin: 0 0 10px;
  color: #555;
}
.smr-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}
.smr-tile {
  flex: 1 1 180px;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #E0DDD6;
  border-radius: 6px;
  background: #FAFAF8;
}
.smr-tile span {
  font-size: .78rem;
  text-transform: uppercase;
  color: #555;
}
.smr-tile b {
  font-size: 1.45rem;
}
.smr-tile small {
  color: #666;
}
.smr-up {
  color: #15803D;
}
.smr-down {
  color: #C8102E;
}
.smr-g2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
.smr-g2 > div {
  min-width: 0;
  overflow-x: auto;
}
#stmore .pqcard {
  max-width: 100%;
  box-sizing: border-box;
}
.smr-g2 h4 {
  margin: 4px 0 6px;
}
.smr-t {
  width: 100%;
}
.smr-bar {
  display: inline-block;
  width: 100px;
  height: 8px;
  background: #EEE;
  border-radius: 4px;
  overflow: hidden;
  vertical-align: middle;
}
.smr-bar i {
  display: block;
  height: 100%;
  background: #C2410C;
}
@media (max-width:860px) {
  .smr-g2 {
    grid-template-columns: 1fr;
  }
  .smr-bar {
    width: 60px;
  }
}

/* Tuning page (/tuning.html, v145): the truck and transmission pickers hold long names, so on a phone they shrink to
   the screen instead of pushing the page sideways. */
#tuview .pqbar > .pqf {
  max-width: 100%;
}
#tuview select.ein {
  max-width: 100%;
  min-width: 0;
}
/* Its tables have only 2–5 short columns, so they don't need the 760 px minimum other tables use. */
#tuview .pqjobs {
  min-width: 0;
}
#tuview .pqcard {
  min-width: 0;
}
/* Tuning page (v147): a label line with an ⓘ; the explanation pops up on hover, or on tap (focus) on a phone. */
#tuview .tulabel {
  display: flex;
  align-items: center;
  gap: 6px;
}
#tuview .tuhelp {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #8C8C8C;
  font: 700 .72rem "Source Sans 3", system-ui, sans-serif;
  color: #333;
  background: #fff;
  cursor: help;
  text-transform: none;
  letter-spacing: 0;
}
#tuview .tuhelp:hover::after,
#tuview .tuhelp:focus::after {
  content: attr(data-help);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 50;
  width: min(300px, 80vw);
  padding: 8px 10px;
  border: 1px solid #1F1F1F;
  border-radius: 6px;
  background: #fff;
  color: #1F1F1F;
  font: 400 .85rem/1.35 "Source Sans 3", system-ui, sans-serif;
  text-align: left;
  white-space: normal;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
#tuview .tuhelp:focus {
  outline: 2px solid #1F1F1F;
}
#tuview #tucopytext {
  display: block;
  width: 100%;
  margin-top: 6px;
}
/* On a phone the explanation shows as a strip along the bottom of the screen, so it never runs off the edge. */
@media (max-width: 700px) {
  #tuview .tuhelp:hover::after,
  #tuview .tuhelp:focus::after {
    position: fixed;
    left: 4vw;
    right: 4vw;
    top: auto;
    bottom: 16px;
    width: auto;
  }
}
/* Tuning page (v148): the Build sheet's section headings (Fuel, Air, Engine limits, Drivetrain, Use and notes). */
#tuview .tugroup {
  margin: 16px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #D0D0D0;
  font: 700 .8rem "Source Sans 3", system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #333;
}
/* Tuning page (v148): the picked saved setup's notes and file. */
#tuview .tusetupdetail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #D0D0D0;
}
#tuview #tusetupnotes {
  width: 100%;
}
#tuview #tusetups label.btn {
  cursor: pointer;
}
/* Tuning page (v148): Coach step chips, the step card and the advice list. */
#tuview .tusteps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
#tuview .tustep {
  padding: 6px 10px;
  border: 1px solid #8C8C8C;
  border-radius: 999px;
  background: #fff;
  font: 600 .82rem "Source Sans 3", system-ui, sans-serif;
  color: #1F1F1F;
  cursor: pointer;
}
#tuview .tustep[aria-pressed="true"] {
  background: #1F1F1F;
  border-color: #1F1F1F;
  color: #fff;
}
#tuview .tustepcard {
  padding: 10px 12px;
  border: 1px solid #D0D0D0;
  border-radius: 6px;
  background: #FAFAFA;
}
#tuview .tuadvice {
  margin: 6px 0 0;
  padding-left: 0;
  list-style: none;
}
#tuview .tuadvice li {
  margin: 4px 0;
  padding: 8px 10px;
  border-left: 4px solid #8C8C8C;
  background: #F6F6F6;
}
#tuview .tuadvice .tuadvice-stop {
  border-left-color: #B42318;
  background: #FDECEA;
}
#tuview .tuadvice .tuadvice-change {
  border-left-color: #B54708;
  background: #FFF4E5;
}
#tuview .tuadvice .tuadvice-done {
  border-left-color: #067647;
  background: #ECFDF3;
}
#tuview #tusess-notes {
  width: 100%;
}

/* =====================================================================================================================
   Tuning Handbook (tuning-handbook.html, owners only, app version 149). The text is built from docs/tuning-handbook.md
   by tools/build-tuning-handbook.py. Screen look first, then the print look used by Print and Save as PDF.
   ===================================================================================================================== */
/* The page sits in the Shop Quotes grid; min-width 0 keeps wide tables from pushing it past a phone screen. */
#tuhbview,
#tuhbview #tuhbpage {
  min-width: 0;
  max-width: 100%;
}
#tuhbview .tuhbtools {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  background: var(--bg, #fff);
}
#tuhbview .tuhbtext {
  max-width: 860px;
  margin: 0 auto 60px;
  font-family: "Noto Serif", Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
  min-width: 0;
}
#tuhbview .tuhbtext h1 {
  font-family: "Saira Condensed", sans-serif;
  font-size: 34px;
  margin: 18px 0 6px;
}
#tuhbview .tuhbtext h2 {
  font-family: "Saira Condensed", sans-serif;
  font-size: 26px;
  margin: 34px 0 8px;
  padding-top: 8px;
  border-top: 2px solid var(--line, #ddd);
}
#tuhbview .tuhbtext h3 {
  font-family: "Saira Condensed", sans-serif;
  font-size: 20px;
  margin: 22px 0 6px;
}
#tuhbview .tuhbtext table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0 18px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  line-height: 1.4;
}
#tuhbview .tuhbtext th,
#tuhbview .tuhbtext td {
  border: 1px solid var(--line, #ccc);
  padding: 6px 8px;
  vertical-align: top;
  text-align: left;
  min-width: 110px;
}
#tuhbview .tuhbtext th {
  background: var(--soft, #f2f2f2);
}
#tuhbview .tuhbtext code {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  word-break: break-all;
}
#tuhbview .tuhbtext .formula {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent, #c33);
  background: var(--soft, #f6f6f6);
  overflow-x: auto;
}
#tuhbview .tuhbtext ul,
#tuhbview .tuhbtext ol {
  padding-left: 24px;
}
/* The fuel chain diagram in section 1: boxes in rows with arrows between. */
#tuhbview .chain {
  margin: 14px 0 18px;
  font-family: "Source Sans 3", sans-serif;
  text-align: center;
}
#tuhbview .chain-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
#tuhbview .chain-box {
  display: inline-block;
  min-width: 150px;
  padding: 8px 12px;
  border: 2px solid var(--line, #999);
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
}
#tuhbview .chain-box small {
  display: block;
  font-weight: 400;
  font-size: 13px;
}
#tuhbview .chain-box.main {
  border-color: var(--accent, #c33);
}
#tuhbview .chain-box.side {
  border-style: dashed;
}
#tuhbview .chain-arrow {
  font-size: 22px;
  line-height: 1.2;
}

@media print {
  /* Only the handbook prints: the top bar, sign-in screen, people circles, chat button and pop-ups (all added straight
     to <body>) and the button row are hidden. */
  body.pq-page:has(#tuhbview) > *:not(main),
  #tuhbview .tuhbtools {
    display: none !important;
  }
  /* app.css hides everything but #printarea when printing; the handbook prints from <main> instead. */
  body.pq-page:has(#tuhbview) > main {
    display: block !important;
  }
  body.pq-page,
  #tuhbview {
    background: #fff !important;
    color: #000 !important;
  }
  #tuhbview .tuhbtext {
    max-width: none;
    margin: 0;
    font-size: 11pt;
    color: #000;
  }
  #tuhbview .tuhbtext h2 {
    break-before: page;
    border-top: none;
  }
  #tuhbview .tuhbtext h2:first-of-type {
    break-before: auto;
  }
  #tuhbview .tuhbtext h2,
  #tuhbview .tuhbtext h3 {
    break-after: avoid;
  }
  #tuhbview .tuhbtext table {
    display: table;
    overflow: visible;
    font-size: 9pt;
  }
  #tuhbview .tuhbtext tr,
  #tuhbview .chain,
  #tuhbview .tuhbtext .formula {
    break-inside: avoid;
  }
  #tuhbview .tuhbtext th,
  #tuhbview .tuhbtext td {
    min-width: 0;
    border-color: #888;
  }
  #tuhbview .tuhbtext a {
    color: #000;
  }
  #tuhbview .tuhbtext a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    word-break: break-all;
  }
}

/* Tuning page Truck card (v151): a facts tile showing the Build sheet's part instead of the factory one. */
#tuview .tubuild {
  border-left: 3px solid var(--accent, #c33);
}
#tuview .tutag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--accent, #c33);
  color: #fff;
  font-size: 11px;
  text-transform: none;
}
#tuview .tufactory {
  display: block;
  margin-top: 2px;
  opacity: 0.75;
}
#tuview input.ein:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

/* Tuning page Map helper (v151): the colored grid, outlined cells for the Coach's step, changed cells marked. */
#tuview .tumapgrid table {
  font-size: 12px;
}
#tuview .tumapgrid td,
#tuview .tumapgrid th {
  padding: 3px 5px;
  white-space: nowrap;
}
#tuview .tumapgrid td small {
  display: block;
  font-size: 10px;
  opacity: 0.6;
  text-decoration: line-through;
}
#tuview .tumapgrid td.tumapin {
  outline: 2px solid #15191e;
  outline-offset: -2px;
}
#tuview .tumapgrid td.tumapchanged {
  font-weight: 700;
}
#tuview #tumap-text,
#tuview #tulog-paste {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  width: 100%;
}
#tuview .tulogcolumns summary {
  cursor: pointer;
  margin: 8px 0;
}

/* Tuning page (v154): "How to use this card" panels (tuning-guides.js) and the Tune sheet card (tuning-sheet.js). */
.tuguide {
  margin: 0 0 10px;
  border: 1px solid #d8dde0;
  border-radius: 6px;
  background: #f6f8f9;
  font-size: 0.92em;
}
.tuguide > summary {
  cursor: pointer;
  padding: 6px 10px;
  font-weight: 600;
  color: #2a6f79;
}
.tuguide[open] > summary {
  border-bottom: 1px solid #d8dde0;
}
.tuguide p,
.tuguide ul {
  margin: 6px 10px;
}
.tuguide ul {
  padding-left: 18px;
}
.tusheetlist {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}
.tusheetrow {
  border: 1px solid #d8dde0;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.tusheetrow .pqmuted {
  margin-left: 6px;
}
.tusheettext {
  max-height: 140px;
  overflow: auto;
  margin: 6px 0 0;
  padding: 6px;
  background: #f6f8f9;
  font-size: 0.8em;
  white-space: pre;
}
@media print {
  #printarea .tusheettext {
    max-height: none;
    overflow: visible;
    background: none;
  }
}

/* Build My Tune (v157): the blue buttons (also on the Tuning page's tool bar), the paste boxes and the truck facts. */
.btn.tublue {
  background: #1f6fb2;
  border-color: #1f6fb2;
  color: #fff;
}
.btn.tublue:hover:not([disabled]) {
  background: #185a92;
  border-color: #185a92;
}
.btn.tublue[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.tbbig {
  font-size: 1.15em;
  padding: 12px 22px;
}
#tbview .tbslot {
  border-top: 1px solid #e3e7e9;
  padding-top: 8px;
  margin-top: 8px;
}
#tbview .tbpaste {
  width: 100%;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8em;
}
#tbview .tbfacts {
  margin: 6px 0 10px;
  padding-left: 18px;
}

/* Tuning pages (v158): link buttons (<a class="btn">: Build My Tune, Handbook, Back to Tuning…) look like the real
   buttons beside them: text centered both ways, no underline. */
#tuview a.btn,
#tuhbview a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  line-height: normal;
}

/* =====================================================================================================================
   Tuning pages: plain background (Tony, Nov 15 2026, look "C"). On tuning.html, tuning-build.html and tuning-handbook.html
   (<html class="tuplainbg">) the site's Admin → Look background picture is turned off and the page gets one solid,
   slightly darker white that never moves, so the text is easy to read while scrolling. The Look colors (top bar,
   turquoise card headers, buttons) are untouched. The Handbook's sections each sit in a white bordered box
   (tuning-handbook.js wrapSectionsInBoxes makes <section class="tuhbbox"> around each h2 and what follows it).
   ===================================================================================================================== */
html.tuplainbg,
html.tuplainbg.look-has-bg {
  background: #E4E7EB;
}
html.tuplainbg.look-has-bg::before,
html.tuplainbg.look-has-bg::after {
  display: none;
}
html.tuplainbg body,
html.tuplainbg body.pq-page {
  background: #E4E7EB;
  --bg: #E4E7EB;
}
#tuhbview .tuhbtext .tuhbbox {
  background: #fff;
  border: 1px solid #C9D0D8;
  border-radius: 12px;
  padding: 4px 18px 14px;
  margin: 16px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  min-width: 0;
}
/* Inside a box the section heading no longer needs its own line above it. */
#tuhbview .tuhbtext .tuhbbox > h2:first-child {
  border-top: none;
  margin-top: 12px;
}
@media (max-width: 600px) {
  #tuhbview .tuhbtext .tuhbbox {
    padding: 2px 12px 10px;
  }
}
@media print {
  html.tuplainbg,
  html.tuplainbg body {
    background: #fff !important;
  }
  /* Printed: no boxes, and each section starts a new page like before (the first one doesn't). */
  #tuhbview .tuhbtext .tuhbbox {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    break-before: page;
  }
  #tuhbview .tuhbtext .tuhbbox:first-of-type {
    break-before: auto;
  }
  #tuhbview .tuhbtext .tuhbbox > h2 {
    break-before: auto;
  }
}
