/* CLAUDE 10-18: Suggestions, Bug report and Get free credits (rewards.js). Graphite: no box unless it means something,
   one primary per area, green only for state (a credited item). Uses the control primitives of controls.css. */

/* ===== the sidebar: the three entries under a hairline, below Pricing ===== */
.home-tabs.nav-earn {
  margin-top: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--c-line);
}

/* ===== the pages ===== */
.rw .page-head {
  display: block;
  margin-bottom: var(--s-5);
  text-align: left;
}
.rw .page-sub {
  margin: var(--s-1) 0 0;
  color: var(--c-fg-2);
}
.rw-amt {
  color: var(--c-fg);
  font-weight: 600;
}
.rw-form,
.rw-sent {
  display: grid;
  gap: var(--s-4);
  max-width: 560px;
}
.rw .m-label small,
.rw-hint {
  color: var(--c-fg-3);
  font-size: var(--t-label);
  font-weight: 400;
}
.rw textarea.m-field {
  display: block;
  padding: var(--s-2) var(--s-3);
  line-height: 20px;
  resize: vertical;
  font: inherit;
  font-size: var(--t-body);
}
.rw .m-err {
  margin: 0;
}
.rw-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4);
  padding-top: var(--s-1);
}
.rw-quiet,
.rw-fine a,
.rw-what a {
  color: var(--c-fg-2);
  font-size: var(--t-label);
  text-decoration: none;
  text-underline-offset: 3px;
}
.rw-quiet:hover,
.rw-fine a:hover,
.rw-what a:hover {
  color: var(--c-fg);
  text-decoration: underline;
}

/* the screenshot: a quiet button, then the picture itself (the image is the shape) */
.rw-shot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
}
.rw-shot-add {
  cursor: pointer;
}
.rw-shot-add svg,
.rw-shot-pic .m-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rw-shot-add:focus-within {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}
.rw-shot-pic {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: 0;
  min-width: 0;
}
.rw-shot-pic img {
  width: 128px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--c-stage);
}
.rw-shot-pic figcaption {
  min-width: 0;
  overflow: hidden;
  color: var(--c-fg-3);
  font-size: var(--t-meta);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* consent: the 18 px box from the sign-up form, and what it attaches behind a disclosure */
.rw-consent .consent {
  color: var(--c-fg-2);
  font-size: var(--t-body);
  line-height: 20px;
}
.page-inner .rw-what {
  margin: var(--s-2) 0 0 28px;
  padding: 0;
  border: 0;
  background: transparent; /* not studio.css's boxed .page-inner details: a disclosure, no box */
}
.rw-what summary {
  width: max-content;
  color: var(--c-fg-2);
  font-size: var(--t-label);
  cursor: pointer;
}
.rw-what dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--s-1) var(--s-4);
  margin: var(--s-3) 0;
  font-size: var(--t-label);
}
.rw-what dt {
  color: var(--c-fg-3);
}
.rw-what dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--c-fg-2);
  font-variant-numeric: tabular-nums;
}
.rw-what .rw-hint {
  margin: 0;
}

