:root {
  color-scheme: light dark;
  --ink: #1a1a1e;
  --paper: #faf7f1;
  --screen: #fffdfa;
  --soft: #595550;
  --rule: #b9b2a8;
  --hl: #ffdd3c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ede9e1;
    --paper: #141416;
    --screen: #202023;
    --soft: #c6c1b8;
    --rule: #6f6b65;
  }
}
* {
  box-sizing: border-box;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 62rem;
  margin: auto;
  padding: 1rem clamp(1rem, 5vw, 4rem);
  font:
    1rem/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--paper);
  color: var(--ink);
}
main {
  flex: 1;
}
a {
  color: inherit;
  text-underline-offset: 0.18em;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
h1,
.wordmark {
  font-family: Georgia, ui-serif, serif;
}
h1,
p {
  margin: 0;
}
.wordmark {
  display: inline-block;
  text-decoration: none;
  color: #1a1a1e;
  font-size: 1.55rem;
  font-weight: bold;
  background: linear-gradient(transparent 45%, var(--hl) 45%);
}
@media (prefers-color-scheme: dark) {
  .wordmark {
    color: var(--ink);
    background: linear-gradient(transparent 77%, #7e6d22 77%);
  }
}
.lede {
  font-size: 1.12rem;
}
.button,
.text-control {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 0.4rem;
  cursor: pointer;
  color: var(--ink);
  background: var(--screen);
}
.button:not(.button--quiet) {
  color: #171717;
  background: var(--hl);
  border-color: #514609;
}
footer {
  display: flex;
  gap: 1.3rem;
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.87rem;
  color: var(--soft);
}
.account-header {
  padding-block: 0.7rem;
}

/* The account page: one card in the middle of the page, the same paper and highlighter as the site. */

.account-signin {
  width: min(100%, 27rem);
  margin-inline: auto;
  padding-block: clamp(1.5rem, 6vh, 4.5rem) 2rem;
}

.account-card {
  padding: clamp(1.4rem, 5vw, 2.25rem);
  background: var(--screen);
  border: 1px solid var(--rule);
  border-radius: 1.2rem;
}

.account-card > * + *,
.account-signin details[open] > * + * {
  margin-top: 1.1rem;
}

.account-signin h1 {
  font-size: clamp(1.7rem, 5vw, 2.1rem);
  line-height: 1.15;
}

.account-signin h2 {
  margin: 0 0 0.5rem;
  font-family: Georgia, ui-serif, serif;
  font-size: 1.15rem;
}

.account-signin .lede {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--soft);
}

/* Apple's and Google's own buttons, as they supply them, one under the other. */
.provider-links {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  padding-top: 0.3rem;
}

.provider-button {
  display: inline-flex;
  max-width: 100%;
  border-radius: 0.5rem;
}

.provider-button img {
  display: block;
  width: 221px;
  height: 50px;
  object-fit: contain;
}

/* "or use your email", with a rule on each side. */
.account-or {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.88rem;
  color: var(--soft);
}

.account-or::before,
.account-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.account-signin form {
  display: grid;
  gap: 0.9rem;
}

.account-signin label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.account-signin label small {
  font-weight: 400;
  color: var(--soft);
}

.account-signin input {
  width: 100%;
  height: 2.9rem;
  padding: 0 0.8rem;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0.7rem;
}

.account-signin input:focus-visible {
  outline-offset: 1px;
}

.account-code {
  font-size: 1.5rem !important;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.account-signin button {
  font: inherit;
}

.account-signin .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.5rem 1.1rem;
  border-radius: 0.7rem;
  font-weight: 600;
  text-decoration: none;
}

.button--wide {
  width: 100%;
}

.account-signin summary {
  cursor: pointer;
}

.account-notice {
  padding: 0.7rem 0.9rem;
  border-inline-start: 3px solid var(--hl);
  border-radius: 0 0.5rem 0.5rem 0;
  background: var(--paper);
  font-size: 0.95rem;
}

.account-small {
  font-size: 0.92rem;
  color: var(--soft);
}

/* The plan and the Mac connection, each set off by a rule inside the card. */
.account-plan,
.account-connect {
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.account-plan p + p,
.account-connect p + form {
  margin-top: 0.9rem;
}

.plan-links {
  display: grid;
  gap: 0.6rem;
}

.plan-small {
  font-size: 0.92rem;
  color: var(--soft);
}

/* Under the card: how sign-in works, and signing out. */
.account-privacy,
.account-signout {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--soft);
}

.account-privacy > * + * {
  margin-top: 0.7rem;
}

.account-signout {
  display: block;
  text-align: center;
}

.account-signout .text-control {
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  color: var(--soft);
}
