:root {
  color-scheme: light dark;
  --bg: #f2f2f7;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --card-bg: rgba(255, 255, 255, 0.55);
  --card-border: rgba(255, 255, 255, 0.65);
  --card-shadow:
    0 2px 20px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --separator: rgba(0, 0, 0, 0.08);
  --accent: #6155f5;
  --accent-strong: #5043e8;
  --button-border: rgba(97, 85, 245, 0.35);
  --button-bg: rgba(97, 85, 245, 0.08);
  --ring: rgba(97, 85, 245, 0.35);
  --icon-fg: #1d1d1f;
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 28px;
  --maxw: 980px;
  --content-maxw: 640px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --fg: #f5f5f7;
    --muted: #ababaf;
    --card-bg: rgba(28, 28, 30, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-shadow:
      0 2px 20px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(255, 255, 255, 0.05);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --separator: rgba(255, 255, 255, 0.08);
    --accent: #6b5dff;
    --accent-strong: #7a6eff;
    --button-border: rgba(107, 93, 255, 0.45);
    --button-bg: rgba(107, 93, 255, 0.14);
    --icon-fg: #f5f5f7;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.47;
  font-size: 17px;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
}

:where(a, button, summary, [role="button"]) {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

.page {
  margin: 0 auto;
  max-width: var(--maxw);
  padding: 48px 20px 80px;
}

.content-page {
  max-width: var(--content-maxw);
  padding-top: 28px;
}

@media (min-width: 700px) {
  .page {
    padding: 64px 32px 100px;
  }

  .content-page {
    padding-top: 40px;
  }
}

.glass {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow), var(--glass-highlight);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}

.hero {
  display: grid;
  gap: 32px;
  align-items: start;
  grid-template-columns: 1fr;
  grid-template-areas:
    "copy"
    "devices"
    "preview";
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas:
      "copy preview"
      "devices devices";
    column-gap: 40px;
    row-gap: 0;
  }
}

.hero-copy {
  max-width: 560px;
  grid-area: copy;
}

@media (prefers-color-scheme: dark) {
  .preview-lock {
    filter: invert(1);
  }
}

.hero-desc {
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow), var(--glass-highlight);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  padding: 18px 20px;
}

.hero-desc h1 {
  color: var(--fg);
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.45px;
  margin: 0 0 10px;
}

.hero-desc p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.5;
}

@media (min-width: 760px) {
  .hero-copy {
    margin-top: 46px;
  }
}

.primary-button,
.secondary-button,
.support-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 180ms ease;
}

.primary-button {
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 8px 22px rgba(97, 85, 245, 0.24);
}

.secondary-button,
.support-button {
  color: var(--fg);
  background: var(--button-bg);
  border: 1px solid var(--button-border);
  box-shadow: var(--card-shadow), var(--glass-highlight);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}

@media (hover: hover) and (pointer: fine) {
  .primary-button:hover,
  .secondary-button:hover,
  .support-button:hover {
    opacity: 0.88;
  }
}

.tiny {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.profile-preview {
  grid-area: preview;
  width: 100%;
  max-width: 340px;
  min-height: 510px;
  justify-self: center;
  padding: 30px 24px 24px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 760px) {
  .profile-preview {
    max-width: 320px;
    justify-self: end;
  }
}

.preview-lock-wrap {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 4px auto 22px;
  border-radius: 22px;
  background: var(--button-bg);
  border: 1px solid var(--button-border);
}

.preview-lock {
  width: 31px;
  height: 46px;
  object-fit: contain;
  opacity: 0.85;
}

.profile-preview h2 {
  margin: 0;
  text-align: center;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.profile-preview > p {
  margin: 8px 0 26px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.preview-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--separator);
}

.preview-list li {
  position: relative;
  padding: 17px 0 17px 29px;
  border-bottom: 1px solid var(--separator);
  font-size: 15px;
}

.preview-list li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: var(--accent);
  font-weight: 750;
}

