/* @impl STUDIO_HOME.letter */
* { box-sizing: border-box; }

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  margin: 0;
  padding-block: calc(clamp(3.5rem, 10vh, 7rem) + env(safe-area-inset-top, 0px))
                calc(clamp(4rem, 11vh, 7.5rem) + env(safe-area-inset-bottom, 0px));
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
  background: #ffffff;
  color: #4d4d4d;
  font: 0.9375rem/1.68 ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  -webkit-font-smoothing: antialiased;
}

main {
  width: min(560px, calc(100% - 40px));
  margin-inline: auto;
}

h1, h2, p { margin: 0; }

.logo-link {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  margin-bottom: 1.75rem;
  border-radius: 10px;
  color: #1f1f1f;
  text-decoration: none;
  font-weight: 500;
}

.logo-link img {
  display: block;
  width: 42px;
  height: 42px;
  /* Let the full alt text set the width when the square image is unavailable. */
  aspect-ratio: auto;
  min-width: max-content;
  white-space: nowrap;
  border-radius: 10px;
}

h1 {
  font-size: 0.96875rem;
  font-weight: 500;
  line-height: 1.55;
  color: #1f1f1f;
  margin-bottom: 1.5rem;
}

main > p + p { margin-top: 1.35rem; }

.catalog-grid {
  margin-top: 2.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.catalog-app, #contact {
  background: #f7f6f3;
  border-radius: 14px;
  padding: 22px 20px;
  font-size: 0.8125rem;
  line-height: 1.58;
  color: #52514e;
}

/* @impl STUDIO_HOME.catalog */
.catalog-app {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.catalog-app:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.catalog-app:last-child:nth-child(odd) .app-description {
  max-width: 54ch;
}

.card-head, .card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-icon {
  border-radius: 9px;
  object-fit: cover;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(31, 31, 31, 0.08);
}

.card-meta, .availability, .button {
  font-size: 0.75rem;
  color: #5c5b56;
}

h2 {
  font: 400 1.5rem/1.18 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  letter-spacing: -0.02em;
  color: #1f1f1f;
  margin: 14px 0 8px;
}

a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.card-title-link { gap: 6px; margin-block: -7px; }
.arrow { font: 0.875rem/1 monospace; color: #5c5b56; }
.card-foot { flex-wrap: wrap; margin-top: auto; padding-top: 14px; }
.button { gap: 4px; padding-inline: 10px; background: white; border-radius: 10px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

#contact {
  margin-top: 16px;
  padding: 26px 24px;
  text-align: center;
  line-height: 1.6;
}

.summary {
  max-width: 44ch;
  margin-inline: auto;
  color: #4d4c49;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  min-height: 44px;
  margin-top: 18px;
  padding: 12px 20px;
  border-radius: 10px;
  background: #1f1f1f;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.metadata {
  margin-top: 14px;
  font-size: 0.75rem;
  color: #5c5b56;
  font-variant-numeric: tabular-nums;
}

a {
  -webkit-touch-callout: none;
  touch-action: manipulation;
  transition: transform 120ms cubic-bezier(0.22, 1, 0.36, 1), background-color 120ms ease;
}

.logo-link, .button, .contact-button { -webkit-user-select: none; user-select: none; }
a:active { transform: scale(0.97); }
:focus-visible { outline: 2px solid #1f1f1f; outline-offset: 4px; }

@media (max-width: 559px) {
  .catalog-grid { grid-template-columns: 1fr; }
}

@media (hover: hover) and (pointer: fine) {
  .contact-button:hover { background-color: #373737; }
  .button:hover, .card-title-link:hover, .metadata a:hover { text-decoration: underline; }
}

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
  a:active { transform: none; }
}

@media (prefers-contrast: more) {
  .catalog-app, #contact, .button { outline: 1px solid #52514e; }
  body, .catalog-app, .summary, .metadata, .card-meta, .availability { color: #2f2f2f; }
}
