/* Public wizard and analysis layout. The file name follows the plugin structure. */

.mag-app,
.mag-article-wrap {
    --mag-ink: #1c1917;
    --mag-muted: #57534e;
    --mag-line: #e7e5e4;
    --mag-bg: #f6f4ef;
    --mag-card: #ffffff;
    --mag-accent: #0f766e;
    --mag-accent-dark: #115e59;
    --mag-cta: #c2410c;
    --mag-chip: #ecfdf5;
    max-width: 980px;
    margin: 28px auto 72px;
    padding: 0 20px;
    color: var(--mag-ink);
    font-family: "Segoe UI", system-ui, sans-serif;
    line-height: 1.5;
}

.mag-app *,
.mag-article-wrap * {
    box-sizing: border-box;
}

.mag-hero h1,
.mag-card h1,
.mag-card h2,
.mag-card h3,
.mag-modal h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 8px;
}

.mag-hero {
    margin-bottom: 22px;
}

.mag-hero h1,
.mag-article h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.mag-kicker {
    margin: 0 0 8px;
    color: var(--mag-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.mag-lead,
.mag-muted {
    color: var(--mag-muted);
}

.mag-lead {
    font-size: 1.05rem;
    margin: 0;
}

.mag-progress {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.mag-progress li {
    flex: 1;
    padding: 8px 10px;
    border-radius: 999px;
    background: #eceae4;
    color: var(--mag-muted);
    font-size: 0.85rem;
    text-align: center;
}

.mag-progress li.is-active,
.mag-progress li.is-done {
    background: var(--mag-accent);
    color: #fff;
}

.mag-card {
    background: var(--mag-card);
    border: 1px solid var(--mag-line);
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(28, 25, 23, 0.05);
    padding: 28px;
}

.mag-form,
.mag-summary form,
.mag-modal form {
    display: grid;
    gap: 14px;
}

.mag-field {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.mag-field input {
    width: 100%;
    border: 1px solid #d6d3d1;
    border-radius: 12px;
    padding: 14px 16px;
    font: inherit;
    font-weight: 500;
    color: var(--mag-ink);
    background: #fff;
}

.mag-field input:focus {
    outline: 2px solid var(--mag-accent);
    border-color: transparent;
}

.mag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.mag-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.mag-btn--primary {
    background: var(--mag-accent);
    color: #fff;
}

.mag-btn--primary:hover:not(:disabled) {
    background: var(--mag-accent-dark);
}

.mag-btn--cta {
    background: var(--mag-cta);
    color: #fff;
    padding: 16px 22px;
    font-size: 1.02rem;
}

.mag-btn--ghost {
    background: #f5f5f4;
    color: var(--mag-ink);
}

.mag-alert {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef2f2;
    color: #991b1b;
}

.mag-summary__head {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.mag-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #042f2e;
    color: #fff;
    font-weight: 700;
}

.mag-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 22px;
}

.mag-facts div {
    background: var(--mag-bg);
    border-radius: 16px;
    padding: 14px;
}

.mag-facts dt {
    color: var(--mag-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mag-facts dd {
    margin: 4px 0 0;
    font-weight: 700;
}

.mag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.mag-chips li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--mag-chip);
    color: var(--mag-accent-dark);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 700;
}

.mag-chips span {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #fff;
    font-size: 0.75rem;
}

.mag-features {
    margin: 0 0 18px;
    padding-left: 18px;
}

.mag-features li + li {
    margin-top: 6px;
}

.mag-competitor-list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    gap: 8px;
}

.mag-check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid var(--mag-line);
    border-radius: 16px;
    padding: 12px 14px;
    cursor: pointer;
}

.mag-check input {
    margin-top: 4px;
}

.mag-check span {
    display: grid;
}

.mag-check em,
.mag-check small {
    color: var(--mag-muted);
    font-style: normal;
}

.mag-ad-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mag-ad-card,
.mag-cta {
    border: 1px solid var(--mag-line);
    border-radius: 18px;
    padding: 16px;
    background: #fffdfb;
}

.mag-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.mag-metric {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    background: #042f2e;
    color: #fff;
    border-radius: 16px;
    padding: 16px 18px;
}

.mag-metric strong {
    font-size: 1.3rem;
}

.mag-spend-list {
    list-style: none;
    margin: 12px 0 22px;
    padding: 0;
}

.mag-spend-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--mag-line);
}

.mag-preview iframe {
    width: 100%;
    height: 280px;
    border: 1px solid var(--mag-line);
    border-radius: 12px;
    margin-top: 10px;
    background: #f5f5f4;
}

.mag-cta {
    margin-top: 22px;
    background: #fff7ed;
}

.mag-modal[hidden] {
    display: none;
}

.mag-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.mag-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 25, 23, 0.55);
}

.mag-modal__dialog {
    position: relative;
    width: min(460px, 100%);
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.mag-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 1.6rem;
    cursor: pointer;
}

.mag-form-note {
    min-height: 1.2em;
    margin: 0;
    color: #991b1b;
}

.mag-success {
    margin: 0;
    color: var(--mag-accent-dark);
    font-weight: 700;
}

.mag-hp {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

body.mag-lock {
    overflow: hidden;
}

@media (max-width: 800px) {
    .mag-facts,
    .mag-ad-grid {
        grid-template-columns: 1fr;
    }

    .mag-progress {
        flex-direction: column;
    }

    .mag-btn,
    .mag-actions .mag-btn {
        width: 100%;
    }
}

@media print {
    .mag-modal,
    .mag-btn--cta,
    .mag-preview,
    .mag-progress {
        display: none !important;
    }
}
