/* The mobile apps (Hotwire Native).
   AppWelcomeController: the first screen when signed out. A dark panel with the
   brand (the website's side panel, moved above), then Continue with Apple,
   Google (only when the app's sign-in component is there) and email. */
.app-welcome { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); }
.app-welcome__top {
  flex: 0 0 44vh; flex: 0 0 44dvh;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 22px;
  background: var(--ink); color: var(--paper);
  padding: calc(env(safe-area-inset-top) + 40px) 28px 28px;
  min-height: max-content; /* larger text: it grows and the page scrolls */
}
.app-welcome__brand .brand-mark { --mark-size: 46px; }
.app-welcome__brand .brand__name { font-size: 27px; }
.app-welcome__brand .brand__ar { font-size: 16px; }
.app-welcome__intro { display: flex; flex-direction: column; gap: 8px; }
.app-welcome__title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 40px; line-height: 1.05; }
.app-welcome__lead { margin: 0; max-width: 480px; font-size: 17px; line-height: 1.45; color: var(--text-on-dark-muted); }

.app-welcome__main { position: relative; flex: 1; padding: 24px 24px calc(env(safe-area-inset-bottom) + 24px); }
.app-welcome__column { width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.app-welcome__note { margin: 0; font-size: 15px; color: var(--ink-line); text-align: center; }
.app-welcome__error { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--clay-soft); font-size: 15px; line-height: 1.45; }

.app-welcome__btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 16px; border-radius: 12px;
  font: inherit; font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.app-welcome__btn:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.app-welcome__btn svg { flex-shrink: 0; }
.app-welcome__btn--apple { background: #000; color: #fff; border: none; font-family: -apple-system, "SF Pro Text", var(--font-sans); }
.app-welcome__btn--google { background: #fff; color: var(--ink); border: 1.5px solid var(--line-strong); }
.app-welcome__btn--email { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.app-welcome__btn--email:hover { color: var(--ink); text-decoration: none; }
.app-welcome__btn--ink { background: var(--ink); color: var(--paper); border: none; border-radius: var(--radius-pill); }
.app-welcome__btn:disabled { cursor: default; }
.app-welcome__btn--ink:disabled { opacity: .45; }

.app-welcome__small { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-body); text-align: center; }
.app-welcome__small a { font-weight: 600; }
.app-welcome__school {
  align-self: center; display: flex; align-items: center; min-height: 44px;
  font-size: 13px; font-weight: 600; color: var(--ink); text-align: center;
  text-decoration: underline; text-underline-offset: 3px;
}

/* Apple and Google only in an app that has the sign-in component (the bridge sets the attribute). */
.app-welcome__native, .app-welcome__native-line { display: none; }
html[data-bridge-components~="sign-in"] .app-welcome__native { display: flex; }
html[data-bridge-components~="sign-in"] .app-welcome__native-line { display: inline; }

/* Signing in, and the Terms step for a new account: a card over the dimmed buttons. */
.app-welcome__main.is-busy .app-welcome__column { opacity: .45; pointer-events: none; }
.app-welcome__card {
  position: absolute; left: 24px; right: 24px; top: 50%; transform: translateY(-50%);
  max-width: 340px; margin: 0 auto; padding: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 20px 50px -18px rgba(28, 35, 33, .5); text-align: center;
}
.app-welcome__card[hidden] { display: none; }
.app-welcome__card--terms { align-items: stretch; text-align: left; }
.app-welcome__card-title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 26px; line-height: 1.1; }
.app-welcome__card-text { margin: 0; font-size: 14px; color: var(--text-body); }
.app-welcome__check { font-size: 15px; line-height: 1.45; }
.app-welcome__cancel { align-self: center; min-height: 44px; padding: 0 12px; background: none; border: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--clay); cursor: pointer; }
.app-welcome__spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(28, 35, 33, .18); border-top-color: var(--clay);
  animation: auth-spin .8s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .app-welcome__spinner { animation-duration: 2.4s; } }

