/* ---------- Variables ---------- */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text: #1f2937;
    --muted: #6b7280;
    --bg: #f9fafb;
    --surface: #ffffff;
    --border: #e5e7eb;
    --radius: 8px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
h1, h2 { line-height: 1.2; margin-bottom: 0.5em; }
p { margin-bottom: 1em; }
code { background: var(--border); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

main.container {
    flex: 1;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo { font-weight: 700; font-size: 1.25rem; color: var(--text); }

nav a {
    margin-left: 20px;
    color: var(--muted);
    font-weight: 500;
}

nav a:hover,
nav a.active { color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 60px 0;
}

.hero h1 { font-size: 2.5rem; }
.hero p { color: var(--muted); font-size: 1.125rem; }

/* ---------- Cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

/* ---------- Screen gallery ---------- */
.page-heading {
    font-size: 1.75rem;
    margin: 48px 0 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.screen-section { margin-top: 28px; }

.screen-section h3 {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 12px;
}

.screen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.screen-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 120px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.screen-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
}

.screen-num {
    align-self: flex-start;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    background: #1E3F7A;
    color: #fff;
}

.screen-label { flex: 1; font-weight: 600; line-height: 1.35; }

.screen-meta { font-size: 0.8rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover { background: var(--primary-dark); }

/* ---------- Forms ---------- */
.form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 500px;
}

.form input,
.form textarea {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    margin-bottom: 8px;
}

.form input:focus,
.form textarea:focus {
    outline: 2px solid var(--primary);
    border-color: transparent;
}

.form .btn { align-self: flex-start; }

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert ul { margin-left: 20px; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #991b1b; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    color: var(--muted);
}

.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .hero h1 { font-size: 1.875rem; }
    nav a { margin-left: 12px; }
}
