:root {
    --bg-color: #f0f9ff;
    --section: #e0f2fe;
    --section-deep: #bae6fd;
    --card-bg: #ffffff;
    --border-color: #7dd3fc;
    --text-main: #0c4a6e;
    --text-muted: #334155;
    --accent: #0369a1;
    --accent-hover: #075985;
    --success: #047857;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    color-scheme: light;
}

a {
    color: var(--accent);
}

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

.skip {
    position: absolute;
    left: 1rem;
    top: -3rem;
    background: var(--card-bg);
    color: var(--text-main);
    padding: 0.5rem 0.75rem;
    z-index: 20;
}

.skip:focus {
    top: 0.75rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

header.site {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

header.site .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.brand {
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
}

nav.primary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

nav.primary a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

nav.primary a:hover {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-color), var(--section));
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -0.025em;
}

.hero .subhead {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 44rem;
    margin: 0 auto 2rem auto;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.highlights-kicker {
    margin: 2.5rem 0 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero .highlights {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: left;
    margin-top: 0;
}

.hero .highlights .card {
    padding: 1.25rem;
}

.hero .highlights h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.hero .highlights p {
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 900px) {
    .hero .highlights {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .hero .highlights {
        grid-template-columns: 1fr;
    }
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    border: 0;
    font-size: 1rem;
}

.btn.primary {
    background-color: var(--accent);
    color: #fff;
}

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

.btn.secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn.secondary:hover {
    background-color: var(--border-color);
}

.meta {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Sandbox Section */
.sandbox-section {
    padding: 4rem 0;
    background-color: var(--section);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.sandbox-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.sandbox-section > .container > p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.sandbox-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

@media(max-width: 768px) {
    .sandbox-container {
        grid-template-columns: 1fr;
    }
}

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

.controls label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.controls select, .controls input {
    width: 100%;
    padding: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 6px;
    font-size: 1rem;
}

.output-panel {
    background: var(--section);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 250px;
}

.placeholder-text {
    color: var(--text-muted);
    text-align: center;
}

.match-card {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: 6px;
    padding: 1rem;
}

.match-card .badge {
    background: var(--success);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.match-card h4 {
    margin-bottom: 0.5rem;
}

.match-card p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.match-card small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.match-card.null {
    background: transparent;
    border-color: var(--border-color);
}

/* Niches Section */
.niches {
    padding: 5rem 0;
    background: var(--bg-color);
}

.niches h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media(max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.aeo {
    padding: 3rem 0 5rem;
    border-top: 1px solid var(--border-color);
    background: var(--section);
}

.aeo h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    max-width: 28ch;
}

.aeo p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    max-width: 44rem;
}

.aeo p strong {
    color: var(--text-main);
}

.aeo table {
    width: 100%;
    max-width: 44rem;
    border-collapse: collapse;
    margin: 1.25rem 0 0;
    font-size: 0.95rem;
}

.aeo th,
.aeo td {
    text-align: left;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border-color);
    vertical-align: top;
}

.aeo th {
    background: var(--card-bg);
}

.ai-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--section-deep);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-grid a:hover {
    color: var(--text-main);
}

.footer-grid p {
    margin-bottom: 0.5rem;
    max-width: 36rem;
}
