:root {
    --accent: #123acc;
    --text: #1a1a1a;
    --muted: #5b5b5b;
    --border: #d9d4cc;
    --bg: #fff;
    --card: #faf8f5;
    --danger: #9e1b32;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
}
.skip-link:focus {
    left: 8px;
    background: #000;
    color: #fff;
    padding: 8px;
    z-index: 10;
}

.top {
    border-bottom: 1px solid var(--border);
    background: #fff;
}
.top-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.wordmark { font-weight: 700; }
.sep { color: #bbb; }
.title { font-weight: 700; }
nav { display: flex; align-items: center; gap: 16px; }
nav a { color: var(--accent); text-decoration: none; }
.community-link img { height: 36px; display: block; }

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 64px;
}

.intro h1 { margin: 0 0 8px; font-size: 1.8rem; }
.intro p { color: var(--muted); max-width: 46rem; line-height: 1.5; }

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.card {
    border: 1px solid var(--border);
    background: var(--card);
    padding: 20px;
    margin: 0;
    min-width: 0;
}
.card legend {
    font-weight: 700;
    padding: 0 6px;
}

label { display: block; margin: 12px 0 6px; font-weight: 600; font-size: 0.92rem; }
input, select, textarea, button {
    font: inherit;
    width: 100%;
}
input, select, textarea {
    border: 1px solid var(--border);
    background: #fff;
    padding: 8px 10px;
    border-radius: 4px;
}
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.help, .hint, .muted { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.help { margin: 0 0 12px; }

button {
    margin-top: 16px;
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 10px 14px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: wait; }

.alert { padding: 10px 12px; border-radius: 4px; margin: 12px 0; }
.alert-danger { background: #f8e6e8; color: var(--danger); }
.alert-info { background: #eef3ff; }

.typeahead {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    border: 1px solid var(--border);
    background: #fff;
    max-height: 220px;
    overflow: auto;
}
.typeahead li button {
    margin: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-weight: 400;
    border-radius: 0;
}
.typeahead li button:hover,
.typeahead li button:focus { background: #eef6f8; }

.chosen { font-weight: 600; margin: 8px 0; }
.profile {
    background: #fff;
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 0.9rem;
    line-height: 1.45;
}
.profile dt { font-weight: 600; display: inline; }
.profile dd { display: inline; margin: 0 12px 0 4px; }

.results { margin-top: 36px; }
.match {
    border: 1px solid var(--border);
    padding: 16px 18px;
    margin: 12px 0;
    background: #fff;
}
.match h3 { margin: 0 0 6px; }
.score { font-size: 0.85rem; color: var(--muted); }
.notes { color: var(--muted); }

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.auth-card {
    width: 100%;
    max-width: 400px;
}
.auth-card img { max-width: 220px; display: block; margin: 0 auto 12px; }
.auth-card h1 { text-align: center; }
.auth-card .muted { text-align: center; }

@media (max-width: 800px) {
    .grid, .row { grid-template-columns: 1fr; }
    .brand .sep, .brand .title { display: none; }
}