/* iPad: the same layout, larger. */
@media (min-width: 700px) {
  .app-welcome__top { flex-basis: 46vh; padding: calc(env(safe-area-inset-top) + 80px) 96px 56px; gap: 30px; }
  .app-welcome__brand .brand-mark { --mark-size: 64px; }
  .app-welcome__brand .brand__name { font-size: 38px; }
  .app-welcome__brand .brand__ar { font-size: 22px; }
  .app-welcome__title { font-size: 64px; }
  .app-welcome__lead { font-size: 21px; }
  .app-welcome__main { padding: 56px 96px 40px; }
  .app-welcome__column { gap: 14px; }
  .app-welcome__btn { min-height: 56px; border-radius: 14px; font-size: 18px; }
  .app-welcome__note { font-size: 16px; }
  .app-welcome__small, .app-welcome__school { font-size: 14px; }
}

/* The website's sign-in and sign-up pages in the app ("Continue with email",
   opened as a sheet): no side panel, a Sign in / Create account switch on top. */
.split--app { display: block; min-height: 0; }
.split--app .split__main { max-width: 560px; margin: 0 auto; padding: 20px 20px calc(env(safe-area-inset-bottom) + 24px); justify-content: flex-start; gap: 20px; }
.split--app .split__title { font-size: 32px; line-height: 1.05; }
.split__app-steps { max-width: 560px; margin: 0 auto; padding: 16px 20px 0; }
.split--app:has(.app-auth-tabs) .split__app-steps { display: none; } /* creating the account: the switch is enough */
.split__app-steps .onb-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.split__app-steps .onb-steps .steps__item { flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-muted); }
.split__app-steps .onb-steps .steps__item::before { content: ""; display: block; width: 100%; height: 4px; border-radius: 4px; background: var(--line); }
.split__app-steps .onb-steps .steps__item.is-current, .split__app-steps .onb-steps .steps__item.is-done { color: var(--ink); }
.split__app-steps .onb-steps .steps__item.is-current::before, .split__app-steps .onb-steps .steps__item.is-done::before { background: var(--peach); }
.split__app-steps .steps__dot, .split__app-steps .onb-steps__sub { display: none; }
.split__app-steps .onb-steps__text { padding-top: 0; }
.split__app-steps .onb-steps__label { font-size: 12px; }
.split__app-steps .is-current .onb-steps__label { font-weight: 700; }
.split__app-steps .onb-steps__num { display: inline; }

.app-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--sand); }
.app-auth-tabs__tab {
  display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 9px;
  font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none;
}
.app-auth-tabs__tab:hover { color: var(--ink); text-decoration: none; }
.app-auth-tabs__tab.is-current { background: var(--ink); color: var(--paper); }
.app-auth-tabs__tab:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* Signed-in pages in the apps: no sidebar or top bar (native tabs and navigation bar instead). */
.app--native .app-main { padding: 16px 16px calc(env(safe-area-inset-bottom) + 32px); }

/* The More tab (/more): an iOS-style grouped list on paper. */
.more { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.more__title { margin: 6px 4px 2px; font-family: -apple-system, var(--font-sans); font-size: 34px; font-weight: 700; line-height: 1.1; }
.app--native .more__title { display: none; } /* the native navigation bar shows "More" */

.more__modes { display: flex; flex-direction: column; gap: 6px; }
.more__switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 10px; background: var(--line); }
.more__switch-option {
  min-height: 44px; border: none; border-radius: 8px; background: transparent; color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
}
.more__switch-option.is-current { background: #fff; font-weight: 700; box-shadow: 0 1px 3px rgba(28, 35, 33, .25); }
.more__switch-option:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.more__mode-note { margin: 0 4px; font-size: 13px; line-height: 1.4; color: var(--text-body); }

.more__person {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none;
}
.more__person:hover { color: var(--ink); text-decoration: none; border-color: var(--line-strong); }
.more__avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--peach); font-family: var(--font-serif); font-size: 24px;
}
.more__who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.more__name { font-size: 18px; font-weight: 700; line-height: 1.2; }
.more__pills { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.more__pill { padding: 1px 9px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); font-weight: 700; white-space: nowrap; }
.more__pill--level { background: var(--sand); border-color: var(--line-mid); }
.more__pill--pro { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.more__pill--streak { background: var(--green-soft); border-color: var(--green-soft); color: var(--green); }
.more__pill--role { background: var(--mark); border-color: var(--peach); }
.more__chevron { color: var(--line-dashed); font-size: 20px; }

.more__managed { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--sand); font-size: 13px; line-height: 1.45; }
.more__managed-i { font-family: var(--font-serif); font-weight: 700; font-size: 18px; line-height: 1.1; color: var(--green); }

