/* Certificates page and the review screen's "What we read" side, per the Cert IQ handoff
   (Certificates ~923-1050, review ~1061-1154). Tokens: README.md of the handoff. */
.cert-tiles[hidden] { display: none; }
.cert-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 0 18px; }
@media (max-width: 560px) { .cert-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.cert-tile { display: flex; flex-direction: column; text-align: left; min-width: 0; cursor: pointer; padding: 20px 22px; background: #fff;
  border: 2px solid #222; border-left-width: 6px; border-radius: 12px; box-shadow: 4px 4px 0 #E5E8E7; font: inherit; color: #444; }
.cert-tile:focus-visible { outline: 2px solid #DA720F; outline-offset: 2px; }
.cert-tile[aria-pressed="true"] { box-shadow: 4px 4px 0 #222; }
.cert-tile-teal { background: #EEF7F8; border-left-color: #007681; }
.cert-tile-green { background: #F7F7EC; border-left-color: #949300; }
.cert-tile-orange { background: #FFF8F0; border-left-color: #DA720F; }
.cert-tile-red { border-left-color: #D14124; }
.cert-tile-label { font-size: 13px; }
.cert-tile-count { font: 400 38px/1 Roboto, Arial, sans-serif; margin: 14px 0 10px; color: #222; }
.cert-tile-teal .cert-tile-count { color: #007681; }
.cert-tile-green .cert-tile-count { color: #5E5D00; }
.cert-tile-orange .cert-tile-count { color: #B85E05; }
.cert-tile-red .cert-tile-count { color: #9C2F19; }
.cert-tile-note { font-size: 12px; line-height: 1.5; }
.cert-tile-go { margin-top: 10px; font-size: 13px; font-weight: 500; color: #B85E05; }

#cert-table th.wb-check, #cert-table td.wb-check { width: 36px; padding-right: 0; }
.cert-group-row td { background: #F9F9F9; border-top: 1px solid #DADADA; padding: 12px var(--s4); }
.cert-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.cert-group > :first-child { flex: 1 1 220px; min-width: 0; }
.cert-group b { font-size: 15px; font-weight: 500; }
.cert-tally { display: flex; gap: 6px; flex-wrap: wrap; }
.cert-profile-link { background: none; border: 0; padding: 0; color: #B85E05; font: 500 13px Roboto, Arial, sans-serif; cursor: pointer; }
#cert-table .cert-ref { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.cert-meta { margin-left: 0; font-size: 12px; color: #666; }
.cert-ref .num { font-size: 12px; color: #444; }
.cert-reading { font-size: 12px; color: #444; }
.cert-reading.is-problem { color: #9C2F19; }
.cert-status { display: inline-block; font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 4px; white-space: nowrap; border: 1px solid #DADADA; background: #F2F2F2; color: #666; }
.cert-status-awaiting-review { background: #E8F4F5; color: #005B64; border-color: #B5D5D7; }
.cert-status-accepted { background: #F3F4E0; color: #5E5D00; border-color: #D3D39A; }
.cert-status-rejected { background: #FBEDEA; color: #9C2F19; border-color: #EBC1B8; }
.cert-status-expired { background: #F2F2F2; color: #666; border-color: #DADADA; }
html.certificate-workbench .wb-bulk { background: #222; color: #fff; padding: 12px 22px; gap: 12px; border: 0; }
.wb-bulk .btn { border: 0; }
.cert-bulk-accept { background: #949300; color: #fff; }
.cert-bulk-reject { background: #fff; color: #222; }
.cert-bulk-clear { margin-left: auto; background: none; border: 0; color: #fff; text-decoration: underline; cursor: pointer; }
.cert-bulk-panel { padding: 16px 22px; border-bottom: 1px solid #DADADA; background: #fff; }
.cert-bulk-panel[hidden] { display: none; }

/* What we read */
.wwr { background: #fff; border: 2px solid #222; border-radius: 12px; box-shadow: 4px 4px 0 #E5E8E7; overflow: clip; }
.wwr-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 14px 22px; border-bottom: 2px solid #222; }
.wwr-head h2 { margin: 0; font: 500 16px/1.3 Roboto, Arial, sans-serif; }
.wwr-issues { font-size: 12px; font-weight: 500; color: #005B64; }
.wwr-issues.is-bad { color: #9C2F19; }
.wwr-row { padding: 12px 22px; border-bottom: 1px solid #EEEEEE; }
.wwr-row.is-bad { background: #FBEDEA; }
.wwr-row.is-selected { background: #FFF8F0; }
.wwr-top, .wwr-value-line, .wwr-edit-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.wwr-label { font-size: 12px; color: #666; }
.wwr-tag { font-size: 12px; font-weight: 500; color: #9C2F19; }
.wwr-tag.is-ok { color: #5E5D00; }
.is-corrected .wwr-tag { color: #005B64; }
.wwr-value-line { margin-top: 4px; }
.wwr-value { font-size: 15px; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.is-bad .wwr-value { color: #9C2F19; }
.wwr-matched .wwr-value { font-size: 14px; }
.wwr-edit { background: none; border: 0; padding: 0; color: #B85E05; font: 500 13px Roboto, Arial, sans-serif; cursor: pointer; }
.wwr-note { margin-top: 4px; font-size: 12px; color: #666; }
.wwr-input { flex: 1 1 160px; padding: 8px 10px; border: 1px solid #222; border-radius: 4px; font-size: 14px; }
.wwr-edit-line { margin-top: 6px; justify-content: flex-start; }
.wwr-fold > summary { display: flex; justify-content: space-between; gap: 10px; padding: 12px 22px; background: #F9F9F9; font-size: 13px; color: #444; cursor: pointer; border-bottom: 1px solid #EEEEEE; }
.wwr-show { color: #B85E05; font-weight: 500; }
.wwr-decision { margin-top: 18px; padding: 16px 22px; background: #fff; border: 2px solid #222; border-radius: 12px; box-shadow: 4px 4px 0 #E5E8E7; display: flex; flex-direction: column; gap: 10px; }
.wwr-decision[hidden] { display: none; }
.wwr-decide { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wwr-decision .btn.pri:disabled, .cert-bulk-panel .btn.pri:disabled { opacity: .5; cursor: not-allowed; }
.wwr-help { margin: 0; font-size: 12px; color: #666; line-height: 1.5; }
.wwr-status { margin: 0; font-size: 12px; color: #9C2F19; }
.wwr-status:empty { display: none; }
.wwr-panel { display: flex; flex-direction: column; gap: 10px; }
.wwr-panel-title { font-size: 14px; font-weight: 500; }
.wwr-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #444; }
.wwr-field input, .wwr-field textarea { padding: 8px 10px; border: 1px solid #BBBBBB; border-radius: 4px; font-size: 13px; }
.wwr-reasons { display: flex; flex-direction: column; gap: 6px; }
.wwr-reason { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid #DADADA; border-radius: 6px; font-size: 13px; line-height: 1.45; cursor: pointer; }
.wwr-reason.is-auto { background: #FBEDEA; border-color: #EBC1B8; }
.wwr-found { color: #9C2F19; font-weight: 500; }
.wwr-mail { border: 1px solid #DADADA; border-radius: 6px; overflow: hidden; }
.wwr-mail-head { padding: 10px 14px; background: #F9F9F9; border-bottom: 1px solid #DADADA; font-size: 12px; line-height: 1.7; color: #444; overflow-wrap: anywhere; }
.wwr-eyebrow { font: 700 10px Roboto, Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #666; margin-bottom: 4px; }
.wwr-mail-body { padding: 14px 16px; }
.wwr-mail-text { font-size: 13px; line-height: 1.6; white-space: pre-line; }
.wwr-mail-link { margin: 14px 0 6px; }
.wwr-mail-button { display: inline-block; padding: 9px 14px; background: #222; color: #fff; border-radius: 4px; font-size: 13px; font-weight: 500; }

/* On a phone the table becomes stacked rows: the customer headers stay, each certificate is one block. */
@media (max-width: 700px) {
  html.certificate-workbench #cert-table, html.certificate-workbench #cert-table tbody { display: block; width: 100%; }
  html.certificate-workbench #cert-table thead { display: none; }
  html.certificate-workbench #cert-table tr.cert-group-row { display: block; }
  html.certificate-workbench #cert-table tr.cert-group-row > td { display: block; width: auto; padding: 12px 14px; }
  html.certificate-workbench #cert-table tr.cert-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; align-items: start; padding: 12px 14px; border-bottom: 1px solid #E4E4E4; background: #fff; cursor: pointer; }
  html.certificate-workbench #cert-table tr.cert-row > td { display: block; min-width: 0; width: auto; padding: 0; border: 0; background: transparent; }
  html.certificate-workbench #cert-table tr.cert-row > td:nth-child(1) { grid-column: 1; grid-row: 1; }
  html.certificate-workbench #cert-table tr.cert-row > td:nth-child(1):empty { display: none; }
  html.certificate-workbench #cert-table tr.cert-row > td:nth-child(2) { grid-column: 2; grid-row: 1; }
  html.certificate-workbench #cert-table tr.cert-row > td:nth-child(6) { grid-column: 3; grid-row: 1; }
  html.certificate-workbench #cert-table tr.cert-row > td:nth-child(3), html.certificate-workbench #cert-table tr.cert-row > td:nth-child(4),
  html.certificate-workbench #cert-table tr.cert-row > td:nth-child(5) { grid-column: 2 / -1; }
}

/* Tab consistency (Noah, 2026-11-08): the list panel, tiles and toolbar controls match the other tabs. */
html.certificate-workbench #v-certificates.view>.card{border:2px solid #222;border-radius:12px;box-shadow:4px 4px 0 #E5E8E7;overflow:hidden;background:#fff}
html.certificate-workbench #v-certificates .cert-tile{border:2px solid #222;border-radius:12px;box-shadow:4px 4px 0 #E5E8E7}
html.certificate-workbench #v-certificates .cert-tile[aria-pressed="true"]{box-shadow:4px 4px 0 #222}
html.certificate-workbench #v-certificates .cert-tile::before{display:none}
html.certificate-workbench #v-certificates .phead-t{display:flex;flex-direction:column;gap:6px}
html.certificate-workbench #v-certificates .phead-t .pnote{margin:0;color:#555;font-size:15px}
html.certificate-workbench #v-certificates #cert-total{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
html.certificate-workbench #v-certificates .bar>#wb-saved{border:1px solid #222;border-radius:6px;color:#222;font-weight:500;height:40px}
html.certificate-workbench #v-certificates #ux-view-menu>summary{border:1px solid #222;border-radius:6px;color:#222;font-weight:500;background:#fff;height:40px;box-sizing:border-box;display:inline-flex;align-items:center;padding:0 14px;font-size:14px}
html.certificate-workbench #v-certificates .bar>.cert-grouping{margin:0;flex:none;max-width:none;height:40px;box-sizing:border-box}

/* Status rail (Noah chose option B, 2026-11-08): every row carries a coloured bar for its status, status
   reads as a dot and a word, and a customer's summary sits in the Status column. */
#cert-rows tr.cert-row { --rail: #9A9A9A; }
#cert-rows tr.cert-tone-awaiting-review { --rail: #007681; }
#cert-rows tr.cert-tone-accepted { --rail: #949300; }
#cert-rows tr.cert-tone-expiring-soon { --rail: #DA720F; }
#cert-rows tr.cert-tone-rejected { --rail: #D14124; }
#cert-rows tr.cert-row > td:first-child { box-shadow: inset 4px 0 0 var(--rail); }
#cert-rows tr.cert-row .cert-status { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: #222; font-size: 13px; }
#cert-rows tr.cert-row .cert-status::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--rail); }
#cert-rows tr.cert-group-row > td { background: #F4F4F2 !important; border-top: 1px solid #DADADA; padding-top: 10px; padding-bottom: 10px; }
#cert-rows tr.cert-group-row .cert-group { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
#cert-rows tr.cert-group-row .cert-group b { font-size: 14px; color: #222; }
#cert-rows tr.cert-group-row .cert-profile-link { margin-left: 10px; }
#cert-rows tr.cert-group-row td.cert-tally { font-size: 13px; color: #444; }
#cert-rows tr.cert-group-row td.cert-tally { display: table-cell; }
#cert-rows tr.cert-group-row .cert-group > :first-child { flex: none; }
@media (max-width: 700px) {
  html.certificate-workbench #cert-table tr.cert-row { box-shadow: inset 4px 0 0 var(--rail); }
  html.certificate-workbench #cert-table tr.cert-row > td:first-child { box-shadow: none; }
  html.certificate-workbench #cert-table tr.cert-group-row > td.wb-check { display: none; }
  html.certificate-workbench #cert-table tr.cert-group-row > td.cert-tally { display: block; padding-top: 0; }
}

/* Picker (hunt A4): a long client name ends in an ellipsis and stays clear of the arrow. */
html.certificate-workbench .workspace-scope select { min-width: 0; padding-right: 30px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
html.certificate-workbench .workspace-scope { min-width: 0; }

/* Toolbar (hunt A5): between phone and desktop the controls wrap onto a second row instead of
   running past the card. */
@media (max-width: 900px) {
  html.certificate-workbench #v-certificates .bar.ux-table-toolbar { flex-wrap: wrap; }
  html.certificate-workbench #v-certificates .bar-find { flex: 1 1 100%; }
}

/* Long names (hunt A7, A8): a customer name or form code wraps inside its cell, and the status
   text keeps its own column instead of sitting under the name. */
#cert-rows tr.cert-group-row .cert-group { min-width: 0; }
#cert-rows tr.cert-group-row .cert-group b,
#cert-rows tr.cert-row .cert-form { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
#cert-rows tr.cert-group-row > td { overflow-wrap: anywhere; }
#cert-rows tr.cert-group-row td.cert-tally { overflow-wrap: normal; }
#cert-rows tr.cert-group-row .cert-group > :first-child { flex: 0 1 auto; max-width: 100%; }
