.collection-stats {
  display: grid;
  gap: 8px;
  padding: 22px;
  background: #e9efdf;
  border-radius: 6px;
  margin-bottom: 24px;
}
.collection-stats strong {
  font-size: 24px;
  color: var(--green);
}
.collection-stats span {
  font-size: 14px;
}
.collection-stats small {
  font-size: 12px;
  line-height: 1.7;
  color: #596d52;
}
.collection-filters {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.collection-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin: 20px 0;
}
.collection-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
  cursor: pointer;
  overflow-wrap: anywhere;
  color: var(--green);
}
.collection-card:hover {
  border-color: #6a865a;
}
.collection-card:focus-visible {
  outline: 3px solid #738b5a;
  outline-offset: 2px;
}
.collection-card small {
  font-size: 11px;
  line-height: 1.5;
  color: #67785f;
}
.collection-card strong {
  font-size: 17px;
  line-height: 1.5;
}
.collection-card span {
  font-size: 11px;
  margin-top: auto;
  color: #6d805e;
}
.collection-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.collection-dialog {
  width: min(1100px, calc(100vw - 30px));
  max-height: 90dvh;
  border: 1px solid #d7dece;
  border-radius: 8px;
  padding: 26px;
  overflow: auto;
  background: #fbfcf7;
  color: var(--ink);
}
.collection-dialog::backdrop {
  background: #173d3580;
}
[data-collection-detail] {
  max-width: 900px;
  background: white;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
[data-collection-detail][hidden],
[data-collection-browse][hidden] {
  display: none !important;
}
[data-collection-detail] h2 {
  font-size: 27px;
  line-height: 1.4;
  margin: 14px 0 22px;
}
[data-collection-detail] h3 {
  font-size: 18px;
  line-height: 1.5;
  margin: 26px 0 14px;
}
[data-collection-detail] p,
[data-collection-detail] li {
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
[data-collection-detail] ul {
  padding-left: 22px;
}
[data-collection-detail] .ack {
  line-height: 1.7;
  font-size: 14px;
  align-items: flex-start;
  margin: 14px 0;
}
[data-collection-detail] .ack input {
  flex-shrink: 0;
  margin-top: 5px;
}
.collection-context {
  border-left: 3px solid #bacba4;
  padding: 12px 18px;
  background: #f3f7ec;
}
.collection-stage,
.collection-related {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 17px;
  margin: 16px 0;
}
.collection-stage summary,
.collection-related summary {
  cursor: pointer;
  line-height: 1.7;
  min-height: 44px;
  font-weight: 600;
}
.collection-related .text-button {
  display: block;
  min-height: 44px;
  line-height: 1.6;
  text-align: left;
  margin: 8px 0;
  white-space: normal;
}
.collection-stage .text-button {
  text-align: left;
  line-height: 1.6;
}
.collection-start {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0;
}
.collection-start h2 {
  font-size: 24px;
  line-height: 1.4;
  margin: 15px 0;
}
.collection-start p {
  max-width: 650px;
  font-size: 13px;
  line-height: 1.8;
}
.collection-start > .button {
  flex-shrink: 0;
  white-space: normal;
}
.collection-dialog .wording-modes {
  flex-wrap: wrap;
}
.collection-dialog .button {
  white-space: normal;
}
#helper-expanded {
  margin-bottom: 20px;
}
#worksheet-collection {
  margin: 16px 0;
}
.collection-toolbar .text-button {
  min-height: 44px;
}
@media (max-width: 1000px) {
  .collection-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 750px) {
  .collection-filters,
  .collection-cards {
    grid-template-columns: 1fr;
  }
  .collection-dialog {
    width: calc(100vw - 16px);
    padding: 16px;
    max-height: 94dvh;
  }
  .collection-card {
    padding: 18px;
  }
  .collection-card strong {
    font-size: 17px;
  }
  .collection-filters input,
  .collection-filters select {
    font-size: 16px;
    min-height: 44px;
  }
  .collection-start {
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 14px;
  }
  .collection-start > .button {
    min-height: 44px;
  }
  [data-collection-detail] {
    padding: 17px;
  }
  [data-collection-detail] h2 {
    font-size: 24px;
  }
  .collection-stage,
  .collection-related {
    padding: 13px;
  }
  .collection-stats {
    padding: 18px;
  }
  .collection-dialog .export-actions {
    flex-wrap: wrap;
  }
  .collection-dialog .button {
    min-height: 44px;
  }
  .collection-toolbar {
    gap: 8px;
  }
}
.collection-featured {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 24px;
}
.collection-featured .text-button {
  min-height: 44px;
  line-height: 1.6;
  text-align: left;
}
.collection-featured .text-button,
.collection-related .text-button,
.collection-stage .text-button,
.collection-toolbar .text-button {
  font-size: 14px;
}
@media (max-width: 750px) {
  .collection-card small,
  .collection-card span {
    font-size: 12px;
  }
  .collection-dialog .button,
  [data-collection-detail] .wording-modes button {
    font-size: 14px;
  }
}
/* Compact task walkthrough, stable context and reachable actions. */
.collection-stats[hidden],
.collection-viewbar [hidden],
.collection-related[hidden] {
  display: none !important;
}
#main:has(.collection-is-detail) > .page-heading,
#main:has(.collection-is-detail) > [data-collection-briefing] {
  display: none;
}
.collection-viewbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  max-width: 900px;
  background: #f5f5ef;
  border-bottom: 1px solid #d5dfd1;
  padding: 10px 0;
  margin-bottom: 16px;
}
.collection-view-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.collection-viewbar .wording-modes {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.collection-viewbar .wording-modes > span {
  font-size: 12px;
  font-weight: 600;
}
.collection-viewbar .wording-modes button,
.collection-view-nav button {
  min-height: 44px;
}
.collection-viewbar .wording-modes button {
  padding: 9px 12px;
  font-size: 13px;
}
.collection-view-nav .text-button {
  font-size: 13px;
  text-align: left;
  white-space: normal;
}
[data-collection-detail] h2 {
  margin: 8px 0 12px;
}
.collection-safety-note {
  color: #596b5a;
  font-size: 13px;
  margin: 8px 0;
}
.collection-safety-note summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
}
.collection-intro-guidance {
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  padding-bottom: 10px;
}
.collection-intro-guidance > summary {
  font-size: 13px;
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  font-weight: 600;
}
.collection-stage-picker {
  position: relative;
  padding-bottom: 4px;
}
.collection-stage-picker > h3 {
  margin-top: 18px;
}
.collection-stage {
  padding: 0;
  margin: 10px 0;
}
.collection-stage > summary {
  padding: 12px;
  font-size: 14px;
  min-height: 48px;
  scroll-margin-top: 155px;
}
.collection-stage-count {
  font-size: 11px;
  font-weight: 500;
  color: #45644e;
  white-space: nowrap;
  margin-left: 8px;
}
.collection-pick-row {
  display: flex;
  align-items: center;
  border-top: 1px solid #e4e9e0;
  padding: 0 6px 0 12px;
  gap: 8px;
  transition: background-color 0.12s;
}
.collection-pick-row.is-selected {
  background: #e7f1e7;
  box-shadow: inset 3px 0 #245c48;
}
.collection-pick-row > label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 11px 0;
  min-height: 48px;
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
}
.collection-pick-row input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #245c48;
  margin: 3px 0 0;
}
.collection-pick-row small {
  display: block;
  font-size: 12px;
  color: #596b5a;
}
.collection-row-help {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-weight: 700;
  color: #245c48;
}
.collection-row-help:hover {
  background: #dce8d9;
}
.collection-stage-reference {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 6px 12px;
  font-size: 13px;
}
.collection-stage-reference .text-button {
  min-height: 44px;
  flex-shrink: 0;
}
.collection-add-bar {
  position: sticky;
  bottom: 0;
  z-index: 7;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #b9cbb8;
  box-shadow: 0 -4px 14px #173d3510;
  padding: 12px;
  margin: 14px -1px 0;
  border-radius: 6px;
}
.collection-add-bar > span {
  font-size: 13px;
  font-weight: 600;
}
.collection-add-bar .button {
  min-height: 44px;
  white-space: normal;
}
.collection-help-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(580px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  max-width: 100vw;
  margin: 0;
  padding: 0 24px 28px;
  border: 0;
  border-left: 1px solid #c5d0c0;
  background: #fbfcf7;
  color: var(--ink);
  overflow: auto;
}
.collection-help-drawer::backdrop {
  background: #173d3566;
}
.collection-help-drawer > header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 18px 0;
  background: #fbfcf7;
  border-bottom: 1px solid var(--line);
}
.collection-help-drawer h2 {
  font-size: 23px;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}
