/*
  A company's first days: the setup guide (templates/launch/setup.html), the bar that leads back
  to it from every page (templates/base.html), and bringing records over from ADP RUN and
  QuickBooks (templates/launch/imports.html, import_review.html).

  Gold (the accent) marks the step that waits for a person; verdigris (--ok) marks what is done.
*/

/* The bar on every page while a company is still setting up */
.su-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.3rem 0.4rem 0.3rem 0.75rem;
  border: 1px solid var(--b-1);
  border-radius: var(--r-ctl, 9px);
  background: var(--s-1);
  font-size: 0.8125rem;
}

.su-bar-link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.7rem;
  min-inline-size: 0;
  padding-block: 0.3rem;
  color: var(--t-2);
  text-decoration: none;
}

.su-bar-link b {
  color: var(--t-1);
  font-weight: 600;
  white-space: nowrap;
}

.su-bar-link > span:nth-of-type(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.su-bar-link .icon {
  margin-inline-start: auto;
  color: var(--t-3);
  transition: translate 160ms var(--e-out, ease-out);
}

.su-bar-link:hover .icon {
  translate: 2px 0;
  color: var(--a-ink);
}

/* how far along, as a ring: the same gold as the step that waits */
.su-ring {
  flex: none;
  inline-size: 1.125rem;
  block-size: 1.125rem;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--s-1) 62%, transparent 64%),
    conic-gradient(var(--a-fill) calc(var(--su-part, 0) * 1%), var(--b-2) 0);
}

.su-bar form {
  display: flex;
}

.su-bar button {
  display: grid;
  place-items: center;
  inline-size: 1.75rem;
  block-size: 1.75rem;
  border: 0;
  border-radius: var(--r-ctl, 8px);
  background: none;
  color: var(--t-3);
  cursor: pointer;
}

.su-bar button:hover {
  background: var(--f-hover);
  color: var(--t-1);
}

/* The guide */
.su-progress {
  display: grid;
  gap: 0.55rem;
  margin-block: 0.25rem 1.5rem;
  max-inline-size: 46rem;
}

.su-count {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.9rem;
  font-size: 0.875rem;
  color: var(--t-3);
}

.su-count strong {
  color: var(--t-1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.su-track {
  block-size: 6px;
  border-radius: 999px;
  background: var(--b-1);
  overflow: hidden;
}

.su-track span {
  display: block;
  block-size: 100%;
  min-inline-size: 6px;
  border-radius: inherit;
  background: var(--a-fill);
  transition: inline-size 420ms var(--e-out, ease-out);
}

.su-steps {
  display: grid;
  margin: 0;
  padding: 0;
  max-inline-size: 46rem;
  list-style: none;
}

.su-step {
  position: relative;
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 0.9rem;
  padding-block: 0.85rem;
}

/* the line that runs from one step's mark to the next */
.su-step:not(:last-child)::before {
  content: "";
  position: absolute;
  inset-block: 2.8rem -0.6rem;
  inset-inline-start: calc(0.875rem - 0.5px);
  inline-size: 1px;
  background: var(--b-1);
}

.su-mark {
  display: grid;
  place-items: center;
  inline-size: 1.75rem;
  block-size: 1.75rem;
  border: 1px solid var(--b-2);
  border-radius: 50%;
  background: var(--s-1);
  color: var(--t-3);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.su-mark .icon {
  inline-size: 0.9rem;
  block-size: 0.9rem;
}

.su-step.is-done .su-mark {
  border-color: transparent;
  background: var(--ok-soft);
  color: var(--ok);
}

.su-step.is-current .su-mark {
  border-color: var(--a-fill);
  background: var(--a-fill);
  color: var(--a-on);
}

.su-body {
  display: grid;
  gap: 0.4rem;
  min-inline-size: 0;
  padding-block-start: 0.15rem;
}

.su-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}

.su-line h2 {
  margin: 0;
  font-size: 0.9688rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--t-1);
}

.su-step.is-done .su-line h2,
.su-step.is-later .su-line h2 {
  color: var(--t-2);
  font-weight: 500;
}

.su-state {
  font-size: 0.75rem;
  color: var(--t-3);
}

.su-state.is-done {
  color: var(--ok);
}

.su-why,
.su-detail {
  margin: 0;
  max-inline-size: 60ch;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--t-2);
}

