:root {
  --background: #05070b;
  --foreground: #c9ccd4;
  --card: #0b0d12;
  --card-foreground: #f8f8f8;
  --primary: #fbbf24;
  --primary-foreground: #111111;
  --secondary: #11141b;
  --muted-foreground: #8c8f95;
  --accent: #7aa2f7;
  --accent-foreground: #111111;
  --border: #1e222a;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

::selection {
  background: var(--accent);
  color: var(--accent-foreground);
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 50;
  padding: 8px 16px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Landing page ---------- */

.ghost-site {
  display: grid;
  min-height: 100dvh;
  grid-template-rows: 1fr auto;
}

.ghost-main {
  display: flex;
  width: min(1080px, calc(100% - 48px));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  padding-block: clamp(64px, 9vh, 112px);
  text-align: center;
}

.ghost-mark {
  width: clamp(88px, 10vw, 120px);
  height: auto;
}

.ghost-tagline {
  margin: clamp(28px, 5vh, 44px) 0 0;
  color: var(--card-foreground);
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.ghost-install {
  width: min(100%, 690px);
  margin-top: 32px;
}

.ghost-command {
  display: grid;
  min-height: 58px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  text-align: left;
}

.ghost-command__prompt {
  color: var(--primary);
  font-weight: 700;
}

.ghost-command code {
  overflow: hidden;
  color: var(--card-foreground);
  font-family: inherit;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ghost-command button {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 7px;
  padding-inline: 16px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.ghost-command button:hover {
  background: rgb(251 191 36 / 0.08);
}

.ghost-install > p {
  margin: 13px 0 0;
  color: var(--muted-foreground);
  font-size: 11px;
}

.ghost-install > p a {
  color: var(--muted-foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ghost-install > p a:hover {
  color: var(--primary);
}

.ghost-footer {
  display: flex;
  width: min(1080px, calc(100% - 48px));
  min-height: 62px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 22px;
  padding-block: 16px;
  margin-inline: auto;
  border-top: 1px solid var(--border);
}

.ghost-footer a {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}

.ghost-footer a:hover {
  color: white;
}

.ghost-footer__legacy {
  padding-left: 22px;
  border-left: 1px solid var(--border);
}

@media (max-width: 560px) {
  .ghost-main,
  .ghost-footer {
    width: min(100% - 32px, 1080px);
  }

  .ghost-mark {
    width: 88px;
  }

  .ghost-tagline {
    font-size: 23px;
  }

  .ghost-footer__legacy {
    flex-basis: 100%;
    padding-left: 0;
    border-left: 0;
    text-align: center;
  }

  .ghost-command button span {
    display: none;
  }
}

/* ---------- Login page ---------- */

.login-main {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.login-card {
  width: 100%;
  max-width: 36rem;
}

.login-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.04);
}

.login-title {
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 800;
  color: white;
  margin: 0 0 16px;
}

.login-title .accent {
  color: var(--primary);
}

.login-lede {
  font-size: 15px;
  line-height: 1.7;
  color: #d1d5db;
}

.login-install-link {
  display: inline-block;
  margin-top: 24px;
  font-size: 14px;
  font-weight: 500;
  color: rgb(252 211 77 / 0.9);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.login-install-link:hover {
  color: #fcd34d;
}

.login-error {
  margin-top: 24px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgb(247 118 142 / 0.3);
  background: rgb(247 118 142 / 0.08);
  color: #fecdd3;
  font-size: 13px;
}

.login-actions {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

.login-actions p {
  margin: 0 0 4px;
  font-size: 13px;
  color: #9ca3af;
}

.login-actions .login-note {
  margin: 0 0 16px;
  font-size: 12px;
  color: #6b7280;
}

.login-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
}

@media (min-width: 640px) {
  .login-buttons {
    flex-direction: row;
  }
}

.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding-inline: 20px;
  border-radius: 12px;
  border: 1px solid #262626;
  background: black;
  color: white;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.login-button:hover {
  border-color: #404040;
}

.login-google-mark {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-footer {
  margin-top: 32px;
  font-size: 12px;
  color: #6b7280;
}

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

.login-footer a:hover {
  color: #fbbf24;
}

/* ---------- Account page ---------- */

.account-main {
  width: min(36rem, calc(100% - 48px));
  margin-inline: auto;
  padding-block: clamp(48px, 8vw, 80px);
}

.account-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
}

.account-back:hover {
  color: var(--foreground);
}

.account-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--card-foreground);
  margin: 0;
}

.account-lede {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.account-command {
  margin-top: 8px;
  display: block;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgb(11 13 18 / 0.6);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 12px;
  color: var(--foreground);
}

.account-user {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgb(30 34 42 / 0.6);
  padding-top: 24px;
}

.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.account-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.account-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: var(--card-foreground);
}

.export-card {
  position: relative;
  display: block;
  overflow: hidden;
  margin-top: 32px;
  border-radius: 24px;
  border: 1px solid rgb(245 158 11 / 0.2);
  background: rgb(11 13 18 / 0.6);
  padding: 24px;
  text-decoration: none;
  color: inherit;
}

a.export-card:hover {
  border-color: rgb(251 191 36 / 0.4);
}

.export-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.export-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgb(245 158 11 / 0.25);
  background: rgb(245 158 11 / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  animation: soul-breathe 4s ease-in-out infinite;
}

@keyframes soul-breathe {
  0%, 100% {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.15), 0 0 40px rgba(251, 146, 60, 0.08);
  }
  50% {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.25), 0 0 60px rgba(251, 146, 60, 0.15);
  }
}

.export-card-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgb(252 211 77 / 0.8);
}

.export-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--card-foreground);
}