.collection-help-drawer h3 {
  margin-top: 24px;
  font-size: 17px;
}
.collection-help-drawer p,
.collection-help-drawer li {
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.collection-help-drawer .helper {
  font-size: 12px;
}
.collection-help-drawer summary {
  min-height: 44px;
  cursor: pointer;
  padding: 12px 0;
}
.collection-help-drawer a {
  display: inline-block;
  min-height: 44px;
  padding: 8px 0;
}
.collection-help-drawer > header .button {
  flex-shrink: 0;
  min-height: 44px;
}
.collection-dialog > .collection-toolbar {
  position: sticky;
  top: -26px;
  z-index: 12;
  padding-block: 10px;
  background: #fbfcf7;
}
.collection-dialog .collection-viewbar {
  top: 48px;
  background: #fbfcf7;
}
@media (max-width: 850px) {
  body:has([data-collection-browse]) > .sidebar {
    position: sticky;
    top: 0;
    z-index: 12;
  }
  .collection-viewbar {
    top: 64px;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 6px 0;
  }
  .collection-view-nav {
    gap: 4px 14px;
  }
  .collection-viewbar .wording-modes {
    margin-left: auto;
  }
  .collection-add-bar {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    gap: 10px;
  }
  .collection-add-bar .button {
    font-size: 12px;
  }
  .collection-help-drawer {
    padding-inline: 18px;
  }
  .collection-help-drawer h2 {
    font-size: 21px;
  }
  .collection-dialog > .collection-toolbar {
    top: -16px;
  }
  .collection-dialog .collection-viewbar {
    top: 48px;
  }
}
@media (max-width: 450px) {
  .collection-viewbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }
  .collection-view-nav {
    justify-content: space-between;
  }
  .collection-viewbar .wording-modes {
    justify-content: space-between;
    width: 100%;
  }
  .collection-add-bar > span {
    font-size: 12px;
  }
  .collection-pick-row > label {
    font-size: 14px;
  }
  .collection-help-drawer > header {
    gap: 10px;
  }
  .collection-help-drawer > header .button {
    padding: 10px;
    font-size: 12px;
  }
}
body.field-contrast .collection-pick-row.is-selected {
  background: #d5ead2;
  box-shadow: inset 4px 0 #000;
}
body.field-contrast .collection-add-bar,
body.field-contrast .collection-viewbar,
body.field-contrast .collection-help-drawer,
body.field-contrast .collection-help-drawer > header {
  background: #fff;
  color: #000;
  border-color: #000;
}
body.field-contrast .collection-stage-count,
body.field-contrast .collection-row-help {
  color: #000;
}

.collection-viewbar .wording-modes {
  flex-direction: row;
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus-visible {
  background: #315249 !important;
  color: #fff !important;
}

[data-collection-title] {
  font-size: 27px;
  line-height: 1.4;
  margin: 8px 0 12px !important;
  letter-spacing: -0.7px;
}
@media (max-width: 750px) {
  [data-collection-title] {
    font-size: 24px;
  }
}

.collection-card-category {
  display: flex;
  align-items: center;
  gap: 9px;
}
.collection-category-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #4d715a;
}
.collection-card-category > span {
  font-size: 11px !important;
  margin: 0 !important;
  line-height: 1.5;
}
.field-contrast .collection-category-icon {
  color: #000;
}
@media (max-width: 750px) {
  .collection-card-category > span {
    font-size: 12px !important;
  }
  .collection-category-icon {
    width: 24px;
    height: 24px;
  }
}

