/* ── Section cards ───────────────────────────────────────────────────────── */

.dgen-section {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.dgen-section-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dgen-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.5rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(23, 33, 39, 0.15);
    background: #f7f4ef;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: #172127;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.dgen-tag--required {
    border-color: rgba(187, 77, 0, 0.3);
    background: rgba(187, 77, 0, 0.06);
    color: #7e2f00;
}

.dgen-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #172127;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dgen-required {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #bb4d00;
    background: rgba(187, 77, 0, 0.08);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
}

.dgen-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a73e8;
    background: rgba(26, 115, 232, 0.08);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
}

.dgen-badge--warn {
    color: #9b2b1b;
    background: rgba(155, 43, 27, 0.07);
}

.dgen-desc {
    font-size: 0.82rem;
    color: #5f6b72;
    line-height: 1.55;
}

.dgen-desc code {
    font-size: 0.78rem;
    background: rgba(23, 33, 39, 0.07);
    border-radius: 4px;
    padding: 0.1rem 0.3rem;
}

/* ── Option groups ───────────────────────────────────────────────────────── */

.dgen-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.dgen-options--inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.dgen-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid rgba(23, 33, 39, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.dgen-options--inline .dgen-option {
    flex: 1 1 auto;
}

.dgen-option:hover {
    border-color: rgba(23, 33, 39, 0.22);
    background: rgba(23, 33, 39, 0.02);
}

.dgen-option--selected {
    border-color: #bb4d00;
    background: rgba(187, 77, 0, 0.05);
}

.dgen-radio {
    margin-top: 0.2rem;
    accent-color: #bb4d00;
    flex-shrink: 0;
}

.dgen-option-inner {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.dgen-option-name {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: #172127;
}

.dgen-option-hint {
    font-size: 0.76rem;
    color: #5f6b72;
    line-height: 1.35;
}

/* ── Field rows ──────────────────────────────────────────────────────────── */

.dgen-field-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.dgen-static {
    background: #f7f4ef;
    color: #5f6b72;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.82rem;
    max-width: 10rem;
}

.dgen-pct-row {
    align-items: center;
    gap: 0.75rem;
}

.dgen-range {
    flex: 1;
    accent-color: #bb4d00;
}

.dgen-pct-display {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dgen-pct-number {
    width: 4.5rem;
    text-align: center;
    font-weight: 600;
}

.dgen-pct-label {
    font-size: 0.88rem;
    color: #5f6b72;
}

.dgen-pct-hint {
    font-size: 0.78rem;
    margin-top: 0.5rem;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
}

.dgen-pct-hint--ok   { color: #1f6b3a; background: rgba(31, 107, 58, 0.07); }
.dgen-pct-hint--warn { color: #cc7700; background: rgba(204, 119, 0, 0.07); }
.dgen-pct-hint--muted { color: #8a8f96; background: rgba(138, 143, 150, 0.07); }

/* ── Sticky output panel ─────────────────────────────────────────────────── */

.dgen-output-wrap {
    position: sticky;
    top: 1.5rem;
}

.dgen-output-card {
    padding: 1.5rem;
}

.dgen-output-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #8a8f96;
    margin-bottom: 0.2rem;
}

.dgen-output-meta {
    font-size: 0.8rem;
    color: #5f6b72;
    margin-bottom: 0.85rem;
}

.dgen-output-meta code {
    font-size: 0.76rem;
    background: rgba(23, 33, 39, 0.07);
    border-radius: 4px;
    padding: 0.1rem 0.3rem;
}

.dgen-record-value {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.78rem;
    color: #172127;
    background: #f7f4ef;
    border: 1px solid rgba(23, 33, 39, 0.08);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    word-break: break-all;
    line-height: 1.6;
    min-height: 3rem;
}

/* ── Plain-English explanation panel ─────────────────────────────────────── */

.dgen-output-tokens {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid rgba(23, 33, 39, 0.07);
    padding-top: 0.85rem;
}

.dgen-explain-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #8a8f96;
    margin-bottom: 0.2rem;
}

.dgen-explain-line {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #172127;
    line-height: 1.5;
}

.dgen-explain-icon {
    color: #bb4d00;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* ── Install steps ───────────────────────────────────────────────────────── */

.dgen-output-install {
    background: #f7f4ef;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(23, 33, 39, 0.06);
}

.dgen-install-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5f6b72;
    margin-bottom: 0.55rem;
}

.dgen-install-list {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 0.8rem;
    color: #172127;
    line-height: 1.7;
}

.dgen-install-list code {
    font-size: 0.74rem;
    background: rgba(23, 33, 39, 0.07);
    border-radius: 3px;
    padding: 0.08rem 0.3rem;
    word-break: break-all;
}

/* ── Landing teaser card ─────────────────────────────────────────────────── */

.dmarc-teaser-card {
    padding: 1.5rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    color: inherit;
}

.dmarc-teaser-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
}

.dmarc-teaser-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: #bb4d00;
    margin-bottom: 0.4rem;
}

.dmarc-teaser-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #172127;
    margin-bottom: 0.5rem;
}

.dmarc-teaser-desc {
    font-size: 0.83rem;
    color: #5f6b72;
    margin-bottom: 1.1rem;
    line-height: 1.5;
}

.dmarc-teaser-preview {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: #f7f4ef;
    border: 1px solid rgba(23, 33, 39, 0.07);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    margin-bottom: 1.1rem;
    pointer-events: none;
}

.dmarc-teaser-param {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
}

.dmarc-teaser-tag {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-weight: 700;
    font-size: 0.72rem;
    color: #7e2f00;
    background: rgba(187, 77, 0, 0.09);
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
    min-width: 2.5rem;
    text-align: center;
}

.dmarc-teaser-val {
    font-family: 'SFMono-Regular', Consolas, monospace;
    color: #172127;
    font-size: 0.78rem;
    min-width: 5rem;
}

.dmarc-teaser-hint {
    font-size: 0.73rem;
    color: #8a8f96;
    line-height: 1.3;
}

.dmarc-teaser-param--more {
    font-size: 0.73rem;
    color: #8a8f96;
    padding-top: 0.2rem;
}

.dmarc-teaser-cta {
    font-size: 0.88rem;
    font-weight: 600;
    color: #bb4d00;
    display: flex;
    align-items: center;
}


/* ── SPF service quick-add grid ──────────────────────────────────────────── */

.spf-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 0.5rem;
}

