/* Sign up / log in (the page after the splash), plans, the Profile page and the sidebar Profile button.
   Colours keep their meaning: pink = TELEIOS, blue = monthly, yellow = yearly (best value),
   green = active plan, orange = cancelled (still running), gray = ended or none. */

/* ---------- the welcome page */
.welcome {
  /* the window never scrolls (base.css), so this page scrolls itself: on a phone the form is taller than the screen */
  height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.4fr);
  background: var(--canvas); background-image: radial-gradient(var(--canvas-dot) 1.2px, transparent 1.2px); background-size: 22px 22px;
  color: var(--text); font-family: var(--font-ui);
}
.welcome-side {
  display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 48px 40px;
  background: var(--accent); border-right: 3px solid var(--line); color: var(--on-candy);
}
.welcome-brand { display: flex; flex-direction: column; gap: 10px; }
.welcome-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 6vw, 68px); letter-spacing: 0.14em; line-height: 1; color: #FFFFFF; text-shadow: 3px 3px 0 var(--line); }
.welcome-tag { align-self: flex-start; padding: 5px 12px; border-radius: 999px; background: var(--yellow); border: 2px solid var(--line); box-shadow: var(--shadow-sm); font-weight: 800; font-size: 13px; color: var(--on-candy); }
.welcome-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-weight: 700; font-size: 15px; }
.welcome-points li { display: flex; align-items: center; gap: 10px; }
.welcome-points span { width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--line); background: var(--c); flex: none; }

.welcome-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px 20px; }
.welcome-tabs { display: inline-flex; padding: 4px; gap: 4px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); }
.welcome-tabs button { border: 0; background: none; font: inherit; font-weight: 800; font-size: 14px; padding: 8px 22px; border-radius: 999px; cursor: pointer; color: var(--text-2); }
.welcome-tabs button.is-active { background: var(--accent); color: var(--on-candy); box-shadow: inset 0 0 0 2px var(--line); }
.welcome-tabs button:disabled { cursor: not-allowed; opacity: 0.5; }
.welcome-tabs button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.welcome-card {
  width: min(560px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 26px;
  background: var(--surface); border: 3px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-md);
}
.welcome-wide { width: min(760px, 100%); }
.welcome-center { align-items: center; text-align: center; }
.welcome-h { font-family: var(--font-display); font-size: 26px; margin: 0; }
.welcome-lead { margin: 0; color: var(--text-2); }
.welcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.welcome-grid > :first-child { grid-column: 1 / -1; }
.welcome-who { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--blue-soft); border: 2px solid var(--line); font-size: 13px; }
.welcome-who img { border-radius: 50%; flex: none; }
.welcome-termsbox { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--yellow-soft); border: 2px solid var(--line); }
.welcome-terms { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); }
.welcome-me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 2px solid var(--border); }
.welcome-me img { border-radius: 50%; }
.welcome-initial, .prof-initial, .profile-btn-initial {
  display: inline-grid; place-items: center; border-radius: 50%; background: var(--violet); color: var(--on-candy);
  border: 2px solid var(--line); font-family: var(--font-display); font-weight: 700;
}
.welcome-initial { width: 48px; height: 48px; font-size: 22px; }
.welcome-note { margin: 0; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }

@media (max-width: 820px) {
  .welcome { grid-template-columns: 1fr; }
  .welcome-side { border-right: 0; border-bottom: 3px solid var(--line); padding: 28px 20px; gap: 16px; }
  .welcome-points { display: none; }
  .welcome-main { justify-content: flex-start; padding: 20px 12px 40px; }
  .welcome-card { padding: 18px; }
}
@media (max-width: 520px) { .welcome-grid { grid-template-columns: 1fr; } }

/* ---------- plans */
.plan-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.plan-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px;
  border: 3px solid var(--line); border-radius: 18px; background: var(--c-soft); box-shadow: var(--shadow-sm);
}
.plan-card.is-best { box-shadow: var(--shadow-md); }
.plan-card.is-current { outline: 3px solid var(--green); outline-offset: 3px; }
.plan-card p { margin: 0; }
.plan-badge { position: absolute; top: -12px; right: 14px; padding: 2px 10px; border-radius: 999px; background: var(--c); border: 2px solid var(--line); font-size: 12px; font-weight: 800; color: var(--on-candy); }
.plan-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.plan-price { display: flex; align-items: baseline; gap: 2px; }
.plan-price strong { font-family: var(--font-display); font-size: 36px; line-height: 1; }
.plan-price span { font-weight: 700; color: var(--text-2); }
.plan-current { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--green); border: 2px solid var(--line); font-weight: 800; font-size: 13px; color: var(--on-candy); }
.plan-card .linkish { align-self: flex-start; }
.plan-card a.btn { text-decoration: none; }
.plan-cards.is-compact .plan-card { padding: 14px; }
.plan-cards.is-compact .plan-price strong { font-size: 28px; }
@media (max-width: 560px) { .plan-cards { grid-template-columns: 1fr; } }

