/* Pricing, credits, and privacy page layout. */

.pricing-shell .paper-sheet,
.account-shell .paper-sheet,
.credits-shell .paper-sheet {
  width: min(600px, 100%);
  display: grid;
  grid-template-rows: repeat(28, var(--paper-half-rule));
  aspect-ratio: auto;
  min-height: auto;
  padding-top: calc(var(--paper-pad-y) + var(--paper-rule-offset));
}

.credits-shell .paper-sheet {
  width: min(500px, 100%);
}

.privacy-shell .paper-sheet {
  width: min(600px, 100%);
  display: grid;
  grid-template-rows: repeat(38, var(--paper-half-rule));
  aspect-ratio: auto;
  min-height: auto;
  padding-top: calc(var(--paper-pad-y) + var(--paper-rule-offset));
  background: var(--paper);
  background-size: auto;
  background-position: 0 0;
}

.privacy-shell .paper-sheet::before,
.privacy-shell .paper-sheet::after {
  background: var(--paper);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pricing-page {
  display: grid;
  gap: 0;
  margin-top: 0;
}

.account-page {
  display: grid;
  grid-template-rows: repeat(12, var(--paper-half-rule));
  justify-items: center;
  gap: 0;
  grid-row: 6 / 16;
  align-self: start;
  text-align: center;
}

.pricing-shell .pricing-page {
  grid-row: 6 / 26;
  align-self: start;
  transform: translateY(15px);
}

.pricing-shell:not(.credits-shell) .report-auth-controls,
.landing-shell.credits-shell:not(.report-shell) .report-auth-controls {
  transform: translateY(calc((var(--paper-rule) * 2) - 7px));
}

.account-page h2,
.account-page h3,
.account-page p {
  margin: 0;
}

.account-page h2,
.account-page h3 {
  color: var(--text);
  font-size: 18px;
  line-height: var(--paper-rule);
}

.account-page h3 {
  margin-top: var(--paper-half-rule);
  font-size: 13px;
}

.account-page p,
.account-source-list li {
  color: var(--muted);
  font-size: 12px;
  line-height: var(--paper-rule);
}

.account-action-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: var(--paper-rule);
  margin-top: var(--paper-half-rule);
}

.account-action-row form {
  margin: 0;
}

.account-source-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: var(--paper-half-rule) 0 0;
  list-style: none;
}

.account-page > .account-source-list:first-child {
  margin-top: 0;
}

.account-source-list strong {
  color: var(--text);
}

