﻿.dd-main {}

.dd-hero {

    padding-top: var(--space-5);
    padding-bottom: var(--space-5);
}

.dd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
    color: var(--color-primary);
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-caption);
    text-transform: uppercase;
    letter-spacing: 0;
}

.dd-hero h1 {
    max-width: 760px;
    margin-bottom: var(--space-2);
}

.dd-hero-desc {
    max-width: 640px;
    color: var(--color-neutral-dark);
    font-size: 18px;
    line-height: 28px;
}

.dd-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: var(--space-3);
    align-items: start;
}

.dd-form-card,
.dd-target-card,
.dd-progress-card,
.dd-summary-card,
.dd-insight,
.dd-recommendation,
.dd-milestones {
    box-shadow: var(--shadow-raised);
}

.dd-form-card {
    display: grid;
    gap: var(--space-3);
}

.dd-card-head {
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border-muted);
}

.dd-card-head h2 {
    margin-bottom: var(--space-05);
}

.dd-card-head p {
    color: var(--color-neutral-dark);
}

.dd-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: var(--radius-md);
    background: var(--color-primary-dark);
    color: var(--color-bg-primary);
    font-weight: var(--font-weight-bold);
}

.dd-field {
    display: grid;
    gap: var(--space-1);
}

.dd-field label,
.dd-field-label {
    color: var(--color-text-primary);
    font-size: var(--font-size-label);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-label);
}

.dd-field-label {
    display: block;
}

.dd-dropdown {
    position: relative;
}

.dd-dropdown-trigger {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 12px var(--space-2);
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-md);
    background: var(--color-input-bg);
    color: var(--color-input-text);
    font-family: var(--font-family-body);
    font-size: var(--font-size-body);
    line-height: var(--line-height-input);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-default), box-shadow var(--transition-default);
}

.dd-dropdown-trigger:hover {
    border-color: var(--color-neutral-medium);
}

.dd-dropdown-trigger:focus-visible,
.dd-dropdown.is-open .dd-dropdown-trigger {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus-ring);
}

.dd-dropdown-trigger i {
    flex: 0 0 auto;
    color: var(--color-primary);
    transition: transform var(--transition-default);
}

.dd-dropdown.is-open .dd-dropdown-trigger i {
    transform: rotate(180deg);
}

.dd-dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-1));
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    gap: var(--space-05);
    padding: var(--space-1);
    margin: 0;
    list-style: none;
    border: 1px solid var(--color-border-muted);
    border-radius: var(--radius-md);
    background: var(--color-white);
    box-shadow: var(--shadow-elevated);
}

.dd-dropdown-menu[hidden] {
    display: none;
}

.dd-dropdown-option {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: var(--color-text-primary);
    font-family: var(--font-family-body);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-body);
    text-align: left;
    cursor: pointer;
}

.dd-dropdown-option:hover,
.dd-dropdown-option:focus-visible {
    outline: none;
    border-color: var(--color-border-muted);
    background: var(--color-bg-lighter);
}

.dd-dropdown-option.is-selected {
    border-color: var(--color-primary);
    background: var(--color-bg-neutral);
    color: var(--color-primary-dark);
}

.dd-hint {
    color: var(--color-neutral-dark);
    font-size: var(--font-size-caption);
    line-height: 18px;
}

.dd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding-top: var(--space-1);
}

.dd-action-primary,
.dd-action-secondary {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
}

.dd-action-secondary {
    background: var(--color-white);
}

.dd-results {
    display: grid;
    gap: var(--space-3);
}

.dd-target-card {
    position: relative;
    overflow: hidden;
    border-color: var(--color-primary-dark);
    background: var(--color-primary-dark);
    color: var(--color-bg-primary);
}

.dd-target-card .dd-result-label,
.dd-target-card p {
    color: var(--color-bg-primary);
}

.dd-target-value {
    display: block;
    margin: var(--space-2) 0 var(--space-1);
    color: var(--color-bg-primary);
    font-family: var(--font-family-display);
    font-size: clamp(34px, 6vw, 58px);
    font-weight: var(--font-weight-bold);
    line-height: 1.05;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.dd-result-label {
    display: block;
    margin-bottom: var(--space-1);
    color: var(--color-neutral-dark);
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-caption);
    text-transform: uppercase;
    letter-spacing: 0;
}

.dd-result-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.dd-result-row strong {
    display: block;
    color: var(--color-text-primary);
    font-size: 28px;
    line-height: 34px;
}