/* Catalogue scan hierarchy. Browsing layout and topic reading depth are separate controls. */
.collection-viewbar[hidden] {
  display: none !important;
}
#main:has([data-collection-browse]) {
  padding-top: 24px;
}
#main:has([data-collection-browse]) > .page-heading {
  margin-bottom: 18px;
}
#main:has([data-collection-browse]) > .page-heading h1 {
  font-size: 32px;
}
.collection-start-briefing {
  font-size: 12px;
  min-height: 44px;
  line-height: 1.5;
  text-align: left;
}
.collection-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 16px;
  padding: 10px 0;
  margin: 4px 0 12px;
  background: transparent;
  border-radius: 0;
}
.collection-stats strong {
  font-size: 16px;
  color: #284638;
}
.collection-stats span {
  font-size: 12px;
  color: #4d6257;
}
.collection-filters {
  grid-template-columns: minmax(0, 2fr) minmax(120px, 0.8fr) minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.collection-filters .field {
  margin-bottom: 0;
}
.collection-clear {
  min-height: 44px;
  font-size: 12px;
  white-space: nowrap;
}
.collection-featured {
  display: block;
  margin: 0 0 14px;
}
.collection-featured > span {
  display: block;
  font-size: 11px;
  font-weight: 650;
  color: #536957;
  margin-bottom: 7px;
}
.collection-featured > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.collection-shortcut {
  border: 1px solid #c8d6cc;
  background: #f0f5ef;
  border-radius: 20px;
  padding: 9px 13px;
  min-height: 44px;
  text-align: left;
  font-size: 12px;
  color: #294d3c;
  white-space: nowrap;
}
.collection-shortcut:hover {
  background: #e2ece0;
  border-color: #6e8e74;
}
.collection-layout-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px;
}
.collection-layout-tools > span {
  font-size: 12px;
  color: #4a5d51;
}
.collection-layout-tools > [role='group'] {
  display: flex;
  border: 1px solid #c7d4c3;
  border-radius: 5px;
  overflow: hidden;
}
.collection-layout-tools button {
  border: 0;
  min-height: 44px;
  padding: 10px 13px;
  background: #fff;
  color: #355440;
  font-size: 12px;
}
.collection-layout-tools button[aria-pressed='true'] {
  background: #173d35;
  color: #fff;
}
.collection-results-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.collection-results-nav > span {
  font-size: 13px;
  color: #3d5547;
}
.collection-results-nav > div {
  display: flex;
  gap: 8px;
}
.collection-results-nav .button {
  min-height: 44px;
  font-size: 12px;
  padding: 10px 13px;
}
.collection-results-nav {
  scroll-margin-top: 80px;
}
.collection-card {
  min-height: 190px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px #173d3509;
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
  gap: 15px;
}
.collection-card:hover {
  border-color: #4d795e;
  box-shadow: 0 5px 16px #173d351c;
}
.collection-card strong {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
.collection-card-category {
  align-self: flex-start;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  background: #eaf1f8;
  color: #273c50 !important;
}
.collection-card-category > span {
  color: #273c50 !important;
  font-weight: 550;
}
.collection-category-icon {
  color: #3c586d;
}
.collection-card .collection-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto !important;
  width: 100%;
}
.collection-card-footer > span {
  margin: 0 !important;
  font-size: 12px !important;
  color: #536958;
}
.collection-card .collection-card-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: #e6eee5;
  color: #24533b;
  font-size: 20px !important;
  line-height: 1;
}
.collection-card:hover .collection-card-arrow {
  background: #24533b;
  color: #fff;
}
.collection-cards.is-list {
  grid-template-columns: 1fr;
  gap: 10px;
}
.collection-cards.is-list .collection-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.7fr) auto;
  align-items: center;
  min-height: 88px;
  padding: 16px 18px;
  gap: 16px;
}
.collection-cards.is-list .collection-card-category {
  align-self: center;
}
.collection-cards.is-list .collection-card-footer {
  margin-top: 0 !important;
  width: auto;
}
.collection-cards.is-list .collection-card-footer > span:first-child {
  white-space: nowrap;
}
@media (max-width: 850px) {
  .collection-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }
  .collection-filters > .field:first-child {
    grid-column: 1/3;
    grid-row: 1;
  }
  .collection-filters > .field:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .collection-filters > .field:nth-child(3) {
    grid-column: 2/4;
    grid-row: 2;
  }
  .collection-filters > .collection-clear {
    grid-column: 3;
    grid-row: 1;
  }
  .collection-featured > div {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }
  .collection-shortcut {
    flex-shrink: 0;
    scroll-snap-align: start;
  }
  .collection-results-nav {
    scroll-margin-top: 80px;
  }
  .collection-cards.is-list .collection-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
  }
  .collection-cards.is-list .collection-card-category {
    grid-column: 1/-1;
    justify-self: start;
  }
  .collection-cards.is-list .collection-card strong {
    grid-column: 1;
    grid-row: 2;
  }
  .collection-cards.is-list .collection-card-footer {
    grid-column: 2;
    grid-row: 2;
  }
  .collection-cards.is-list .collection-card-footer > span:first-child {
    max-width: 100px;
    white-space: normal;
    text-align: right;
  }
}
@media (max-width: 450px) {
  #main:has([data-collection-browse]) > .page-heading h1 {
    font-size: 30px;
  }
  .collection-stats strong {
    font-size: 15px;
  }
  .collection-card {
    min-height: 175px;
  }
  .collection-layout-tools {
    justify-content: space-between;
  }
  .collection-results-nav {
    gap: 7px;
  }
  .collection-results-nav > span {
    font-size: 12px;
  }
  .collection-results-nav .button {
    font-size: 12px;
    padding: 10px;
  }
  .collection-card-category > span {
    font-size: 12px !important;
  }
}
body.field-contrast .collection-card {
  border-color: #333;
  box-shadow: none;
}
body.field-contrast .collection-card-category {
  background: #e4eef8;
  color: #000 !important;
}
body.field-contrast .collection-card-category > span,
body.field-contrast .collection-category-icon {
  color: #000 !important;
}
body.field-contrast .collection-shortcut {
  border-color: #333;
  color: #000;
}
body.field-contrast .collection-results-nav > span,
body.field-contrast .collection-stats span {
  color: #000;
}
@media (prefers-reduced-motion: reduce) {
  .collection-card {
    transition: none;
  }
}
/* Dense catalogue defaults, pinned filters and independent quick actions. */
.collection-browser-controls {
  position: sticky;
  top: 0;
  z-index: 9;
  background: #f5f5ef;
  border-bottom: 1px solid #cbd7c9;
  padding: 10px 0 4px;
  margin-bottom: 10px;
}
.collection-browser-controls .collection-results-nav {
  margin: 8px 0 0;
}
.collection-browser-controls .collection-filters {
  align-items: end;
}
.collection-browser-controls [hidden] {
  display: none !important;
}
.collection-filter-input {
  position: relative;
  min-width: 0;
}
.collection-filter-input input,
.collection-filter-input select {
  padding-right: 46px;
}
.collection-filter-input button {
  position: absolute;
  right: 2px;
  top: 2px;
  bottom: 2px;
  width: 40px;
  border: 0;
  background: #edf2ea;
  color: #24533a;
  border-radius: 4px;
  font-size: 21px;
  line-height: 1;
  min-height: 38px;
}
.collection-filter-input:has(select) select {
  padding-right: 66px;
}
.collection-filter-input:has(select) button {
  right: 22px;
  width: 36px;
}
.collection-filter-input input::-webkit-search-cancel-button {
  display: none;
}
.collection-action-status {
  margin: 8px 0;
  font-size: 12px;
  color: #355c40;
  line-height: 1.6;
}
.collection-action-status:empty {
  display: none;
}
.collection-browse-extras {
  margin: 6px 0 8px;
}
.collection-browse-extras > summary {
  font-size: 12px;
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
  color: #49634e;
}
.collection-layout-tools {
  margin: 4px 0 8px;
}
.collection-result {
  position: relative;
  min-width: 0;
}
.collection-result > .collection-card {
  width: 100%;
  height: 100%;
}
.collection-result .collection-card-category {
  max-width: calc(100% - 66px);
}
.collection-quick-add {
  position: absolute;
  right: 10px;
  top: 12px;
  min-width: 48px;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #c7d6c3;
  border-radius: 5px;
  background: #f1f6ed;
  color: #254f35;
  font-size: 12px;
  font-weight: 600;
}
.collection-quick-add:hover {
  background: #dcebd7;
  border-color: #608362;
}
.collection-reference-only {
  position: absolute;
  right: 20px;
  top: 24px;
  font-size: 13px;
  color: #63766a;
}
.collection-card-footer b {
  font-weight: 500;
}
.collection-card .collection-stage-metric,
.collection-card .collection-related-metric {
  display: inline-flex;
  gap: 3px;
  align-items: baseline;
}
.collection-card-footer .collection-metric-label {
  margin: 0 !important;
  font-size: 11px !important;
  white-space: nowrap;
}
.collection-card-footer > span {
  min-width: 0;
}
.collection-list-head {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 64px 72px 56px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-bottom: 1px solid #bccdb8;
  color: #526854;
  font-size: 11px;
  font-weight: 650;
}
.collection-list-head > span:nth-child(n + 3) {
  text-align: center;
}
.collection-cards.is-list {
  gap: 0;
  margin: 0 0 12px;
}
.collection-cards.is-list .collection-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  align-items: stretch;
  border: 1px solid #d7e0d3;
  border-top: 0;
  background: #fff;
}
.collection-cards.is-list .collection-result:hover {
  background: #f0f5ed;
}
.collection-cards.is-list .collection-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 64px 72px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 10px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  text-align: left;
  height: auto;
}
.collection-cards.is-list .collection-card strong {
  font-size: 13px;
  font-weight: 550;
  line-height: 1.5;
  grid-column: auto;
  grid-row: auto;
  overflow-wrap: anywhere;
}
.collection-cards.is-list .collection-card-category {
  grid-column: auto;
  grid-row: auto;
  align-self: center;
  justify-self: start;
  background: transparent;
  padding: 0;
  max-width: 100%;
  gap: 7px;
}
.collection-cards.is-list .collection-card-category > span {
  font-size: 11px !important;
}
.collection-cards.is-list .collection-category-icon {
  width: 18px;
  height: 18px;
}
.collection-cards.is-list .collection-category-name {
  display: none !important;
}
.collection-cards.is-list .collection-card-footer {
  display: contents !important;
}
.collection-cards.is-list .collection-stage-metric,
.collection-cards.is-list .collection-related-metric {
  display: block;
  text-align: center;
  grid-column: auto;
  grid-row: auto;
  white-space: normal !important;
  font-size: 12px !important;
  max-width: none !important;
}
.collection-cards.is-list .collection-metric-label,
.collection-cards.is-list .collection-card-arrow {
  display: none !important;
}
.collection-cards.is-list .collection-quick-add {
  position: static;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  border: 0;
  border-left: 1px solid #d7e0d3;
  border-radius: 0;
  font-size: 11px;
}
.collection-cards.is-list .collection-reference-only {
  position: static;
  align-self: center;
  text-align: center;
}
.collection-quick-drawer .collection-add-bar {
  margin-top: 18px;
}
.collection-quick-drawer > header .eyebrow {
  margin: 0 0 7px;
}
.collection-quick-drawer [data-quick-status] {
  font-size: 13px;
  line-height: 1.6;
  color: #345a3e;
}
.collection-quick-drawer .collection-stage {
  margin-block: 12px;
}
.collection-browser-controls .collection-clear {
  font-size: 11px;
  background: transparent;
}
.collection-dialog .collection-browser-controls {
  top: 48px;
  background: #fbfcf7;
}
@media (max-width: 850px) {
  .collection-browser-controls {
    top: 64px;
    padding-top: 8px;
  }
  .collection-browser-controls .collection-filters {
    gap: 8px;
  }
  .collection-browser-controls .collection-results-nav {
    margin-top: 7px;
  }
  .collection-browser-controls .collection-results-nav .button {
    min-height: 40px;
    padding: 8px 10px;
  }
  .collection-dialog .collection-browser-controls {
    top: 48px;
  }
  .collection-list-head {
    grid-template-columns: 130px minmax(0, 1fr) 64px 72px 56px;
  }
}
@media (max-width: 600px) {
  .collection-list-head {
    grid-template-columns: 88px minmax(0, 1fr) 48px;
  }
  .collection-list-head > span:nth-child(3),
  .collection-list-head > span:nth-child(4) {
    display: none;
  }
  .collection-list-head > span:last-child {
    grid-column: 3;
  }
  .collection-cards.is-list .collection-result {
    grid-template-columns: minmax(0, 1fr) 48px;
  }
  .collection-cards.is-list .collection-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 4px 8px;
    padding: 8px;
  }
  .collection-cards.is-list .collection-card-category {
    grid-column: 1;
    grid-row: 1/3;
    align-self: start;
    gap: 4px;
  }
  .collection-cards.is-list .collection-card strong {
    grid-column: 2;
    grid-row: 1;
    font-size: 13px;
  }
  .collection-cards.is-list .collection-card-footer {
    display: flex !important;
    grid-column: 2;
    grid-row: 2;
    gap: 10px;
    justify-content: flex-start;
  }
  .collection-cards.is-list .collection-stage-metric,
  .collection-cards.is-list .collection-related-metric {
    display: inline-flex;
    text-align: left;
    gap: 3px;
    font-size: 11px !important;
  }
  .collection-cards.is-list .collection-metric-label {
    display: inline !important;
    font-size: 10px !important;
    white-space: normal;
  }
  .collection-browser-controls .collection-results-nav > span {
    font-size: 11px;
  }
  .collection-browser-controls .collection-results-nav {
    gap: 4px;
  }
  .collection-browser-controls .collection-results-nav .button {
    font-size: 11px;
  }
  .collection-browser-controls .collection-filter-input input,
  .collection-browser-controls .collection-filter-input select {
    font-size: 16px;
  }
  .collection-browser-controls .collection-results-nav > div {
    gap: 5px;
  }
}
body.field-contrast .collection-browser-controls {
  background: #fff;
  border-color: #000;
}
body.field-contrast .collection-cards.is-list .collection-result {
  border-color: #444;
}
body.field-contrast .collection-quick-add {
  color: #000;
  border-color: #333;
}
body.field-contrast .collection-list-head {
  color: #000;
  border-color: #333;
}
body.field-contrast .collection-action-status {
  color: #000;
}
.collection-figure-flag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff3d6;
  color: #6b4a00;
  font-size: 12px;
  font-weight: 600;
}
.collection-stage-detail {
  margin: 8px 0 10px;
}
.collection-step-list li {
  margin-bottom: 10px;
}
.collection-step-list p {
  margin: 4px 0 0;
}
.collection-note-actions {
  margin: 14px 0;
}
.collection-linked-actions {
  margin: 0 0 10px 28px;
  font-size: 14px;
}
.collection-linked-actions ul {
  margin: 6px 0;
}
.note-matches {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid #bacbb9;
  border-radius: 7px;
}
.note-matches h3 {
  margin: 0 0 4px;
}
.note-matches .text-button {
  display: block;
  margin: 6px 0;
  text-align: left;
  white-space: normal;
}
.quick-flha {
  display: grid;
  gap: 18px;
}
.quick-flha h3 {
  margin: 16px 0 6px;
}
.quick-flha-hazard {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #e3e8df;
}
.quick-flha-hazard input {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
}
.quick-flha-hazard small {
  display: block;
  color: #5e6b62;
}
.quick-flha-ask {
  margin-top: 4px;
  font-weight: 600;
}
.quick-flha-walk {
  touch-action: pan-y pinch-zoom;
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid #d5ddd1;
  border-radius: 10px;
}
.quick-flha-walk h3 {
  margin-top: 0;
}
.quick-flha-walk .quick-flha-hazard:last-of-type {
  border-bottom: 0;
}
.quick-flha-walk .export-actions {
  margin-top: 10px;
}
.quick-flha-walk-stops {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.quick-flha-walk-stops button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 1px solid #c5cfc2;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.quick-flha-walk-stops .has-picks {
  background: #e4efe6;
  border-color: #17634b;
  font-weight: 700;
}
.quick-flha-walk-stops [aria-current='step'] {
  outline: 2px solid #17634b;
  outline-offset: 1px;
}
.quick-flha-add {
  display: flex;
  gap: 8px;
}
.quick-flha-add input {
  flex: 1;
  min-width: 0;
}
.quick-flha-entry {
  padding: 14px 0;
  border-bottom: 1px solid #e3e8df;
}
.quick-flha-entry .text-button {
  display: block;
  text-align: left;
  white-space: normal;
  margin: 6px 0;
}
/* What is left before Save works: big, tappable, each item jumps to its field. */
.quick-flha-missing {
  margin: 14px 0;
  padding: 14px 16px;
  border: 2px solid #c98a00;
  border-radius: 8px;
  background: #fff6e0;
  color: #3d2a00;
  outline: none;
}
.quick-flha-missing:has(.quick-flha-ready) {
  border-color: #3f8a55;
  background: #e8f4ea;
}
.quick-flha-missing:empty {
  display: none;
}
.quick-flha-missing.is-flash {
  animation: flha-flash 0.9s ease-out 2;
}
@keyframes flha-flash {
  50% {
    box-shadow: 0 0 0 6px #f0b42988;
  }
}
.quick-flha-missing h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}
.quick-flha-missing ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.quick-flha-goto {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #d9b45c;
  border-radius: 6px;
  background: #fff;
  color: #3d2a00;
  font: inherit;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.quick-flha-goto:hover,
.quick-flha-goto:focus-visible {
  background: #fff1cc;
}
.quick-flha-ready {
  margin: 0;
  color: #1d5a37;
  font-size: 18px;
  font-weight: 700;
}
[data-flha-pdf][aria-disabled='true'],
[data-flha-copy][aria-disabled='true'] {
  opacity: 0.55;
}
.feed-updates [data-feed-province] {
  min-height: 44px;
  max-width: 20rem;
}
.feed-update-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 12px;
}
.feed-update-card {
  background: var(--paper, #fff);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.feed-update-card h3 {
  margin: 4px 0 8px;
}
.feed-update-scope {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.feed-saved > summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
  font-weight: 700;
}
.feed-save {
  min-height: 44px;
}
.feed-save[aria-pressed='true'] {
  font-weight: 700;
}
.feed-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.feed-stream {
  display: grid;
  gap: 20px;
  overflow-anchor: none;
}
.feed-sentinel {
  min-height: 60px;
  padding: 20px 0;
  text-align: center;
}
.feed-tone-green {
  --feed-accent: #1f6b52;
  --feed-tint: #e6f1ea;
}
.feed-tone-gold {
  --feed-accent: #8a6100;
  --feed-tint: #fbf1d3;
}
.feed-tone-rust {
  --feed-accent: #a8481c;
  --feed-tint: #fbe9df;
}
.feed-tone-blue {
  --feed-accent: #1f5f8b;
  --feed-tint: #e3eff7;
}
.feed-tone-plum {
  --feed-accent: #6d3f83;
  --feed-tint: #f1e8f6;
}
.feed-tone-slate {
  --feed-accent: #48596b;
  --feed-tint: #e8edf2;
}
.feed-tone-teal {
  --feed-accent: #0f6e78;
  --feed-tint: #dff2f3;
}
.feed-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #d5dcd2;
  border-radius: 10px;
  background: #fff;
}
.feed-card-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.feed-card-head h2 {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}
.feed-kicker {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #5e6b62;
}
.feed-kicker svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.feed-hero {
  display: grid;
  flex: none;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--feed-tint);
  color: var(--feed-accent);
}
.feed-hero-icon {
  width: 32px;
  height: 32px;
}
.feed-variant-0 {
  border-top: 5px solid var(--feed-accent);
}
.feed-variant-1 {
  border-left: 6px solid var(--feed-accent);
}
.feed-variant-2 .feed-hero {
  border-radius: 50%;
  background: var(--feed-accent);
  color: #fff;
}
.feed-variant-3 {
  background: var(--feed-tint);
}
.feed-variant-3 .feed-hero {
  background: #fff;
}
.feed-card h3 {
  margin: 18px 0 8px;
  color: var(--feed-accent);
}
.feed-lines {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feed-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.feed-line p {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.feed-line strong {
  display: block;
}
.feed-line-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--feed-tint);
  color: var(--feed-accent);
}
.feed-variant-3 .feed-line-icon {
  background: #fff;
}
.feed-icon {
  width: 20px;
  height: 20px;
}
.feed-effects p {
  font-size: 1.05em;
}
.feed-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.feed-chip {
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--feed-accent);
  border-radius: 999px;
  background: transparent;
  color: var(--feed-accent);
  font: inherit;
  font-size: 14px;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.feed-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.feed-link-editor [data-targets] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feed-link-editor [data-selected] li {
  margin-block: 4px;
}
.feed-review summary {
  cursor: pointer;
}
.feed-review[open] {
  width: 100%;
}
.feed-review .button {
  margin: 8px 6px 0 0;
}
.who-to-call {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.who-entry {
  padding: 14px 16px;
  border: 1px solid #d5dcd2;
  border-radius: 10px;
  background: #fff;
}
.who-entry summary {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}
.who-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e6f1ea;
  color: #1f6b52;
}
.who-ask {
  padding: 10px 12px;
  border-radius: 7px;
  background: #f4f6f0;
}
.who-phones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.who-phones .button {
  white-space: normal;
}
.who-links {
  margin: 12px 0 0;
  padding-left: 18px;
}
/* Quick filters, badges and the worksheet bar. */
.collection-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}
.collection-chip {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #b9cbb8;
  border-radius: 999px;
  background: #fff;
  color: #254f35;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.collection-chip:hover {
  background: #f0f5ed;
}
.collection-chip[aria-pressed='true'] {
  background: #24533b;
  border-color: #24533b;
  color: #fff;
}
.collection-gap-note {
  margin: 10px 0 4px;
  font-size: 14px;
  line-height: 1.55;
}
.collection-gap-note a {
  display: inline;
}
.collection-gap-ask {
  display: block;
  margin-top: 4px;
}
.collection-draft-note {
  margin: 10px 0 6px;
  font-size: 12px;
}
.collection-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}
.collection-badge {
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.collection-badge.is-specialist {
  background: #fde6dd;
  color: #8a2f12;
}
.collection-badge.is-figure {
  background: #fff3d6;
  color: #6b4a00;
}
.collection-card mark {
  background: #fdeca8;
  color: inherit;
  border-radius: 2px;
}
.collection-filter-toggle {
  display: none;
}
.collection-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.collection-sheet-bar {
  position: sticky;
  bottom: 0;
  z-index: 7;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #b9cbb8;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 -4px 14px #173d3514;
}
.collection-sheet-bar > span {
  font-size: 14px;
  font-weight: 600;
}
.collection-sheet-bar .button {
  min-height: 44px;
}
body.field-contrast .collection-chip,
body.field-contrast .collection-sheet-bar {
  border-color: #333;
  color: #000;
}
body.field-contrast .collection-chip[aria-pressed='true'] {
  background: #000;
  color: #fff;
}
body.field-contrast .collection-badge {
  color: #000;
  outline: 1px solid #333;
}
@media (max-width: 600px) {
  /* Search stays pinned; the other filters open from one button. */
  .collection-browser-controls .collection-filters {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .collection-browser-controls .collection-filters > .field:first-child {
    grid-column: 1;
    grid-row: 1;
  }
  .collection-browser-controls .collection-filter-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    min-height: 48px;
    white-space: nowrap;
  }
  .collection-browser-controls .collection-filters > .field:nth-child(2),
  .collection-browser-controls .collection-filters > .field:nth-child(3),
  .collection-browser-controls .collection-filters > .collection-clear {
    display: none;
  }
  .collection-browser-controls .collection-filters.is-open > .field:nth-child(2),
  .collection-browser-controls .collection-filters.is-open > .field:nth-child(3),
  .collection-browser-controls .collection-filters.is-open > .collection-clear {
    display: block;
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .collection-browser-controls .collection-filters.is-open > .collection-clear:not([hidden]) {
    justify-self: start;
  }
  .collection-browser-controls .collection-filters > [hidden] {
    display: none !important;
  }
  .collection-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }
  .collection-chip {
    flex-shrink: 0;
    scroll-snap-align: start;
  }
  /* One column per row: title and badges, with Add beside it. Stages show when a guide is opened. */
  .collection-list-head {
    display: none;
  }
  .collection-cards.is-list .collection-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 12px;
  }
  .collection-cards.is-list .collection-card-category,
  .collection-cards.is-list .collection-card-footer {
    display: none !important;
  }
  .collection-cards.is-list .collection-card strong {
    grid-column: 1;
    grid-row: 1;
    font-size: 15px;
  }
  .collection-cards.is-list .collection-result {
    grid-template-columns: minmax(0, 1fr) 64px;
  }
  .collection-cards.is-list .collection-quick-add {
    font-size: 13px;
    min-height: 48px;
  }
  .collection-sheet-bar {
    padding: 8px 10px;
  }
  .collection-sheet-bar > span {
    font-size: 13px;
  }
}
/* The type column covers this on wider screens. */
.collection-badge.is-type {
  display: none;
  background: #e6eee5;
  color: #24533b;
}
@media (max-width: 600px) {
  .collection-badge.is-type {
    display: inline;
  }
}
.collection-sheet-bar[hidden],
.collection-featured[hidden],
.collection-gap-note[hidden] {
  display: none;
}
@media (max-width: 600px) {
  .collection-add-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .collection-add-actions {
    flex-wrap: nowrap;
  }
  .collection-add-actions .button {
    flex: 1 1 0;
  }
}
.quick-flha-equipment {
  padding: 10px 12px;
  border-radius: 6px;
  background: #f2f6fb;
  color: #2b4a6f;
  font-size: 14px;
}
.quick-flha-equipment .text-button {
  display: inline;
  min-height: 44px;
}
/* Quick FLHA ideas: tap to add a line to the controls, tap again to take it out. */
.quick-flha-ideas[open] {
  padding-bottom: 6px;
}
.quick-flha-idea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 6px 0 0;
  padding: 8px 12px;
  border: 1px solid #cdd8c8;
  border-radius: 8px;
  background: #fff;
  color: #173d35;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.quick-flha-idea:hover {
  border-color: #24533b;
}
.quick-flha-idea[aria-pressed='true'] {
  border-color: #24533b;
  background: #e6eee5;
  font-weight: 600;
}

