/* The pages around the app: landing (/), the sign-up gate (/join), and the
   small states between (reset, welcome, loading). Classes are prefixed lp- and
   gt- so nothing here can collide with the app's own.

   Motion rule: the plain rules describe the FINISHED picture; every animation
   runs it forwards from nothing inside prefers-reduced-motion: no-preference.
   Hiding a thing in a base rule would leave anybody who asked for stillness
   looking at an empty box. */

.lp, .gt { color: var(--ink); background: var(--bg); min-height: 100vh; }
.lp a:not(.lp-btn):not(.lp-brand):not(.lp-link), .gt a:not(.gt-google):not(.gt-back) { color: inherit; }

/* ---- buttons ---- */
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px;
  padding: 13px 22px; font: 600 16px/1.2 var(--body); text-decoration: none; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s, background .2s, border-color .2s; }
.lp-btn:hover { transform: translateY(-1px); }
.lp .lp-btn--pri { background: #fff; color: #3d2f86; box-shadow: 0 8px 28px rgba(15, 10, 60, .35); }
.lp .lp-btn--ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .38); }
.lp-btn--ghost:hover { background: rgba(255, 255, 255, .2); }
.lp .lp-sec .lp-btn--pri { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(102, 126, 234, .4); }

/* ---- hero ---- */
.lp-hero { position: relative; isolation: isolate; color: var(--sky-ink); overflow: hidden;
  background: radial-gradient(110% 90% at 72% 0%, var(--sky2), var(--sky1) 78%);
  padding: 0 24px 56px; min-height: min(92vh, 760px); display: flex; flex-direction: column; }
.lp-sky { position: absolute; inset: 0; z-index: -1; display: flex; align-items: center; justify-content: flex-end; }
.lp-sky svg { width: min(100%, 980px); height: auto; opacity: .92; margin-right: -2%; }
.lp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(29, 26, 74, .94) 0%, rgba(29, 26, 74, .78) 38%, rgba(29, 26, 74, 0) 72%); }
.lp-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1180px; width: 100%;
  margin: 0 auto; padding: 20px 0; }
.lp-brand { font: 700 20px var(--body); text-decoration: none; color: #fff; }
.lp-navlinks { display: flex; align-items: center; gap: 18px; }
.lp-link { color: rgba(255, 255, 255, .85); text-decoration: none; font-weight: 500; }
.lp-link:hover { color: #fff; }
.lp-navlinks .lp-btn { padding: 9px 16px; font-size: 14.5px; }
.lp-hero__body { max-width: 1180px; width: 100%; margin: auto; padding: 36px 0 20px; }
.lp-hero__body > * { max-width: 620px; }
.lp-eyebrow { font: 500 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--sky-gold); margin-bottom: 14px; }
.lp-hero h1 { font: 600 clamp(40px, 6.4vw, 76px)/1.02 var(--display); color: #fff; text-wrap: balance; }
.lp-hero h1 em { font-style: italic; color: var(--sky-gold); }
.lp-lede { font-size: clamp(16px, 1.7vw, 19px); line-height: 1.6; color: rgba(255, 255, 255, .86); margin-top: 20px; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.lp-fine { font-size: 13.5px; color: rgba(255, 255, 255, .62); margin-top: 16px; }
.lp-caption { font: 400 11px var(--mono); letter-spacing: .04em; color: rgba(255, 255, 255, .5); max-width: 1180px; width: 100%; margin: 0 auto; }

/* the sky's own marks */
.lp-sky .lp-bg { fill: var(--sky-star); opacity: .5; }
.lp-sky .lp-ln { stroke: var(--sky-line); stroke-width: 1.2; opacity: .6; fill: none; }
.lp-sky .lp-ag { stroke: var(--sky-bad); stroke-dasharray: 4 3; opacity: .9; }
.lp-sky .lp-s-none { fill: var(--sky-star); } .lp-sky .lp-s-detail { fill: var(--sky-line); }
.lp-sky .lp-s-match { fill: var(--sky-ok); } .lp-sky .lp-s-mismatch { fill: var(--sky-bad); }
.lp-sky .lp-gold { fill: var(--sky-gold); }
.lp-sky .lp-halo { opacity: .22; }
.lp-sky .lp-ring { fill: none; stroke: var(--sky-gold); stroke-width: 1.2; stroke-dasharray: 2 2; }
.lp-sky text { fill: var(--sky-ink); font: 600 12px var(--body); text-anchor: middle; paint-order: stroke; stroke: var(--sky1); stroke-width: 3px; }
.lp-sky text.lp-lv { fill: var(--sky-star); font: 500 9px var(--mono); letter-spacing: .08em; }
@media (prefers-reduced-motion: no-preference) {
  .lp-sky .lp-tw { animation: lp-tw 4.5s ease-in-out infinite; animation-delay: var(--d, 0s); }
  .lp-sky .lp-ln { animation: lp-draw 2.4s ease-out both; stroke-dasharray: 600; }
  .lp-sky .lp-ag { animation: none; stroke-dasharray: 4 3; }
  .lp-hero__body > * { animation: lp-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .lp-hero__body > *:nth-child(2) { animation-delay: .08s; } .lp-hero__body > *:nth-child(3) { animation-delay: .16s; }
  .lp-hero__body > *:nth-child(4) { animation-delay: .24s; } .lp-hero__body > *:nth-child(5) { animation-delay: .32s; }
}
@keyframes lp-tw { 0%, 100% { opacity: .15; } 50% { opacity: .8; } }
@keyframes lp-draw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
@keyframes lp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 820px) {
  .lp-hero { padding: 0 20px 40px; min-height: 0; }
  .lp-sky { align-items: flex-end; justify-content: center; }
  .lp-sky svg { width: 150%; margin: 0; opacity: .5; }
  .lp-hero::after { background: linear-gradient(180deg, rgba(29, 26, 74, .8), rgba(29, 26, 74, .55)); }
  .lp-link { display: none; }
}

/* ---- sections ---- */
.lp-sec { padding: 84px 24px; max-width: 1180px; margin: 0 auto; }
.lp-alt { max-width: none; background: var(--raise); padding-left: 0; padding-right: 0; }
.lp-alt > * { max-width: 1132px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.lp-kicker { font: 500 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--moon); margin-bottom: 10px; }
.lp-sec h2 { font: 600 clamp(30px, 4.2vw, 46px)/1.08 var(--display); max-width: 20ch; text-wrap: balance; }
.lp-sec h3 { font: 600 24px/1.15 var(--display); margin-bottom: 6px; }
.lp-sec p { color: var(--muted); }

.lp-three { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.lp-three li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px; box-shadow: 0 2px 14px rgba(44, 62, 80, .06); }
.lp-n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; font: 600 22px var(--display); margin-bottom: 14px; }

.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 38px; }
.lp-grid article { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--ember); border-radius: 14px; padding: 22px; }
.lp-grid article:nth-child(3n+2) { border-top-color: var(--moon); }
.lp-grid article:nth-child(3n) { border-top-color: var(--star); }