.spf-service-btn {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid rgba(23, 33, 39, 0.12);
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
    width: 100%;
}

.spf-service-btn:hover {
    border-color: rgba(23, 33, 39, 0.25);
    background: #fafaf8;
}

.spf-service-btn--active {
    border-color: #bb4d00;
    background: rgba(187, 77, 0, 0.05);
}

.spf-service-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #172127;
}

.spf-service-domain {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.69rem;
    color: #8a8f96;
}

/* ── SPF item list (custom includes + IPs) ───────────────────────────────── */

.spf-item-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.spf-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    background: #f7f4ef;
    border-radius: 6px;
}

.spf-item-value {
    flex: 1;
    font-size: 0.78rem;
    background: transparent;
    padding: 0;
    color: #172127;
}

.spf-item-remove {
    background: none;
    border: none;
    color: #8a8f96;
    padding: 0;
    cursor: pointer;
    line-height: 1;
    font-size: 1rem;
    flex-shrink: 0;
    transition: color 0.1s ease;
}

.spf-item-remove:hover { color: #9b2b1b; }

/* ── SPF lookup counter ──────────────────────────────────────────────────── */

.spf-lookup-wrap {
    border-top: 1px solid rgba(23, 33, 39, 0.07);
    padding-top: 0.85rem;
}

.spf-lookup-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.4rem;
}

.spf-lookup-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #8a8f96;
}

.spf-lookup-count {
    font-size: 0.82rem;
    font-weight: 700;
    color: #172127;
}

.spf-lookup-bar {
    height: 6px;
    background: rgba(23, 33, 39, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.spf-lookup-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.spf-lookup-fill--ok   { background: #1f6b3a; }
.spf-lookup-fill--warn { background: #cc7700; }
.spf-lookup-fill--over { background: #9b2b1b; }

.spf-lookup-hint {
    font-size: 0.76rem;
    margin-top: 0.4rem;
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
}

.spf-lookup-hint--ok   { color: #1f6b3a; background: rgba(31, 107, 58, 0.07); }
.spf-lookup-hint--warn { color: #cc7700; background: rgba(204, 119, 0, 0.07); }
.spf-lookup-hint--over { color: #9b2b1b; background: rgba(155, 43, 27, 0.07); }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 991.98px) {
    .dgen-output-wrap {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .dgen-options--inline {
        flex-direction: column;
    }
}
