/* Page composition shared by more than one page: the closing call to action,
   the head of a content page, the sign-in pieces, the narrow pages (delete,
   open, checkout) and the price figure. The home page is home.css. */

/* A gated page ships hidden and site.js either reveals it or bounces; with no
   script it stays hidden rather than show prices to someone signed out. */
.gated main {
  visibility: hidden;
}

/* ----------------------------------------------------------------- price --- */

.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 20px;
}

.price b {
  color: var(--label);
  font-size: clamp(2.5rem, 2rem + 1.6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: var(--track-display);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.price span {
  color: var(--label-2);
  font-size: var(--callout);
}

.price-alt {
  margin-top: 8px;
  color: var(--label-2);
  font-size: var(--footnote);
}

/* --------------------------------------------------------------- finale --- */

/* The last call: centred, the one place the page leaves its left axis, under
   a faint light from below. */
.finale {
  position: relative;
  padding-block: clamp(88px, 11vw, 152px);
  overflow: hidden;
  text-align: center;
}

.finale::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 120%, rgba(46, 155, 255, 0.1), transparent 70%);
  content: "";
  pointer-events: none;
}

.finale > * {
  position: relative;
}

.finale h2 {
  max-width: 18ch;
  margin-inline: auto;
}

.finale .lede {
  margin: 18px auto 0;
}

.finale .actions {
  margin-top: 32px;
}

/* --------------------------------------------------------- content pages --- */

.account-page {
  padding-top: calc(var(--masthead) + clamp(48px, 6vw, 96px));
  padding-bottom: clamp(80px, 9vw, 128px);
}

/* A page that closes on the finale lets the finale's own space end it. */
.account-page:has(> .shell > .finale:last-child) {
  padding-bottom: 0;
}

.account-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.account-head h1 {
  font-size: var(--title-page);
  line-height: 1.07;
  letter-spacing: var(--track-display);
}

.account-head .lede,
.account-head .legal-meta {
  margin-top: 20px;
}

.account-head .actions {
  margin-top: 28px;
}

/* A long page's parts, one after another down the left axis. The head is
   followed by its first part at the head's own margin, as on every page. */
.page-block + .page-block {
  margin-top: clamp(72px, 9vw, 120px);
}

.page-block .section-head {
  margin-bottom: clamp(28px, 3.4vw, 44px);
}

/* Support and the legal pages: an index on the left (the page's groups, or
   the three legal documents), held in view while the page scrolls; on a
   narrow screen, a row of links. */
.index-layout {
  display: grid;
  gap: 40px;
}

.page-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-index a {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--fill-2);
  color: var(--label);
  font-size: var(--footnote);
  font-weight: 510;
  transition: background-color var(--fast) var(--ease-out-soft), color var(--fast) var(--ease-out-soft);
}

.page-index a:hover {
  background: var(--fill);
  text-decoration: none;
}

@media (min-width: 940px) {
  .index-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
  }

  .page-index {
    position: sticky;
    top: calc(var(--masthead) + 40px);
    display: grid;
    gap: 2px;
  }

  .page-index a {
    padding: 8px 12px;
    border-radius: var(--r-button);
    background: transparent;
    color: var(--label-2);
    font-size: var(--callout);
  }

  .page-index a:hover,
  .page-index a[aria-current="page"] {
    background: var(--fill-2);
    color: var(--label);
  }
}

.page-index a[aria-current="page"] {
  background: var(--fill);
}

.support-groups h2 {
  margin-bottom: 20px;
  font-size: var(--title-2);
}

.support-groups .faq-list {
  max-width: none;
}

/* ---------------------------------------------------------------- sign in --- */

.sign-in-alt {
  margin-top: 12px;
}

/* The other ways in, under the email form: "or sign in with" set into a
   hairline, over a row of round brand marks. Each mark is its button's whole
   label, so each carries an aria-label. */
.oauth {
  margin-top: 28px;
}

.oauth-label {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--label-2);
  font-size: var(--footnote);
  white-space: nowrap;
}

.oauth-label::before,
.oauth-label::after {
  flex: 1;
  height: 1px;
  background: var(--hairline);
  content: "";
}

.oauth-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.oauth-button {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0.5px var(--hairline-strong), 0 6px 16px -8px rgba(0, 0, 0, 0.5);
  transition: transform var(--spring-snappy-ms) var(--spring-snappy), opacity var(--fast) var(--ease-out-soft);
}

.oauth-button svg {
  width: 26px;
  height: 26px;
}

.oauth-button:active {
  transform: scale(0.97);
  transition-duration: var(--press-in);
}

.oauth-button:disabled {
  opacity: 0.5;
  transform: none;
}

.oauth-github {
  background: var(--label);
  color: var(--base);
}

/* Google's own colours, on the white its guidelines put the mark on. */
.oauth-google {
  background: #ffffff;
}

.oauth-google svg {
  width: 24px;
  height: 24px;
}

/* Apple's black mark on white, its guidelines' white style. */
.oauth-apple {
  background: #ffffff;
  color: #000000;
}

.oauth-apple svg {
  width: 24px;
  height: 24px;
  margin-top: -2px;
}

/* The code a person types on GitHub: mono, because it is typed. */
.device-code {
  margin: 14px 0 20px;
  color: var(--label);
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0.18em;
}

#github-flow > p:first-child {
  margin-top: 10px;
}

/* ------------------------------------------------------------ narrow pages --- */

.narrow {
  max-width: 640px;
}

.narrow h1 {
  font-size: var(--title-page);
  line-height: 1.07;
  letter-spacing: var(--track-display);
}

.narrow h1 + .prose,
.narrow h1 + .lede {
  margin-top: 20px;
}

.narrow ~ .panel {
  margin-top: 40px;
}

.narrow > .lede ~ .actions {
  margin-top: 28px;
}

.narrow > .lede ~ .caption {
  margin-top: 24px;
}

/* The checkout thank-you: a mark, then the steps. */
.thanks-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 28px;
  border-radius: var(--r-group);
  background: var(--green-fill);
  color: var(--green-ink);
}

.thanks-mark svg {
  width: 30px;
  height: 30px;
}

.thanks-mark ~ .lede {
  margin-top: 20px;
}

.thanks-mark ~ h2 {
  margin-top: 52px;
  font-size: var(--title-3);
  letter-spacing: var(--track-title-3);
}

.thanks-mark ~ .caption {
  margin-top: 36px;
  font-size: var(--callout);
}

.thanks-mark ~ .actions {
  margin-top: 28px;
}

/* The steps are a real sequence, so they are numbered. */
.steps {
  display: grid;
  margin: 18px 0 0;
  padding: 0;
  border-radius: var(--r-group);
  background: var(--surface);
  box-shadow: var(--highlight);
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 16px 20px 16px 60px;
  color: var(--label-body);
  font-size: var(--callout);
  line-height: 1.55;
  counter-increment: step;
}

.steps li + li {
  box-shadow: inset 60px 0 0 var(--surface), inset 0 0.5px 0 var(--hairline);
}

.steps li::before {
  position: absolute;
  top: 15px;
  left: 20px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tint-fill);
  color: var(--tint);
  font-size: var(--caption);
  font-weight: 700;
  content: counter(step);
}
