:root {
    --bg: #0a0a0a;
    --card: #141414;
    --card-hover: #1a1a1a;
    --text: #e5e5e5;
    --text-strong: #fafafa;
    --muted: #737373;
    --muted-strong: #a3a3a3;
    --border: #262626;
    --border-hover: #404040;
    --focus: #a3a3a3;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #fafafa;
        --card: #ffffff;
        --card-hover: #f5f5f5;
        --text: #262626;
        --text-strong: #0a0a0a;
        --muted: #737373;
        --muted-strong: #525252;
        --border: #e5e5e5;
        --border-hover: #a3a3a3;
        --focus: #525252;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    padding: 5rem 1.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

header {
    margin-bottom: 3rem;
}

h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-strong);
    margin-bottom: 0.4rem;
}

.tagline {
    color: var(--muted);
    font-size: 0.95rem;
}

.apps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.app-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.25rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.app-card:hover,
.app-card:focus-within {
    background: var(--card-hover);
    border-color: var(--border-hover);
}

.app-link {
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    outline: none;
}

.app-link:focus-visible {
    box-shadow: 0 0 0 2px var(--focus);
}

.app-link h2 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-strong);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.app-link p {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
    outline: none;
    flex-shrink: 0;
}

.source-link:hover {
    color: var(--text-strong);
    background: var(--border);
}

.source-link:focus-visible {
    box-shadow: 0 0 0 2px var(--focus);
}

footer {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
}

footer a {
    color: var(--muted-strong);
    text-decoration: none;
    transition: color 0.15s ease;
    outline: none;
    border-radius: 3px;
}

footer a:hover {
    color: var(--text-strong);
}

footer a:focus-visible {
    box-shadow: 0 0 0 2px var(--focus);
}

@media (max-width: 480px) {
    main {
        padding: 3rem 1rem 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
