.campaign-strip {
  min-height: 44px;
  padding: 0 20px;
}

.campaign-strip a {
  color: inherit;
  font-weight: 800;
  text-decoration-thickness: 1px;
}

.header-account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  min-width: 0;
}

.account-subscriptions {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  min-width: 0;
  max-width: 220px;
}

.account-subscriptions > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account-auth {
  display: inline-flex;
  align-items: stretch;
  min-height: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.account-auth a {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

.account-auth a + a {
  border-left: 1px solid var(--line);
}

.header-account [hidden],
.auth-gate[hidden],
.account-state[hidden],
form[hidden] {
  display: none !important;
}

.auth-gate {
  display: grid;
  gap: 16px;
}

@media (max-width: 1040px) {
  .account-subscriptions { max-width: min(42vw, 220px); }
  .header-account {
    margin-left: auto;
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 680px) {
  .campaign-strip {
    padding-inline: 16px;
  }

  .header-account {
    gap: 4px;
  }

  .account-auth a {
    padding-inline: 10px;
  }
}

.legal-copy {
  padding-block: 56px 80px;
}

.legal-copy h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: 0;
}

.legal-copy h2 {
  margin: 32px 0 8px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
}

.legal-copy p,
.legal-copy li {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.7;
}

.legal-copy ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.legal-copy a,
.check-row a,
.auth-switch a,
.auth-help a {
  color: inherit;
  font-weight: 750;
}

.auth-form h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.auth-form h2 + p,
.auth-help,
.auth-switch {
  margin: 0 0 16px;
  color: var(--muted, #5d675f);
  font-size: 13px;
  line-height: 1.6;
}

.auth-switch {
  margin: 16px 0 0;
}

.form-actions a:not(.button):not(.button-secondary) {
  align-self: center;
}

.personal-space {
  padding: clamp(48px, 7vw, 92px) 0 112px;
  background: var(--paper);
}

.personal-space-intro {
  max-width: 820px;
}

.personal-space-intro h1 {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.personal-space-intro p {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.personal-space-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 44px 0 12px;
  border-block: 1px solid var(--line);
}

.personal-space-nav a {
  display: flex;
  align-items: center;
  min-height: 70px;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  text-decoration: none;
  text-wrap: balance;
}

.personal-space-nav a + a {
  border-left: 1px solid var(--line);
}

.personal-space-nav a:hover,
.personal-space-nav a:focus-visible {
  background: var(--white);
  color: var(--pine);
}

.personal-space-section {
  padding: clamp(42px, 6vw, 74px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 84px;
}

.personal-space-section:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 4px;
}

.personal-section-heading {
  display: flex;
  align-items: baseline;
  gap: clamp(18px, 3vw, 36px);
  margin-bottom: 28px;
}

.personal-section-index {
  flex: 0 0 auto;
  color: var(--pine);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.personal-section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.personal-section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.personal-space .account-state {
  max-width: 790px;
}

.personal-space .account-card {
  margin-top: 0;
  padding: clamp(24px, 3vw, 36px);
}

.personal-space .account-state-guide {
  margin-top: 16px;
}

.personal-card-kicker {
  color: var(--pine);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.personal-space .account-card h3,
.personal-note h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.personal-space .account-card p,
.personal-note p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.personal-space .account-progress-label {
  color: var(--pine);
  font-weight: 750;
}

.personal-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 790px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--pine);
  background: var(--white);
}

.personal-note > div:first-child {
  display: grid;
  gap: 10px;
}

.personal-note .actions {
  flex: 0 0 auto;
}

@media (max-width: 850px) {
  .personal-space-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .personal-space-nav a:nth-child(3) {
    border-left: 0;
  }

  .personal-space-nav a:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .personal-space {
    padding: 48px 0 72px;
  }

  .personal-space-nav {
    margin-top: 32px;
  }

  .personal-space-nav a {
    min-height: 64px;
    padding: 12px;
    font-size: 13px;
  }

  .personal-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .personal-section-heading {
    align-items: flex-start;
  }
}

.auth-form [hidden],
[data-verify-notice][hidden],
[data-verify-link][hidden],
[data-verify-guest][hidden],
[data-verify-done][hidden],
[data-register-panel][hidden],
[data-register-success][hidden],
[data-forgot-request][hidden],
[data-forgot-reset][hidden] {
  display: none !important;
}

.auth-page {
  background: var(--paper);
  min-height: 100dvh;
  display: grid;
  align-content: safe center;
  justify-items: center;
  padding: 32px 16px 48px;
}

.auth-logo {
  display: flex;
  justify-content: center;
  padding: 0 0 20px;
}

.auth-logo .brand {
  letter-spacing: 0;
}

.auth-shell {
  width: min(420px, 100%);
}

.auth-shell .auth-form {
  width: 100%;
  margin: 0;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-shell h1,
.auth-shell .auth-form h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: 0;
  text-wrap: balance;
}

.auth-shell .auth-lead,
.auth-shell .auth-form h2 + p {
  margin: 0 0 20px;
  color: var(--muted, #5d675f);
  font-size: 14px;
  line-height: 1.55;
}

.auth-shell .form-grid {
  gap: 12px;
}

.auth-shell .field input {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
}

.password-field {
  position: relative;
  display: block;
}

.auth-shell .password-field input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  inset: 1px 1px 1px auto;
  width: 42px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pine);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--pine-dark);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.auth-shell .check-row {
  min-height: 0;
  margin-top: 14px;
}

.auth-shell .check-row a {
  color: var(--pine);
  font-weight: 750;
  text-underline-offset: 4px;
}

.auth-shell .form-actions {
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
}

@media (max-width: 480px) {
  .auth-shell .auth-form {
    padding: 24px 18px 20px;
  }
}

/* Reference authentication cards use the existing PPEV pine and paper tokens. */
.auth-page-reference {
  grid-template-rows: auto 1fr auto;
  align-content: normal;
  justify-items: stretch;
  padding: 0;
}
.auth-page-reference .auth-logo {
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.auth-page-reference .brand-logo { width: 36px; height: 36px; }
.auth-home { color: var(--body); font-size: 14px; text-decoration: none; }
.auth-home:hover { color: var(--pine); text-decoration: underline; text-underline-offset: 4px; }
.auth-page-reference .auth-shell {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  padding: 16px 24px;
}
.auth-page-reference .auth-form {
  max-width: 480px;
  padding: 24px 32px;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgb(20 36 31 / 4%);
}
.auth-page-reference .auth-shell h1 { margin: 0 0 18px; font-size: 30px; line-height: 1.2; font-weight: 750; }
.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
  cursor: pointer;
}
.auth-google:hover { background: var(--paper); border-color: var(--pine); }
.auth-google svg { flex: 0 0 20px; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 12px 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-page-reference .form-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.auth-page-reference .field { gap: 4px; font-size: 14px; line-height: 1.4; }
.auth-page-reference .field input { min-width: 0; min-height: 44px; height: 44px; padding: 8px 12px; border-radius: 8px; font-size: 14px; line-height: 1.4; }
.auth-page-reference .password-field input { padding-right: 48px; }
.auth-page-reference .password-toggle { inset: 0 0 0 auto; width: 44px; border-radius: 8px; color: var(--muted); }
.auth-page-reference .password-toggle svg { width: 21px; height: 21px; }
.auth-field-title { display: flex; align-items: baseline; gap: 10px; }
.auth-field-title label { font-weight: 650; }
.auth-inline-hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.auth-forgot { min-height: 0; margin-left: auto; padding: 0; font-size: 13px; font-weight: 600; }
.auth-page-reference .auth-submit { width: 100%; min-height: 44px; margin-top: 18px; padding: 10px 16px; border-radius: 8px; font-size: 14px; line-height: 1.4; }
.auth-page-reference .auth-switch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
}
.auth-switch a { display: inline-flex; align-items: center; gap: 12px; color: var(--pine); text-underline-offset: 5px; }
.auth-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.auth-code-button { min-height: 44px; height: 44px; padding: 8px 12px; border-radius: 9px; font-size: 13px; white-space: nowrap; }
.auth-code-status { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; font-weight: 400; }
.auth-code-status:empty { display: none; }
.auth-page-reference .check-row { margin-top: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.auth-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 12px 32px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-footer nav { display: flex; gap: 24px; }
.auth-footer a { color: inherit; text-decoration: none; }
.auth-footer a:hover { color: var(--pine); text-decoration: underline; text-underline-offset: 4px; }
.auth-google-dialog { overscroll-behavior: contain; width: min(440px, calc(100% - 32px)); margin: auto; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); color: var(--ink); }
.auth-google-dialog::backdrop { background: rgb(20 36 31 / 40%); }
.auth-google-dialog h2 { margin: 0 0 14px; font-size: 24px; line-height: 1.3; }
.auth-google-dialog p { margin: 0 0 20px; color: var(--body); font-size: 14px; line-height: 1.6; }
.auth-google-dialog .auth-example-account { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); overflow-wrap: anywhere; }
.auth-google-dialog .form-actions { justify-content: flex-end; gap: 10px; }
@media (max-width: 600px) {
  .auth-page-reference .auth-logo { min-height: 64px; padding: 12px 20px; }
  .auth-page-reference .auth-shell { padding: 20px 16px; }
  .auth-page-reference .auth-form { padding: 24px; border-radius: 14px; }
  .auth-page-reference .auth-shell h1 { font-size: 28px; }
  .auth-page-reference .field input { min-height: 44px; height: 44px; font-size: 16px; line-height: 1.25; }
  .auth-code-button { min-height: 44px; height: 44px; }
  .auth-footer { padding: 12px 20px; gap: 16px; font-size: 12px; }
  .auth-footer nav { gap: 16px; }
  .auth-google-dialog { padding: 24px 20px; }
  .auth-google-dialog .form-actions { flex-direction: column-reverse; align-items: stretch; }
}
@media (max-width: 360px) {
  .auth-page-reference .auth-form { padding: 22px 20px; }
  .auth-inline-hint { font-size: 12px; }
}

@media (min-width: 601px) and (max-height: 800px) {
  .auth-page-reference .auth-logo { min-height: 56px; padding-block: 8px; }
  .auth-page-reference .auth-shell { padding-block: 8px; }
  .auth-page-reference .auth-form { padding: 16px 28px; }
  .auth-page-reference .auth-shell h1 { margin-bottom: 12px; font-size: 28px; }
  .auth-divider { margin-block: 8px; }
  .auth-page-reference .form-grid { gap: 8px; }
  .auth-page-reference .check-row { margin-top: 10px; }
  .auth-page-reference .auth-submit { margin-top: 12px; }
  .auth-page-reference .auth-switch { margin-top: 14px; padding-top: 12px; }
  .auth-footer { padding-block: 7px; }
}
