/* GitAway shared components. Tokens live in tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
/* Icons carry their size as --ico (rem); a page rule such as .btn-round svg can still override it. */
svg[style*="--ico"] { width: var(--ico); height: var(--ico); }
.ga-page { background: var(--ground); min-height: 100vh; display: flex; flex-direction: column; }
.ga-page > main { flex: 1; }
.ga-skip { position: absolute; left: 1rem; top: -5rem; z-index: 10; padding: 0.75rem 1.125rem; border-radius: var(--r-pill); background: var(--ink); color: #FFFFFF; font-weight: 800; text-decoration: none; }
.ga-skip:focus { top: 1rem; color: #FFFFFF; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--ink); }
a:hover { color: var(--coral-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 0.1875rem solid var(--ink);
  outline-offset: 0.1875rem;
}
.on-ink a:focus-visible, .on-ink button:focus-visible { outline-color: var(--sun); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.ga-wrap { width: min(82rem, 100% - 2rem - env(safe-area-inset-left) - env(safe-area-inset-right)); margin-inline: auto; }

/* Header */
.ga-header { height: calc(5.25rem + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.ga-brand { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; }
.ga-brand-mark { width: 2.5rem; height: 2.5rem; border-radius: var(--r-sm); background: var(--coral); box-shadow: 0 0.1875rem 0 var(--coral-deep); display: grid; place-items: center; }
.ga-brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.6875rem; letter-spacing: -0.02em; color: var(--ink); }
.ga-nav { display: flex; align-items: center; gap: 2rem; font-weight: 600; }
.ga-nav a { text-decoration: none; }
.ga-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent-2); text-decoration-thickness: 0.25rem; text-underline-offset: 0.5rem; }

/* Signed-in account: avatar plus Sign out */
.ga-account { display: flex; align-items: center; gap: 0.75rem; }
.ga-avatar { width: 2.75rem; height: 2.75rem; border-radius: var(--r-pill); border: 0.1875rem solid #fff; display: grid; place-items: center; font-weight: 800; }
.ga-me { display: inline-flex; border-radius: var(--r-pill); }
.ga-signout { min-height: 2.75rem; padding: 0 0.5rem; border: 0; background: none; color: var(--ink); font: 700 1rem var(--font-body); text-decoration: underline; text-underline-offset: 0.25rem; cursor: pointer; }

/* Tactile buttons */
.btn {
  --btn-bg: var(--card); --btn-fg: var(--ink); --btn-ledge: rgba(30,26,46,.12);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  min-height: 3.5rem; padding: 0 1.625rem; border: 0; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 800 1.125rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 1px var(--line), 0 0.25rem 0 var(--btn-ledge);
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); box-shadow: 0 0 0 1px var(--line), 0 0.3125rem 0 var(--btn-ledge); }
.btn:active { transform: translateY(0.25rem); box-shadow: 0 0 0 1px var(--line), 0 0 0 var(--btn-ledge); }
.btn-primary { --btn-bg: var(--accent); --btn-ledge: var(--accent-deep); }
.btn-ink { --btn-bg: var(--ink); --btn-fg: #FFFFFF; --btn-ledge: var(--ink-ledge); }
.btn-sm { min-height: 2.75rem; padding: 0 1.25rem; font-size: 1rem; }

/* Stickers and tags */
.sticker {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 2.75rem; padding: 0 1.125rem 0 0.75rem;
  border-radius: var(--r-pill); border: 0.1875rem solid #FFFFFF; box-shadow: var(--shadow-sticker);
  font-weight: 800; font-size: 1rem; background: var(--sun);
}
.tag { display: inline-flex; align-items: center; height: 1.625rem; padding: 0 0.625rem; border-radius: var(--r-pill); font-size: max(var(--text-min), 0.8125rem); font-weight: 800; background: var(--sun); }
.tag-booked { background: var(--ink); color: #FFFFFF; letter-spacing: .03em; }
.fill-sun { background: var(--sun); } .fill-mint { background: var(--mint); } .fill-sky { background: var(--sky); }
.fill-grape { background: var(--grape); } .fill-bubble { background: var(--bubble); }

/* Surfaces */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }

/* Action rows */
.ga-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.ga-soon .ga-actions { justify-content: center; }

/* Footer */
.ga-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 2.5rem 0 calc(2.5rem + env(safe-area-inset-bottom)); color: var(--ink-3); font-weight: 600; font-size: 0.9375rem; }
.ga-footer .ga-brand-name { font-size: 1.375rem; }
.ga-footer-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.ga-footer-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink-2); font-weight: 700; text-decoration: none; }
.ga-footer-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.25rem; }

