/* Documents register and Backup & sync. */
.documents {
  display: grid;
  gap: 12px;
}
.documents-tools {
  display: grid;
  gap: 10px;
}
.documents-tools .field {
  max-width: 520px;
  margin: 0;
}
.documents-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.documents-groups .button {
  min-height: 40px;
}
.documents-groups [aria-pressed='true'] {
  border-color: #24533b;
  background: #e6eee5;
  color: #173d35;
}
.documents-groups small {
  margin-left: 4px;
  opacity: 0.7;
}
.documents-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.documents-table th,
.documents-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2e5dc;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.documents-table thead th {
  color: #526854;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.documents-table tbody th {
  font-weight: 700;
}
.documents-kind {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #edf0e7;
  color: #3d5246;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.documents-kind.is-emergency {
  background: #fde8e4;
  color: #8a2f12;
}
.documents-kind.is-meetings {
  background: #e8eef7;
  color: #2b4a6f;
}
.documents-kind.is-procedures {
  background: #f2e9f7;
  color: #5b2f73;
}
.documents-status.is-alert {
  color: #8a2f12;
  font-weight: 700;
}
.documents-open {
  text-align: right;
}
.documents-open .button {
  min-height: 40px;
}
.backup-panel h2 {
  margin-top: 0;
}
.backup-age {
  margin: 8px 0 12px;
}
.backup-areas {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.backup-areas li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #e2e5dc;
}
.backup-mode {
  margin: 12px 0;
  padding: 0;
  border: 0;
}
.backup-mode label {
  margin: 6px 0;
}
.backup-table {
  width: 100%;
  border-collapse: collapse;
}
.backup-table th,
.backup-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e2e5dc;
  text-align: left;
}
.backup-table td {
  width: 80px;
  font-variant-numeric: tabular-nums;
}
.backup-table tr.is-same {
  color: var(--muted);
}
.sync-form {
  display: grid;
  gap: 8px;
  max-width: 420px;
}
.sync-form .field {
  margin: 0;
}
.sync-state.is-error,
.sync-state.is-offline {
  color: #8a2f12;
  font-weight: 600;
}
.sync-devices {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.sync-devices li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e2e5dc;
}
.sync-devices li > div {
  display: grid;
}
/* Sharing: the dialog, the list of shared links, and the read-only page a client opens. */
.share-qr:not([hidden]) {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-block: 12px;
}
.share-qr img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.share-preview,
.shared-text {
  max-height: 50vh;
  overflow: auto;
  padding: 12px;
  border: 1px solid #cdd8c8;
  border-radius: 6px;
  background: #fbfcf7;
  font-family: inherit;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.shared-links ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.shared-links li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e2e5dc;
}
.shared-links li > div {
  display: grid;
  min-width: 0;
  overflow-wrap: anywhere;
}
.shared-links li.is-off {
  opacity: 0.6;
}
.documents-open .button + .button {
  margin-left: 6px;
}
body.is-shared-view .sidebar,
body.is-shared-view .bottom-nav,
body.is-shared-view .topbar {
  display: none !important;
}
body.is-shared-view .shell {
  margin-left: 0;
}
body.is-shared-view {
  padding-bottom: 0;
}
.shared-record {
  max-width: 820px;
  margin: 0 auto;
}
.shared-record header h1 {
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.shared-record .shared-text {
  max-height: none;
  margin: 12px 0;
  background: #fff;
  font-size: 15px;
  line-height: 1.6;
}
@media (max-width: 760px) {
  .documents-open .button + .button {
    margin: 6px 0 0;
  }
}
@media print {
  .shared-actions {
    display: none !important;
  }
  .shared-record .shared-text {
    border: 0;
    padding: 0;
  }
}

/* QR codes for shared links: suggest a short link, and show how often it was opened. */
.share-qr-hint {
  margin: -4px 0 12px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}
.share-qr-long {
  padding: 12px 14px;
  border: 2px solid #c98a00;
  border-radius: 8px;
  background: #fff6e0;
  color: #3d2a00;
}
.share-qr-long p {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.45;
}
.share-qr-long .button {
  min-height: 48px;
  font-size: 16px;
}
.share-qr-views {
  margin: 0;
  font-size: 17px;
}
.share-qr-views .text-button {
  min-height: 44px;
  font-size: 16px;
}

/* The way out of a shared record: always visible, large enough to tap with gloves. */
.shared-close-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto 14px;
  padding: 8px 0;
  background: var(--paper, #f4f3ee);
  font-size: 16px;
  font-weight: 650;
}
.shared-close-bar .button {
  min-height: 48px;
  font-size: 16px;
}
@media print {
  .shared-close-bar {
    display: none;
  }
}
/* Keeping a shared Quick FLHA on this device. */
.shared-save {
  max-width: 820px;
  margin: 0 auto 16px;
  padding: 14px 16px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
  background: #fff;
}
.shared-save.is-saved {
  border: 2px solid #3f8a55;
  background: #e8f4ea;
}
.shared-save p {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.45;
}
.shared-save .shared-save-title {
  margin: 0;
  color: #1d5a37;
  font-size: 19px;
  font-weight: 700;
}
.shared-save .button {
  min-height: 50px;
  font-size: 16px;
}
@media print {
  .shared-save {
    display: none;
  }
}
/* Sharing: what else to send, the two ways to send, and importing a received file. */
.share-include {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.share-include legend {
  padding: 0 4px;
  font-size: 16px;
  font-weight: 700;
}
.share-include .ack,
.share-way .ack,
.receive-choice {
  align-items: flex-start;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.4;
}
.share-way {
  margin: 14px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.share-way h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.share-way p {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.45;
}
.share-way .button {
  min-height: 48px;
  font-size: 16px;
}
.documents-import {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}
.documents-import .button {
  min-height: 48px;
  font-size: 16px;
}
.documents-import .helper {
  font-size: 16px;
}
.receive-ask {
  font-size: 18px;
  font-weight: 700;
}

/* Answers to a link: the QR panel while the crew signs, Send to dispatch, and the page a
   worker or dispatcher sees. */
.crew-qr-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border: 2px solid #3f8a55;
  border-radius: 8px;
  background: #f3f8f3;
}
.crew-qr-panel h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
.crew-qr-panel p {
  font-size: 16px;
  line-height: 1.45;
}
.crew-qr-panel .share-qr img {
  width: min(260px, 70vw);
  height: auto;
}
.crew-qr-count {
  font-size: 18px;
  font-weight: 700;
}
.crew-qr-note {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.45;
}
.crew-qr-panel .button,
.flha-receipt .button {
  min-height: 48px;
  font-size: 16px;
}
.flha-receipt {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #b8c9b6;
}
.flha-receipt p {
  font-size: 16px;
  line-height: 1.45;
}
.flha-receipt-title {
  font-size: 18px;
  font-weight: 700;
}
.flha-receipt.is-done,
p.flha-receipt.is-done {
  color: #1d5a37;
  font-size: 18px;
  font-weight: 700;
}
.flha-receipt-msg:empty {
  display: none;
}
.remote-signoff {
  max-width: 820px;
  margin: 0 auto 16px;
  padding: 16px;
  border: 2px solid #3f8a55;
  border-radius: 10px;
  background: #fff;
}
.remote-signoff h2 {
  margin: 0 0 6px;
  font-size: 22px;
}
.remote-signoff p {
  font-size: 17px;
  line-height: 1.45;
}
.remote-signoff.is-done {
  background: #e8f4ea;
}
.remote-signoff .button {
  width: 100%;
  min-height: 56px;
  font-size: 18px;
}
@media print {
  .remote-signoff {
    display: none;
  }
}

/* Site board: who is in, who is missing, how many signed. */
.site-board .panel h2 {
  font-size: 22px;
}
.board-signin {
  font-size: 16px;
}
.board-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.board-open {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.board-open strong {
  font-size: 18px;
}
.board-open span {
  font-size: 16px;
}
.board-open span[aria-hidden] {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  font-weight: 700;
}
.board-head h2 {
  margin: 0;
}
.board-date {
  margin: 4px 0;
  font-size: 16px;
}
.board-count {
  margin: 8px 0;
  font-size: 26px;
  font-weight: 800;
  color: #1d5a37;
}
.board-head .button,
.board-code .button {
  min-height: 48px;
  font-size: 16px;
}
.board-code summary {
  min-height: 44px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.board-code p {
  font-size: 16px;
}
.board-code .share-qr img {
  width: min(260px, 70vw);
  height: auto;
}
.board-expected {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.board-expected li {
  padding: 10px 12px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
  background: #fff;
}
.board-expected li.is-missing {
  border: 2px solid #c98a00;
  background: #fffaf0;
}
.board-exp-name {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}
.board-exp-name strong {
  font-size: 19px;
}
.board-in {
  color: #1d5a37;
  font-size: 17px;
  font-weight: 800;
}
.board-missing {
  color: #8a4b00;
  font-size: 17px;
  font-weight: 800;
}
.board-exp-name .button {
  min-height: 44px;
  font-size: 16px;
}
.board-sub {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f4;
}
.board-sub-main {
  display: grid;
  gap: 3px;
  font-size: 17px;
  line-height: 1.4;
}
.board-sub-main strong {
  font-size: 18px;
}
.board-crew {
  color: #1d5a37;
  font-weight: 700;
}
.board-crew.is-none {
  color: #8a4b00;
}
.board-sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.board-sub-actions .button {
  min-height: 44px;
  font-size: 16px;
}
.board-pick {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
.board-pick li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
}
.board-pick li div {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 16px;
}
.board-pick li strong {
  font-size: 18px;
}
.remote-signoff .board-pick .button {
  width: auto;
  min-width: 96px;
  flex: none;
}
.board-who {
  font-size: 17px;
}
.site-board [data-board-remove] {
  min-height: 44px;
  font-size: 16px;
}

/* Synced storage used, under Backup & sync. */
.sync-usage {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
  background: #fff;
}
.sync-usage p {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.4;
}
.sync-usage-bar {
  height: 12px;
  margin: 6px 0;
  border-radius: 6px;
  background: #e3e8df;
  overflow: hidden;
}
.sync-usage-bar span {
  display: block;
  height: 100%;
  background: #3f8a55;
}
.sync-usage.is-near {
  border: 2px solid #c98a00;
  background: #fff6e0;
}
.sync-usage.is-near .sync-usage-bar span {
  background: #c98a00;
}
.board-reminded {
  color: var(--ink);
  font-size: 16px;
}

/* Site board: forms grouped by crew. */
.board-kind {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e3f0e4;
  color: #1d5a37;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.board-title {
  font-size: 18px;
  font-weight: 700;
}
.board-workers {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}
.board-how {
  font-size: 16px;
  line-height: 1.45;
}
p.board-who {
  margin: 4px 0 0;
  font-size: 16px;
}
.board-pick li div .board-kind {
  margin-bottom: 2px;
}

/* Remote crew for a tailgate meeting. */
.talk-remote {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 2px solid #3f8a55;
  border-radius: 8px;
  background: #f3f8f3;
}
.talk-remote h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
.talk-remote p,
.talk-remote li {
  font-size: 16px;
  line-height: 1.45;
}
.talk-remote .button {
  min-height: 48px;
  font-size: 16px;
}
.talk-remote .share-qr img {
  width: min(220px, 60vw);
  height: auto;
}
.talk-remote-count {
  font-size: 17px;
}
.talk-remote-questions {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.talk-remote-questions li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
  background: #fff;
}
.talk-remote-questions span {
  font-size: 17px;
}
.remote-meeting {
  max-width: 820px;
  margin: 0 auto;
}
.remote-meeting-call {
  padding: 10px 12px;
  border-left: 4px solid #3f8a55;
  background: #eef5ef;
  font-size: 17px;
  line-height: 1.45;
}
.remote-topic {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #b8c9b6;
  border-radius: 10px;
  background: #fff;
}
.remote-topic h2 {
  margin: 4px 0 8px;
  font-size: 24px;
}
.remote-topic h3 {
  margin: 14px 0 4px;
  font-size: 18px;
}
.remote-topic p,
.remote-topic li {
  font-size: 18px;
  line-height: 1.5;
}
.remote-topic-count {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.remote-topic-nav .button {
  min-height: 54px;
  font-size: 18px;
}
.remote-ask {
  margin: 0 0 16px;
}
.remote-ask summary {
  min-height: 44px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

/* Compact Documents (milestone 1): one heading, search, then records. Layout follows the width
   the Documents area actually has, not the screen, so an open sidebar is accounted for. */
.documents {
  container-type: inline-size;
  gap: 10px;
}
.documents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.documents-head h1 {
  margin: 0;
  font-size: 28px;
}
.documents-head .button {
  min-height: 44px;
  font-size: 16px;
}
.documents-intro {
  display: none;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.documents-search input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #cdd8c8;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 16px;
}
.documents-filter-narrow {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.documents-filter-narrow .button {
  min-height: 48px;
  font-size: 16px;
}
.documents-filter-narrow [aria-pressed='true'] {
  border-color: #24533b;
  background: #e6eee5;
  color: #173d35;
  font-weight: 700;
}
.documents-type {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}
.documents-type select {
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #cdd8c8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.documents-filter .documents-groups {
  display: none;
}
.documents-groups .button {
  min-height: 44px;
  font-size: 15px;
}
.documents-backup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0;
  padding: 8px 12px;
  border-left: 4px solid #c98a00;
  border-radius: 4px;
  background: #fff6e0;
  color: #3d2a00;
  font-size: 16px;
}
.documents-backup .text-button {
  min-height: 44px;
  font-size: 16px;
  font-weight: 700;
}
.documents-count {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.documents-count:empty {
  display: none;
}
.documents-empty h2 {
  margin-top: 0;
  font-size: 20px;
}
.documents-empty p {
  font-size: 16px;
}
.documents-empty .button {
  min-height: 48px;
  font-size: 16px;
}
.doc-more:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.documents-open .button {
  min-height: 44px;
  font-size: 15px;
}
[data-doc-shared] .shared-links summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
}

/* Narrow (phone, or a tablet with the sidebar open): records as cards, readable at arm's length. */
@container (max-width: 699px) {
  .documents-table,
  .documents-table tbody,
  .documents-table tr,
  .documents-table td,
  .documents-table tbody th {
    display: block;
  }
  .documents-table thead {
    display: none;
  }
  .documents-table tr {
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid #cdd8c8;
    border-radius: 8px;
  }
  .documents-table td,
  .documents-table tbody th {
    padding: 2px 0;
    border: 0;
    font-size: 16px;
  }
  .documents-table tbody th {
    font-size: 18px;
  }
  .documents-table td.is-blank {
    display: none;
  }
  .documents-table td[data-label='Site']::before,
  .documents-table td[data-label='Date']::before,
  .documents-table td[data-label='Status']::before {
    content: attr(data-label) ': ';
    color: var(--muted);
    font-size: 15px;
  }
  .documents-kind {
    font-size: 14px;
  }
  .documents-open {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
  }
  .documents-open > .button {
    flex: 1 1 140px;
    min-height: 48px;
    font-size: 16px;
    margin: 0;
  }
  .documents-open .doc-more {
    flex-basis: 100%;
  }
  .documents-open .doc-more .button {
    flex: 1 1 140px;
    min-height: 48px;
    margin: 0;
    font-size: 16px;
  }
}
/* Wide: a table, type buttons, and every action in the row. */
@container (min-width: 700px) {
  .documents-intro {
    display: block;
  }
  .documents-search {
    max-width: 560px;
  }
  .documents-filter .documents-filter-narrow {
    display: none;
  }
  .documents-filter .documents-groups {
    display: flex;
  }
  .documents-table td,
  .documents-table tbody th {
    font-size: 15px;
  }
  .documents-table tbody th {
    font-size: 16px;
  }
  .documents-open {
    white-space: nowrap;
  }
  .documents-open .doc-more-toggle {
    display: none;
  }
  .documents-open .doc-more,
  .documents-open .doc-more[hidden] {
    display: inline-flex;
    gap: 6px;
    margin: 0 0 0 6px;
  }
  .documents-open .doc-more .button + .button {
    margin: 0;
  }
}
.documents-backup {
  display: block;
}
.documents-backup p {
  margin: 0;
}
.documents-backup .text-button {
  min-height: 40px;
  padding: 0;
  vertical-align: baseline;
}
.documents-backup-where {
  color: #5b4300;
  font-size: 15px;
}
/* Documents is its own heading on phones: no breadcrumb above it. */
@media (max-width: 760px) {
  body[data-view='documents'] .topbar > span:first-child {
    display: none;
  }
}
/* Medium (tablet portrait, or a laptop with the sidebar open): the table, with Open and
   More actions per row so the row never runs off the side. */
@container (min-width: 700px) and (max-width: 1023px) {
  .documents-open {
    white-space: normal;
    text-align: right;
  }
  .documents-open .doc-more-toggle {
    display: inline-flex;
    margin-left: 6px;
  }
  .documents-open .doc-more[hidden] {
    display: none;
  }
  .documents-open .doc-more:not([hidden]) {
    display: flex;
    justify-content: flex-end;
    margin: 6px 0 0;
  }
}
@container (min-width: 700px) {
  .documents-table td[data-label='Date'],
  .documents-table td[data-label='Status'] {
    white-space: nowrap;
  }
}
@container (min-width: 700px) {
  .documents-table thead th {
    white-space: nowrap;
  }
}
@container (min-width: 700px) and (max-width: 1023px) {
  .documents-open {
    white-space: nowrap;
  }
  .documents-open .doc-more:not([hidden]) {
    flex-wrap: wrap;
    white-space: normal;
  }
}
.documents-kind-inline {
  display: none;
}
@container (min-width: 700px) and (max-width: 1023px) {
  .documents-table thead th:first-child,
  .documents-table td[data-label='Type'] {
    display: none;
  }
  .documents-table .documents-kind-inline {
    display: table;
    margin-top: 4px;
    font-weight: 600;
  }
}
/* Medium: fixed columns so long titles and sites wrap and Open / More actions always fit. */
@container (min-width: 700px) and (max-width: 1023px) {
  .documents-table {
    table-layout: fixed;
  }
  .documents-table thead th:nth-child(3) {
    width: 22%;
  }
  .documents-table thead th:nth-child(4) {
    width: 108px;
  }
  .documents-table thead th:nth-child(5) {
    width: 96px;
  }
  .documents-table thead th:nth-child(6) {
    width: 236px;
  }
}
/* Site filter: shown where there is room for it beside search. */
.documents-site {
  display: none;
  gap: 2px;
  color: var(--muted);
  font-size: 13px;
}
.documents-site select {
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #cdd8c8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
@container (min-width: 700px) {
  .documents-search {
    display: inline-block;
    width: min(560px, 60%);
    vertical-align: bottom;
  }
  .documents-site {
    display: inline-grid;
    width: min(320px, 36%);
    margin-left: 10px;
    vertical-align: bottom;
  }
}
.documents-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.documents-toolbar .documents-search {
  flex: 1 1 260px;
}
@container (min-width: 700px) {
  .documents-toolbar .documents-search {
    display: block;
    width: auto;
    max-width: 560px;
  }
  .documents-toolbar .documents-site {
    width: auto;
    flex: 0 1 300px;
    margin: 0;
  }
}

/* Site board, 2026-11: crew send-by-code, board cards, code card, day tiles, wide layout. */
.site-board {
  display: grid;
  gap: 18px;
}
.board-join {
  border: 2px solid #3f8a55;
}
.board-join h2 {
  margin-top: 0;
}
.board-join > p,
.board-run > p {
  font-size: 16px;
  line-height: 1.5;
}
.board-join-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.board-join-form .field {
  margin: 0;
  flex: 0 1 260px;
}
.board-code-input {
  box-sizing: border-box;
  height: auto !important;
  min-height: 60px;
  padding: 8px 14px !important;
  line-height: 1.2;
  font-size: 28px !important;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.board-join-form .button {
  min-height: 60px;
  font-size: 17px;
}
.board-joined {
  display: grid;
  gap: 2px;
  margin: 0 0 6px;
}
.board-joined strong {
  font-size: 22px;
}
.board-joined span,
.board-join [data-join-other] {
  font-size: 16px;
}
.board-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.board-card {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 96px;
  padding: 14px;
  border: 1px solid #b8c9b6;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.board-card:hover {
  border-color: var(--green);
}
.board-card-name {
  font-size: 19px;
  font-weight: 800;
}
.board-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 15px;
}
.board-card-count {
  font-size: 16px;
  font-weight: 700;
  color: #1d5a37;
}
.board-code-chip {
  padding: 2px 8px;
  border-radius: 4px;
  background: #e3f0e4;
  color: #1d5a37;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.board-ended {
  padding: 2px 8px;
  border-radius: 4px;
  background: #f3e3d3;
  color: #7a3a00;
  font-weight: 700;
}
.board-new > summary {
  min-height: 48px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.board-new .field textarea,
.board-new .field input,
.board-new .field select {
  font-size: 16px;
}
.board-new .button {
  min-height: 48px;
  font-size: 16px;
}
/* One board. */
.board-layout {
  display: grid;
  gap: 18px;
  grid-template-areas: 'head' 'side' 'lists';
}
.board-head {
  grid-area: head;
}
.board-side {
  grid-area: side;
}
.board-lists {
  grid-area: lists;
  display: grid;
  gap: 18px;
  align-content: start;
}
.board-head-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: end;
  justify-content: space-between;
}
.board-day {
  display: grid;
  gap: 2px;
  font-size: 14px;
  font-weight: 700;
}
.board-day select {
  min-height: 44px;
  font-size: 16px;
}
.board-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 14px 0 6px;
}
.board-stat {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
  background: #f7f8f4;
  font-size: 15px;
}
.board-stat-n {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
}
.board-stat-n small {
  font-size: 20px;
  color: var(--muted);
}
.board-stat.is-good {
  border-color: #3f8a55;
  background: #e8f3ec;
}
.board-stat.is-warn {
  border: 2px solid #c98a00;
  background: #fff6e0;
}
.board-code-card > summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
  min-height: 48px;
  cursor: pointer;
}
.board-code-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.board-code-big {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.board-code-card p {
  font-size: 16px;
  line-height: 1.5;
}
.board-code-card .share-qr img {
  width: min(200px, 60vw);
  height: auto;
}
.board-code-card .button {
  min-height: 48px;
  font-size: 16px;
}
.board-code-card .button.small {
  min-height: 44px;
  font-size: 15px;
}
.board-expiry {
  margin: 10px 0 4px;
}
.board-code-card .text-button {
  min-height: 44px;
  font-size: 15px;
}
@media (min-width: 1024px) {
  .board-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas: 'head side' 'lists side';
    align-items: start;
  }
  .board-side {
    position: sticky;
    top: 16px;
  }
  .board-code-card > summary {
    pointer-events: none;
    flex-direction: column;
  }
  .board-code-card > summary::-webkit-details-marker,
  .board-code-card > summary::marker {
    display: none;
  }
}
@media (max-width: 650px) {
  .board-code-big {
    font-size: 30px;
  }
  .board-pick li {
    flex-wrap: wrap;
  }
}
/* The printed sign for the site office: only the sign prints. */
.board-sign-print {
  display: none;
}
@media print {
  body.printing-sign > *:not(.board-sign-print) {
    display: none !important;
  }
  body.printing-sign .board-sign-print {
    display: block;
    padding: 24px;
    color: #000;
    text-align: center;
    font-family: inherit;
  }
  .board-sign-print h1 {
    margin: 6px 0 18px;
    font-size: 40pt;
  }
  .board-sign-kicker {
    font-size: 20pt;
  }
  .board-sign-print .board-sign-code {
    margin: 0 0 18px;
    font-size: 88pt;
    font-weight: 800;
    letter-spacing: 0.12em;
  }
  .board-sign-print ol {
    display: inline-block;
    margin: 0 0 18px;
    text-align: left;
    font-size: 20pt;
    line-height: 1.6;
  }
  .board-sign-print .share-qr {
    display: flex;
    justify-content: center;
    margin: 0 0 8px;
  }
  .board-sign-print .share-qr img {
    width: 220px;
    height: 220px;
  }
  .board-sign-print p {
    font-size: 14pt;
  }
  .board-sign-foot {
    margin-top: 18px;
    color: #333;
  }
}
.board-join > .helper {
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 15px;
}
.board-new .helper,
.board-view .helper {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink);
}
/* Board recovery key. */
.board-recovery {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
  background: #f7f8f4;
  font-size: 16px;
  line-height: 1.5;
}
.board-recovery.is-unsaved,
.board-recovery.is-needed {
  border: 2px solid #c98a00;
  background: #fff6e0;
}
.board-recovery > summary {
  min-height: 44px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.board-recovery h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.board-recovery-key {
  margin: 8px 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.board-recovery .button {
  min-height: 48px;
  font-size: 16px;
}
.board-recovery .helper {
  margin-top: 6px;
  color: var(--ink);
  font-size: 15px;
}
.board-recovery-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.board-recovery-form .field {
  flex: 1 1 320px;
  margin: 0;
}
.board-recovery-form input {
  font-size: 18px !important;
  letter-spacing: 0.06em;
}
@media print {
  .board-sign-print .board-recovery-print-key {
    margin: 12px 0 24px;
    font-size: 30pt;
    font-weight: 800;
    letter-spacing: 0.08em;
  }
}
.board-none {
  color: var(--ink);
  font-size: 16px;
}
.board-qr-label {
  margin: 12px 0 4px;
}
.board-recovery-warn {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 4px solid #c98a00;
  background: #fff;
}
/* The lead's briefing for crews. */
.board-brief {
  margin: 10px 0;
  padding: 10px 14px;
  border-left: 4px solid #c98a00;
  border-radius: 6px;
  background: #fff6e0;
  color: var(--ink);
}
.board-brief h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.board-brief-label {
  margin: 8px 0 2px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.board-brief ul {
  margin: 0;
  padding-left: 20px;
}
.board-brief li {
  font-size: 17px;
  line-height: 1.45;
}
.board-brief .helper {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 15px;
}
.board-briefing > summary {
  min-height: 48px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.board-briefing p {
  font-size: 16px;
  line-height: 1.5;
}
.board-briefing textarea {
  font-size: 16px !important;
}
.board-briefing .button {
  min-height: 48px;
  font-size: 16px;
}
.board-brief-note {
  padding: 8px 10px;
  border-left: 4px solid #c98a00;
  background: #fffaf0;
  font-size: 15px !important;
}
.board-side {
  display: grid;
  gap: 18px;
  align-content: start;
}
.board-took {
  color: #1d5a37;
  font-weight: 700;
}
.board-brief-prefill {
  padding: 8px 10px;
  border-left: 4px solid var(--green);
  background: var(--soft);
  font-size: 15px !important;
}
.board-briefing .text-button {
  min-height: 44px;
  font-size: 15px;
  font-weight: 700;
}
/* Send a saved document to a site board. */
.board-send-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
.board-send-dialog::backdrop {
  background: rgba(20, 30, 25, 0.45);
}
.board-send-dialog h2 {
  margin: 0 0 6px;
  font-size: 22px;
}
.board-send-dialog p {
  font-size: 16px;
}
.board-send-targets {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
.board-send-targets li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
}
.board-send-targets li div {
  display: grid;
  gap: 2px;
}
.board-send-targets strong {
  font-size: 17px;
}
.board-send-targets span {
  font-size: 15px;
  color: var(--muted);
}
.board-send-dialog .button,
.board-send-dialog .text-button {
  min-height: 44px;
  font-size: 16px;
}
.board-own-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 6px 0 10px;
}
.board-own-picks p {
  margin: 0;
  flex-basis: 100%;
  font-size: 16px;
  font-weight: 700;
}
.board-own-picks .button {
  min-height: 48px;
  font-size: 16px;
}
.board-handed {
  padding: 8px 10px;
  border-left: 4px solid var(--green);
  background: var(--soft);
  font-size: 16px;
}
/* Wide table: the job and site keep room to read; actions wrap under Open instead of
   squeezing the title to one word per line. */
@container (min-width: 1024px) {
  .documents-table tbody th {
    min-width: 200px;
  }
  .documents-table td[data-label='Site'] {
    min-width: 160px;
  }
  .documents-table td[data-label='Status'] {
    min-width: 130px;
  }
  .documents-open {
    min-width: 240px;
    white-space: normal;
  }
  .documents-open .doc-more,
  .documents-open .doc-more[hidden] {
    flex-wrap: wrap;
    margin: 6px 0 0;
  }
}
