/* A site's own pages, on top of the app kit (kit.css), which draws the signed-in shell: the sidebar, its nav, the page.
   This adds only the signed-out page, the screen's frame, and the phone's bars. */

@layer site {
  body { margin: 0; background: var(--paper); color: var(--ink); }

  /* Signed out */
  body.site { display: flex; flex-direction: column; min-height: 100dvh; }
  .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 48px; }
  .brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: 20px; }
  .mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }
  .top nav { gap: 20px; }
  .quiet { color: var(--muted); text-decoration: none; font-size: var(--text-md); }
  .quiet:hover { color: var(--ink); }
  .intro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 0 24px 64px; text-align: center; }
  .intro h1 { margin: 0; max-width: 17ch; font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(40px, 7vw, 72px); line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; }
  .intro h1 em { font-style: normal; color: var(--accent-ink); }
  .intro p { margin: 0; max-width: 48ch; font-size: 19px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
  .intro .said { color: var(--ink); font-size: var(--text-lg); }
  /* The one field, its address and Continue on a line, the fact about publishing under them. */
  .ask { display: flex; gap: 8px; width: min(100%, 480px); }
  .ask input { flex: 1; min-width: 0; height: 48px; font-size: var(--text-lg); }
  .ask button { flex: none; }
  .ask { flex-wrap: wrap; justify-content: center; }
  .ask .cf-turnstile { flex-basis: 100%; }
  /* A first week's ideas before sign-up, each a card with its title and why. */
  .preview .ideas { display: flex; flex-direction: column; gap: 12px; width: min(100%, 560px); margin: 0; padding: 0; list-style: none; text-align: left; }
  .preview .ideas li { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
  .preview .ideas strong { font-size: var(--text-lg); font-weight: 600; text-wrap: balance; }
  .preview .ideas span { color: var(--muted); font-size: var(--text-md); line-height: 1.45; text-wrap: pretty; }
  .intro .note { max-width: 44ch; color: var(--muted); font-size: var(--text-sm); text-wrap: pretty; }
  .foot { display: flex; gap: 18px; padding: 18px 48px; font-size: var(--text-sm); color: var(--muted); }
  .foot a { color: var(--muted); }
  .foot a:hover { color: var(--ink); }
  @media (max-width: 640px) {
    .top { padding: 14px 16px; }
    .foot { padding: 16px; }
    .intro { gap: 20px; padding: 0 16px 48px; }
    .intro.preview { padding-top: 24px; }
    .intro p { font-size: 17px; }
    .intro .button.large { width: 100%; }
    .ask { flex-direction: column; }
  }

  /* Signed in */
  iframe.screen { display: block; width: 100%; height: 420px; border: 0; background: transparent; transition: opacity var(--slow) var(--ease); }
  iframe.screen.stopped { opacity: 0.3; pointer-events: none; }
  /* Why something the screen asked for outside it, like connecting GitHub, didn't happen. */
  /* Lined up with the screen's own content, as wide as it is on a wide page. */
  .card.said { width: 100%; max-width: 972px; margin: 0 auto 12px; color: var(--bad); }
  /* The sidebar's column runs the whole page however long the screen grows, while the sidebar itself stays in view. */
  @media (min-width: 840px) { body.app { background: linear-gradient(90deg, var(--sunken) 248px, var(--paper) 248px); } }
  .switcher { display: flex; align-items: center; justify-content: flex-start; gap: 10px; text-align: left; }
  .switcher .avatar { --size: 22px; font-size: 10px; }
  #workspaces { min-width: 220px; }
  #workspaces form { display: contents; }
  #workspaces form button { justify-content: flex-start; width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; background: transparent; box-shadow: none; color: var(--ink); font-size: var(--text-md); font-weight: 400; }
  #workspaces form button:hover { background: var(--sunken); }
  .menu > a { display: flex; align-items: center; gap: 10px; }

  .tabbar, .phone-only { display: none; }
  @media (max-width: 839px) {
    /* The places move to a bar at the foot of the screen, and the top keeps the name and the workspace. */
    body.app { grid-template-rows: auto 1fr; }
    .sidebar { justify-content: space-between; }
    .sidebar .places, .desktop-only { display: none; }
    .sidebar .push { display: flex; margin: 0; }
    .tabbar { display: flex; }
    .menu > a.phone-only { display: flex; }
  }
}