/* Placeholder pages while a screen is being built */
.ga-soon { min-height: calc(100vh - 13.75rem); display: grid; place-items: center; text-align: center; }
.ga-soon h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.ga-soon p { margin: 1rem auto 1.75rem; max-width: 32.5rem; color: var(--ink-2); font-size: 1.25rem; }

/* Motion */
@keyframes ga-pop { 0% { transform: scale(.6); opacity: 0 } 70% { transform: scale(1.06); opacity: 1 } 100% { transform: scale(1) } }
@keyframes ga-shimmer { from { background-position: -200% 0 } to { background-position: 200% 0 } }
.skeleton { background: linear-gradient(90deg, var(--skeleton) 0%, var(--skeleton-band) 50%, var(--skeleton) 100%); background-size: 200% 100%; animation: ga-shimmer 1.4s linear infinite; }

@media (max-width: 720px) {
  .ga-header { height: auto; padding: calc(1rem + env(safe-area-inset-top)) 0 1rem; flex-wrap: wrap; }
  .ga-nav { gap: 1.125rem; order: 3; width: 100%; }
  .ga-footer { flex-direction: column; align-items: flex-start; }
  .ga-brand { min-height: 2.75rem; }
  .ga-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Sign-in notice: "You joined X's family" (F-043) */
.ga-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; width: min(46rem, 100% - 2rem); margin: 0.5rem auto; padding: 0.625rem 1rem; border-radius: var(--r-md); background: var(--sky-tint); color: var(--ink); font-weight: 700; }
.ga-note-actions, .ga-note form { display: flex; gap: 0.5rem; margin: 0; }

/* First-run welcome (F-053): three ways to begin, shown wherever a brand-new family would otherwise see an empty page. rem only. */
.fr { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; max-width: 62.5rem; }
.fr-h { font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -0.03em; }
.fr-lede { color: var(--ink-2); font-size: 1.125rem; max-width: 40rem; }
.fr-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 0.5rem; }
.fr-paths.fr-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fr-path {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; padding: 1.25rem; min-height: 2.75rem; border-radius: var(--r-lg);
  background: var(--card); box-shadow: var(--shadow-md); color: var(--ink); text-decoration: none; text-align: left;
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.fr-path:hover, .fr-path:focus-visible { color: var(--ink); transform: translateY(-0.1875rem); box-shadow: var(--shadow-lg); }
.fr-ico { width: 3rem; height: 3rem; border-radius: 0.875rem; display: grid; place-items: center; flex: none; }
.fr-body { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.fr-title { font-family: var(--font-display); font-weight: 800; font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1.1; }
.fr-text { color: var(--ink-2); font-size: 1rem; font-weight: 500; }
.fr-choices { display: flex; flex-direction: column; align-items: flex-start; gap: 0.125rem; }
.fr-path-multi:hover { transform: none; box-shadow: var(--shadow-md); }
.fr-go { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; font-weight: 800; color: var(--coral-deep); }
@media (max-width: 825px) { .fr-paths, .fr-paths.fr-two { grid-template-columns: minmax(0, 1fr); } .fr-path { flex-direction: row; align-items: center; flex-wrap: wrap; } .fr-body { flex: 1 1 12rem; } .fr-choices { flex: 1 1 100%; } }
@media (max-width: 720px) { .fr-lede { font-size: 1.0625rem; } .fr-path { min-height: 2.75rem; } }
.fr .eyebrow { font-size: max(var(--text-min), 0.875rem); font-weight: 800; letter-spacing: .08em; color: var(--accent-deep); }