.more__group { display: flex; flex-direction: column; gap: 6px; }
.more__group-title { margin: 0 16px; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-body); font-weight: 600; }
.more__list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.more__list > li + li { border-top: 1px solid var(--line-soft); }
.more__list form { margin: 0; }
.more__row {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 9px 14px;
  color: var(--ink); text-decoration: none; background: none; border: none; font: inherit; text-align: left; cursor: pointer;
}
.more__row:hover { color: var(--ink); text-decoration: none; background: var(--sand-hover); }
.more__row:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.more__tile { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--sand); color: var(--ink); }
.more__tile--ink { background: var(--ink); color: var(--peach); }
.more__row-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 10px; }
.more__label { font-size: 16px; font-weight: 500; line-height: 1.25; }
.more__label--strong { font-weight: 600; }
.more__detail { font-size: 14px; color: var(--text-body); text-align: right; }
.more__detail--clay { color: var(--clay); font-weight: 600; }

.more__delete {
  align-self: center; display: flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: 16px; color: var(--clay); text-decoration: underline; text-underline-offset: 3px;
}
.more__footer { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 16px; font-size: 13px; color: var(--text-muted); }
.more__footer-links { display: flex; align-items: center; gap: 6px; }
.more__footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--ink-line); }

/* Delete account: the confirmation (opened as a sheet in the apps). */
.delete-account { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.delete-account__title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 32px; line-height: 1.1; }
.delete-account__lead { margin: 0; font-size: 16px; line-height: 1.55; }
.delete-account__note { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--sand); font-size: 14px; line-height: 1.5; }
.delete-account__export { display: flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; }
.delete-account__form { display: flex; flex-direction: column; gap: 18px; }
.delete-account__actions { display: flex; flex-direction: column; gap: 10px; }
.delete-account__actions .btn:disabled { background: var(--line); border-color: var(--line); color: var(--text-body); cursor: default; }

