/* The pages of the pro tools (/t/<type>): the parts in js/pro/kit.js. White cards on the warm
   paper, under a stage in the pen of the tool's group; a page lays these out its own way. */

.pro {
  padding-bottom: 112px;
}

.pro-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-block: 0;
}

/* the stage runs past the column of the page, to the width every stage has */
.pro-hero {
  width: min(100vw - 2 * var(--inset), 1680px);
  margin-left: 50%;
  padding-block: 52px;
  translate: -50%;
}

.pro-hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px 64px;
}

.pro-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  max-width: 640px;
}

.pro-hero-copy > .stage-pic {
  width: 112px;
  height: 112px;
}

.pro-hero-copy .lead {
  color: var(--ink);
}

.pro-hero-aside {
  max-width: 420px;
}

.pro-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
}

.pro-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pro-step {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pen);
  font-size: 15px;
  font-weight: 600;
}

.pro-card-title {
  flex: 1;
  font-size: 22px;
  line-height: 30px;
  letter-spacing: -0.01em;
}

.pro-progress {
  position: relative;
  width: 96px;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--paper-3);
}

.pro-progress > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--ink);
  transition: width 200ms var(--ease);
}

.pro-pending {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: var(--q-l);
  corner-shape: squircle;
  background: var(--canvas);
}

.pro-pending .working {
  width: 96px;
}

.pro-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* one of a few, as cards */
.pro-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.pro-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--q-l);
  corner-shape: squircle;
  background: var(--canvas);
  box-shadow: inset 0 0 0 1px transparent;
  cursor: pointer;
  transition:
    box-shadow 140ms var(--ease),
    background-color 140ms var(--ease);
}

.pro-choice:hover {
  background: var(--paper-2);
}

.pro-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pro-choice:has(input:checked) {
  background: var(--wash);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.pro-choice:has(input:disabled) {
  background: var(--paper-2);
  color: var(--ink-3);
  cursor: not-allowed;
}

.pro-choice:has(input:focus-visible) {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.pro-choice-visual {
  display: grid;
  place-items: center;
  height: 64px;
  margin-bottom: 6px;
  border-radius: var(--radius);
  background: var(--paper);
}

.pro-choice-label {
  font-weight: 500;
  line-height: 22px;
}

.pro-choice-hint {
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-3);
}

/* before and after */
.pro-compare {
  position: relative;
  overflow: hidden;
  border-radius: var(--q-l);
  corner-shape: squircle;
  background: var(--paper-2);
  user-select: none;
}

.pro-compare > img {
  display: block;
  width: 100%;
  height: auto;
}

/* Lies over the first picture and takes its size: it has to win over `.pro-compare > img`. */
.pro-compare > .pro-compare-top {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pro-compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgb(18 36 28 / 0.35);
  pointer-events: none;
}

.pro-compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.pro-compare-tag {
  position: absolute;
  top: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-s);
  background: rgb(255 255 255 / 0.9);
  font-size: 13px;
  line-height: 20px;
  pointer-events: none;
}

.pro-compare-tag.is-left {
  left: 10px;
}

.pro-compare-tag.is-right {
  right: 10px;
}

.pro-compare.is-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  overflow: visible;
  background: none;
}

.pro-compare.is-side figure {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.pro-compare.is-side img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-s);
  background: var(--paper-2);
}

.sheet-pro {
  margin-top: 8px;
}

@media (max-width: 860px) {
  .pro {
    padding-bottom: 72px;
  }

  .pro-hero {
    padding-block: 32px;
  }

  .pro-hero-copy > .stage-pic {
    width: 84px;
    height: 84px;
  }

  .pro-hero-in {
    grid-template-columns: 1fr;
  }

  .pro-hero-aside {
    max-width: none;
  }

  .pro-card {
    padding: 22px 18px;
  }

  .pro-compare.is-side {
    grid-template-columns: 1fr;
  }
}

/* an editor's button under a finished task */
.pro-editor:not(:empty) {
  padding-top: 24px;
}

/* a report in a card lies on the card */
.pro-card .report-section,
.pro-card .report > .ledger {
  padding: 0;
  background: none;
  box-shadow: none;
}

.pro-card .report,
.pro-card .report-body {
  gap: 48px;
}
