.page {
  padding-block: clamp(32px, 5vw, 64px);
}
.page-head {
  margin-bottom: var(--section-gap);
  padding-bottom: clamp(1rem,2vw,1.6rem);
  border-bottom: 2px solid var(--wave);
}
.page-head h1 { max-width: 32ch; }
.page-head p {
  max-width: 64ch;
  color: var(--muted);
  margin-top: 16px;
  font-size: 1.0625rem;
  line-height: 1.75;
}
.page-head > .text-link { margin-bottom: 16px; }
.page.stack > .page-head { margin-bottom: 12px; }
.page > h1:first-child { margin-bottom: var(--section-gap); }
.page.stack > h1:first-child { margin-bottom: 12px; }
.page :where(h1, h2, h3) {
  overflow-wrap: anywhere;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--panel-padding);
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.panel h2,
.two-col h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 800;
  line-height: 1.35;
}
.panel p,
.field,
.chat-log,
.message,
.item-row {
  overflow-wrap: anywhere;
}
.stack {
  display: grid;
  align-content: start;
  gap: 1.25rem;
  min-width: 0;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(24px, 3vw, 40px);
}
.actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.actions > * {
  max-width: 100%;
}
.status,
.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--sea);
  color: var(--sea-ink);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.5;
}
.status.pending {
  background: #fff0d4;
  color: #67470b;
}
.status.done {
  background: #dff3e4;
  color: #165638;
}
.status.error,
.error {
  color: #842422;
}
.error {
  background: #fff0ec;
  border-left: 3px solid #aa3531;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
}
.eyebrow {
  color: var(--muted);
  font-weight: 650;
}
.item-list,
.chat-log {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.item-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.item-row :where(h2, h3) {
  font-size: 1.12rem;
}
.item-row h3 a {
  display: inline-block;
  min-block-size: 24px;
}
.item-row img {
  width: 74px;
  aspect-ratio: 1.25;
  object-fit: cover;
  border-radius: 7px;
}
.total {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 1.08rem;
  font-weight: 650;
}
.empty-state {
  padding: clamp(22px, 4vw, 42px);
  border-radius: var(--radius);
  background: var(--pale);
}
.empty-state h3 {
  margin-bottom: 5px;
}
.empty-state .button {
  margin-top: 12px;
}
.board-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
}
.board-card h2 {
  font-size: 1.3rem;
  margin-block: 4px;
}
.board-card > div {
  flex: 1 1 260px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.board-card > div:last-child {
  flex: 0 1 260px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.offer-items,
.history ol {
  margin: 0;
  padding-inline-start: 1.3rem;
}
.offer-items li,
.history li {
  padding-block: 4px;
  overflow-wrap: anywhere;
}
.terms-list {
  display: grid;
  gap: 0;
  margin: 0;
}
.terms-list > div {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}
.terms-list dd {
  margin: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.terms-list dt { color: var(--muted); }
.terms-list > div:last-child { border-bottom: 0; }
.editor summary,
.history summary {
  min-height: 44px;
  padding-block: 10px;
  font-weight: 600;
  color: var(--ink);
}
.panel.history { padding: 14px var(--panel-padding); }
.history[open] summary { margin-bottom: 16px; }
.history li { color: var(--muted); font-size: .9375rem; padding-block: 8px; }
.editor[open] summary {
  margin-bottom: 8px;
}
.preserve-lines {
  white-space: pre-wrap;
}
@media (max-width: 720px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
.board-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-block: 16px 24px;
}
.board-filters > label {
  flex: 1 1 220px;
  min-width: 0;
}
.cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: var(--field-gap);
}
.cost-grid > * { min-width: 0; }
.need-alert-controls {
  flex: 1 1 100%;
  min-width: 0;
}
.need-alert-controls p:not(:empty) { margin-block-start: .5rem; overflow-wrap: anywhere; }
[data-account-alerts] li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  overflow-wrap: anywhere;
}
.confirm-removal {
  max-width: min(32rem, calc(100% - 2rem));
  margin: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 32px);
  color: var(--ink);
  background: var(--white);
}
.confirm-removal::backdrop { background: rgb(0 0 0 / 50%); }
.offer-quantity {
  display: grid;
  gap: .4rem;
  padding-block: .6rem;
  border-top: 1px solid var(--line);
}
.offer-quantity input[type="number"] { max-width: 8rem; }
.parcel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
}
.parcel-grid > li { min-width: 0; overflow-wrap: anywhere; }
.parcel-balance { padding-block-start: 1rem; border-top: 1px solid var(--line); }
.crew-work-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr));
  gap: 1rem;
}
.crew-work-counts dt { color: var(--muted); }
.crew-work-counts dd { margin: .25rem 0 0; font-size: 1.35rem; font-weight: 700; }
