.strip--one {
  grid-template-columns: minmax(0, 1fr);
}

.strip--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strip + .strip {
  margin-top: calc(var(--s-4) * -1 + var(--s-3));
}

.stat__approx {
  margin-left: 6px;
  color: var(--ink-3);
  font-size: var(--t-2);
  font-weight: 500;
  letter-spacing: normal;
  cursor: help;
}

.trend--flat {
  background: var(--neutral-tint);
  color: var(--ink-3);
  padding: 2px 8px;
}

.bar--0::after { width: 0; }
.bar--5::after { width: 5%; }
.bar--10::after { width: 10%; }
.bar--15::after { width: 15%; }
.bar--20::after { width: 20%; }
.bar--25::after { width: 25%; }
.bar--30::after { width: 30%; }
.bar--35::after { width: 35%; }
.bar--40::after { width: 40%; }
.bar--45::after { width: 45%; }
.bar--50::after { width: 50%; }
.bar--55::after { width: 55%; }
.bar--60::after { width: 60%; }
.bar--65::after { width: 65%; }
.bar--70::after { width: 70%; }
.bar--75::after { width: 75%; }
.bar--80::after { width: 80%; }
.bar--85::after { width: 85%; }
.bar--90::after { width: 90%; }
.bar--95::after { width: 95%; }
.bar--100::after { width: 100%; }

.state {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: var(--t-2);
  font-weight: 500;
  white-space: nowrap;
}

.state--on {
  background: var(--rise-tint);
  color: var(--rise);
}

.state--off {
  background: var(--neutral-tint);
  color: var(--ink-3);
}

.state--bad {
  background: var(--fall-tint);
  color: var(--fall);
}

.client__mark--logo,
.card__mark--logo {
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.client__mark--logo img,
.card__mark--logo img {
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}

.clientbar--viewing .client__role {
  background: var(--neutral-tint);
  color: var(--ink-2);
}

.msgs {
  display: grid;
  gap: var(--s-3);
}

.msg {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: var(--t-3);
  line-height: 1.5;
  text-align: left;
}

.msg img {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.msg b {
  display: block;
  font-weight: 500;
}

.msg--ok {
  background: var(--rise-tint);
  border: 1px solid #cfe6da;
}

.msg--bad {
  background: var(--fall-tint);
  border: 1px solid #efd3dc;
}

.msg--note {
  grid-template-columns: minmax(0, 1fr);
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  font-size: var(--t-4);
}

.invite__acts,
.acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}

.inline {
  display: inline;
}

.pagelink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
  transition: color var(--fast) ease, text-decoration-color var(--fast) ease;
}

.pagelink:hover {
  color: var(--brand-text);
  text-decoration-color: var(--brand-line);
}

.setform {
  display: grid;
  gap: var(--s-4);
}

.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-4);
}

.setform .field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 0;
}

.setform .field > label,
.field__label {
  color: var(--ink-2);
  font-size: var(--t-3);
  font-weight: 500;
}

.setform .field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.setform .field select,
.setform .field textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-4);
  transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
}

.setform .field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
}

.setform .field input:hover,
.setform .field select:hover,
.setform .field textarea:hover {
  border-color: var(--ink-3);
}

.setform .field input:focus,
.setform .field select:focus,
.setform .field textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint-2);
}

.setform .field [aria-invalid="true"] {
  border-color: var(--fall);
}

.setform .field [aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px var(--fall-tint);
}

.field__hint {
  color: var(--ink-3);
  font-size: var(--t-3);
  line-height: 1.5;
}

.field__error {
  color: var(--fall);
  font-size: var(--t-3);
  font-weight: 500;
}

.checks {
  display: grid;
  gap: var(--s-3);
}

.checks--grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.tick {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-2);
  font-size: var(--t-3);
  line-height: 1.5;
  cursor: pointer;
}

.tick input {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  accent-color: var(--brand);
}

.tick b {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

.empty {
  padding: var(--s-6) var(--s-5);
  color: var(--ink-2);
  font-size: var(--t-4);
  line-height: 1.6;
}

.empty b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: var(--t-5);
  font-weight: 500;
}

.cards {
  display: grid;
  gap: var(--s-5);
}