/* the free trial: the offer on the plans page, and the countdown inside the app */
.trial-offer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; border: 2px dashed var(--line); background: var(--green-soft, var(--surface-2)); }
.trial-offer p { margin: 2px 0 0; }
.trial-badge {
  position: fixed; z-index: 40; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow-md); font-size: 14px;
}
.trial-badge strong { font-variant-numeric: tabular-nums; }
.trial-badge.is-ending { background: var(--yellow); color: var(--on-candy); }
@media (max-width: 560px) { .trial-badge { left: 12px; right: 12px; justify-content: space-between; } }

/* a coupon code before checkout */
.coupon-box { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface-2); }
.coupon-box .row { display: flex; align-items: center; gap: 8px; }
.coupon-box .input { min-width: 0; }
.coupon-box.is-applied { border-color: var(--line); background: var(--green-soft, var(--surface-2)); }
.coupon-box p { margin: 0; }

/* ---------- Profile page */
.prof { display: flex; flex-direction: column; gap: 14px; }
.prof-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.prof-avatar { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--line); flex: none; object-fit: cover; }
.prof-initial { font-size: 28px; }
.prof-h { margin: 6px 0 0; font-family: var(--font-display); font-size: 16px; }
.plan-now { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--c-soft); flex-wrap: wrap; }
.plan-now > .icon { color: var(--c-ink); }
.sub-hit { display: flex; align-items: center; gap: 8px; padding: 6px 10px; flex-wrap: wrap; }
.sub-hit .avatar-img { border-radius: 50%; }

/* ---------- sidebar Profile button (profile + plan + team in one) */
.profile-btn {
  display: flex; align-items: center; gap: 10px; flex: none; margin: 8px 10px 0; padding: 7px 10px;
  border: 2px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm);
  font: inherit; color: var(--text); text-align: left; cursor: pointer; min-width: 0;
}
.profile-btn:hover { background: var(--hover); }
.profile-btn:active { transform: translate(1px, 1px); box-shadow: none; }
.profile-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.profile-btn-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; border: 2px solid var(--line); object-fit: cover; }
.profile-btn-initial { font-size: 14px; }
.profile-btn-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.profile-btn-name { font-weight: 800; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-btn-plan { font-size: 11px; font-weight: 700; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-btn-icon { color: var(--blue-ink); flex: none; }
.is-collapsed .profile-btn { justify-content: center; margin: 8px auto 0; padding: 5px; }

/* ---------- website sign-in (email, Google, Apple) */
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-providers { display: flex; flex-direction: column; gap: 10px; }
.auth-provider {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 14px;
  border: 2px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm);
  font: inherit; font-weight: 800; font-size: 15px; color: var(--text); cursor: pointer;
}
.auth-provider:hover { background: var(--hover); }
.auth-provider:active { transform: translate(1px, 1px); box-shadow: none; }
.auth-provider:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.auth-provider:disabled { opacity: 0.6; cursor: wait; }
.auth-provider.is-apple { background: #000000; color: #FFFFFF; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 2px; background: var(--border); }
.auth-error { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--red-soft); border: 2px solid var(--line); color: var(--red-ink); font-size: 13px; font-weight: 700; }
.auth-note { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--green-soft); border: 2px solid var(--line); font-size: 13px; }

/* ---------- script page: talk to type (pink) and Play (blue) */
.sp-dictate.sp-listening { animation: sp-pulse 1.2s ease-in-out infinite; }
@keyframes sp-pulse { 50% { box-shadow: 0 0 0 4px var(--pink-soft); } }
@media (prefers-reduced-motion: reduce) { .sp-dictate.sp-listening { animation: none; } }

/* phones: "Put TELEIOS on your home screen" (Android Chrome's install offer) */
.install-banner {
  position: fixed; z-index: 41; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 16px;
  border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow-md); font-size: 14px;
}
.install-banner .small { font-size: 12px; }

.welcome-privacy { margin: 0; font-size: 12px; color: var(--text-2); }
.welcome-privacy a { color: inherit; font-weight: 700; }
