/**
 * lmg-match — on-site styling.
 *
 * Tokens follow the LMG design manual §10.1. The accent is set per site (and
 * overridden inline from config), so the same stylesheet serves every site in
 * the portfolio without a fork.
 */

.lmg-match {
    --lmg-accent: #B8956A;
    --lmg-text: #252528;
    --lmg-muted: #555560;
    --lmg-rule: #D8D8D2;
    --lmg-base: #FAFAF7;
    --lmg-paper-dark: #F4F4F0;
    --lmg-font-body: "EB Garamond", Georgia, serif;
    --lmg-font-heading: "Playfair Display", Georgia, serif;
    --lmg-font-ui: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

    max-width: 720px;
    margin: 2.5rem auto;
    padding: 2rem;
    background: var(--lmg-base);
    border: 1px solid var(--lmg-rule);
    color: var(--lmg-text);
    font-family: var(--lmg-font-body);
}

.lmg-match *,
.lmg-match *::before,
.lmg-match *::after { box-sizing: border-box; }

/* --- type ---------------------------------------------------------------- */

.lmg-match__eyebrow {
    font-family: var(--lmg-font-ui);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--lmg-accent);
    margin: 0 0 0.75rem;
}

.lmg-match__title {
    font-family: var(--lmg-font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    outline: none;                 /* focus is moved here programmatically, not clicked */
}

.lmg-match__body {
    font-size: 17px;
    line-height: 1.65;
    margin: 0 0 1.5rem;
}

.lmg-match__help,
.lmg-match__meta {
    font-family: var(--lmg-font-ui);
    font-size: 12px;
    color: var(--lmg-muted);
    margin: 0 0 1rem;
}

.lmg-match__meta { margin: 1rem 0 0; }

.lmg-match__note {
    font-size: 15px;
    font-style: italic;
    color: var(--lmg-muted);
    margin: 0 0 1.5rem;
}

/* --- progress ------------------------------------------------------------ */

.lmg-match__progress {
    height: 2px;
    background: var(--lmg-rule);
    margin: 0 0 1.75rem;
}

.lmg-match__progress span {
    display: block;
    height: 100%;
    background: var(--lmg-accent);
    transition: width 0.25s ease;
}

/* --- options ------------------------------------------------------------- */

.lmg-match__options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 0 0 1.5rem;
}

.lmg-match__option {
    font-family: var(--lmg-font-ui);
    font-size: 14px;
    line-height: 1.3;
    text-align: left;
    padding: 0.9rem 1rem;
    min-height: 48px;              /* comfortable touch target */
    background: #fff;
    border: 1px solid var(--lmg-rule);
    border-radius: 2px;
    color: var(--lmg-text);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.lmg-match__option:hover { border-color: var(--lmg-accent); }

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

.lmg-match__option.is-selected {
    border-color: var(--lmg-accent);
    background: var(--lmg-paper-dark);
    box-shadow: inset 3px 0 0 var(--lmg-accent);
    font-weight: 600;
}

/* --- actions ------------------------------------------------------------- */

.lmg-match__actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.lmg-match__btn {
    display: inline-block;
    background: var(--lmg-accent);
    color: #fff;
    padding: 0.75rem 2rem;
    font-family: var(--lmg-font-ui);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 0;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.lmg-match__btn:hover { background: #a58259; }

.lmg-match__btn[disabled] { opacity: 0.35; cursor: not-allowed; }

.lmg-match__btn:focus-visible,
.lmg-match__link:focus-visible {
    outline: 2px solid var(--lmg-accent);
    outline-offset: 2px;
}

.lmg-match__link {
    background: none;
    border: 0;
    padding: 0;
    font-family: var(--lmg-font-ui);
    font-size: 13px;
    color: var(--lmg-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.lmg-match__link:hover { color: var(--lmg-text); }

/* --- results ------------------------------------------------------------- */

.lmg-match__cards {
    display: grid;
    gap: 1px;
    background: var(--lmg-rule);
    border: 1px solid var(--lmg-rule);
    margin: 0 0 2rem;
}

.lmg-match__card {
    display: block;
    padding: 1.25rem;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.lmg-match__card:hover { background: var(--lmg-paper-dark); }

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

.lmg-match__why {
    font-family: var(--lmg-font-ui);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lmg-accent);
    margin: 0 0 0.4rem;
}

.lmg-match__cardTitle {
    font-family: var(--lmg-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.4rem;
}

.lmg-match__excerpt {
    font-size: 15px;
    line-height: 1.55;
    color: var(--lmg-muted);
    margin: 0;
}

/* --- signup -------------------------------------------------------------- */

.lmg-match__signup {
    border-top: 1px solid var(--lmg-rule);
    padding: 1.75rem 0 0.5rem;
    margin: 0 0 1.5rem;
}

.lmg-match__field {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0 0.75rem;
}

.lmg-match__input {
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--lmg-font-ui);
    font-size: 15px;
    padding: 0.75rem;
    border: 1px solid var(--lmg-rule);
    border-radius: 2px;
    background: #fff;
    color: var(--lmg-text);
}

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

/* --- mobile -------------------------------------------------------------- */

@media (max-width: 767px) {
    .lmg-match { margin: 1.5rem 0; padding: 1.25rem; }
    .lmg-match__title { font-size: 1.35rem; }
    .lmg-match__body { font-size: 16px; }
    .lmg-match__options { grid-template-columns: 1fr; }
    .lmg-match__field { flex-direction: column; }
    .lmg-match__btn { width: 100%; text-align: center; }
    .lmg-match__actions { gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .lmg-match__progress span,
    .lmg-match__option,
    .lmg-match__card,
    .lmg-match__btn { transition: none; }
}
