.of-screen {
  color-scheme: only light;
  --of-paper: var(--surface, #fff);
  --of-ink: var(--glass-ink, #25313d);
  --of-muted: var(--glass-muted, #697582);
  --of-line: var(--glass-line, #dce3e9);
  --of-soft: var(--crm-ui-surface-muted, #f6f8fa);
  --of-green: var(--accent, #527c35);
  --of-selected: var(--crm-ui-selected, #edf5e5);
  --of-amber: #79551b;
  --of-amber-fill: #ffebcb;
  --of-red: var(--red, #b64545);
  --of-red-fill: #fff0f0;
  box-sizing: border-box;
  container-type: inline-size;
  width: 100%;
  min-width: 0;
  color: var(--of-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.of-screen *, .of-screen *::before, .of-screen *::after { box-sizing: border-box; }
.of-screen [hidden] { display: none !important; }
.of-screen :is(h1, h2, h3, p) { margin: 0; }
.of-screen .of-heading h1, .of-screen .of-dialog h2, .of-screen .of-colhead h3, .of-old h3 {
  color: inherit;
  line-height: 1.45;
  font-weight: 650;
}
.of-screen .of-heading h1 { font-size: 30px; line-height: 1.25; letter-spacing: -.03em; font-weight: 750; }
.of-screen .of-dialog h2 { font-size: 20px; margin-top: 4px; }
.of-screen .of-colhead h3, .of-old h3 { font-size: 14px; }
.of-screen :where(button, input, select, textarea) { font: inherit; color: inherit; }
.of-screen button { cursor: pointer; overflow-wrap: anywhere; }
.of-screen button:disabled { cursor: not-allowed; opacity: .55; }
.of-screen :is(button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--of-green);
  outline-offset: 3px;
}

.of-heading, .of-notice, .of-board-info, .of-footer, .of-minirow {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
}
.of-heading { gap: 12px; margin-bottom: 16px; }
.of-sub, .of-muted, .of-count { color: var(--of-muted); font-size: 12px; }
.of-heading .of-sub { display: block; margin-top: 3px; }
.of-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.of-deal-choice {
  display: grid;
  align-content: start;
  max-width: 100%;
}
.of-deal-choice > .of-link { justify-self: start; margin: 2px 0 0 8px; }
.of-tag {
  display: grid;
  gap: 2px;
  min-width: 133px;
  max-width: min(280px, 100%);
  padding: 9px 11px;
  text-align: left;
  border: 1px solid var(--of-line);
  border-radius: 9px;
  background: var(--of-paper);
}
.of-tag[aria-pressed=true] {
  border-color: var(--of-deal, var(--of-green));
  background: color-mix(in srgb, var(--of-deal, var(--of-green)) 8%, var(--of-paper));
}
.of-tag-name { display: flex; align-items: center; gap: 6px; font-weight: 650; }
.of-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--of-deal, var(--of-green)); }
.of-tag-check { margin-left: auto; visibility: hidden; }
.of-tag[aria-pressed=true] .of-tag-check { visibility: visible; }

.of-check, .of-inline, .of-detail-actions, .of-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.of-check { cursor: pointer; font-size: 13px; }
.of-screen input:is([type=checkbox], [type=radio]) {
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 0;
  flex: none;
  accent-color: var(--of-green);
}
.of-board-info { gap: 8px; margin-bottom: 12px; color: var(--of-muted); font-size: 12px; }
.of-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(min(198px, 100%), 1fr);
  align-items: stretch;
  column-gap: 22px;
  width: 100%;
  min-width: 0;
  padding: 4px 2px 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: #b2c3cc #e6edf1;
}
.of-stage-group {
  display: grid;
  grid-template-columns: subgrid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  min-width: 0;
}
.of-screen .of-group-heading {
  grid-column: 1 / -1;
  padding-bottom: 4px;
  border-bottom: 1px solid #9cabb5;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
}
.of-group-heading > span {
  position: sticky;
  left: 2px;
  display: block;
  width: max-content;
}
.of-column {
  min-width: 0;
  padding: 0 11px 12px;
  border: 1px solid #e0e7ec;
  border-radius: 16px;
  background: linear-gradient(180deg, #f0f3f6, #eaf0f3);
  box-shadow: inset 0 1px 0 #f9fbfc, 0 3px 11px #35495708;
}
.of-colhead { display: grid; gap: 3px; min-height: 72px; margin: 0 -11px 12px; padding: 11px 13px; border-top: 3px solid #cdd8e1; border-radius: 15px; background: #e6edf2; }
.of-count { align-self: start; min-width: 23px; padding: 2px 6px; border-radius: 6px; background: #f5f8fa; text-align: center; }
.of-column.is-success .of-colhead { border-top-color: var(--of-green); }
.of-column.is-failed .of-colhead { border-top-color: var(--of-red); }
.of-col-name { display: flex; justify-content: space-between; gap: 8px; }
.of-stack { display: grid; gap: 9px; }
.of-empty { padding: 12px 3px; color: var(--of-muted); font-size: 13px; }
.of-empty-page { padding: 14px 0; }

.of-card {
  display: grid;
  min-width: 0;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--of-line);
  border-left: 4px solid var(--of-deal);
  border-radius: 13px;
  background: var(--of-paper);
  box-shadow: inset 0 1px 0 #fff, 0 4px 12px #1f3d4b0b;
  overflow-wrap: anywhere;
}
.of-card.is-highlight { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--of-deal) 55%, transparent); }
.of-item-head { display: grid; gap: 4px; width: 100%; padding: 0; text-align: left; border: 0; background: transparent; }
.of-card-title { font-size: 15px; font-weight: 650; }
.of-card-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; margin-top: 3px; }
.of-qty { font-size: 23px; letter-spacing: -.025em; }
.of-route, .of-context { font-size: 13px; overflow-wrap: anywhere; }
.of-due { color: var(--of-amber); font-size: 12px; }
.of-badge { justify-self: start; max-width: 100%; padding: 4px 7px; border-radius: 6px; font-size: 12px; }
.of-badge, .of-screen .of-quality, .of-tripnote { background: var(--of-soft); color: var(--of-muted); }
.of-screen :is(.of-quality, .of-badge).is-good { background: var(--of-selected); color: var(--of-green); }
.of-screen :is(.of-quality, .of-badge).is-warn { background: var(--of-amber-fill); color: var(--of-amber); }
.of-screen :is(.of-quality, .of-badge).is-bad { background: var(--of-red-fill); color: var(--of-red); }
.of-quality, .of-tripnote { display: grid; gap: 2px; padding: 7px 8px; border-radius: 6px; font-size: 12px; }
.of-quality { width: 100%; border: 1px solid transparent; text-align: left; }
.of-screen button.of-quality:hover { border-color: var(--of-line); }
.of-quality strong, .of-tripnote strong { font-weight: 600; }
.of-tripnote strong { color: var(--of-ink); }
.of-action {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--of-line);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--of-paper), #f5f7f9);
  color: var(--of-ink);
  font-size: 13px;
  font-weight: 600;
}
.of-action:hover { background: var(--of-soft); }
.of-action.is-primary { border-color: #9dce70; background: linear-gradient(145deg, #bceb82, #86c93f); color: #243c1d; }
.of-action.is-primary:hover { background: linear-gradient(145deg, #c5ee91, #7dbc37); }
.of-link { padding: 2px 0; border: 0; background: transparent; color: var(--of-muted); font-size: 12px; text-align: left; }
.of-link:hover { color: var(--of-green); }
.of-card-actions { display: grid; gap: 8px; }
.of-card-actions > * { min-width: 0; }
.of-minirow { gap: 7px; }
.of-notice { gap: 9px; padding: 11px 13px; margin-bottom: 13px; border-radius: 9px; background: var(--of-selected); color: var(--of-green); }
.of-close { padding: 5px 8px; border: 0; background: transparent; color: var(--of-muted); font-size: 20px; line-height: 1; }
.of-close:hover { color: var(--of-green); }
.of-footer { gap: 8px; margin-top: 18px; color: var(--of-muted); font-size: 12px; }
.of-old { margin-block: 14px; }
.of-old h3 { margin-bottom: 8px; }
.of-old > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(245px, 100%), 1fr)); gap: 9px; }

.of-dialog {
  width: min(680px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--of-line);
  border-radius: 20px;
  background: var(--of-paper);
  color: var(--of-ink);
  box-shadow: 0 18px 50px #243a4b18, 0 3px 10px #243a4b07;
}
.of-dialog::backdrop { background: #33445280; }
.of-dialog-body { padding: 21px; }
.of-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
.of-dialog-head .of-close { min-height: 36px; padding: 8px 10px; border: 1px solid var(--of-line); border-radius: 7px; background: var(--of-paper); color: var(--of-ink); font-size: 14px; }
.of-dialog-head .of-close:hover { background: var(--of-soft); }
.of-dialog .of-context { margin: 10px 0; color: var(--of-muted); }
.of-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; margin: 14px 0; }
.of-field { display: grid; min-width: 0; gap: 5px; color: var(--of-muted); font-size: 12px; }
.of-form > .of-field, .of-form > .of-check { margin: 10px 0; }
.of-field :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--of-line);
  border-radius: 7px;
  background: var(--of-paper);
  color: var(--of-ink);
}
.of-field textarea { resize: vertical; min-height: 75px; }
.of-radio { display: flex; align-items: flex-start; gap: 10px; margin: 9px 0; padding: 13px; border: 1px solid var(--of-line); border-radius: 9px; cursor: pointer; }
.of-radio input { margin-top: 2px; }
.of-radio > span { display: grid; gap: 4px; }
.of-radio small { color: var(--of-muted); font-size: 12px; }
.of-radio:has(input:checked) { border-color: var(--of-green); background: var(--of-selected); }
.of-splitnumbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 10px; padding: 12px 0; border-block: 1px solid var(--of-line); }
.of-splitnumbers > div { display: grid; gap: 3px; overflow-wrap: anywhere; }
.of-splitnumbers strong { font-size: 25px; }
.of-blocknote { margin: 12px 0; padding: 10px; border-radius: 7px; background: var(--of-amber-fill); color: var(--of-amber); font-size: 13px; }
.of-foot, .of-detail-actions { margin-top: 18px; }
.of-foot .is-primary { margin-left: auto; }
.of-screen .of-error { margin-top: 10px; color: var(--of-red); font-size: 13px; white-space: pre-line; }
.of-error:empty { display: none; }
.of-form .of-muted { font-size: 13px; }
.of-part-list { list-style: none; margin: 0; padding: 0; }
.of-part-list li { display: grid; gap: 7px; margin: 9px 0; padding: 12px; border: 1px solid var(--of-line); border-left: 4px solid var(--of-deal, var(--of-green)); border-radius: 8px; }
.of-screen details { margin-top: 13px; }
.of-screen summary { color: var(--of-muted); font-size: 13px; cursor: pointer; }
.of-events { margin: 0; padding-left: 19px; color: var(--of-muted); font-size: 12px; }
.of-events li { margin: 9px 0; }

@container (max-width: 520px) {
  .of-board { grid-auto-columns: min(268px, 100%); }
  .of-tag { flex: 1 1 125px; }
}
@media (max-width: 600px) {
  .of-fields { grid-template-columns: 1fr; }
  .of-dialog-body { padding: 15px; }
  .of-foot .is-primary { margin-left: 0; }
}
@media (pointer: coarse) {
  .of-screen button { min-height: 44px; }
  .of-screen input:not([type=checkbox]):not([type=radio]), .of-screen select, .of-screen textarea { min-height: 44px; font-size: 16px; }
}
