:root {
  color-scheme: light;
  --radius: 0.5rem;

  --bg: #ffffff;
  --panel: #ffffff;
  --text: #020817;
  --muted-color: #64748b;
  --line: #e2e8f0;
  --accent-color: #0f172a;
  --accent-fg: #f8fafc;
  --ghost-bg: #f1f5f9;
  --row-hover: #f1f5f9;
  --focus-ring: rgba(15, 23, 42, 0.2);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-hover: #f8fafc;
}

:root[data-theme="dark"],
:root.dark {
  color-scheme: dark;

  --bg: #020817;
  --panel: #0f172a;
  --text: #f8fafc;
  --muted-color: #94a3b8;
  --line: #1e293b;
  --accent-color: #f8fafc;
  --accent-fg: #0f172a;
  --ghost-bg: #1e293b;
  --row-hover: #1e293b;
  --focus-ring: rgba(226, 232, 240, 0.25);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --card-hover: #1e293b;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

.page {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem 2rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.header-brand {
  min-width: 0;
}

.header h1 {
  margin: 0;
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.header-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted-color);
  font-weight: 400;
}

.main {
  flex: 1;
}

.intro {
  margin: 0 0 1.25rem;
  color: var(--muted-color);
  font-size: 0.9375rem;
}

.app-grid {
  display: grid;
  gap: 0.875rem;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.app-card:hover {
  background: var(--card-hover);
  border-color: var(--muted-color);
  box-shadow: var(--shadow-md);
}

.app-card:active {
  transform: scale(0.99);
}

.app-card:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.app-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: var(--ghost-bg);
  color: var(--accent-color);
}

.app-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.app-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.app-title {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.app-title-is {
  font-size: 0.8125rem;
  color: var(--muted-color);
}

.app-desc {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-color);
}

.app-arrow {
  flex-shrink: 0;
  color: var(--muted-color);
  transition: color 0.15s ease, transform 0.15s ease;
}

.app-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}

.app-card:hover .app-arrow {
  color: var(--text);
  transform: translateX(2px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 44px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
}

.btn.ghost:hover {
  background: var(--row-hover);
}

.btn:active {
  transform: scale(0.98);
}

.footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted-color);
}

@media (min-width: 540px) {
  .app-grid {
    gap: 1rem;
  }

  .app-card {
    padding: 1.25rem 1.5rem;
  }
}
