:root {
  /* the brand palette */
  --tbv-admin-charcoal: #1e2220;
  --tbv-admin-cedar: #3f4c45;
  --tbv-admin-aqua: #b8dbc4;
  --tbv-admin-light-grey: #edeeed;
  --tbv-admin-white: #ffffff;

  /* WordPress's own admin neutrals */
  --tbv-admin-text: #1d2327;
  --tbv-admin-muted: #50575e;
  --tbv-admin-line: #c3c4c7;
  --tbv-admin-divider: #dcdcde;
  --tbv-admin-surface: #ffffff;
  --tbv-admin-focus: #2271b1;
  --tbv-admin-error-text: #8a2424;
  --tbv-admin-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  --tbv-admin-backdrop: rgba(30, 34, 32, 0.6);

  /* the page header: the brand's identity */
  --tbv-admin-header-fill: #1e2220;
  --tbv-admin-header-text: #ffffff;
  --tbv-admin-header-muted: #b8dbc4;
  --tbv-admin-header-edge: #b8dbc4;
  --tbv-admin-header-line: #3f4c45;
  --tbv-admin-header-hover: #3f4c45;

  /* the four badges (§5 principle 3): live or passes, due or warned, overdue or failed, draft or not yet */
  --tbv-admin-badge-good-fill: #edfaef;
  --tbv-admin-badge-good-text: #005c12;
  --tbv-admin-badge-warn-fill: #fcf9e8;
  --tbv-admin-badge-warn-text: #614200;
  --tbv-admin-badge-bad-fill: #fcf0f1;
  --tbv-admin-badge-bad-text: #8a2424;
  --tbv-admin-badge-quiet-fill: #f0f0f1;
  --tbv-admin-badge-quiet-text: #3c434a;

  /* the status region's tones, WordPress's own notice colours, the edges deepened to 3:1 */
  --tbv-admin-notice-success-fill: #edfaef;
  --tbv-admin-notice-success-edge: #008a20;
  --tbv-admin-notice-warning-fill: #fcf9e8;
  --tbv-admin-notice-warning-edge: #996800;
  --tbv-admin-notice-error-fill: #fcf0f1;
  --tbv-admin-notice-error-edge: #d63638;
  --tbv-admin-notice-info-fill: #ffffff;
  --tbv-admin-notice-info-edge: #2271b1;

  /* a destructive confirm button */
  --tbv-admin-danger-fill: #b32d2e;
  --tbv-admin-danger-text: #ffffff;

  /* one content width, one line length for prose */
  --tbv-admin-width: 48rem;
  --tbv-admin-measure: 70ch;
  --tbv-admin-radius: 4px;
  --tbv-admin-gap: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* the surface, white: the focus colour reads 5.2:1 on it as a link, and only 4.4:1 on the light grey */
  background: var(--tbv-admin-surface);
  color: var(--tbv-admin-text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
a { color: var(--tbv-admin-focus); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--tbv-admin-focus); outline-offset: 2px; }
.tbv-skip {
  position: absolute; left: 8px; top: -48px; z-index: 10;
  background: var(--tbv-admin-surface); color: var(--tbv-admin-text);
  padding: 8px 12px; min-height: 24px; border-radius: var(--tbv-admin-radius);
}
.tbv-skip:focus { top: 8px; }
.tbv-band {
  background: var(--tbv-admin-header-fill); color: var(--tbv-admin-header-text);
  border-bottom: 3px solid var(--tbv-admin-header-edge);
}
.tbv-band-inner {
  max-width: 72rem; margin: 0 auto; padding: 12px var(--tbv-admin-gap);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px var(--tbv-admin-gap);
}
.tbv-name { font-weight: 600; margin: 0; font-size: 15px; }
.tbv-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.tbv-menu a {
  display: inline-block; min-height: 32px; padding: 6px 10px; border-radius: var(--tbv-admin-radius);
  color: var(--tbv-admin-header-text); text-decoration: none;
}
.tbv-menu a:hover { background: var(--tbv-admin-header-hover); }
.tbv-menu a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--tbv-admin-header-edge); }
.tbv-band a:focus-visible { outline-color: var(--tbv-admin-header-edge); }
main { max-width: 72rem; margin: 0 auto; padding: var(--tbv-admin-gap); }
h1 { font-size: 23px; font-weight: 400; margin: 8px 0 16px; }
/* the portal's foot: the terms of use and the privacy notice, each link a 24 px target */
.tbv-foot { max-width: 72rem; margin: 0 auto; padding: 0 var(--tbv-admin-gap) var(--tbv-admin-gap); }
.tbv-foot ul { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--tbv-admin-divider); display: flex; flex-wrap: wrap; gap: 4px 16px; }
p { max-width: var(--tbv-admin-measure); }
.tbv-muted { color: var(--tbv-admin-muted); }
.tbv-views ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tbv-views a { display: inline-block; min-height: 24px; padding: 2px 0; }
.tbv-views a[aria-current="page"] { color: var(--tbv-admin-text); font-weight: 600; text-decoration: none; }
.tbv-count { color: var(--tbv-admin-muted); font-weight: 400; }
.tbv-empty {
  background: var(--tbv-admin-surface); border: 1px solid var(--tbv-admin-line); border-radius: var(--tbv-admin-radius);
  padding: var(--tbv-admin-gap); box-shadow: var(--tbv-admin-shadow);
}
.tbv-empty p { margin: 0; }
.tbv-empty p + p { margin-top: 8px; }
table { width: 100%; border-collapse: collapse; background: var(--tbv-admin-surface); border: 1px solid var(--tbv-admin-line); }
caption { text-align: left; padding: 8px 0; font-weight: 600; }
th, td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--tbv-admin-divider); vertical-align: top; }
thead th { border-top: 0; }
/* a back link alone on its line given 24 px, as a row's own link is (WCAG 2.5.8) */
.tbv-back a { display: inline-block; min-height: 24px; line-height: 24px; }
/* a row's own link given a 24 px line, so it meets WCAG 2.5.8 at every width */
th a, td a { display: inline-block; min-height: 24px; line-height: 24px; }
.tbv-badge {
  display: inline-block; padding: 0 8px; border-radius: 10px; font-size: 12px; line-height: 20px; white-space: nowrap;
}
.tbv-badge-good { background: var(--tbv-admin-badge-good-fill); color: var(--tbv-admin-badge-good-text); }
.tbv-badge-warn { background: var(--tbv-admin-badge-warn-fill); color: var(--tbv-admin-badge-warn-text); }
.tbv-badge-bad { background: var(--tbv-admin-badge-bad-fill); color: var(--tbv-admin-badge-bad-text); }
.tbv-badge-quiet { background: var(--tbv-admin-badge-quiet-fill); color: var(--tbv-admin-badge-quiet-text); }
h2 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; }
code { font-family: Consolas, Monaco, monospace; font-size: 13px; overflow-wrap: anywhere; }
.tbv-status:empty { display: none; }
.tbv-status {
  background: var(--tbv-admin-notice-info-fill); border-left: 4px solid var(--tbv-admin-notice-info-edge);
  box-shadow: var(--tbv-admin-shadow); margin: 0 0 16px; padding: 8px 12px; max-width: var(--tbv-admin-width);
}
.tbv-status-success { background: var(--tbv-admin-notice-success-fill); border-left-color: var(--tbv-admin-notice-success-edge); }
.tbv-status-warning { background: var(--tbv-admin-notice-warning-fill); border-left-color: var(--tbv-admin-notice-warning-edge); }
.tbv-status-error { background: var(--tbv-admin-notice-error-fill); border-left-color: var(--tbv-admin-notice-error-edge); }
form p { margin: 0 0 12px; }
.tbv-field label, .tbv-label { display: block; font-weight: 600; margin-bottom: 4px; }
.tbv-help { display: block; color: var(--tbv-admin-muted); font-size: 13px; margin-top: 2px; }
.tbv-error-text { display: block; color: var(--tbv-admin-error-text); font-weight: 600; margin-top: 2px; }
input[type="search"], input[type="text"], input[type="number"], input[type="url"], input[type="password"], input[type="email"], input[type="tel"], input[type="file"], select, textarea {
  font: inherit; color: var(--tbv-admin-text); background: var(--tbv-admin-surface);
  border: 1px solid var(--tbv-admin-muted); border-radius: var(--tbv-admin-radius);
  min-height: 32px; padding: 4px 8px; max-width: 100%;
}
input[type="search"], input[type="text"], input[type="url"], input[type="password"], input[type="email"], input[type="tel"], input[type="file"], textarea { width: 100%; max-width: 32rem; }
/* a box to tick, 24 px, its label beside it and the whole label the target */
.tbv-check { display: flex; gap: 8px; align-items: flex-start; }
.tbv-check input { width: 24px; height: 24px; margin: 0; flex: none; }
.tbv-check label { font-weight: 600; min-height: 24px; }
.tbv-target { display: inline-block; min-height: 24px; line-height: 24px; }
.tbv-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* the code's six boxes, one digit each, in a row that fits a phone */
.tbv-code { display: flex; gap: 6px; flex-wrap: nowrap; }
.tbv-code span { display: contents; }
.tbv-code input { width: min(2.6em, calc((100% - 30px) / 6)); min-width: 24px; min-height: 44px; font-size: 20px; text-align: center; padding: 4px 0; font-family: Consolas, Monaco, monospace; }
.tbv-turnstile { min-height: 24px; margin: 0 0 12px; }
.tbv-signed-in { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 32px; border-top: 1px solid var(--tbv-admin-divider); padding-top: 12px; }
.tbv-signed-in form p { margin: 0; }
textarea { min-height: 5em; }
[aria-invalid="true"] { border-color: var(--tbv-admin-notice-error-edge); box-shadow: 0 0 0 1px var(--tbv-admin-notice-error-edge); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--tbv-admin-focus); outline-offset: 1px; }
fieldset { min-width: 0; border: 1px solid var(--tbv-admin-divider); border-radius: var(--tbv-admin-radius); margin: 0 0 12px; padding: 8px 12px; }
legend { font-weight: 600; padding: 0 4px; }
.tbv-filters { display: flex; flex-wrap: wrap; gap: 0 16px; }
.tbv-button {
  font: inherit; min-height: 32px; padding: 4px 12px; border-radius: var(--tbv-admin-radius); cursor: pointer;
  background: var(--tbv-admin-surface); color: var(--tbv-admin-focus); border: 1px solid var(--tbv-admin-focus);
}
.tbv-button-primary { background: var(--tbv-admin-focus); color: var(--tbv-admin-white); }
.tbv-button-danger { background: var(--tbv-admin-danger-fill); color: var(--tbv-admin-danger-text); border-color: var(--tbv-admin-danger-fill); }
a.tbv-button { display: inline-block; text-decoration: none; line-height: 22px; }
.tbv-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: 0 0 16px; }
.tbv-actions form p { margin: 0; }
.tbv-shape { display: grid; gap: var(--tbv-admin-gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .tbv-shape { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.tbv-rim { width: 100%; max-width: 40rem; height: auto; }
.tbv-rim-disc { fill: var(--tbv-admin-light-grey); }
.tbv-rim-wedge { fill: var(--tbv-admin-aqua); stroke: var(--tbv-admin-cedar); stroke-width: 2; }
.tbv-rim-label { fill: var(--tbv-admin-text); font-size: 16px; }
/* at a phone's width the rim's names would be drawn about 8 px tall: the list of the families names them in its order instead (standards review 14) */
@media (max-width: 40rem) { .tbv-rim-label { display: none; } }
.tbv-families, .tbv-found { padding-left: 1.5rem; }
.tbv-families > li, .tbv-found > li { margin: 0 0 16px; }
.tbv-families input[type="text"] { max-width: 100%; }
.tbv-pager ul { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tbv-pager a { display: inline-block; min-width: 32px; min-height: 32px; padding: 5px 8px; text-align: center; }
.tbv-pager a[aria-current="page"] { font-weight: 600; color: var(--tbv-admin-text); text-decoration: none; }
.tbv-fields { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: 6px 16px; max-width: var(--tbv-admin-width); }
.tbv-fields dt { font-weight: 600; }
.tbv-fields dd { margin: 0; }
.tbv-card {
  background: var(--tbv-admin-surface); border: 1px solid var(--tbv-admin-line); border-radius: var(--tbv-admin-radius);
  box-shadow: var(--tbv-admin-shadow); padding: 12px var(--tbv-admin-gap); margin: 0 0 16px;
}
.tbv-card h2 { margin-top: 0; }
blockquote { margin: 4px 0 8px; padding-left: 12px; border-left: 3px solid var(--tbv-admin-divider); }
del { background: var(--tbv-admin-badge-bad-fill); color: var(--tbv-admin-badge-bad-text); }
ins { background: var(--tbv-admin-badge-good-fill); color: var(--tbv-admin-badge-good-text); text-decoration: none; }
@media (max-width: 600px) {
  .tbv-fields { grid-template-columns: 1fr; }
  .tbv-fields dd { margin-bottom: 8px; }
}
/* a table at phone width is a list of cards, each cell under its heading (the self-serve plan's §4.13) */
@media (max-width: 600px) {
  table, thead, tbody, tr, th, td, caption { display: block; }
  table { border: 0; background: transparent; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tr { background: var(--tbv-admin-surface); border: 1px solid var(--tbv-admin-line); border-radius: var(--tbv-admin-radius); margin-bottom: 8px; }
  th, td { border: 0; }
  td::before { content: attr(data-heading); display: block; color: var(--tbv-admin-muted); font-size: 12px; }
}