.cards--two {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.grid--wrap th,
.grid--wrap td {
  white-space: normal;
}

.grid .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.code {
  display: block;
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  font-size: var(--t-4);
  letter-spacing: .04em;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.logo-preview {
  display: inline-grid;
  place-items: center;
  width: 160px;
  height: 80px;
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 860px) {
  .strip--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .invite,
  .invite__acts,
  .acts {
    align-items: stretch;
    flex-direction: column;
  }

  .invite .btn,
  .acts .btn {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 460px) {
  .strip--three {
    grid-template-columns: minmax(0, 1fr);
  }
}

button.menu__item {
  font: inherit;
  color: inherit;
}

.topbar__right form.inline {
  display: contents;
}

.iconbtn[aria-disabled="true"] {
  cursor: default;
}

.field input[aria-invalid="true"] {
  border-color: var(--fall);
}

.field input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px var(--fall-tint);
}

.card__alt form {
  display: inline;
}

.card__alt button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.card .msgs {
  margin-top: var(--s-5);
}

.card .msg + .msg,
.card .msgs .msg {
  margin-top: 0;
}

.card__alt button {
  color: var(--brand-text);
  font-weight: 500;
}

.card__alt button:hover {
  text-decoration: underline;
}

.card > .btn {
  justify-content: center;
  width: 100%;
  margin-top: var(--s-5);
}

.install__head {
  margin-top: var(--s-6);
  font-size: var(--t-5);
  font-weight: 500;
}

.install__list {
  display: grid;
  gap: 6px;
  margin-top: var(--s-3);
  color: var(--ink-2);
  font-size: var(--t-3);
  text-align: left;
}

.install__list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card .code {
  margin-top: var(--s-3);
  font-size: var(--t-2);
  text-align: left;
}

.prods form {
  display: contents;
}

.client__mark--dark,
.card__mark--dark {
  background: var(--ink);
  border-color: var(--ink);
}

.confirm__acts form {
  display: contents;
}

.grid__act .acts {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.grid__act .acts form {
  display: contents;
}

.sort {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0;
  vertical-align: middle;
  border: 0;
  border-radius: var(--r-pill);
  background: url("../images/icon-expand-more-mute.svg") center / 16px no-repeat;
  cursor: pointer;
  transition: background-color var(--fast) ease;
}

.sort:hover {
  background-color: var(--brand-tint);
}

[aria-sort="ascending"] .sort {
  transform: rotate(180deg);
}

[aria-sort] .sort {
  background-image: url("../images/icon-expand-more-brand.svg");
}

.ranges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  min-width: 0;
}

.otherdates > summary {
  list-style: none;
  cursor: pointer;
}

.otherdates > summary::-webkit-details-marker {
  display: none;
}

.otherdates {
  position: relative;
}

.otherdates__form {
  position: absolute;
  z-index: 25;
  top: calc(100% + var(--s-2));
  right: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s-3);
  width: max-content;
  max-width: calc(100vw - var(--s-7));
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
}

.otherdates[open] > summary,
.otherdates[open] > summary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  font-weight: 500;
}

.ranges:has(.otherdates[open]) .chips .chip[aria-current] {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-2);
  font-weight: 400;
}

.otherdates__field {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-size: var(--t-3);
  font-weight: 500;
}

.otherdates__field input {
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-4);
}

.otherdates__field input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint-2);
}

.ranges__summary {
  color: var(--ink-3);
  font-size: var(--t-3);
}

.ranges__summary strong {
  color: var(--ink);
  font-weight: 500;
}

.board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-4);
}

.board > .w--stat,
.board > .w--plain {
  grid-column: span 3;
}

.board > .w--chart,
.board > .w--list {
  grid-column: span 6;
}

.widget {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  min-width: 0;
}

.widget > .tile,
.widget > .panel {
  flex: 1;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.tile.stat {
  border-left: 1px solid var(--line);
}

.tile__from {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-3);
  font-size: var(--t-1);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color var(--fast) ease;
}

.tile__from:hover {
  color: var(--brand-text);
}

.w__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.w__drag {
  margin-right: auto;
  color: var(--ink-3);
  font-size: var(--t-2);
  cursor: grab;
}

.widget[draggable="true"] {
  cursor: grab;
}

.chartbox {
  position: relative;
  height: 260px;
  padding: 0 var(--s-5) var(--s-3);
}

