/* Shared visual language from the native Theme: paper, serif stories and cobalt glass. */
.app-site { --bg: #fff; --surface: #f6f5f2; --ink: #111; --body: #1e1e1e; --muted: #5f5f5f;
  --rule: #e4e2dc; --accent: #2445e6; --accent-soft: #e9edfd; color-scheme: light; }
@media (prefers-color-scheme: dark) {
  .app-site { --bg: #000; --surface: #1c1c1e; --ink: #f6f5f2; --body: #e4e2dd; --muted: #a8a7a3;
    --rule: #2a2a2d; --accent: #9db0ff; --accent-soft: #1f2648; color-scheme: dark; }
}
.app-site .page { max-width: 1120px; padding-inline: 32px; }
.app-site .topbar { height: auto; min-height: 64px; }
.app-site .topbar .wordmark { font-size: 28px; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; background: var(--surface); color: var(--ink); padding: 12px 20px; border-radius: 16px; }
.skip-link:focus { top: 16px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.home-intro { max-width: 760px; padding-block: 64px 44px; }
.home-intro h1 { font-size: clamp(36px, 4.7vw, 56px); line-height: 1.12; font-weight: 600; letter-spacing: -.025em; margin: 12px 0 20px; }
.home-intro .lede { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0; }
.intro-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.app-site .block { padding-block: 40px; }
.app-site .block h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -.015em; }
.app-site .block .sub { max-width: 660px; }
.app-site .eyebrow { font-size: 12px; }
.app-site #latest { border-top: 0; padding-top: 12px; }
.app-site .latest { grid-template-columns: repeat(3,minmax(0,1fr)); }
.app-site .how { gap: 24px; margin-top: 24px; }
.app-site .how > div { border: 1px solid var(--rule); border-radius: 20px; background: var(--surface); padding: 22px; }
.app-site .how h3 { font-size: 22px; }
.app-site #questions { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 40px; grid-template-rows: max-content 1fr; align-items: start; }
.app-site #questions > .eyebrow { grid-column: 1; }
.app-site #questions > h2 { grid-column: 1; margin: 4px 0 0; max-width: 280px; }
.faq-list { grid-column: 2; grid-row: 1 / span 2; margin: 0; border: 1px solid var(--rule); border-radius: 20px; background: var(--surface); overflow: hidden; }
.faq-list details + details { border-top: 1px solid var(--rule); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none;
  padding: 18px 20px; min-height: 60px; color: var(--ink); font-size: 16px; line-height: 1.45; font-weight: 600; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::marker { content: ''; }
.faq-list summary::after { content: ''; width: 7px; height: 7px; flex: 0 0 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); margin-right: 3px; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin: 0; padding: 0 40px 20px 20px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.faq-list summary:focus-visible { outline-offset: -4px; border-radius: 12px; }
@media (max-width: 600px) {
  .app-site #questions { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; gap: 0; }
  .app-site #questions > h2 { max-width: none; margin-bottom: 20px; }
  .faq-list { grid-column: 1; grid-row: auto; }
}
.app-site .closing { border: 1px solid var(--rule); background: var(--surface); border-radius: 26px; padding: 36px 24px; margin-top: 16px; }
.app-site .closing img { display: block; border-radius: 16px; margin: 0 auto 20px; }
.app-site .closing h2 { font-size: clamp(28px, 3vw, 36px); margin: 0 0 8px; }
.app-site .closing > p { margin: 0 0 20px; }
.app-site .closing .note { margin: 18px 0 0; }
.app-site .doc { padding-top: 40px; }
.app-site .doc h1 { font-size: clamp(32px,5vw,44px); }
.app-site .doc h2 { border-top: 1px solid var(--rule); padding-top: 24px; margin-top: 32px; }
.app-site .profile-head { padding: 40px 24px 24px; background: var(--surface); border-radius: 0 0 28px 28px; margin-bottom: 24px; }
.app-site .story-list li { border: 1px solid var(--rule); background: var(--surface); border-radius: 20px; padding: 0 20px; margin-bottom: 12px; }
.app-site .cta, .app-site .auth-box { border: 1px solid var(--rule); border-radius: 22px; }
@media (max-width: 860px) {
  .app-site .latest { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-site .how { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .app-site .page { padding-inline: 20px; }
  .app-site .topbar.topbar-pill { padding-inline: 14px; }
  .app-site .topbar .wordmark { font-size: 24px; }
  .app-site .topbar nav { gap: 12px; font-size: 14px; }
  .app-site .topbar nav a[href="/support"] { display: none; }
  .home-intro { padding-block: 40px 32px; }
  .home-intro .lede { font-size: 17px; }
  .app-site .latest { grid-template-columns: minmax(0,1fr); }
  .app-site .block { padding-block: 32px; }
}
/* Content is visible immediately; no scroll-dependent reveal hides stories or links. */
.app-site .block > *, .app-site .closing > *, .app-site .latest li, .app-site .how > div, .app-site .story-list li {
  animation: none; opacity: 1; transform: none;
}
.app-site .btn.primary { background: linear-gradient(to bottom, #ffffff24, transparent 65%), #2445e6; color: #fff; }
.app-site .topbar nav a[href="/#latest"] { display: inline-block; }

/* A single viewport-anchored bar avoids nested sticky wrappers shifting at page boundaries. */
.app-site { padding-top: 96px; min-height: 100vh; display: flow-root; }
.app-site .page:has(> .topbar:only-child) { position: static; top: auto; z-index: auto; margin-bottom: 0; }
.app-site .topbar.topbar-pill { position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 64px); max-width: 1056px; margin: 0; z-index: 50; }
@media (max-width: 600px) {
  .app-site .topbar.topbar-pill { width: calc(100% - 40px); }
}

/* FAQ expansion changes document height without moving the reader's scroll anchor. */
html:has(.home-site) { overflow-anchor: none; scrollbar-gutter: stable; }

.home-intro { max-width: none; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 40px; align-items: center; }
.home-intro h1 { font-size: clamp(36px,4.1vw,50px); }
.app-previews { margin: 0; min-width: 0; }
.app-preview-screens { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0 24px; }
.app-preview-screens img { display: block; width: calc(50% - 7px); height: auto; border-radius: 26px;
  border: 1px solid var(--rule); box-shadow: 0 12px 28px #00000024; }
.app-preview-screens .preview-reader { margin-top: 42px; }
.app-previews figcaption { font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 760px) {
  .home-intro { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .app-previews { max-width: 390px; width: 100%; margin-inline: auto; }
  .app-preview-screens img { border-radius: 22px; }
}