/* Settings → Notifications (/settings/notifications): a card per type, with Push and Email. */
.notif { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.notif__title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 40px; line-height: 1.05; }
.app--native .notif__title { display: none; }
.notif__banner {
  display: flex; flex-direction: column; gap: 8px; padding: 14px;
  background: var(--mark); border: 1.5px solid var(--peach); border-radius: 14px; font-size: 14px; line-height: 1.45;
}
.notif__banner[hidden], .notif__offer[hidden] { display: none; }
.notif__banner strong { font-size: 16px; }
.notif__banner-btn, .notif__offer-btn {
  align-self: flex-start; min-height: 44px; padding: 0 16px; border: none; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--paper); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.notif__offer {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; font-size: 14px;
}
.notif__offer-btn { align-self: center; font-size: 14px; padding: 0 14px; }
.notif__note { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--sand); font-size: 14px; line-height: 1.45; color: var(--ink-line); }
.notif__form { display: flex; flex-direction: column; gap: 14px; }
.notif__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.notif__card, .notif__rules {
  display: flex; flex-direction: column; gap: 8px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.notif__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.notif__name { margin: 0; font-size: 17px; font-weight: 700; }
.notif__tag { padding: 1px 9px; border-radius: var(--radius-pill); background: var(--sand); font-size: 12px; font-weight: 700; white-space: nowrap; }
.notif__when { margin: 0; font-size: 15px; line-height: 1.4; color: var(--ink-line); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.notif__opens { margin: 0; font-size: 13px; color: var(--text-body); }
.notif__time {
  min-height: 36px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--clay); font: inherit; font-size: 15px; font-weight: 700;
}
.notif__switches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.notif__switch, .notif__fixed { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; cursor: pointer; }
.notif__fixed { cursor: default; justify-content: flex-start; }
.notif__switch-text, .notif__fixed { flex-direction: column; align-items: flex-start; }
.notif__switch-text { display: flex; }
.notif__fixed { gap: 0; justify-content: center; }
.notif__switch-label { font-size: 15px; font-weight: 600; }
.notif__state { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.notif__switch:has(input:checked) .notif__state { color: var(--green); }
.notif__state--muted { color: var(--text-muted); }
.notif__switch.is-disabled { opacity: .6; cursor: default; }
.notif__switch.is-disabled .notif__state { color: var(--clay); }
.notif__rules p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-line); }
.notif__rules strong { color: var(--ink); }
.notif__quiet { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.notif__quiet-pick { display: flex; align-items: center; gap: 6px; }
.notif__rules .notif__zone { font-size: 12px; color: var(--text-muted); }
.notif__save { align-self: flex-start; }

/* The explanation before the phone's notification prompt (the apps, once). */
.notif-ask { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding-top: 10px; }
.notif-ask__title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 36px; line-height: 1.05; }
.notif-ask__lock { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 14px 16px; border-radius: 24px; background: var(--ink); }
.notif-ask__clock { font-family: -apple-system, var(--font-sans); font-size: 54px; font-weight: 300; line-height: 1; color: var(--paper); }
.notif-ask__card { width: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 18px; background: rgba(245, 239, 227, .92); }
.notif-ask__icon { width: 36px; height: 36px; border-radius: 9px; background: var(--ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-ask__icon .brand-mark { --mark-size: 28px; }
.notif-ask__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.notif-ask__app { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-body); }
.notif-ask__app strong { color: var(--ink); }
.notif-ask__head { font-size: 15px; font-weight: 600; }
.notif-ask__ar { font-family: var(--font-arabic); font-size: 19px; }
.notif-ask__body { font-size: 14px; color: var(--ink-line); }
.notif-ask__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.4; }
.notif-ask__list span { color: var(--text-body); }
.notif-ask__rules { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-body); }
.notif-ask__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.notif-ask__later { min-height: 48px; background: none; border: none; font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.notif__switch.is-disabled .switch input + span { background: var(--line-strong); cursor: default; }

/* Consent to AI processing: the screen (/ai-consent), a feature's closed state, and Settings › Privacy & AI. */
.ai-consent, .ai-closed, .ai-settings { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.ai-consent__mark {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--peach); font-family: var(--font-arabic); font-size: 26px; line-height: 1;
}
.ai-consent__title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 34px; line-height: 1.05; }
.ai-consent__lead { margin: 0; font-size: 16px; line-height: 1.5; }
.ai-consent__group { padding: 6px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.ai-consent__group-title { margin: 8px 0 2px; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.ai-consent__items { list-style: none; margin: 0; padding: 0; }
.ai-consent__items li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 9px 0; font-size: 15px; line-height: 1.35; }
.ai-consent__items li + li { border-top: 1px solid var(--line-soft); }
.ai-consent__processor { font-size: 13px; font-weight: 700; color: var(--green); white-space: nowrap; }
.ai-consent__never { margin: 0; display: flex; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-line); }
.ai-consent__never > span:first-child { color: var(--green); font-weight: 700; }
.ai-consent__links { margin: 0; display: flex; gap: 18px; font-size: 15px; font-weight: 600; }
.ai-consent__links a { min-height: 44px; display: flex; align-items: center; }
.ai-consent__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ai-consent__actions form { display: contents; }
.ai-consent__allow {
  width: 100%; min-height: 52px; border: none; border-radius: 14px; background: var(--ink); color: var(--paper);
  font: inherit; font-size: 17px; font-weight: 600; cursor: pointer;
}
.ai-consent__later { width: 100%; min-height: 48px; border: none; background: none; color: var(--ink); font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; }
.ai-consent__foot { margin: 0; text-align: center; font-size: 13px; color: var(--text-muted); }
.ai-consent__allow:focus-visible, .ai-consent__later:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.ai-closed__title { margin: 0; display: flex; align-items: baseline; gap: 10px; font-family: var(--font-serif); font-weight: 400; font-size: 38px; }
.ai-closed__ar { font-family: var(--font-arabic); font-size: 28px; color: var(--clay); }
.app--native .ai-closed__title { display: none; }
.ai-closed__card { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.ai-closed__head { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 26px; line-height: 1.15; }
.ai-closed__card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-line); }
.ai-closed__btn {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 46px; margin-top: 4px; padding: 0 20px;
  border-radius: var(--radius-pill); background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 600;
}
.ai-closed__btn:hover { color: var(--paper); text-decoration: none; background: var(--ink-raised); }
.ai-closed__works { display: flex; flex-direction: column; }
.ai-closed__works-title { margin: 0; padding-bottom: 6px; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.ai-closed__link { display: flex; justify-content: space-between; align-items: center; min-height: 48px; border-top: 1px solid var(--line); font-size: 16px; color: var(--ink); }
.ai-closed__link:hover { color: var(--ink); text-decoration: none; background: var(--sand-hover); }
.ai-closed__link span:last-child { color: var(--text-on-dark-faint); }

.ai-settings__title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 40px; line-height: 1.05; }
.app--native .ai-settings__title { display: none; }
.ai-settings__card { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.ai-settings__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ai-settings__label-wrap { display: flex; flex-direction: column; gap: 2px; }
.ai-settings__label { font-size: 17px; font-weight: 600; }
.ai-settings__state { font-size: 14px; font-weight: 700; color: var(--text-muted); }
.ai-settings__state.is-on { color: var(--green); }
.ai-settings__since, .ai-settings__note { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-body); }
.ai-settings__sheet {
  width: min(560px, 100vw); max-width: 100vw; margin: auto auto 0; padding: 20px 20px calc(env(safe-area-inset-bottom) + 28px);
  border: none; border-radius: 20px 20px 0 0; background: var(--card); color: var(--ink);
}
.ai-settings__sheet[open] { display: flex; flex-direction: column; gap: 12px; }
.ai-settings__sheet::backdrop { background: rgba(28, 35, 33, .38); }
.ai-settings__sheet-title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 28px; line-height: 1.1; }
.ai-settings__sheet p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-line); }
.ai-settings__sheet ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.4; }
.ai-settings__sheet .ai-settings__still { font-size: 14px; color: var(--green); }
.ai-settings__sheet form { display: contents; }
.ai-settings__off {
  width: 100%; min-height: 52px; margin-top: 4px; border: none; border-radius: 14px; background: var(--clay); color: var(--text-on-accent);
  font: inherit; font-size: 17px; font-weight: 600; cursor: pointer;
}