.account-report-row,
.account-metric-row,
.account-settings-row {
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-report-row {
  grid-row: 2 / 4;
  gap: 12px;
  height: 100%;
}

.account-report-action {
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.account-report-action:hover,
.account-report-action:focus-visible {
  color: var(--text);
  outline: none;
}

.account-report-icon {
  display: block;
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("/static/img/report-search.svg") center / contain no-repeat;
  mask: url("/static/img/report-search.svg") center / contain no-repeat;
}

.account-report-label {
  transform: translateY(1px);
}

.account-metric-row {
  gap: 11px;
}

.account-report-stats-row {
  grid-row: 4 / 6;
  height: 100%;
}

.account-progress-row {
  grid-row: 6 / 8;
  height: 100%;
}

.account-settings-row {
  gap: 12px;
  height: 100%;
  margin: 0;
}

.account-engine-row {
  grid-row: 8 / 10;
}

.account-done-row {
  grid-row: 10 / 12;
}

.account-settings-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  width: 230px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.account-settings-row select {
  width: 118px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 2px 6px;
  transform: translateY(1px);
}

.account-settings-row select:disabled {
  opacity: 1;
  cursor: default;
}

.credits-page {
  display: grid;
  grid-row: 6 / 26;
  align-self: start;
  transform: translateY(17px);
}

.credits-page h2 {
  height: var(--paper-rule);
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: var(--paper-rule);
}

.credits-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.credits-list li {
  min-height: var(--paper-rule);
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: var(--paper-rule);
}

.credits-list a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.credits-list a:hover {
  text-decoration: underline;
}

.pricing-intro {
  max-width: 520px;
}

.pricing-intro p {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.pricing-table-wrap {
  overflow-x: auto;
  outline: 1px solid color-mix(in srgb, var(--line-strong) 54%, transparent);
  outline-offset: 0;
}

.pricing-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--text);
  font-size: 12px;
  line-height: 1;
}

.pricing-table th,
.pricing-table td {
  height: var(--paper-rule);
  padding: 0 12px;
  text-align: left;
  vertical-align: middle;
}

.pricing-table thead th {
  color: var(--text);
  font-weight: 750;
}

.pricing-table thead tr:first-child th {
  border-bottom: 1px solid color-mix(in srgb, var(--line-strong) 36%, transparent);
}

.pricing-table thead tr:nth-child(2) th {
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.pricing-table thead th:first-child,
.pricing-table tbody th {
  width: 33.333%;
  color: var(--muted);
  font-weight: 650;
}

.pricing-table th:nth-child(2),
.pricing-table td:nth-child(2),
.pricing-table th:nth-child(3),
.pricing-table td:nth-child(3) {
  width: 33.333%;
}

.pricing-table th:nth-child(2),
.pricing-table td:nth-child(2),
.pricing-table th:nth-child(3),
.pricing-table td:nth-child(3) {
  border-left: 1px solid color-mix(in srgb, var(--line-strong) 36%, transparent);
}

.pricing-mobile-label {
  display: none;
}

.privacy-page {
  display: grid;
  gap: 0;
  grid-row: 1 / 38;
  align-self: start;
  transform: none;
}

.privacy-section {
  min-height: calc(var(--paper-rule) * 3);
}

.privacy-title h2,
.privacy-section h3,
.privacy-section p {
  margin: 0;
}

.privacy-title h2 {
  color: var(--text);
  font-size: 18px;
  line-height: var(--paper-rule);
}

.privacy-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: var(--paper-rule);
}

.privacy-section h3 {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  line-height: var(--paper-rule);
}

.privacy-section p {
  color: var(--muted);
  font-size: 11px;
  line-height: var(--paper-half-rule);
}

.privacy-main-link {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: var(--paper-rule);
  text-decoration: none;
}

.privacy-main-link:hover {
  text-decoration: underline;
}

.pricing-reward-note {
  height: var(--paper-rule);
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: var(--paper-rule);
}

@media (max-width: 760px) {
  .pricing-shell {
    width: 100%;
    padding: 0;
  }

  .privacy-shell {
    width: 100%;
    min-height: 100vh;
    height: auto;
    padding: 0;
  }

  .pricing-shell .paper-stack,
  .privacy-shell .paper-stack {
    height: auto;
    min-height: 100vh;
    align-items: stretch;
  }

  .pricing-shell .paper-sheet,
  .privacy-shell .paper-sheet {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    height: auto;
    min-height: 100vh;
    padding: calc(var(--paper-pad-y) - var(--paper-half-rule)) 18px 24px;
    border: 0;
    box-shadow: none;
  }

  .pricing-shell:not(.credits-shell) .paper-sheet,
  .credits-shell .paper-sheet {
    display: grid;
    align-content: start;
    align-items: stretch;
    justify-items: center;
    grid-template-rows: repeat(40, var(--paper-half-rule));
  }

  .pricing-shell .paper-sheet::before,
  .pricing-shell .paper-sheet::after,
  .privacy-shell .paper-sheet::before,
  .privacy-shell .paper-sheet::after {
    display: none;
  }

  .pricing-shell .page-menu,
  .privacy-shell .page-menu {
    top: calc(var(--paper-half-rule) - 11px);
    left: 12px;
  }

  .pricing-shell .pricing-page,
  .credits-shell .credits-page,
  .privacy-shell .privacy-page {
    width: min(500px, 100%);
  }

  .pricing-shell:not(.credits-shell) .report-header,
  .credits-shell .report-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    grid-row: 1 / 3;
    width: min(500px, 100%);
    min-height: 0;
    margin: 0;
    padding: 0;
    border-bottom: 0;
  }

  .pricing-shell:not(.credits-shell) .report-header h1,
  .credits-shell .report-header h1 {
    font-size: clamp(29px, 8.6vw, 38px);
  }

  .landing-shell.pricing-shell:not(.report-shell) .report-header {
    transform: none;
  }

  .pricing-shell:not(.credits-shell) .report-auth-controls,
  .landing-shell.credits-shell:not(.report-shell) .report-auth-controls {
    transform: translateY(calc((var(--paper-rule) * 2) - 7px));
  }

  .pricing-page {
    margin-top: 0;
  }

  .pricing-intro p {
    font-size: 18px;
  }

  .pricing-shell:not(.credits-shell) .pricing-page {
    grid-row: 4 / 26;
    transform: translateY(calc((var(--paper-rule) * 2) - 2px));
  }

  .account-shell .account-page {
    grid-row: 3 / 21;
    transform: translateY(calc((var(--paper-rule) * 2) - 2px));
  }

  .account-shell .account-settings-row select {
    transform: none;
  }

  .credits-page {
    grid-row: 7 / 27;
    transform: translateY(calc(var(--paper-half-rule) - 2px));
  }

  .credits-page h2 {
    font-size: 16px;
  }

  .credits-list li {
    font-size: 10px;
  }

  .pricing-table {
    font-size: 10px;
  }

  .pricing-table th,
  .pricing-table td {
    padding: 0 4px;
  }

  .pricing-table thead th:first-child,
  .pricing-table tbody th {
    width: 34%;
  }

  .pricing-table th:nth-child(2),
  .pricing-table td:nth-child(2) {
    width: 27%;
  }

  .pricing-table th:nth-child(3),
  .pricing-table td:nth-child(3) {
    width: 39%;
  }

  .pricing-table thead tr:first-child th {
    font-size: 11px;
  }

  .pricing-table thead tr:nth-child(2) th {
    font-size: 10px;
  }

  .privacy-shell .privacy-page {
    grid-row: auto;
    margin-top: 30px;
    transform: none;
  }

  .privacy-shell .paper-sheet {
    display: flex;
    align-items: stretch;
    width: 100%;
    aspect-ratio: auto;
    min-height: 100vh;
    grid-template-rows: none;
    height: max-content;
    background: var(--paper);
    background-size: auto;
    background-position: 0 0;
  }

  .privacy-section {
    min-height: 0;
    margin-top: 18px;
  }

  .privacy-section:first-of-type {
    margin-top: 20px;
  }

  .privacy-title h2 {
    font-size: 16px;
    line-height: 1.25;
  }

  .privacy-title p,
  .privacy-section h3 {
    font-size: 11px;
    line-height: 1.35;
  }

  .privacy-section p {
    font-size: 10px;
    line-height: 1.45;
    margin-top: 7px;
  }

  .pricing-full-label {
    display: none;
  }

  .pricing-mobile-label {
    display: inline;
  }
}