/* Quick FLHA: start from the last FLHA at a place, then check each copied hazard. */
.flha-previous h2 {
  margin: 0 0 6px;
}
/* The general helper style pulls up under field labels; here it follows a heading. */
.flha-previous .helper {
  margin-top: 0;
}
.flha-previous > p:first-child {
  margin: 0;
}
.flha-previous-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.flha-previous-place {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid #cdd8c8;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.flha-previous-place:hover {
  border-color: var(--green);
  background: #f3f7f1;
}
.flha-previous-place strong {
  grid-column: 1;
}
.flha-previous-place small {
  grid-column: 1;
  color: var(--muted);
}
.flha-previous-place span {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--green);
  font-weight: 700;
}
.flha-previous-place.is-here {
  border-color: var(--green);
  border-width: 2px;
}
.quick-flha-entry.is-carried {
  border-left: 4px solid #d99a1e;
}
.flha-carried {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff3d6;
  color: #4d3600;
  font-size: 14px;
}
.flha-carried span {
  flex: 1 1 200px;
}
.flha-carried .button {
  min-height: 44px;
}

/* Quick FLHA: today's conditions. Suggested chips carry a reason; the rest are one-line taps. */
.flha-conditions h2 {
  margin: 0 0 6px;
}
.flha-conditions .helper {
  margin-top: 0;
}
.flha-conditions h3 {
  margin: 14px 0 6px;
  font-size: 15px;
}
.flha-condition-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.flha-condition {
  display: grid;
  gap: 2px;
  min-height: 48px;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid #cdd8c8;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.flha-condition:hover {
  border-color: var(--green);
}
.flha-condition span {
  font-weight: 600;
}
.flha-condition small {
  color: var(--muted);
}
.flha-condition[aria-pressed='true'] {
  border: 2px solid var(--green);
  background: #e6eee5;
}
.flha-condition-facts {
  margin: 12px 0 0;
}
.flha-condition-more {
  margin-top: 12px;
}
.flha-condition-more > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--green);
  cursor: pointer;
}
.flha-condition-more > summary::before {
  content: '▸';
  margin-right: 8px;
}
.flha-condition-more[open] > summary::before {
  content: '▾';
}

