:root {
  --paper: #f7f7f5;
  --surface: #ffffff;
  --ink: #161616;
  --muted: #6e6e73;
  --hairline: #dededb;
  --focus: #0066cc;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body { min-width: 320px; margin: 0; background: var(--paper); }
a { color: inherit; }

.site-shell { display: flex; min-height: 100svh; flex-direction: column; }

main {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: clamp(44px, 8vw, 84px) 24px 72px;
}

.masthead {
  margin-bottom: clamp(52px, 9vw, 88px);
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(29px, 6vw, 46px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 46px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-item { min-width: 0; text-align: center; }

.app-link {
  display: inline-flex;
  width: 100%;
  max-width: 152px;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border-radius: 26px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.app-icon {
  display: block;
  width: clamp(108px, 30vw, 136px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 23.5%;
  box-shadow: 0 0 0 0.5px rgb(0 0 0 / 10%), 0 12px 30px rgb(0 0 0 / 8%);
  object-fit: cover;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 180ms ease;
}

.app-link span {
  overflow: hidden;
  max-width: 100%;
  font-size: 14px;
  font-weight: 520;
  letter-spacing: -0.012em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-link:hover .app-icon {
  transform: translateY(-4px) scale(1.018);
  box-shadow: 0 0 0 0.5px rgb(0 0 0 / 10%), 0 18px 38px rgb(0 0 0 / 13%);
}

.app-link:active .app-icon { transform: scale(0.965); }

.app-link:focus-visible,
.footer a:focus-visible,
.websites summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent);
  outline-offset: 5px;
}

.footer {
  display: flex;
  width: min(calc(100% - 48px), 812px);
  margin: auto auto 0;
  padding: 20px 0 28px;
  align-items: flex-start;
  justify-content: space-between;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 11px;
}

.websites { position: relative; }
.websites summary { width: max-content; cursor: pointer; list-style: none; }
.websites summary::-webkit-details-marker { display: none; }
.websites summary::after { content: ' +'; }
.websites[open] summary::after { content: ' −'; }
.websites nav { display: grid; gap: 8px; padding-top: 14px; }
.websites a, .legal a { text-decoration: none; }
.websites a:hover, .legal a:hover { color: var(--ink); }
.legal { display: flex; gap: 18px; }

.beta-section {
  margin-top: clamp(72px, 11vw, 108px);
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.beta-section h2 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  letter-spacing: -0.01em;
}

.beta-grid { margin-top: 36px; }

.legal-page {
  width: min(100%, 680px);
  padding-top: clamp(40px, 7vw, 72px);
  font-size: 15px;
  line-height: 1.62;
}

.legal-page .back-link {
  display: inline-block;
  margin-bottom: 52px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.legal-page .back-link:hover { color: var(--ink); }

.legal-page h1 {
  margin-bottom: 52px;
  font-size: clamp(34px, 7vw, 54px);
}

.legal-page section + section { margin-top: 34px; }

.legal-page h2 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.legal-page p { margin: 0; color: #3f3f42; }
.legal-page p a { text-underline-offset: 3px; }

@media (min-width: 560px) {
  .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 58px 32px; }
}

@media (min-width: 780px) {
  .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .app-icon { transition: none; }
}