.dd-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: var(--radius-lg);
    background: var(--color-bg-lighter);
    border: 1px solid var(--color-border-muted);
    color: var(--color-text-primary);
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-bold);
}

.dd-progress {
    width: 100%;
    height: 18px;
    padding: 3px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-muted);
    background: var(--color-bg-neutral);
}

.dd-progress span {
    display: block;
    width: 0%;
    min-width: 0;
    height: 100%;
    border-radius: var(--radius-xl);
    background: var(--color-primary);
    transition: width var(--transition-default);
}

.dd-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    margin-top: var(--space-2);
    color: var(--color-neutral-dark);
    font-size: var(--font-size-caption);
    line-height: 18px;
}

.dd-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.dd-summary-card {
    border-color: var(--color-border-muted);
}

.dd-summary-card strong {
    display: block;
    margin-bottom: var(--space-1);
    color: var(--color-text-primary);
    font-family: var(--font-family-display);
    font-size: 26px;
    font-weight: var(--font-weight-bold);
    line-height: 32px;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.dd-summary-card p {
    color: var(--color-neutral-dark);
}

.dd-summary-card--time {
    border-color: var(--color-primary);
}

.dd-insight {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: var(--space-2);
    align-items: center;
}

.dd-insight-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--color-bg-lighter);
    color: var(--color-text-primary);
}

.dd-insight p {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-semibold);
}

.dd-insight--success {
    border-color: var(--color-success);
    background: var(--color-success-bg);
}

.dd-insight--success .dd-insight-icon {
    background: var(--color-success);
    color: var(--color-white);
}

.dd-insight--warning {
    border-color: var(--color-warning-secondary);
    background: #fff7db;
}

.dd-insight--warning .dd-insight-icon {
    background: var(--color-warning-primary);
    color: var(--color-primary-dark);
}

.dd-insight--danger {
    border-color: var(--color-danger, #b42318);
    background: #fff0ed;
}

.dd-insight--danger .dd-insight-icon {
    background: var(--color-danger, #b42318);
    color: var(--color-white);
}

.dd-recommendation {
    border-color: var(--color-primary);
    background: var(--color-bg-primary);
}

.dd-recommendation p {
    margin: 0;
    color: var(--color-text-primary);
    font-weight: var(--font-weight-semibold);
}

.dd-milestones {
    display: grid;
    gap: var(--space-3);
}

.dd-milestones-head {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    flex-wrap: wrap;
    align-items: flex-start;
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border-muted);
}

.dd-milestones-head h2 {
    margin: 0;
    color: var(--color-text-primary);
    font-size: 22px;
    line-height: 28px;
}

.dd-milestone-list {
    display: grid;
    gap: var(--space-3);
}

.dd-milestone {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-2);
}

.dd-milestone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--color-bg-neutral);
    color: var(--color-primary);
}

.dd-milestone-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.dd-milestone-label {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-semibold);
    overflow-wrap: anywhere;
}

.dd-milestone-track {
    height: 6px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--color-bg-neutral);
    border: 1px solid var(--color-border-muted);
}

.dd-milestone-fill {
    height: 100%;
    background: var(--color-primary);
}

.dd-milestone-date {
    color: var(--color-neutral-dark);
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-bold);
    white-space: nowrap;
}

.dd-result-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.dd-copy-result {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    border: 1px solid var(--color-border-muted);
    background: var(--color-white);
}

.dd-copy-status {
    min-height: 20px;
    color: var(--color-neutral-dark);
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-semibold);
}

@media (max-width: 1023px) {
    .dd-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 639px) {
    .dd-main {}

    .dd-hero {
        padding-top: var(--space-4);
        padding-bottom: var(--space-4);
    }

    .dd-hero h1 {
        font-size: 38px;
        line-height: 42px;
    }

    .dd-hero-desc {
        font-size: var(--font-size-body);
        line-height: var(--line-height-body);
    }

    .dd-card-head,
    .dd-actions,
    .dd-progress-meta {
        flex-direction: column;
    }

    .dd-action-primary,
    .dd-action-secondary {
        width: 100%;
    }

    .dd-summary-grid {
        grid-template-columns: 1fr;
    }

    .dd-milestone {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .dd-milestone-date {
        grid-column: 2;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .dd-result-actions {
        align-items: stretch;
        justify-content: stretch;
        flex-direction: column;
    }

    .dd-copy-result {
        width: 100%;
    }
}