
/* ---------------------------------------------- THE CERTIFICATE REGISTER */
.cr-table td,.cr-table th{vertical-align:top;}
/* THE SCOPE READS ON ONE LINE, AND THE ROWS STAY THE HEIGHT OF THEIR
   CONTENT. Matt, 30 November, twice on this table: "Can we tweak the
   columns so the AS9100 explainer is on one line please?" and then,
   looking at the result, "Does the row need to be left so high?
   Assuming you overlooked it?"

   He was right, and it was my doing. The first fix put width:1% on
   five columns so they would shrink-wrap and hand the surplus to
   Scope. It did put Scope on one line, but it squeezed the narrow
   columns so hard that the phrases inside them broke: "To be
   supplied" went over two lines in three columns at once and
   "Awaiting document" over two lines inside its pill. Every row went
   to 95px for one line of words, and the AS9100D row to 149px because
   its Expires cell carries a note underneath as well.

   WHAT THIS DOES INSTEAD. Nothing is told how wide to be. Every cell
   is told not to wrap, so the browser asks each column for its
   one-line width and shares what is left over, and no cell can be the
   reason a row grows. The side padding comes in from 24px to 16px,
   which is what buys the room for that to fit. Two things are still
   allowed to break: the small note under an expiry date, and the
   download pill, which is the widest item in the table and the only
   one that can afford a second line without looking wrong.

   MEASURED AFTER, at 1160, 1200, 1280, 1366, 1440 and 1600: the table
   fits its wrapper at every one, the scope is on one line at every
   one, and the rows come out at 73px from 1280 up (95px at 1160 and
   1200, where the pill takes its second line). Before: 95px and
   149px at all of them.

   AND IT ONLY APPLIES WHERE IT FITS. Below 1160 the one-line widths
   add up to more than .specwrap, which clips rather than scrolls, so
   the right hand columns would be cut off instead of wrapped. 1160 is
   measured, not chosen: it fits at 1160 and spills at 1100. Under
   that the table wraps the way it did before, which is the lesser of
   the two faults. */
@media (min-width:1160px){
  /* no column is given a width. Every cell is held to one line, so
     each column asks for exactly what its longest line needs and the
     surplus is shared out. The note and the pill may still break. */
  /* the doubled class and the !important are not decoration. The
     shared table sheet carries .spec th{width:212px}, which is the
     same specificity as a single .cr-table selector, and extract_css
     reorders the sheets, so a plain rule loses silently. Measured
     with it missing: the Standard column held 264px of whitespace at
     1280 and the download pill broke onto a second line for want of
     nine of them. */
  .cr-table.cr-table tr > *{white-space:nowrap !important;width:auto !important;
    padding-left:16px;padding-right:16px;}
  .cr-table.cr-table .cr-tbs{white-space:nowrap;}
  .cr-table.cr-table .cr-dl,.cr-table.cr-table .cr-note{white-space:normal !important;}
}
/* THE PLACEHOLDERS WERE DARK INK ON A DARK GROUND. This table was
   written against the paper coloured spec table and then mounted in
   the quality page's .sh2-sheet, which is navy, so "To be supplied"
   and "Awaiting document" were rgba(23,28,60,.42) on #0b0f2e and read
   as smudges. Seen in Matt's screenshot of 30 November: the words are
   there in the markup and all but invisible on screen.

   The doubled class and the !important are the house rule for this
   project: the sheet that colours text inside .sh2-sheet sits later
   in the cascade at the same specificity, so a single class loses. */
.cr-tbs.cr-tbs{color:rgba(255,255,255,.5) !important;font-style:italic;}
.cr-note.cr-note{display:block;font-size:12px;
  color:rgba(255,255,255,.52) !important;margin-top:3px;white-space:normal;}
.cr-cell{white-space:nowrap;}
/* the button. A real link with a download attribute, so it saves with a
   sensible filename instead of arriving as document(3).pdf */
.cr-dl{display:inline-flex;align-items:center;gap:9px;
  padding:9px 16px 8px;border-radius:999px;text-decoration:none;
  font-size:13px;font-weight:700;letter-spacing:.2px;
  background:#00806e;color:#fff;transition:background .2s ease;}
.cr-dl:hover{background:#0b9c86;}
.cr-dl:focus-visible{outline:2px solid #00eecc;outline-offset:3px;}
.cr-sz{font-weight:500;opacity:.72;font-size:12px;}
.cr-wait.cr-wait{background:rgba(255,255,255,.08);
  color:rgba(255,255,255,.55) !important;font-weight:600;cursor:default;}
/* the expiry state, written by script so it cannot go stale between builds */
.cr-state{display:inline-block;font-size:11px;font-weight:700;
  letter-spacing:.8px;text-transform:uppercase;padding:2px 8px 1px;
  border-radius:999px;margin-left:8px;vertical-align:1px;}
.cr-state:empty{display:none;}
tr[data-state="current"] .cr-state{background:rgba(0,128,110,.12);color:#00806e;}
tr[data-state="soon"] .cr-state{background:rgba(196,120,0,.14);color:#a86400;}
tr[data-state="expired"] .cr-state{background:rgba(198,40,40,.12);color:#c62828;}
.cr-foot{margin-top:22px;font-size:14px;line-height:1.65;
  color:rgba(23,28,60,.62);max-width:62ch;}
@media (max-width:720px){
  .cr-cell{white-space:normal;}
  .cr-dl{width:100%;justify-content:center;}
}