.su-detail {
  color: var(--t-3);
  font-size: 0.8125rem;
}

.su-step.is-later .su-why {
  display: none;
}

/* the step that waits for you is the only one drawn as a card */
.su-step.is-current .su-body {
  margin-block: -0.5rem 0.25rem;
  padding: 0.95rem 1.1rem 1.05rem;
  border: 1px solid var(--b-1);
  border-radius: var(--r-card, 12px);
  background: var(--s-1);
}

.su-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-block-start: 0.2rem;
}

.su-actions form {
  display: contents;
}

.su-step.is-done .su-actions {
  margin-block-start: -0.1rem;
}

.su-from {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-block-start: 0.35rem;
}

.su-from .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.su-choice {
  position: relative;
  display: flex;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--b-2);
  border-radius: var(--r-ctl, 10px);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.su-choice:hover {
  background: var(--f-hover);
}

.su-choice:has(input:checked) {
  border-color: var(--a-line, var(--a-fill));
  background: var(--f-selected);
}

.su-choice:has(input:focus-visible) {
  outline: 2px solid var(--a-fill);
  outline-offset: 2px;
}

.su-choice input {
  flex: none;
  align-self: start;
  inline-size: 1rem;
  block-size: 1rem;
  margin: 0.12rem 0 0;
  accent-color: var(--a-fill);
}

.su-choice span {
  display: grid;
  gap: 0.15rem;
}

.su-choice b {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--t-1);
}

.su-choice small {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--t-3);
}

.su-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  max-inline-size: 46rem;
  margin-block-start: 1.25rem;
  padding-block-start: 1.1rem;
  border-block-start: 1px solid var(--b-1);
  font-size: 0.8125rem;
  color: var(--t-3);
}

.su-end p {
  margin: 0;
  max-inline-size: 52ch;
}

.su-end h2 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  color: var(--t-1);
}

/* Bringing records over */
.im-sources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 1rem;
  margin-block-end: 1.25rem;
}

.im-source {
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.im-source-head h2 {
  margin: 0 0 0.2rem;
}

.im-source-head p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--t-2);
}

.im-drop {
  display: grid;
  gap: 0.6rem;
  justify-items: start;
}

.im-file {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  inline-size: 100%;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--b-2);
  border-radius: var(--r-ctl, 10px);
  color: var(--t-3);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.im-file:hover,
.im-file.is-over {
  border-color: var(--a-fill);
  background: var(--f-hover);
}

.im-file:has(input:focus-visible) {
  outline: 2px solid var(--a-fill);
  outline-offset: 2px;
}

.im-file span {
  display: grid;
  gap: 0.1rem;
  min-inline-size: 0;
}

.im-file b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--t-1);
}

.im-file small {
  font-size: 0.78rem;
}

.im-file input {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  opacity: 0;
  cursor: pointer;
}

.im-what summary {
  font-size: 0.8125rem;
  color: var(--t-2);
  cursor: pointer;
}

.im-what ul {
  display: grid;
  gap: 0.8rem;
  margin: 0.8rem 0 0.6rem;
  padding: 0;
  list-style: none;
}

.im-what li {
  display: grid;
  gap: 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--t-2);
}

.im-what li b {
  color: var(--t-1);
  font-weight: 600;
}

.im-what li small,
.im-what p {
  font-size: 0.75rem;
  color: var(--t-3);
}

.im-empty {
  padding: 1.1rem 1.25rem;
}

.im-also,
.im-note {
  max-inline-size: 70ch;
  font-size: 0.8125rem;
}

.im-match h2 {
  margin: 0 0 0.75rem;
}

.im-match h3 {
  margin: 1.25rem 0 0.6rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--t-2);
}

.im-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 0.7rem 0.9rem;
}

.im-column {
  display: grid;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--t-2);
}