/* Quick FLHA section 3 on phones: one hazard at a time, with My list beside the ideas. */
.flha-step-stops button {
  font-size: 16px;
  font-weight: 700;
}
.flha-step-count {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
}
.quick-flha-entry.is-step {
  padding-top: 4px;
  border-bottom: 0;
}
.quick-flha-entry.is-step h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
  outline: none;
}
.quick-flha-entry.is-step .field,
.quick-flha-entry.is-step summary,
.quick-flha-entry.is-step .quick-flha-idea {
  font-size: 17px;
}
.flha-step-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 14px 0 6px;
}
.flha-step-nav .button {
  min-height: 52px;
  font-size: 17px;
}
.flha-step-remove {
  display: block;
  min-height: 44px;
  margin: 4px 0 0;
  font-size: 16px;
}
.flha-step-summary {
  outline: none;
}
.flha-step-summary h3 {
  margin: 4px 0 6px;
  font-size: 20px;
  line-height: 1.3;
}
.flha-step-summary p {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}
.flha-mine {
  margin-top: 10px;
}
.flha-mine h4,
.flha-mine-manage h4,
.flha-mine-hazards + h4 {
  margin: 12px 0 2px;
  font-size: 16px;
}
.flha-mine .text-button {
  min-height: 44px;
  font-size: 16px;
  font-weight: 650;
}
.flha-mine [role='status']:empty {
  display: none;
}
.flha-mine-hazards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.flha-mine-hazards .flha-condition[disabled] {
  border-color: #24533b;
  background: #e6eee5;
  color: var(--ink);
  font-weight: 600;
  opacity: 1;
}
.flha-mine-manage {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.flha-mine-manage > summary {
  min-height: 44px;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
}
.flha-mine-manage ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.flha-mine-manage li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.flha-mine-manage li span {
  display: grid;
  min-width: 0;
  overflow-wrap: anywhere;
}
.flha-mine-manage li small {
  color: var(--muted);
  font-size: 14px;
}
.flha-step-stops {
  margin-top: 12px;
}

/* Quick FLHA: confirmation after Finish and save. */
.flha-saved {
  /* The small print below pulls itself up 10px to sit under the buttons. */
  margin: 14px 0 26px;
  padding: 14px 16px;
  border: 2px solid #3f8a55;
  border-radius: 8px;
  background: #e8f4ea;
  color: var(--ink);
}
.flha-saved p {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.45;
}
.flha-saved .flha-saved-title {
  color: #1d5a37;
  font-size: 20px;
  font-weight: 700;
}
.flha-saved .button {
  min-height: 50px;
  font-size: 16px;
}
[data-flha-status] {
  outline: none;
  font-size: 16px;
}
[data-flha-finish-save][aria-disabled='true'] {
  opacity: 0.55;
}

/* Keeping repeated FLHAs fresh. */
.flha-repeat-intro {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}
.flha-condition .flha-quiet {
  justify-self: start;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fff1d6;
  color: #6b4500;
  font-size: 15px;
  font-weight: 700;
}
.flha-same {
  margin: 14px 0 26px;
  padding: 14px 16px;
  border: 2px solid #c98a00;
  border-radius: 8px;
  background: #fff6e0;
  color: #3d2a00;
}
.flha-same p {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.45;
}
.flha-same .flha-same-title {
  font-size: 19px;
  font-weight: 700;
}
.flha-same .button {
  min-height: 50px;
  font-size: 16px;
}
[data-flha-previous] [data-flha-to-today] {
  min-height: 50px;
  margin-top: 6px;
  font-size: 16px;
}
[data-conditions-title] {
  outline: none;
}

/* Quick FLHA started from a JSA. */
.flha-jsa-heading {
  margin-top: 22px;
}
.flha-jsa-step {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}
.flha-based-on {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 4px solid #3f8a55;
  background: #eef5ef;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

/* Crew sign-off: the list on the FLHA, and the screen handed to each worker. */
.crew-intro {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}
.crew-old {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 2px solid #c98a00;
  border-radius: 8px;
  background: #fff6e0;
  color: #3d2a00;
  font-size: 17px;
  font-weight: 650;
}
.crew-none {
  font-size: 16px;
}
.crew-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.crew-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
  background: #fff;
}
.crew-list li.is-old {
  border-color: #c98a00;
  background: #fffaf0;
}
.crew-list li div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.crew-list strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.crew-list span {
  color: var(--ink);
  font-size: 15px;
}
.crew-list .crew-old-tag {
  color: #8a4b00;
  font-weight: 700;
}
.flha-crew .export-actions .button {
  min-height: 52px;
  font-size: 17px;
}
dialog.crew-phone {
  width: min(640px, 100vw);
  max-width: 100vw;
  max-height: 100dvh;
  margin: auto;
  padding: 16px;
  border: 0;
  border-radius: 10px;
  overflow-y: auto;
}
dialog.crew-phone::backdrop {
  background: #0f1f19cc;
}
@media (max-width: 600px) {
  dialog.crew-phone {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
}
.crew-phone header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.crew-phone header h2 {
  margin: 0;
  font-size: 24px;
}
.crew-phone header .button {
  min-height: 48px;
  font-size: 16px;
}
.crew-what {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f4;
}
.crew-what summary {
  min-height: 40px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.crew-job {
  margin: 6px 0;
  font-size: 18px;
}
.crew-hazards {
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
  padding-left: 22px;
  font-size: 17px;
  line-height: 1.4;
}
.crew-hazards span {
  display: block;
}
.crew-label {
  margin: 10px 0 6px;
  font-size: 17px;
  font-weight: 700;
}
.crew-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.crew-name {
  min-height: 52px;
  padding: 8px 16px;
  border: 1px solid #9fb59a;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 650;
  cursor: pointer;
}
.crew-field {
  font-size: 17px;
}
.crew-field input {
  min-height: 52px;
  font-size: 19px;
}
.crew-confirm {
  align-items: flex-start;
  margin: 12px 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}
.crew-confirm input {
  width: 28px;
  height: 28px;
  flex: none;
}
.crew-sign summary {
  min-height: 44px;
  font-size: 17px;
  cursor: pointer;
}
.signature-pad {
  display: block;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 3 / 1;
  border: 2px dashed #9fb59a;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}
.crew-status {
  min-height: 1.4em;
  color: #8a1f11;
  font-size: 17px;
  font-weight: 650;
}
.crew-phone .export-actions .button {
  min-height: 56px;
  font-size: 18px;
}
.crew-phone [data-crew-sign] {
  width: 100%;
}
.crew-thanks-title {
  margin: 20px 0 8px;
  color: #1d5a37;
  font-size: 26px;
  font-weight: 800;
}
.crew-thanks p {
  font-size: 18px;
  line-height: 1.45;
}
/* The hazards the crew is signing for: same size as the rest of this screen. */
.crew-phone .crew-hazards li,
.crew-phone .crew-hazards li strong,
.crew-phone .crew-hazards li span {
  font-size: 17px;
  line-height: 1.4;
}

/* Changes during the shift. */
.updates-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.updates-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
  background: #fff;
}
.updates-list li div {
  display: grid;
  gap: 3px;
  min-width: 0;
  font-size: 17px;
  line-height: 1.4;
}
.updates-action {
  color: #1d5a37;
  font-weight: 650;
}
.updates-form {
  padding: 12px 14px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
  background: #f7f8f4;
}
.updates-form .flha-condition-list {
  margin-bottom: 10px;
}
.updates-add {
  font-size: 17px;
}
.flha-updates .export-actions .button {
  min-height: 52px;
  font-size: 17px;
}
.updates-list .button,
.crew-list .button {
  flex: none;
  white-space: nowrap;
}
/* A hazard prompt that best matches a search while task guides are shown. */
.collection-best-other {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}
.collection-best-other .text-button {
  font-size: 16px;
  min-height: 44px;
  font-weight: 700;
}

/* Pass device for signatures: full screen; what they sign beside the controls in landscape,
   above them in portrait; Hand back (hold) and Sign always in the bar at the bottom. */
dialog.crew-pass {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
}
dialog.crew-pass[open] {
  display: flex;
  flex-direction: column;
}
.crew-pass > header {
  margin: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.crew-pass-count {
  margin: 2px 0 0;
  color: #1d5a37;
  font-size: 17px;
  font-weight: 700;
}
.crew-pass-body,
.crew-pass .crew-thanks {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px;
}
.crew-pass-body {
  display: grid;
  gap: 16px;
  align-content: start;
}
.crew-pass-what h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
@media (orientation: landscape) and (min-width: 820px) {
  .crew-pass-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
  .crew-pass-what {
    position: sticky;
    top: 0;
    max-height: 100%;
    overflow-y: auto;
  }
  .crew-pass .signature-pad {
    max-width: none;
  }
}
.crew-pass-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
}
.crew-pass-bar .crew-sign-now {
  flex: 1 1 auto;
  max-width: 420px;
  min-height: 60px;
  font-size: 20px;
}
.crew-handback-wrap {
  display: grid;
  justify-items: center;
  gap: 2px;
}
.crew-handback {
  color: var(--ink) !important;
  font-weight: 700;
  border-color: #9fb59a !important;
  position: relative;
  overflow: hidden;
  min-height: 52px;
  min-width: 132px;
  font-size: 16px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.crew-hold {
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  width: 0;
  background: var(--green);
}
.crew-handback.is-holding .crew-hold {
  width: 100%;
  transition: width 0.7s linear;
}
.crew-handback-help {
  color: var(--muted);
  font-size: 13px;
}
.crew-name.is-signed {
  border-color: #3f8a55;
  background: #e8f3ec;
  color: #1d5a37;
}
.crew-name.is-again {
  border: 2px solid #c98a00;
  background: #fff6e0;
}
.crew-thanks-left {
  padding: 8px 12px;
  border-left: 4px solid #c98a00;
  background: #fff6e0;
  font-size: 18px !important;
  font-weight: 700;
}
.crew-thanks-done {
  color: #1d5a37;
  font-size: 18px !important;
  font-weight: 700;
}
/* The lead's view: who is here today and the count. */
.crew-roster {
  margin: 10px 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f4;
}
.crew-roster > summary {
  min-height: 44px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.crew-roster .helper {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 15px;
}
.crew-roster-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
  padding: 0;
  list-style: none;
}
.crew-roster-list li {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 12px;
  border: 1px solid #9fb59a;
  border-radius: 999px;
  background: #fff;
  font-size: 16px;
}
.crew-roster-list .text-button {
  min-height: 40px;
  min-width: 40px;
  font-size: 20px;
}
.crew-roster-known {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.crew-roster-known .button {
  min-height: 44px;
  font-size: 15px;
}
.crew-roster-new {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}
.crew-roster-new .field {
  flex: 1 1 220px;
  margin: 0;
}
.crew-roster-new .button {
  min-height: 48px;
}
.crew-progress {
  margin: 10px 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff6e0;
  color: #3d2a00;
  font-size: 18px;
  font-weight: 700;
}
.crew-progress.is-done {
  background: #e8f3ec;
  color: #1d5a37;
}

/* Quick FLHA walk (2026-11-15): named stops with a status each. Phones show the current stop and
   "Jump to a stop"; when the walk has room, the named list sits beside the checklist. */
.quick-flha-walk {
  container-type: inline-size;
}
.walk-layout {
  display: grid;
  gap: 12px;
}
.walk-nav-list {
  display: grid;
  gap: 8px;
}
.walk-jump {
  justify-self: start;
  min-height: 48px;
  font-size: 16px;
}
.walk-stops {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.walk-stops[data-collapsed] {
  display: none;
}
.walk-stop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid #b8c9b6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.walk-stop[aria-current='step'] {
  border: 2px solid var(--green);
  background: #eef5ea;
}
.walk-stop-name {
  font-size: 16px;
  font-weight: 700;
}
.walk-stop-status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.walk-stop.is-picked .walk-stop-status {
  background: #1d5a37;
  color: #fff;
}
.walk-stop.is-none .walk-stop-status {
  border: 1px solid #1d5a37;
  background: #e3ece0;
  color: #173d35;
}
.walk-stop.is-open .walk-stop-status,
.walk-stop.is-summary .walk-stop-status {
  background: #fff3d6;
  color: #6b4500;
}
.walk-progress {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.walk-current h3 {
  margin: 2px 0 4px;
  font-size: 22px;
}
.walk-look {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}
.walk-here {
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}
.walk-here legend {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 800;
}
.walk-none {
  margin-top: 12px;
  border-style: dashed !important;
}
.walk-none.is-disabled {
  opacity: 0.75;
}
.walk-nav .button {
  min-height: 52px;
  font-size: 16px;
}
.walk-open-stops,
.walk-all-done {
  font-size: 16px;
}
.walk-all-done {
  font-weight: 700;
  color: #1d5a37;
}
@container (min-width: 640px) {
  .walk-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    align-items: start;
  }
  .walk-jump {
    display: none;
  }
  .walk-stops[data-collapsed] {
    display: grid;
  }
  .walk-nav-list {
    position: sticky;
    top: 12px;
  }
}
body.field-contrast .walk-stop {
  border: 2px solid #000;
  background: #fff;
  color: #000;
}
body.field-contrast .walk-stop[aria-current='step'] {
  border-width: 3px;
}
body.field-contrast .walk-stop .walk-stop-status {
  border: 2px solid #000;
  background: #fff;
  color: #000 !important;
}
body.field-contrast .walk-stop.is-picked .walk-stop-status {
  background: #000;
  color: #fff !important;
}
.quick-flha-walk .walk-jump {
  border: 2px solid var(--green);
  color: var(--green);
  font-weight: 700;
  opacity: 1;
}
.quick-flha-walk .walk-jump[aria-expanded='true'] {
  background: var(--green);
  color: #fff;
}
.walk-none small {
  color: var(--ink);
  font-size: 15px;
}
.collection-stage-codes {
  border-top: 1px solid var(--line);
  padding: 8px 12px 10px;
}
.collection-stage-codes p {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted, inherit);
}
.collection-stage-codes ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.collection-stage-codes a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
}
