:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --ink: #141416;
  --muted: #5B5B63;
  --line: #E2E2E6;
  --mark-bg: #141416;
  --mark-fg: #FFFFFF;
  --row-hover: #FFFFFF;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C0C0E;
  --surface: #131316;
  --ink: #F4F4F6;
  --muted: #9696A0;
  --line: #242429;
  --mark-bg: #F4F4F6;
  --mark-fg: #0C0C0E;
  --row-hover: #141418;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 180ms ease, color 180ms ease;
}

.page {
  width: 100%;
  max-width: 720px;
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(28px + env(safe-area-inset-top))
    calc(24px + env(safe-area-inset-right))
    calc(32px + env(safe-area-inset-bottom))
    calc(24px + env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 56px;
}

.brand-domain {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.theme-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.theme-toggle:focus-visible,
.app-row:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.icon-sun,
.icon-moon {
  width: 18px;
  height: 18px;
  display: block;
}

[data-theme="light"] .icon-sun,
:root:not([data-theme="dark"]) .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

.main-content {
  flex: 1;
}

.intro {
  margin-bottom: 36px;
}

.intro-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.028em;
}

.intro-subtitle {
  margin: 0;
  max-width: 54ch;
  font-size: 16px;
  color: var(--muted);
}

.apps-directory {
  border-top: 1px solid var(--line);
}

.app-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 22px 14px;
  margin: 0 -14px;
  border-bottom: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: background-color 160ms ease;
  opacity: 0;
  transform: translateY(8px);
  animation: row-enter 380ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.app-row:nth-child(1) {
  animation-delay: 40ms;
}

.app-row:nth-child(2) {
  animation-delay: 110ms;
}

.app-row:nth-child(3) {
  animation-delay: 180ms;
}

.app-row:hover,
.app-row:focus-visible {
  background-color: var(--row-hover);
}

.app-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background-color: var(--mark-bg);
  color: var(--mark-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 180ms ease, color 180ms ease;
}

.app-mark svg {
  width: 34px;
  height: 34px;
  display: block;
}

.verso-glyph {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  font-size: 182px;
  fill: currentColor;
  text-anchor: middle;
}

.app-body {
  min-width: 0;
}

.app-name {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.app-description {
  margin: 0;
  max-width: 58ch;
  font-size: 14px;
  line-height: 1.48;
  color: var(--muted);
}

.app-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  transition: color 160ms ease;
}

.app-row:hover .app-meta,
.app-row:focus-visible .app-meta {
  color: var(--ink);
}

.app-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.app-row:hover .app-arrow,
.app-row:focus-visible .app-arrow {
  transform: translate(2px, -2px);
}

.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

@keyframes row-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .site-header {
    padding-bottom: 40px;
  }

  .app-row {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    gap: 10px 16px;
    padding: 18px 10px;
    margin: 0 -10px;
  }

  .app-mark {
    grid-row: 1 / span 2;
  }

  .app-meta {
    grid-column: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .theme-toggle,
  .app-row,
  .app-mark,
  .app-meta,
  .app-arrow {
    transition: none;
  }

  .app-row {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .app-row:hover .app-arrow,
  .app-row:focus-visible .app-arrow {
    transform: none;
  }
}

