/* Studio Home account dialog. It uses the page tokens from index.html so the
   same markup follows light and dark mode without a second theme system. */
.home-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(5px);
}
.home-auth-overlay[hidden] { display: none; }
.home-auth-card {
  position: relative;
  margin: auto 0;
  width: min(430px, 100%);
  padding: 30px 28px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-2);
}
.home-auth-card.plans {
  width: min(720px, 100%);
  padding: 30px 30px 25px;
}
.home-auth-card::before,
.home-auth-card::after {
  content: "+";
  position: absolute;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  color: rgba(239, 40, 45, .58);
}
.home-auth-card::before { top: 6px; left: 7px; }
.home-auth-card::after { right: 7px; bottom: 6px; }
.ha-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: var(--r-ctl);
  font-size: 20px;
}
.ha-close:hover { color: var(--ink); background: var(--fill); }
.ha-kicker {
  margin: 0 40px 13px 0;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.ha-title {
  max-width: 13ch;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.015em;
}
.ha-copy {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 1.5;
}
.ha-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0 18px;
}
.ha-plan {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--fill);
}
.ha-plan.pro {
  border-color: var(--ink);
  background: var(--card);
}
.ha-plan-name {
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.ha-plan-price {
  margin: 10px 0 3px;
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
}
.ha-plan-price small {
  font-family: var(--body);
  font-size: 12px;
  color: var(--muted);
}
.ha-plan-sub {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.ha-plan ul {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  list-style: none;
}
.ha-plan li {
  position: relative;
  padding-left: 17px;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.45;
}
.ha-plan li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.ha-plan.pro li::before { background: var(--ink); }
.ha-plan-use {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--dash);
  color: #d9a514;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ha-plan-use::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.ha-plan.pro .ha-plan-use { color: #2e9e5b; }
.ha-field { display: block; margin-top: 20px; }
.ha-label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}
.ha-input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  outline: none;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
}
.ha-input:focus { border-color: var(--ink); }
.ha-input.code {
  text-align: center;
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: .28em;
}
.ha-primary,
.ha-secondary,
.ha-quiet {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  padding: 10px 15px;
  border-radius: var(--r-ctl);
  font-family: var(--body-strong, var(--body));
  font-size: 14px;
}
.ha-primary {
  background: var(--ink-fill);
  color: var(--on-ink);
}
.ha-primary.ha-pro-continue {
  background: var(--red);
  color: #fff;
}
.ha-primary:disabled { opacity: .48; cursor: wait; }
.ha-secondary { border: 1px dashed var(--dash); color: var(--ink); }
.ha-secondary:hover { border-color: var(--ink); background: var(--fill); }
#ha-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.ha-google-mark {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.ha-quiet { min-height: 36px; margin-top: 6px; color: var(--muted); }
.ha-quiet:hover { color: var(--ink); }
.ha-step-back {
  margin-top: 17px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ha-step-back:hover { color: var(--ink); }
.ha-error {
  margin-top: 13px;
  color: var(--red);
  font-size: 13px;
  line-height: 1.45;
}
.ha-error:empty { display: none; }
.ha-note {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.ha-turnstile { width: 100%; margin-top: 12px; }
.ha-turnstile:empty { margin-top: 0; }
.ha-terms {
  margin-top: 13px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}
.ha-terms a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
body.home-auth-open { overflow: hidden; }

/* Go Pro is the primary action in the Home header. */
.ghost-btn.home-pro-btn {
  border-style: solid;
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}
.ghost-btn.home-pro-btn:hover {
  border-color: var(--red);
  background: var(--red);
  filter: brightness(1.08);
}

@media (max-width: 620px) {
  .home-auth-card.plans { padding: 27px 20px 22px; }
  .ha-plans { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 560px) {
  .home-auth-overlay { padding: 14px; }
  .home-auth-card { padding: 27px 20px 22px; }
  .ha-title { font-size: 25px; }
}