/* sent: the tick draws once (motion.css .m-check), one line, the next step */
.rw-sent {
  gap: var(--s-2);
  padding-top: var(--s-2);
}
.rw-sent .m-check {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--c-signal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rw-sent h3 {
  margin: var(--s-2) 0 0;
  font-size: var(--t-title);
  font-weight: 600;
  outline: none;
}
.rw-sent p {
  margin: 0;
  color: var(--c-fg-2);
}
.rw-sent .rw-actions {
  padding-top: var(--s-3);
}

/* ===== Get free credits: the ways to earn as rows, the amount as the type ===== */
.rw-ways {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--c-line);
}
.rw-ways li {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--c-line);
}
.rw-plus {
  color: var(--c-fg);
  font-size: var(--t-page);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.rw-plus.rw-none {
  color: var(--c-fg-3);
}
.rw-ways span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.rw-ways span b {
  font-size: var(--t-body);
  font-weight: 500;
}
.rw-ways small {
  color: var(--c-fg-3);
  font-size: var(--t-label);
}
.rw-fine {
  margin: var(--s-3) 0 0;
  color: var(--c-fg-3);
  font-size: var(--t-label);
}
.rw-note {
  margin: var(--s-3) 0 0;
  color: var(--c-fg-2);
  font-size: var(--t-body);
}

/* the account's own items */
.rw-mine {
  margin-top: var(--s-6);
}
.rw-mine-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.rw-mine-head h3 {
  margin: 0;
  font-size: var(--t-title);
  font-weight: 600;
}
.rw-total {
  color: var(--c-fg-2);
  font-size: var(--t-label);
  font-variant-numeric: tabular-nums;
}
.rw-items {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--c-line);
}
.rw-item {
  border-bottom: 1px solid var(--c-line);
}
.rw-item-head {
  --press: var(--press-lg);
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 52px;
  padding: var(--s-2) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--c-fg);
  text-align: left;
}
.rw-item-head svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--c-fg-3);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rw-item-words {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.rw-item-words b {
  overflow: hidden;
  font-size: var(--t-body);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rw-item-words small {
  color: var(--c-fg-3);
  font-size: var(--t-meta);
}
.rw-status {
  color: var(--c-fg-2);
  font-size: var(--t-label);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rw-item.is-credited .rw-status {
  color: var(--c-signal);
}
.rw-item.is-declined .rw-status {
  color: var(--c-fg-3);
}
.rw-item-head:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: -2px;
  border-radius: var(--r-sm);
}
@media (hover: hover) and (pointer: fine) {
  .rw-item-head:hover svg {
    stroke: var(--c-fg-2);
  }
  .rw-item-head:hover .rw-status {
    color: var(--c-fg);
  }
  .rw-item.is-credited .rw-item-head:hover .rw-status {
    color: var(--c-signal);
  }
}

/* the step track: Received, Reviewing, Built / Fixed, Credited, with their dates */
.rw-steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin: 0;
  padding: var(--s-1) 0 var(--s-3) 28px;
  list-style: none;
}
.rw-steps li {
  position: relative;
  display: grid;
  gap: 2px;
  padding-top: var(--s-4);
  padding-right: var(--s-2);
}
.rw-steps li::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 12px;
  right: 4px;
  height: 1px;
  background: var(--c-line-strong);
}
.rw-steps li:last-child::before {
  content: none;
}
.rw-steps li.done:not(.current)::before {
  background: var(--c-fg-3);
}
.rw-steps i {
  position: absolute;
  top: 0;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--c-overlay);
  box-shadow: inset 0 0 0 1px var(--c-line-strong);
}
.rw-steps li.done i {
  background: var(--c-fg-3);
  box-shadow: none;
}
.rw-steps li.current i {
  background: var(--c-fg);
  box-shadow: 0 0 0 3px rgba(242, 240, 235, 0.12);
}
.is-credited .rw-steps li.current i {
  background: var(--c-signal);
  box-shadow: 0 0 0 3px var(--c-signal-soft);
}
.rw-steps span {
  color: var(--c-fg-3);
  font-size: var(--t-label);
}
.rw-steps li.done span {
  color: var(--c-fg-2);
}
.rw-steps li.current span {
  color: var(--c-fg);
  font-weight: 500;
}
.rw-steps small {
  min-height: 16px;
  color: var(--c-fg-3);
  font-size: var(--t-meta);
  font-variant-numeric: tabular-nums;
}
.rw-reason {
  margin: 0 0 var(--s-3) 28px;
  color: var(--c-fg-2);
  font-size: var(--t-body);
}
.rw-skel {
  height: 44px;
  margin-top: var(--s-2);
}

/* ===== phone ===== */
@media (pointer: coarse) {
  .rw-item-head {
    min-height: 56px;
  }
}
@media (max-width: 767px) {
  .rw-ways li {
    grid-template-columns: 56px 1fr;
    row-gap: var(--s-3);
  }
  .rw-ways li > :is(a, button) {
    grid-column: 2;
    justify-self: start;
  }
  .rw-steps {
    padding-left: 0;
  }
  .rw-reason {
    margin-left: 0;
  }
  .rw-what {
    margin-left: 0;
  }
  .rw .m-btn.primary {
    min-height: var(--h-touch);
  }
  /* the phone account sheet: a hairline above and below the three rows */
  .as-sep {
    height: 1px;
    margin: var(--s-1) var(--s-2);
    background: var(--c-line);
  }
}
.as-sep {
  height: 1px;
  background: var(--c-line);
}