.lp-echo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; margin-top: 36px; align-items: start; }
.lp-echo__card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 2px 14px rgba(44, 62, 80, .06); }
.lp-meta { font: 500 11px var(--mono); letter-spacing: .1em; color: var(--muted); }
.lp-quote { font: italic 500 26px/1.3 var(--display); color: var(--ink) !important; margin: 10px 0 16px; }
.lp-seal { border: 1px dashed var(--ember); background: var(--ember-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.lp-voices { display: grid; gap: 14px; }
.lp-voice { border-radius: 14px; padding: 18px; border: 1px solid var(--line); }
.lp-voice--m { background: linear-gradient(150deg, var(--ember-soft), var(--card)); }
.lp-voice--d { background: var(--raise); }
.lp-voice h3 { font-size: 21px; margin-bottom: 4px; }
.lp-voice p { font-size: 14.5px; }
.lp-note { margin-top: 26px; max-width: 70ch; font-size: 15px; }
.lp-note b { color: var(--ink); }

.lp-points { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 14px; max-width: 74ch; }
.lp-points li { padding-left: 30px; position: relative; color: var(--muted); }
.lp-points li::before { content: "✦"; position: absolute; left: 0; color: var(--moon); }
.lp-points b { color: var(--ink); }

.lp-final { text-align: center; padding: 90px 24px 96px; background: radial-gradient(90% 120% at 50% 0%, var(--sky2), var(--sky1)); color: #fff; }
.lp-final h2 { font: 600 clamp(30px, 4.6vw, 52px)/1.08 var(--display); max-width: 18ch; margin: 0 auto; text-wrap: balance; }
.lp-final p { color: rgba(255, 255, 255, .78); margin: 14px 0 26px; }
.lp-final .lp-fine { margin-top: 16px; }
.lp .lp-final .lp-btn--pri { background: #fff; color: #3d2f86; }

.lp-foot { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 26px 24px calc(26px + env(safe-area-inset-bottom)); background: var(--sky1); color: rgba(255, 255, 255, .7); font-size: 14px; }
.lp-foot__links { display: flex; gap: 20px; flex-wrap: wrap; }
.lp-foot a { text-decoration: none; } .lp-foot a:hover { color: #fff; text-decoration: underline; }
.lp-nojs { padding: 16px 24px; text-align: center; color: var(--muted); }

@media (max-width: 900px) {
  .lp-sec { padding: 58px 20px; }
  .lp-alt > * { padding-left: 20px; padding-right: 20px; }
  .lp-three, .lp-grid, .lp-echo { grid-template-columns: minmax(0, 1fr); }
}

/* ---- the gate ---- */
.gt { display: grid; place-items: center; padding: 24px 16px; position: relative; isolation: isolate;
  background: radial-gradient(100% 80% at 50% 0%, var(--sky2), var(--sky1) 70%); }
.gt-back { position: absolute; top: 18px; left: 20px; color: rgba(255, 255, 255, .85) !important; text-decoration: none; font-weight: 600; font-size: 14.5px; }
.gt-card { width: min(100%, 440px); background: var(--card); color: var(--ink); border-radius: 20px; padding: 30px 28px 26px;
  box-shadow: 0 24px 70px rgba(10, 6, 50, .5); display: flex; flex-direction: column; gap: 16px; }
.gt-brand { display: flex; align-items: center; gap: 10px; font: 700 19px var(--body); }
.gt-card h1 { font: 600 34px/1.05 var(--display); }
.gt-card h1 em { color: var(--moon); }
.gt-sub { color: var(--muted); font-size: 14.5px; margin-top: -6px; }
.gt-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--raise); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.gt-tabs button { border: 0; background: none; border-radius: 9px; padding: 10px; font-weight: 600; color: var(--muted); }
.gt-tabs button[aria-selected="true"] { background: var(--grad); color: #fff; }
.gt-google { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); background: #fff; color: #1f1f1f !important;
  border-radius: 12px; padding: 12px 16px; font: 600 15.5px var(--body); text-decoration: none; }
.gt-google:hover { border-color: var(--ember); box-shadow: 0 2px 10px rgba(66, 133, 244, .2); }
.gt-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font: 500 12px var(--mono); letter-spacing: .1em; }
.gt-or::before, .gt-or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.gt-form { display: flex; flex-direction: column; gap: 14px; }
.gt-form label.l { margin-bottom: 4px; }
.gt-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.gt-check input { margin-top: 3px; }
.gt-msg { border-radius: 10px; padding: 10px 12px; font-size: 14px; background: var(--warn-soft); color: var(--warn); }
.gt-msg.ok { background: var(--ok-soft); color: var(--ok); }
.gt-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.gt-links button, .gt-links a { color: var(--ember) !important; font-weight: 600; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.gt-fine { font-size: 12.5px; color: var(--muted); text-align: center; }
.gt .btn.pri { padding: 13px 16px; font-size: 16px; }

/* ---- loading / states ---- */
.state { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; background: var(--bg); color: var(--ink); }
.state__box { max-width: 420px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.state h1 { font: 600 30px/1.1 var(--display); }
.state p { color: var(--muted); }
.dotmark { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 8px var(--ember-soft); }
@media (prefers-reduced-motion: no-preference) { .dotmark { animation: lp-pulse 1.8s ease-in-out infinite; } }
@keyframes lp-pulse { 50% { transform: scale(1.12); box-shadow: 0 0 0 14px var(--ember-soft); } }

/* the message line at the top when something is wrong or just happened */
.toasts { position: fixed; left: 0; right: 0; top: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; }
.toast-line { pointer-events: auto; background: var(--card); color: var(--ink); border: 1px solid var(--ember); border-radius: 12px; padding: 10px 16px; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: min(92vw, 520px); }

/* ---- static pages (privacy, terms, install, delete-account) ---- */
.doc { max-width: 760px; margin: 0 auto; padding: 36px 22px 80px; color: var(--ink); }
.doc .dochead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
.doc .dochead a { color: var(--ember); font-weight: 600; text-decoration: none; }
.doc h1 { font: 600 clamp(32px, 6vw, 46px)/1.05 var(--display); margin-bottom: 8px; }
.doc h2 { font: 600 26px/1.15 var(--display); margin: 34px 0 8px; }
.doc p, .doc li { color: var(--ink); opacity: .86; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.doc a { color: var(--ember); }
.doc .updated { font: 400 12px var(--mono); color: var(--muted); }
.doc .callout { margin: 16px 0; }
.doc .stepcard { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 16px 18px; margin: 12px 0; }

/* ---- the example story on the landing page ---- */
.lp-lede2 { max-width: 62ch; margin-top: 14px; font-size: 17px; }
.lp-book { margin-top: 34px; max-width: 760px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px 28px 22px; box-shadow: 0 2px 14px rgba(44, 62, 80, .06); }
.lp-sec .lp-book h3 { font-size: 32px; margin: 6px 0 4px; }
.lp-book h4 { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--moon); margin: 18px 0 4px; }
.lp-sec .lp-book .lp-sl { font: 500 21px/1.45 var(--display); color: var(--ink); margin: 0; }
.lp-sl--perhaps { font-style: italic !important; color: var(--muted) !important; }
.lp-sl--out { font: 400 15px/1.5 inherit !important; color: var(--muted) !important; }
.lp-pp { font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; font-style: normal; color: var(--moon); }
.lp-fn { font: 600 11px var(--mono); background: var(--ember-soft); color: var(--ember); border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.lp-sec .lp-book .lp-sn { font-size: 14px; margin: 2px 0 0 10px; border-left: 2px solid var(--line); padding-left: 8px; }
.lp-gap { font-style: italic; border-left-style: dashed !important; }
.lp-log { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; color: var(--muted); }
.lp-log li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.lp-log span { display: inline-block; min-width: 64px; font: 500 11px var(--mono); }
@media (max-width: 760px) { .lp-book { padding: 22px 18px 16px; } .lp-sec .lp-book .lp-sl { font-size: 19px; } }