.chartbox--small {
  height: 180px;
}

.panel > .legend {
  padding: 0 var(--s-5) var(--s-3);
}

.panel > .empty {
  padding-top: 0;
}

.data .wrap {
  white-space: normal;
}

.setup + .setup {
  border-top: 1px solid var(--line);
}

.setup p + p {
  margin-top: var(--s-3);
}

.welcome__list {
  display: grid;
  gap: 6px;
  margin-top: var(--s-3);
  color: var(--ink-2);
  font-size: var(--t-4);
  line-height: 1.55;
}

.welcome__list b {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 1240px) {
  .board > .w--stat,
  .board > .w--plain {
    grid-column: span 6;
  }

  .board > .w--chart,
  .board > .w--list {
    grid-column: span 12;
  }
}

@media (max-width: 460px) {
  .board > .widget {
    grid-column: span 12;
  }
}

.custom__templates {
  padding: 0 var(--s-5) var(--s-5);
}

.custom__save {
  justify-content: flex-end;
  margin-top: var(--s-6);
}

.custom__reset .setup {
  grid-template-columns: 0 minmax(0, 1fr) auto;
}

.board--edit .widget {
  padding: var(--s-3);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
}

.board--edit .widget.dragging {
  opacity: .5;
}

.board--tray .widget {
  background: var(--surface-3);
}

.col-6 {
  grid-column: span 6;
}

.col-4 {
  grid-column: span 4;
}

.col-8 {
  grid-column: span 8;
}

@media (max-width: 1080px) {
  .col-6,
  .col-4,
  .col-8 {
    grid-column: span 12;
  }
}

.section > .msg,
.section > .panel {
  min-width: 0;
}

.data td .muted,
.data th .muted {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: var(--t-3);
  font-weight: 400;
}

.data th a,
.data td a:not(.pagelink):not(.btn) {
  color: var(--ink);
  font-weight: 500;
  transition: color var(--fast) ease;
}

.data th a:hover,
.data td a:not(.pagelink):not(.btn):hover {
  color: var(--brand-text);
}

.panel__lead {
  padding: 0 var(--s-5) var(--s-4);
  color: var(--ink-2);
  font-size: var(--t-3);
  line-height: 1.55;
}

.panel > .empty .btn,
.empty p + p {
  margin-top: var(--s-3);
}

.empty p {
  color: var(--ink-2);
}

.logo-preview--dark {
  background: var(--ink);
  border-color: var(--ink);
}

.scroller {
  overflow-x: auto;
  scrollbar-width: thin;
}

.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: var(--t-2);
  font-weight: 500;
  white-space: nowrap;
}

.tag--now {
  margin-left: 8px;
  margin-right: 0;
}

.tag--ok,
.tag--now {
  background: var(--rise-tint);
  color: var(--rise);
}

.tag--bad {
  background: var(--fall-tint);
  color: var(--fall);
}

.panel > .msg,
.panel > .chips {
  margin: 0 var(--s-5) var(--s-4);
}

.panel > .chips {
  padding-bottom: 2px;
}

.setform .field input.colourpick {
  width: 72px;
  height: 44px;
  padding: 4px;
  cursor: pointer;
}

@media (min-width: 1081px) {
  .app > .work {
    min-height: calc(100dvh - var(--topbar-h) - var(--s-4) * 2);
  }
}

@media (max-width: 680px) {
  .otherdates__form {
    right: auto;
    left: 0;
  }
}

.welcome__head {
  align-items: center;
}

.welcome__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s-3);
  padding: 0 var(--s-5) var(--s-5);
  counter-reset: none;
}

.welcome__step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.welcome__no {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--ink);
  border-radius: var(--r-pill);
  color: #fff;
  font-size: var(--t-3);
  font-weight: 500;
}

.welcome__step b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: var(--t-4);
  font-weight: 500;
}

.welcome__step p {
  color: var(--ink-2);
  font-size: var(--t-3);
  line-height: 1.5;
}

.msg--busy {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  padding: var(--s-4) var(--s-5);
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  font-size: var(--t-4);
}

.msg--busy b {
  font-size: var(--t-5);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--brand-line);
  border-top-color: var(--brand);
  border-radius: var(--r-pill);
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
    border-top-color: var(--brand-line);
  }
}
