/* Setup and settings.
   Goes with: js/screens/setup.js. */

.st {
  max-width: none;
  margin: 0;
}
.st-band {
  position: relative;
  background: var(--band);
  color: var(--band-ink);
  box-shadow: 0 0 0 100vmax var(--band);
  clip-path: inset(-100vmax -100vmax 0);
  padding: 4px 0 30px;
}
.st-top {
  display: flex;
  min-height: 44px;
  margin-bottom: 14px;
}
.st-back {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--band-chip);
  border: 0;
  color: var(--band-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.st-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.st-back[hidden],
.st-top:has(.st-back[hidden]) {
  display: none;
}
.st-band:has(.st-back[hidden]) {
  padding-top: 26px;
}
.st-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin: 0;
  color: var(--band-ink);
}
.st-sub {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--band-ink2);
  max-width: 60ch;
}
.st-intro {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 10px;
  counter-reset: st;
}
.st-intro[hidden] {
  display: none;
}
.st-intro li {
  counter-increment: st;
  background: var(--band-chip);
  border-radius: 14px;
  padding: 12px 14px 12px 46px;
  position: relative;
  font-size: 14px;
  line-height: 1.4;
}
.st-intro li::before {
  content: counter(st);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--band-ink);
  color: var(--band);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-intro b {
  display: block;
  color: var(--band-ink);
}
.st-intro span {
  color: var(--band-ink2);
}
/* Laptops: two columns that end on the same line.
   Left: Name, Whose money, Your data, then the start card (first visit) or
   Start over (after setup). Right: Features, then Look and currency, which
   stretches to the bottom of the left column. "Back to my dashboard" sits
   above both. */
.st-body {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  align-items: stretch;
  padding-top: 20px;
}
.st-body>.st-top-actions,
.st-body>.st-privacy {
  grid-column: 1/-1;
}
.st-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.st-fill:empty,
.st-top-actions:empty {
  display: none;
}
/* The last card in each column takes the leftover height. */
.st-fill,
.st-look {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
.st-fill>.st-card {
  flex: 1 0 auto;
}
.st-top-actions {
  display: grid;
}
.st-top-actions>.btn.primary {
  justify-self: start;
  min-width: 240px;
  justify-content: center;
}
.st-tools {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}
.st-tools .btn {
  justify-content: center;
  width: 100%;
}
/* Before setup only Restore shows: centered. */
.st-tools.solo {
  grid-template-columns: minmax(0,320px);
  justify-content: center;
}
.st-tools [hidden] {
  display: none;
}
/* Buttons that remove or replace your numbers: Delete all my data and the
   two Start over buttons. */
.st-danger {
  color: var(--over);
  border-color: var(--over);
}
.st-seg button.on {
  color: #fff;
  -webkit-text-fill-color: #fff;
}
.st-card {
  margin: 0;
}
.st-card h2 {
  margin-bottom: 12px;
}
.st-card .hint {
  margin: -6px 0 10px;
}
.st-row {
  display: grid;
  grid-template-columns: 130px minmax(0,1fr);
  gap: 12px;
  align-items: center;
  margin: 10px 0 0;
}
/* The first row sits right under the card title. (":first-of-type" counted
   tags, so it also caught Currency, the card's first <label>.) */
.st-card h2+.st-row {
  margin-top: 0;
}
.st-row>span {
  font-size: 14px;
  color: var(--ink2);
}
.st-row input,
.st-row select {
  width: 100%;
}
.st-seg {
  display: flex;
  width: 100%;
  box-sizing: border-box;
}
.st-seg button {
  flex: 1;
  padding: 9px 6px;
  text-align: center;
}
.st-row .st-seg {
  width: 100%;
}
#su-earners {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.st-person {
  display: grid;
  grid-template-columns: 10px minmax(0,1fr) minmax(0,190px);
  gap: 12px;
  align-items: end;
  background: var(--soft);
  border-radius: 14px;
  padding: 12px 14px;
}
.st-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  align-self: center;
  margin-top: 18px;
}
.st-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.st-field>span {
  font-size: 12.5px;
  color: var(--ink2);
}
.st-list {
  display: grid;
}
.st-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.st-item:first-child {
  border-top: 0;
  padding-top: 2px;
}
.st-item-t b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}
.st-item-t small {
  display: block;
  font-size: 12.5px;
  color: var(--ink2);
  margin-top: 1px;
}
.st-switch {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  transition: background .15s;
  margin: 0;
  padding: 0;
  border: 0;
}
.st-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform .15s;
}
.st-switch:checked {
  background: var(--accent);
}
.st-switch:checked::after {
  transform: translateX(18px);
}
.st-switch:focus-visible,
.st-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Look and currency spans the page on laptops; its rows keep a readable width. */
.st-look .st-row {
  max-width: 800px;
}
/* Color: named chips, the chosen one outlined. */
.st-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(96px,1fr));   /* every chip the same width: 3 a row on phones, 6 on laptops */
  gap: 8px;
}
.st-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.st-chip i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sw);
}
.st-chip.sel {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  font-weight: 650;
}
.st-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.st-btns .btn {
  justify-content: center;
}
/* Start with my numbers / Look around with sample numbers: stacked, the
   width of their card. */
.st-start {
  display: grid;
  gap: 10px;
}
.st-start .btn {
  width: 100%;
}
.st-privacy {
  margin: 4px 0 0;
}
@media screen and (max-width:760px) {
  .st-body {
    grid-template-columns: minmax(0,1fr);
    gap: 12px;
    padding-top: 14px;
  }
  /* Phones: one column in page order. The column wrappers step aside
     (display: contents) and "order" sets the sequence: Name, Whose money,
     Features, Your data, start card or Start over, Look and currency. */
  .st-body {
    display: flex;
    flex-direction: column;
  }
  .st-col {
    display: contents;
  }
  .st-top-actions { order: 0; }
  .st-name { order: 1; }
  .st-house { order: 2; }
  .st-feat { order: 3; }
  .st-data { order: 4; }
  .st-fill { order: 5; }
  .st-look { order: 6; }
  .st-privacy { order: 7; }
  .st-row {
    grid-template-columns: minmax(0,1fr);
  }
  .st-row>span {
    margin-bottom: -6px;
  }
  .st-person {
    grid-template-columns: 10px minmax(0,1fr);
    row-gap: 10px;
  }
  .st-person .st-field:last-child {
    grid-column: 2;
  }
  .st-top-actions>.btn.primary {
    justify-self: stretch;
  }
  .st-title {
    font-size: 26px;
  }
}
@media (prefers-reduced-motion:reduce) {
  .st-switch,
  .st-switch::after {
    transition: none;
  }
}