/* Pro in the apps (/pro): the paywall, "You have Pro", and the note for younger learners. */
.paywall { position: relative; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.paywall__main { display: flex; flex-direction: column; gap: 14px; transition: opacity .2s ease; }
.paywall__main.is-dim { opacity: .5; pointer-events: none; }
.paywall__intro { display: flex; flex-direction: column; gap: 4px; }
.paywall__title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 36px; line-height: 1; }
.paywall__title em { color: var(--clay); }
.paywall__intro p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-line); }
.paywall__perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.4; }
.paywall__perks li { display: flex; gap: 10px; }
.paywall__perks li::before { content: "✓"; color: var(--green); font-weight: 700; }
.paywall__plans { margin: 0; padding: 0; border: none; display: flex; flex-direction: column; gap: 10px; }
.paywall__plan {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 16px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
}
.paywall__plan:has(input:checked) { border: 2px solid var(--ink); padding: 13px 15px; }
.paywall__plan:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 2px; }
.paywall__radio { width: 22px; height: 22px; margin: 0; accent-color: var(--green); flex-shrink: 0; }
.paywall__plan-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.paywall__plan-name { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.paywall__save { padding: 1px 9px; border-radius: var(--radius-pill); background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 700; }
.paywall__plan-sub { font-size: 13px; color: var(--text-body); }
.paywall__plan-price { font-size: 17px; font-weight: 700; white-space: nowrap; }
.paywall__trial { margin: 0; font-size: 14px; line-height: 1.45; }
.paywall__trial[hidden] { display: none; }
.paywall__trial--used { color: var(--text-body); }
.paywall__cta {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; border: none; border-radius: 14px;
  background: var(--ink); color: var(--paper); font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.paywall__cta:hover { color: var(--paper); text-decoration: none; background: var(--ink-raised); }
.paywall__cta:focus-visible, .paywall__restore:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.paywall__web { align-self: center; display: flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--ink-line); text-decoration: underline; text-underline-offset: 3px; }
.paywall__web[hidden], .paywall__manage[hidden] { display: none; }
.paywall__terms { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-body); }
.paywall__foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 14px; font-weight: 600; }
.paywall__foot span { display: flex; gap: 14px; }
.paywall__foot a { min-height: 44px; display: flex; align-items: center; }
.paywall__restore { min-height: 44px; padding: 0; background: none; border: none; color: var(--clay); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

.paywall__sheet {
  position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 24px); z-index: 50; max-width: 488px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px; padding: 22px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 40px -20px rgba(28, 35, 33, .5);
}
.paywall__sheet[hidden] { display: none; }
.paywall__sheet-head { display: flex; align-items: center; gap: 12px; }
.paywall__sheet-title { font-family: var(--font-serif); font-size: 26px; line-height: 1.1; }
.paywall__sheet-text { font-size: 15px; line-height: 1.5; color: var(--ink-line); }
.paywall__sheet-icon { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.paywall__sheet-icon--spin { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--ink); animation: auth-spin .8s linear infinite; }
.paywall__sheet-icon--ok { background: var(--green); color: var(--paper); }
.paywall__sheet-icon--calm { border: 2px solid var(--text-muted); color: var(--ink-line); font-family: var(--font-serif); }
.paywall__sheet form { display: contents; }
.paywall__sheet form[hidden] { display: none; }
.paywall__sheet-second { min-height: 44px; background: none; border: none; color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .paywall__sheet-icon--spin { animation-duration: 2.4s; } }

.paywall__feature { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 36px; }
.paywall__card { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.paywall__card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-line); }
.paywall__card-title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 25px; line-height: 1.15; }
.paywall__have { display: flex; align-items: center; gap: 10px; }
.paywall__tick { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--green); color: var(--paper); font-weight: 700; }
.paywall__have-title { font-family: var(--font-serif); font-size: 30px; line-height: 1; }
.paywall__facts { margin: 4px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.paywall__facts dt { color: var(--text-body); }
.paywall__facts dd { margin: 0; font-weight: 600; text-transform: none; }
.paywall__manage { align-self: flex-start; display: flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; }

/* In the apps the navigation bar shows the page's name, so a heading that only
   repeats it is hidden, kept for screen readers. A heading that says more
   (Today's greeting, a score) has page-title--keep. */
.app--native :is(.page-title, .fc__title, .fc-browse__title):not(.page-title--keep) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