.im-column em {
  font-style: normal;
  font-size: 0.6875rem;
  color: var(--a-ink);
}

.im-column small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--t-4, var(--t-3));
}

.im-column select {
  min-block-size: 2.125rem;
  padding-block: 0.25rem;
  font-size: 0.8125rem;
}

.im-column.is-empty select {
  color: var(--t-3);
}

.im-counts {
  margin-block: 1rem;
}

.im-bad {
  color: var(--bad);
}

.im-more {
  padding: 0.75rem 1.25rem 1rem;
  margin: 0;
  font-size: 0.8125rem;
}

.im-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block: 1.25rem 0.5rem;
}

.im-actions form {
  display: flex;
}

@media (max-width: 640px) {
  .su-from {
    grid-template-columns: 1fr;
  }

  .su-bar-link > span:nth-of-type(2) {
    display: none;
  }

  .su-step.is-current .su-body {
    padding: 0.85rem 0.9rem 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .su-track span,
  .su-bar-link .icon,
  .su-choice,
  .im-file {
    transition: none;
  }
}

/* Paper paychecks (templates/launch/run_checks.html, checks_print.html, check_register.html) and
   the short lists of what the state asks for (templates/launch/everify.html) */
.plain-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.25rem 0 1rem;
  padding-inline-start: 1.1rem;
  max-inline-size: 72ch;
  color: var(--t-2);
  font-size: 0.875rem;
  line-height: 1.5;
}

.plain-list li::marker {
  color: var(--t-3);
}

.pc-note {
  max-inline-size: 68ch;
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
}

.pc-sheet + .pc-sheet {
  margin-block-start: 1.5rem;
}

/* voiding asks why, so the reason opens in place instead of on a page of its own */
.pc-void > summary {
  display: inline-flex;
  list-style: none;
  cursor: pointer;
}

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

.pc-void[open] > summary {
  margin-block-end: 0.5rem;
}

.pc-void .inline-form {
  align-items: end;
  gap: 0.5rem;
  margin: 0;
}

.pc-void .inline-form input {
  min-inline-size: 14rem;
}

@media print {
  /* one paycheck to a sheet of check stock: the check on top, its stub under it */
  .pc-sheet {
    break-after: page;
    break-inside: avoid;
  }

  .pc-sheet + .pc-sheet {
    margin-block-start: 0;
  }

  .pc-sheet:last-child {
    break-after: auto;
  }
}

/* a source's panel holds a heading, the file and the notes: it needs the padding a detail panel has */
.im-source {
  padding: 1.15rem 1.3rem 1.25rem;
}

/* Florida county rates on the Sales tax page (templates/books/sales_tax.html) */
.fl-rates {
  margin-block-end: 1rem;
}

.fl-rates > .muted {
  max-inline-size: 72ch;
}

.fl-rates select {
  min-inline-size: 15rem;
}

/* a statement whose lines carry a sentence of explanation (the DR-15 worksheet): the words wrap,
   the figures and the column heads do not */
table.statement.st-wrap {
  white-space: normal;
}

.statement.st-wrap :is(td.num, thead th) {
  white-space: nowrap;
}

.statement.st-wrap td.num {
  vertical-align: top;
}

.statement.st-wrap .sub {
  max-inline-size: 58ch;
  font-weight: 430;
  line-height: 1.45;
}

/* a group of notes with none in it takes no room */
.messages:not(:has(.message)) {
  display: none;
}

/* a note that only informs is marked with an i, not with the tick of something done */
.message.info::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
}

.panel + .form-sources {
  margin-block-start: 0.9rem;
}

.im-columns + .muted {
  margin-block-start: 0.75rem;
}

/* A line that belongs with a statement table yet is not one of its rows: it keeps the table's measure and
   stays put when the table scrolls sideways on a phone. */
.statement-sheet .st-aside {
  max-inline-size: 780px;
  margin: 0.35rem auto 0.9rem;
  padding-inline: 12px;
  color: var(--t-3);
  font-size: 0.8rem;
  line-height: 1.5;
}