.profile-preview .preview-note {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.section {
  margin-top: 72px;
}

.home-device-section {
  grid-area: devices;
  margin-top: 0;
}

@media (min-width: 760px) {
  .home-device-section {
    margin-top: 72px;
  }
}

.section h2 {
  margin: 0 0 20px;
  text-align: center;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  padding: 24px;
}

.feature-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.feature-card a {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.device-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}

.device-choice:first-child {
  grid-column: 1 / -1;
}

@media (min-width: 600px) {
  .device-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .device-choice:first-child {
    grid-column: auto;
  }
}

.device-choice {
  width: 100%;
  text-align: center;
}

.group {
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
}

.cell {
  padding: 18px 22px;
  font-size: 17px;
  line-height: 1.4;
}

.cell + .cell {
  border-top: 1px solid var(--separator);
}

.cell h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
}

.cell p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.privacy-wrap {
  display: grid;
  place-items: center;
}

.privacy-badge {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 22px 20px;
  text-align: center;
  row-gap: 4px;
}

.privacy-icon {
  width: 40px;
  height: 40px;
  margin: 0;
  color: #007aff;
}

@media (prefers-color-scheme: dark) {
  .privacy-icon {
    color: #0a84ff;
  }
}

.privacy-badge h3 {
  margin: 0 0 2px;
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.2px;
}

.privacy-badge p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.page-title {
  margin: 0 0 12px;
  text-align: center;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.4px;
}

.page-title-spaced {
  margin-bottom: 42px;
}

.page-intro {
  margin: 0 auto 42px;
  color: var(--muted);
  text-align: center;
  font-size: 17px;
  line-height: 1.5;
  max-width: 560px;
}

.content-card {
  padding: 24px;
  margin-bottom: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.content-card h3 {
  margin: 20px 0 8px;
  font-size: 16px;
}

.content-card p,
.content-card ul,
.content-card ol {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.content-card p {
  margin: 0;
}

.content-card p + p {
  margin-top: 12px;
}

.content-card ul,
.content-card ol {
  margin: 0;
  padding-left: 22px;
}

.content-card li + li {
  margin-top: 9px;
}

.step-copy-button {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: top;
  width: 50px;
  height: 23px;
  min-height: 0;
  margin-left: 6px;
  padding: 0;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--button-bg);
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 340px) {
  .step-copy-button {
    width: 36px;
    font-size: 10px;
  }
}

.content-card strong {
  color: var(--fg);
}

.profile-action {
  display: flex;
  justify-content: center;
  margin: 0 0 24px;
}

.inline-profile-download {
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
}

.inline-profile-download:hover {
  text-decoration: underline;
}

.copy-field {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 16px 0 12px;
}

.copy-value {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--separator);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--card-bg) 72%, transparent);
  color: var(--fg);
  font:
    600 14px/1.35 ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  overflow-wrap: anywhere;
}

.copy-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 17px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--fg);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.copy-status {
  min-height: 1.3em;
  margin-top: 6px !important;
  color: var(--accent) !important;
  font-size: 13px !important;
}

details.content-card {
  padding: 0;
}

details.content-card summary {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  list-style: none;
}

details.content-card summary::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 1px;
  background: var(--separator);
  opacity: 0;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: center;
  transition:
    opacity 240ms ease,
    transform 240ms cubic-bezier(0.32, 0.72, 0, 1);
}

details.content-card summary::-webkit-details-marker {
  display: none;
}