.export-card-download {
  margin-left: auto;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.export-card p {
  position: relative;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.account-signout {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgb(30 34 42 / 0.6);
}

.account-signout button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  padding: 8px 4px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--card-foreground);
  cursor: pointer;
  text-align: left;
}

.account-signout button:hover {
  color: var(--primary);
}

/* ---------- Legal pages ---------- */

.legal-header,
.legal-footer {
  display: flex;
  width: min(720px, calc(100% - 48px));
  align-items: center;
  margin-inline: auto;
  color: var(--muted-foreground);
  font-size: 11px;
  text-transform: uppercase;
}

.legal-header {
  min-height: 64px;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.legal-header a {
  display: flex;
  text-decoration: none;
}

.legal-header img {
  width: 24px;
  height: 24px;
}

.legal-main {
  width: min(680px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: clamp(52px, 8vw, 88px);
}

.legal-main > h1 {
  margin: 0;
  color: var(--card-foreground);
  font-size: clamp(30px, 6vw, 48px);
  font-weight: 500;
  letter-spacing: -0.05em;
}

.legal-updated {
  margin: 10px 0 0;
  color: var(--muted-foreground);
  font-size: 11px;
}

.legal-main article {
  margin-top: 52px;
}

.legal-main h2 {
  margin: 40px 0 12px;
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
}

.legal-main h2:first-child {
  margin-top: 0;
}

.legal-main p,
.legal-main li {
  color: var(--foreground);
  font-size: 13px;
  line-height: 1.8;
}

.legal-main p {
  margin: 0 0 16px;
}

.legal-main ul {
  margin: 0 0 20px;
  padding-left: 22px;
}

.legal-main li + li {
  margin-top: 8px;
}

.legal-main strong {
  color: var(--card-foreground);
  font-weight: 600;
}

.legal-main a,
.legal-footer a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.legal-main a:hover {
  color: white;
}

.legal-footer {
  min-height: 68px;
  justify-content: center;
  gap: 22px;
  border-top: 1px solid var(--border);
}

.legal-footer a {
  color: var(--muted-foreground);
  text-decoration: none;
}

.legal-footer a[aria-current="page"] {
  color: var(--primary);
}

@media (max-width: 560px) {
  .legal-header,
  .legal-footer,
  .legal-main {
    width: min(100% - 32px, 720px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
  }
}
