/* Shared colors and spacing keep every screen part of the same app. */
:root {
    --paper: #f7f6f0;
    --ink: #233e34;
    --muted: #5e6c64;
    --green: #285b46;
    --line: #d9dfd5;
    --mint: #eaf0e4;
    --error: #8b302c;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 1200px; margin: auto; padding: 0 40px; }
button, textarea, select { font: inherit; }
button { min-height: 46px; padding: 12px 22px; border: 1px solid var(--green); border-radius: 10px; background: var(--green); color: white; cursor: pointer; font-weight: 600; transition: background .15s, transform .15s; }
button:hover:not(:disabled) { background: #1d4535; transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #b06a28; outline-offset: 5px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -.045em; line-height: 1.1; }
h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 18px; }
h3 { font-size: 1.3rem; letter-spacing: -.02em; }
p { color: var(--muted); }
.app-header { min-height: 100px; display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { text-decoration: none; color: var(--ink); font-size: 1.55rem; font-weight: 750; letter-spacing: -.06em; display: flex; align-items: center; gap: 10px; }
.brand-mark { background: var(--green); color: white; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; }
.header-note { font-size: .85rem; color: var(--muted); margin-left: auto; }
.demo-badge { font-size: .75rem; border: 1px solid var(--line); padding: 5px 12px; border-radius: 30px; white-space: nowrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; font-weight: 750; color: var(--green); margin-bottom: 22px; }
#welcome { padding-top: 72px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: center; }
#welcome h1 { font-size: clamp(1.65rem, 2.8vw, 2.35rem); line-height: 1.25; font-weight: 650; margin-bottom: 25px; }
.welcome-copy > p:not(.eyebrow) { max-width: 420px; }
#try-demo { margin: 10px 0 18px; padding: 14px 26px; }
#try-demo span { margin-left: 28px; }
#welcome .welcome-message { max-width: none; color: var(--ink); font-size: clamp(3.1rem, 6.5vw, 5.3rem); line-height: 1.1; letter-spacing: -.045em; font-weight: 650; margin-bottom: 25px; }
.welcome-message em { font-family: Georgia, serif; font-weight: 400; color: var(--green); }
.welcome-note { font-size: .8rem; }
/* A lightweight CSS illustration avoids external image downloads. */
.building-scene { background: #e2e9d9; border-radius: 120px 120px 22px 22px; min-height: 440px; padding: 42px 35px 24px; overflow: hidden; }
.scene-caption { text-align: center; font-size: .6rem; letter-spacing: .17em; margin: 5px 0 35px; }
.building { background: #d3ac82; border: 10px solid #e5c7a3; border-bottom: 0; border-radius: 8px 8px 0 0; max-width: 250px; margin: auto; padding: 25px 20px 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px 25px; box-shadow: 15px 10px 0 #c3cfb8; }
/* Yellow glass, transoms, and projecting sills make these read as lit windows. */
.building span { position: relative; display: grid; place-items: center; height: 64px; padding-top: 12px; border-radius: 3px 3px 0 0; background: linear-gradient(135deg, #ffffe2, #e7e7a3); color: #634825; border: 5px solid #f5e5c9; box-shadow: 0 4px 0 2px #f5e5c9, 0 0 14px #ffe8a766; font: 1.4rem Georgia, serif; }
.window-person { position: absolute; bottom: 0; width: 44px; height: 42px; }
.building span::before { content: ""; position: absolute; top: 12px; left: 0; right: 0; height: 3px; background: #f5e5c9; }
.scene-label { border-top: 2px solid #6d805e; margin-top: 4px; padding-top: 18px; font-weight: 650; }
.scene-label em { font-family: Georgia, serif; font-weight: 400; color: var(--green); }
.welcome-steps { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); gap: 40px; padding-top: 30px; }
.welcome-steps p { font-size: .85rem; }
.welcome-steps strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 6px; }
.building-banner { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 24px 0 16px; font-size: .8rem; }
.building-banner strong { color: var(--ink); font-size: 1rem; }
nav { display: flex; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 26px; }
nav button { background: transparent; border-color: transparent; color: var(--muted); font-size: .85rem; }
nav button[aria-current="page"] { background: var(--green); color: white; }
nav button:hover:not(:disabled) { background: var(--mint); color: var(--ink); }
#demo-app section { padding: 15px 0 30px; }
#demo-app section > p:not(.eyebrow) { max-width: 650px; font-size: .9rem; }
#profile-view { max-width: 740px; margin: auto; }
#use-example { background: transparent; color: var(--green); border-color: var(--line); font-size: .85rem; margin: 5px 0 24px; }
#use-example:hover { background: var(--mint); }
form { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: 0 8px 30px #233e3405; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 9px; }
textarea, select { display: block; width: 100%; background: #fafbf7; color: var(--ink); border: 1px solid #b8c4b5; padding: 13px; border-radius: 9px; margin-bottom: 24px; }
textarea { min-height: 145px; resize: vertical; }
textarea::placeholder { color: #6a766d; }
#results, #community-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 30px; }
.neighbor-card { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 28px; overflow-wrap: anywhere; }
.avatar { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 17px; background: #e7eddc; color: #344c32; font: 1.4rem Georgia, serif; margin-bottom: 18px; }
.avatar-2, .avatar-5 { background: #f2e2d4; color: #81462f; }
.avatar-3, .avatar-6 { background: #e6e4f0; color: #575070; }
.neighbor-card h3 { margin-bottom: 10px; }
.neighbor-card p { font-size: .9rem; }
.preferences { border-top: 1px solid var(--line); padding-top: 16px; font-size: .75rem !important; }
.match-reason { color: var(--green); background: var(--mint); border-radius: 8px; padding: 10px 12px; font-size: .8rem !important; }
.match-contact { margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.match-contact summary { cursor: pointer; color: var(--green); font-weight: 600; font-size: .9rem; min-height: 24px; }
.match-contact .contact-email { color: var(--ink); margin: 12px 0 6px; user-select: all; }
.match-contact .contact-note { font-size: .75rem; margin-bottom: 0; }
.neighbor-card button { font-size: .8rem; width: 100%; margin-top: 6px; }
.activity-result:not(:empty) { margin: 16px 0 0; padding: 15px; border-radius: 10px; background: #f1f5ec; }
.activity-result[data-state="loading"] { border-left: 3px solid #8a9f66; }
.activity-result[data-state="error"], #profile-error:not(:empty) { background: #fff0eb; color: var(--error); padding: 14px; border-radius: 9px; }
#app-status:not(:empty) { background: var(--mint); padding: 12px 16px; border-radius: 10px; font-size: .85rem; }
.empty-state { grid-column: 1 / -1; padding: 45px; border: 1px dashed #aaba9e; background: var(--mint); border-radius: 20px; text-align: center; }
.empty-state p { max-width: 480px; margin: 0 auto 22px; }
footer { border-top: 1px solid var(--line); padding: 25px 0; margin-top: 48px; display: flex; justify-content: space-between; gap: 15px; font-size: .75rem; color: var(--muted); }
/* Narrow screens stack content without shrinking text or touch targets. */
@media (max-width: 700px) {
    main { padding: 0 20px; }
    .app-header { min-height: 80px; gap: 12px; justify-content: space-between; }
    .header-note { display: none; }
    #welcome { grid-template-columns: 1fr; padding-top: 40px; gap: 30px; }
    .building-scene { min-height: 380px; border-radius: 70px 70px 20px 20px; }
    .welcome-steps { grid-template-columns: 1fr; gap: 10px; }
    .welcome-steps p { margin-bottom: 15px; }
    .building-banner { flex-direction: column; align-items: flex-start; gap: 2px; }
    nav { gap: 4px; }
    nav button { flex: 1; padding: 10px 6px; font-size: .75rem; }
    #results, #community-list { grid-template-columns: 1fr; }
    form, .neighbor-card { padding: 22px; }
    form button { width: 100%; }
    .empty-state { padding: 28px 20px; }
    footer { flex-direction: column; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
    button { transition: none; }
    button:hover:not(:disabled) { transform: none; }
}
