.manual-cost-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 72px;
    background:
        radial-gradient(circle at 25% 10%, rgba(255,102,0,.14), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
    border-bottom: 1px solid var(--line);
}

.manual-cost-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 40px;
    align-items: center;
}

.manual-cost-hero h1 {
    max-width: 980px;
}

.manual-cost-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.manual-cost-hero-points span,
.manual-cost-small-label {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255,102,0,.32);
    background: rgba(255,102,0,.12);
    color: #ff9b52;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.manual-cost-hero-card,
.manual-cost-card,
.manual-cost-result-card,
.manual-cost-table-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025));
    border-radius: 26px;
    box-shadow: 0 24px 80px rgba(0,0,0,.22);
}

.manual-cost-hero-card {
    padding: 28px;
}

.manual-cost-card-kicker {
    color: var(--accent);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .78rem;
    margin-bottom: 16px;
}

.manual-cost-hero-card ul {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.manual-cost-hero-card li {
    position: relative;
    padding-left: 24px;
    color: #dfdfdf;
}

.manual-cost-hero-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .72em;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
}

.manual-cost-section {
    padding: 64px 0 84px;
    overflow-anchor: none;
}

.manual-cost-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

.manual-cost-main,
.manual-cost-form,
.manual-cost-breakdown {
    display: grid;
    gap: 18px;
}

.manual-cost-progress-wrap {
    border: 1px solid var(--line);
    background: rgba(255,255,255,.04);
    border-radius: 18px;
    padding: 16px;
}

.manual-cost-progress-top,
.manual-cost-breakdown-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    color: #d7d7d7;
    font-size: .92rem;
    font-weight: 800;
}

.manual-cost-progress-bar,
.manual-cost-breakdown-bar {
    height: 10px;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 12px;
}

.manual-cost-progress-bar div,
.manual-cost-breakdown-fill {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #ff9b52);
}

.manual-cost-card,
.manual-cost-table-card,
.manual-cost-result-card {
    padding: 28px;
}

.manual-cost-intro-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
}

.manual-cost-intro-card h2,
.manual-cost-table-head h2,
.manual-cost-result-card h2,
.manual-cost-next-step-card h2 {
    margin-top: 12px;
}

.manual-cost-intro-card p:not(.manual-cost-small-label),
.manual-cost-help-text,
.manual-cost-diagnostic-box p,
.manual-cost-next-step-card p,
.manual-cost-breakdown-meta {
    color: #cfcfcf;
}

.manual-cost-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.manual-cost-field {
    display: grid;
    gap: 8px;
    color: #f5f5f5;
    font-weight: 800;
}

.manual-cost-field input,
.manual-cost-field select,
.manual-cost-table input {
    width: 100%;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.18);
    color: #fff;
    border-radius: 12px;
    padding: 13px 14px;
    font: inherit;
    outline: none;
}

.manual-cost-field input:focus,
.manual-cost-field select:focus,
.manual-cost-table input:focus {
    border-color: rgba(255,102,0,.72);
    box-shadow: 0 0 0 3px rgba(255,102,0,.12);
}

.manual-cost-table-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.manual-cost-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    background: rgba(0,0,0,.13);
}

.manual-cost-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.manual-cost-table th,
.manual-cost-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.08);
    vertical-align: middle;
}

.manual-cost-table th {
    color: #ff9b52;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
    background: rgba(255,102,0,.06);
}

.manual-cost-table tbody tr:last-child td {
    border-bottom: 0;
}

.manual-cost-table tbody tr:hover {
    background: rgba(255,255,255,.025);
}

.manual-cost-task-name {
    min-width: 210px;
}

.manual-cost-row-total {
    color: #fff;
    font-weight: 900;
    white-space: nowrap;
}

.manual-cost-remove-row {
    width: 34px;
    height: 34px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
    color: #fff;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.manual-cost-remove-row:hover {
    border-color: rgba(255,102,0,.75);
    background: rgba(255,102,0,.12);
}

.manual-cost-help-text {
    margin: 16px 0 0;
    font-size: .93rem;
}

.manual-cost-button {
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    font: inherit;
    line-height: 1;
    white-space: nowrap;
}

.manual-cost-button-primary {
    background: var(--accent);
    color: #111;
}

.manual-cost-button-secondary {
    background: rgba(255,255,255,.06);
    color: #fff;
    border: 1px solid rgba(255,255,255,.14);
}

.manual-cost-button:hover {
    transform: translateY(-1px);
}

.manual-cost-side {
    display: grid;
    gap: 18px;
}

.manual-cost-sticky-card {
    position: sticky;
    top: 92px;
}

.manual-cost-main-number {
    margin: 18px 0 20px;
    display: grid;
    gap: 4px;
}

.manual-cost-main-number span {
    color: var(--accent);
    font-weight: 900;
    line-height: 1;
    font-size: clamp(3rem, 6vw, 4.9rem);
    letter-spacing: -.06em;
}

.manual-cost-main-number small {
    color: #bdbdbd;
    font-weight: 800;
    font-size: 1rem;
}

.manual-cost-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.manual-cost-result-grid div,
.manual-cost-diagnostic-box,
.manual-cost-breakdown-item,
.manual-cost-next-steps div {
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    background: rgba(0,0,0,.13);
    padding: 16px;
}