details.content-card summary::after {
  content: "";
  width: 9px;
  height: 14px;
  flex: 0 0 9px;
  margin-left: auto;
  background: currentColor;
  -webkit-mask: url("/Assets/chevron.right.svg") center / contain no-repeat;
  mask: url("/Assets/chevron.right.svg") center / contain no-repeat;
  transform: rotate(0deg);
  transform-origin: center;
  transition: transform 240ms cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

details.content-card[open]:not(.is-closing) summary::after {
  transform: rotate(90deg);
}

details.content-card[open]:not(.is-closing) summary::before {
  opacity: 1;
  transform: scaleX(1);
}

.details-body {
  padding: 20px 24px 24px;
  overflow: hidden;
}

.details-body p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.device-switcher {
  margin: 34px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.device-switcher a {
  color: inherit;
}

body.has-topbar.profile-dialog-open {
  background-color: transparent !important;
}

body.has-topbar.profile-dialog-open .site-content {
  filter: blur(10px) saturate(108%);
  opacity: 1;
  transform: scale(0.998) translateZ(0);
  padding-right: var(--scrollbar-comp, 0px);
  pointer-events: none;
  user-select: none;
}

.profile-download-dialog {
  --profile-dialog-shift-y: clamp(170px, 32vh, 230px);
  position: fixed;
  top: calc(var(--topbar-height) + env(safe-area-inset-top) + 16px);
  right: calc(
    max(16px, env(safe-area-inset-right)) + var(--scrollbar-comp, 0px)
  );
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  z-index: 93;
  width: min(
    430px,
    calc(
      100% - var(--scrollbar-comp, 0px) - max(16px, env(safe-area-inset-left)) -
        max(16px, env(safe-area-inset-right))
    )
  );
  max-height: min(
    32rem,
    calc(
      var(--overlay-h, 100svh) - var(--topbar-height) -
        env(safe-area-inset-top) - env(safe-area-inset-bottom) - 56px
    )
  );
  height: fit-content;
  margin: auto;
  padding: 28px;
  border: 1px solid var(--card-border);
  color: var(--fg);
  opacity: 0;
  overflow-y: auto;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(calc(var(--profile-dialog-shift-y) + 10px)) scale(0.98);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
}

.profile-download-dialog[hidden] {
  display: none;
}

.profile-download-dialog.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(var(--profile-dialog-shift-y)) scale(1);
}

.profile-download-dialog:focus {
  outline: none;
}

.profile-download-dialog h2 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -0.25px;
}

.profile-download-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.profile-download-dialog strong {
  color: var(--fg);
}

.profile-dialog-allow-hint {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin: -3px 4px 16px 0;
  color: #007aff;
  font-size: 16px;
  font-weight: 750;
  line-height: 1;
}

.profile-dialog-allow-hint[hidden] {
  display: none;
}

.profile-dialog-up-arrow {
  display: inline-block;
  font-size: 25px;
  line-height: 0.8;
  animation: profile-dialog-arrow 900ms ease-in-out infinite;
}

.profile-dialog-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.profile-dialog-actions .secondary-button {
  appearance: none;
  -webkit-appearance: none;
}

@media (min-width: 700px) {
  .profile-download-dialog {
    --profile-dialog-shift-y: 72px;
  }
}

@media (max-width: 699px) and (max-height: 700px) {
  .profile-download-dialog {
    --profile-dialog-shift-y: clamp(120px, 22vh, 155px);
  }
}

@media (prefers-color-scheme: dark) {
  .profile-dialog-allow-hint {
    color: #0a84ff;
  }
}

@keyframes profile-dialog-arrow {
  0%,
  100% {
    transform: translateY(1px);
  }

  50% {
    transform: translateY(-4px);
  }
}

.kofi-frame {
  margin: 16px 0 18px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #ffffff;
  overflow: hidden;
  position: relative;
  min-height: 662px;
}

@media (min-width: 700px) {
  .kofi-frame {
    padding: 88px 0 0;
  }
}

.kofi-skeleton {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #ffffff;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 700ms ease,
    visibility 0s linear 700ms;
}

.kofi-frame.is-ready .kofi-skeleton {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#kofiframe {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  box-sizing: border-box;
  border-radius: 0;
}

.patreon-embed {
  text-align: center;
  margin: 42px auto 0;
}

.support-button {
  min-height: 44px;
}

.verse {
  margin: 34px 0 0;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
}

footer {
  margin-top: 72px;
  border-top: 1px solid var(--separator);
  padding: 68px 0 64px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

footer a {
  color: inherit;
}

.footer-links {
  display: flex;
  gap: 12px 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin: 0;
}

.footer-inner {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  justify-items: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(a, button, summary):focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

@media (max-width: 430px) {
  .copy-field {
    flex-direction: column;
  }

  .copy-button {
    align-self: flex-start;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass,
  .secondary-button,
  .support-button {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  :root {
    --card-bg: rgba(255, 255, 255, 0.92);
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --card-bg: rgba(28, 28, 30, 0.92);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
