/* W2 / 31c add-to-home-screen. Restyle by changing --ath-* tokens. */
@font-face {
  font-family: Caslon;
  src: url(/fonts/LibreCaslonText-Var.ttf) format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

.rh-ath,
.rh-ath-open,
.rh-ath-root,
.rh-ath-nudge {
  --ath-paper: #fafaf7;
  --ath-surface: #ffffff;
  --ath-ink: #111;
  --ath-ink2: #5c5c57;
  --ath-line: #e8e6e0;
  --ath-sunk: #f3f2ed;
  --ath-handle: #d9d7d0;
  --ath-scrim: rgba(17, 17, 17, 0.42);
  --ath-radius-sheet: 20px;
  --ath-radius-dialog: 16px;
  --ath-radius-btn: 14px;
  --ath-btn-h: 52px;
  --ath-tab-h: 40px;
  --ath-step: 28px;
  --ath-icon: 18px;
  --ath-close: 44px;
  --ath-dialog: 480px;
  --ath-font-serif: Caslon, "Libre Caslon Text", Georgia, serif;
  --ath-font-ui: -apple-system, BlinkMacSystemFont, Inter, Roboto, "Segoe UI", sans-serif;
}

button.rh-ath-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  height: var(--ath-btn-h);
  margin-top: 20px;
  padding: 0 20px;
  border: 1px solid var(--ath-ink);
  border-radius: var(--ath-radius-btn);
  background: var(--ath-surface);
  color: var(--ath-ink);
  font-family: var(--ath-font-ui);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  cursor: pointer;
  white-space: nowrap;
}

.done + .rh-ath-open {
  margin-top: 16px;
}

body:not(.success) .done + .rh-ath-open,
button.rh-ath-open[hidden],
.rh-ath-root[hidden],
.rh-ath-nudge[hidden],
.rh-ath-inapp[hidden],
.rh-ath-then[hidden],
.rh-ath-prompt[hidden],
.rh-ath-panel[hidden],
.rh-ath-note[hidden] {
  display: none;
}

body.success form + .rh-ath-open {
  display: none;
}

body.rh-ath-sheet-open {
  overflow: hidden;
}

.rh-ath-root,
.rh-ath-nudge {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: var(--ath-font-ui);
  color: var(--ath-ink);
}

.rh-ath-scrim {
  position: absolute;
  inset: 0;
  background: var(--ath-scrim);
}

.rh-ath-sheet {
  position: relative;
  width: 100%;
  max-height: min(92dvh, 760px);
  overflow: auto;
  background: var(--ath-surface);
  border-radius: var(--ath-radius-sheet) var(--ath-radius-sheet) 0 0;
  padding: 8px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -1px 0 var(--ath-line);
}

.rh-ath-handle {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--ath-handle);
  margin: 0 auto 8px;
}

.rh-ath-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.rh-ath-title {
  flex: 1;
  margin: 0;
  padding-top: 8px;
  font-family: var(--ath-font-serif);
  font-weight: 600;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -0.3px;
}

button.rh-ath-close {
  width: var(--ath-close);
  height: var(--ath-close);
  margin: 0 -12px 0 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ath-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  white-space: normal;
}

.rh-ath-sub {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--ath-ink2);
}

.rh-ath-tabs {
  display: flex;
  height: calc(var(--ath-tab-h) + 6px);
  margin-top: 18px;
  padding: 3px;
  border-radius: 12px;
  background: var(--ath-sunk);
}

button.rh-ath-tab {
  flex: 1;
  height: var(--ath-tab-h);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ath-ink2);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.rh-ath-tab[aria-selected="true"] {
  background: var(--ath-ink);
  color: #fff;
}

.rh-ath-inapp {
  margin-top: 16px;
  padding: 14px 16px 16px;
  background: var(--ath-sunk);
  border-radius: 16px;
}

.rh-ath-inapp b {
  display: block;
  font-size: 16px;
  line-height: 22px;
}

.rh-ath-inapp p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: #2e2e2b;
}

button.rh-ath-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 12px;
  padding: 0;
  border: 1px solid var(--ath-ink);
  border-radius: 12px;
  background: var(--ath-surface);
  color: var(--ath-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.rh-ath-then {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--ath-ink2);
}

.rh-ath-then + .rh-ath-panel {
  margin-top: 10px;
}

.rh-ath-prompt {
  margin-top: 16px;
}

button.rh-ath-install {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: var(--ath-btn-h);
  padding: 0;
  border: 0;
  border-radius: var(--ath-radius-btn);
  background: var(--ath-ink);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.rh-ath-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ath-ink2);
}

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

.rh-ath-panel {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rh-ath-panel.is-dim,
.rh-ath-then.is-dim {
  opacity: 0.5;
}

.rh-ath-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 22px;
}

.rh-ath-num {
  width: var(--ath-step);
  height: var(--ath-step);
  border-radius: 50%;
  background: var(--ath-sunk);
  color: var(--ath-ink);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  flex: none;
  margin-top: -3px;
}

.rh-ath-ii {
  display: inline-flex;
  vertical-align: -4px;
  margin: 0 2px;
  padding: 1px;
  border: 1px solid var(--ath-line);
  border-radius: 6px;
  background: var(--ath-paper);
}

.rh-ath-ii svg {
  width: var(--ath-icon);
  height: var(--ath-icon);
  display: block;
}

.rh-ath-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--ath-line);
  font-size: 13.5px;
  line-height: 19px;
  color: var(--ath-ink2);
}

.rh-ath-note svg {
  flex: none;
  margin-top: 1px;
}

.rh-ath-nudge-card {
  position: relative;
  width: 100%;
  background: var(--ath-surface);
  border-radius: 24px 24px 0 0;
  padding: 8px 20px calc(34px + env(safe-area-inset-bottom, 0px));
}

.rh-ath-nudge-card .rh-ath-handle {
  background: #d9d7d0;
}

.rh-ath-nudge-mark {
  display: flex;
  gap: 14px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.rh-ath-nudge-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--ath-line);
  background: var(--ath-surface);
  display: grid;
  place-items: center;
  flex: none;
}

.rh-ath-nudge-title {
  margin: 0;
  font-family: var(--ath-font-ui);
  font-weight: 700;
  font-size: 21px;
  line-height: 28px;
  letter-spacing: -0.3px;
}

.rh-ath-nudge-lead {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--ath-ink2);
}

.rh-ath-nudge-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

button.rh-ath-show,
button.rh-ath-later {
  width: 100%;
  height: var(--ath-btn-h);
  padding: 0;
  border-radius: var(--ath-radius-btn);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

button.rh-ath-show {
  border: 0;
  background: var(--ath-ink);
  color: #fff;
}

button.rh-ath-later {
  border: 1px solid var(--ath-ink);
  background: var(--ath-surface);
  color: var(--ath-ink);
}

@media (min-width: 900px) {
  button.rh-ath-open {
    max-width: 620px;
  }

  .rh-ath-root,
  .rh-ath-nudge {
    align-items: center;
  }

  .rh-ath-sheet {
    width: var(--ath-dialog);
    max-width: calc(100vw - 48px);
    border-radius: var(--ath-radius-dialog);
    padding: 24px 28px 28px;
    box-shadow: 0 24px 60px rgba(17, 17, 17, 0.12);
  }

  .rh-ath-nudge-card {
    width: var(--ath-dialog);
    max-width: calc(100vw - 48px);
    border-radius: var(--ath-radius-dialog);
    padding: 24px 28px 28px;
  }

  .rh-ath-handle {
    display: none;
  }

  .rh-ath-title {
    padding-top: 6px;
  }
}