.manual-cost-result-grid strong,
.manual-cost-result-grid span {
    display: block;
}

.manual-cost-result-grid strong {
    color: #ff9b52;
    margin-bottom: 5px;
    font-size: 1.08rem;
}

.manual-cost-result-grid span {
    color: #cfcfcf;
    font-size: .86rem;
}

.manual-cost-diagnostic-box {
    background: rgba(255,102,0,.08);
    border-color: rgba(255,102,0,.22);
    margin-bottom: 18px;
}

.manual-cost-diagnostic-box strong {
    display: block;
    color: #ff9b52;
    margin-bottom: 8px;
}

.manual-cost-side-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.manual-cost-copy-message {
    min-height: 22px;
    margin: 12px 0 0;
    color: #8de3b9;
    font-size: .93rem;
    font-weight: 800;
}

.manual-cost-summary-section {
    padding: 0 0 90px;
}

.manual-cost-summary-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
}

.manual-cost-breakdown-item {
    display: grid;
    gap: 10px;
}

.manual-cost-breakdown-top span:first-child {
    color: #fff;
    font-weight: 900;
}

.manual-cost-breakdown-top span:last-child {
    color: #ff9b52;
    font-weight: 900;
}

.manual-cost-next-steps {
    display: grid;
    gap: 12px;
    margin: 22px 0;
}

.manual-cost-next-steps strong,
.manual-cost-next-steps span {
    display: block;
}

.manual-cost-next-steps strong {
    color: #ff9b52;
    margin-bottom: 5px;
}

.manual-cost-next-steps span {
    color: #cfcfcf;
}

@media (max-width: 980px) {
    .manual-cost-hero-inner,
    .manual-cost-layout,
    .manual-cost-summary-layout,
    .manual-cost-settings-grid {
        grid-template-columns: 1fr;
    }

    .manual-cost-sticky-card {
        position: static;
    }
}

@media (max-width: 680px) {
    .manual-cost-hero {
        padding: 70px 0 54px;
    }

    .manual-cost-card,
    .manual-cost-table-card,
    .manual-cost-result-card,
    .manual-cost-hero-card {
        border-radius: 20px;
        padding: 20px;
    }

    .manual-cost-intro-card,
    .manual-cost-table-head,
    .manual-cost-progress-top,
    .manual-cost-breakdown-top {
        display: grid;
        gap: 14px;
    }

    .manual-cost-result-grid {
        grid-template-columns: 1fr;
    }

    .manual-cost-side-actions,
    .manual-cost-button {
        width: 100%;
    }
}

/* Layout correction: keep the result card from colliding with the task table on medium screens. */
.manual-cost-main,
.manual-cost-side,
.manual-cost-table-card,
.manual-cost-table-wrap {
    min-width: 0;
}

.manual-cost-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 340px);
    gap: 30px;
}

.manual-cost-table-card {
    overflow: hidden;
}

.manual-cost-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.manual-cost-table {
    min-width: 760px;
    table-layout: fixed;
}

.manual-cost-table th,
.manual-cost-table td {
    padding: 12px 10px;
}

.manual-cost-table th:nth-child(1),
.manual-cost-table td:nth-child(1) { width: 220px; }
.manual-cost-table th:nth-child(2),
.manual-cost-table td:nth-child(2) { width: 72px; }
.manual-cost-table th:nth-child(3),
.manual-cost-table td:nth-child(3) { width: 115px; }
.manual-cost-table th:nth-child(4),
.manual-cost-table td:nth-child(4) { width: 105px; }
.manual-cost-table th:nth-child(5),
.manual-cost-table td:nth-child(5) { width: 100px; }
.manual-cost-table th:nth-child(6),
.manual-cost-table td:nth-child(6) { width: 105px; }
.manual-cost-table th:nth-child(7),
.manual-cost-table td:nth-child(7) { width: 48px; }

.manual-cost-table input {
    padding: 10px 10px;
}

.manual-cost-task-name {
    min-width: 0;
}

.manual-cost-result-card h2 {
    font-size: clamp(1.65rem, 2.6vw, 2.25rem);
    line-height: 1.05;
}

.manual-cost-main-number span {
    font-size: clamp(3rem, 5vw, 4.25rem);
}

@media (max-width: 1180px) {
    .manual-cost-layout {
        grid-template-columns: 1fr;
    }

    .manual-cost-sticky-card {
        position: static;
    }

    .manual-cost-side {
        max-width: none;
    }

    .manual-cost-result-card {
        display: grid;
        grid-template-columns: minmax(0, .85fr) minmax(280px, 1.15fr);
        gap: 22px;
        align-items: start;
    }

    .manual-cost-result-card > .eyebrow,
    .manual-cost-result-card > h2,
    .manual-cost-result-card > .manual-cost-main-number {
        grid-column: 1;
    }

    .manual-cost-result-grid,
    .manual-cost-diagnostic-box,
    .manual-cost-side-actions,
    .manual-cost-copy-message {
        grid-column: 2;
    }
}

@media (max-width: 760px) {
    .manual-cost-result-card {
        display: block;
    }

    .manual-cost-table {
        min-width: 720px;
    }
}

