.s4d-market {
    --s4d-ink: #183028;
    --s4d-primary: #176b4d;
    --s4d-primary-dark: #0f4935;
    --s4d-soft: #edf6f1;
    --s4d-border: #dbe7e0;
    --s4d-muted: #66776f;
    color: var(--s4d-ink);
    font-family: inherit;
    margin: 36px auto;
    max-width: 1180px;
    padding: 0 20px;
}

#khalssa-app-content[aria-busy="true"] {
    opacity: 0.82;
    transition: opacity 140ms ease;
}

.khalssa-navigation-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 999999;
    height: 3px;
    pointer-events: none;
    opacity: 0;
    overflow: hidden;
    background: color-mix(in srgb, #0f6b55 18%, transparent);
    transition: opacity 120ms ease;
}

.khalssa-navigation-progress::after {
    content: "";
    display: block;
    width: 42%;
    height: 100%;
    background: #0f6b55;
    transform: translateX(240%);
}

.khalssa-navigation-progress.is-active {
    opacity: 1;
}

.khalssa-navigation-progress.is-active::after {
    animation: khalssa-progress 900ms ease-in-out infinite;
}

.khalssa-sr-only {
    position: fixed !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@keyframes khalssa-progress {
    from { transform: translateX(240%); }
    to { transform: translateX(-340%); }
}

@media (prefers-reduced-motion: reduce) {
    #khalssa-app-content,
    .khalssa-navigation-progress,
    .khalssa-navigation-progress::after {
        transition: none !important;
        animation: none !important;
    }
}

.s4d-account__hero {
    align-items: center;
    background: linear-gradient(135deg, #0d3529, #174d39 70%, #1d654a);
    border-radius: 24px;
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(30px, 5vw, 54px);
    position: relative;
}

.s4d-account__hero::after {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    content: '';
    height: 220px;
    inset: auto auto -125px -55px;
    position: absolute;
    width: 220px;
}

.s4d-account__hero > * {
    position: relative;
    z-index: 1;
}

.s4d-account__hero div > span {
    color: #a9e6c8;
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 7px;
}

.s4d-account__hero h1 {
    color: #fff;
    font-size: clamp(32px, 5vw, 48px);
    margin: 0 0 12px;
}

.s4d-account__hero p {
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.8;
    margin: 0;
    max-width: 700px;
}

.s4d-account__hero > strong {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 10px 18px;
}

.s4d-account__nav {
    background: #fff;
    border: 1px solid var(--s4d-border);
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
    padding: 10px;
}

.s4d-account__nav a {
    border-radius: 10px;
    color: var(--s4d-primary-dark);
    font-weight: 700;
    padding: 10px 16px;
    text-decoration: none;
}

.s4d-account__nav a:hover {
    background: var(--s4d-soft);
}

.s4d-account__notice {
    background: #e8f7ef;
    border: 1px solid #bce0cb;
    border-radius: 14px;
    color: #175b40;
    margin: 18px 0;
    padding: 15px 18px;
}

.s4d-account__notice--error {
    background: #fff0f0;
    border-color: #efc7c7;
    color: #8d3030;
}

.s4d-account__panel,
.s4d-account__opportunities {
    background: #fff;
    border: 1px solid var(--s4d-border);
    border-radius: 22px;
    box-shadow: 0 16px 44px rgba(21, 56, 43, 0.06);
    margin: 22px 0;
    padding: clamp(22px, 4vw, 34px);
}

.s4d-account__opportunities {
    background: #f9fcfa;
}

.s4d-account__opportunities .s4d-section-heading > a {
    color: var(--s4d-primary);
    font-weight: 700;
}

.s4d-account__help {
    color: var(--s4d-muted);
    line-height: 1.8;
    margin: -8px 0 20px;
}

.s4d-interest-domains {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.s4d-interest-domain {
    border: 1px solid var(--s4d-border);
    border-radius: 16px;
    overflow: hidden;
}

.s4d-interest-domain__all {
    align-items: center;
    background: var(--s4d-soft);
    cursor: pointer;
    display: flex;
    gap: 11px;
    padding: 16px;
}

.s4d-interest-domain__all span {
    display: grid;
    gap: 3px;
}

.s4d-interest-domain__all strong {
    color: var(--s4d-primary-dark);
}

.s4d-interest-domain__all small {
    color: var(--s4d-muted);
}

.s4d-interest-specialties {
    display: grid;
    gap: 2px;
    padding: 10px;
}

.s4d-interest-specialties label {
    align-items: center;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    gap: 9px;
    margin-inline-start: calc(var(--s4d-depth) * 18px);
    padding: 9px 10px;
}

.s4d-interest-specialties label:hover {
    background: #f6faf8;
}

.s4d-interest-specialties label[style*='--s4d-depth: 0'] span {
    font-weight: 700;
}

.s4d-interest-domain input,
.s4d-interest-cities input {
    accent-color: var(--s4d-primary);
    height: 18px;
    width: 18px;
}

.s4d-interest-locations {
    border-top: 1px solid var(--s4d-border);
    margin-top: 26px;
    padding-top: 26px;
}

.s4d-interest-cities {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
}

.s4d-interest-cities fieldset {
    border: 1px solid var(--s4d-border);
    border-radius: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0;
    padding: 15px;
}

.s4d-interest-cities legend {
    color: var(--s4d-primary-dark);
    font-weight: 700;
    padding: 0 7px;
}

.s4d-interest-cities label {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 7px;
}

@media (max-width: 760px) {
    .s4d-account__hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .s4d-interest-domains,
    .s4d-interest-cities {
        grid-template-columns: 1fr;
    }
}

.s4d-notification-center {
    margin: 24px 0;
    padding: 24px;
    border: 1px solid #dce8e2;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(18, 56, 43, 0.07);
}

.s4d-notification-center .s4d-section-heading {
    margin-bottom: 16px;
}

.s4d-notification-center__all,
.s4d-notification__actions button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #176b4d;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.s4d-notifications {
    display: grid;
    gap: 10px;
}

.s4d-notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    border: 1px solid #e5ece8;
    border-radius: 16px;
    background: #fbfdfc;
}

.s4d-notification.is-unread {
    border-color: #a7d7c3;
    background: #eef8f3;
    box-shadow: inset -4px 0 0 #1f8a61;
}

.s4d-notification h3 {
    margin: 0 0 5px;
    color: #173f32;
    font-size: 1rem;
}

.s4d-notification p {
    margin: 0 0 6px;
    color: #50635c;
}

.s4d-notification time {
    color: #7b8d86;
    font-size: 0.82rem;
}

.s4d-notification__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.s4d-notification__actions a {
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    background: #176b4d;
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 680px) {
    .s4d-notification {
        align-items: flex-start;
        flex-direction: column;
    }
}

.s4d-market *,
.s4d-market *::before,
.s4d-market *::after {
    box-sizing: border-box;
}

.s4d-market__hero,
.s4d-project-detail__hero {
    background: linear-gradient(135deg, #0d3529, #174d39 70%, #1d654a);
    border-radius: 24px;
    color: #fff;
    overflow: hidden;
    padding: clamp(30px, 6vw, 64px);
    position: relative;
}

.s4d-market__hero::after,
.s4d-project-detail__hero::after {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    content: '';
    height: 230px;
    inset: auto auto -120px -50px;
    position: absolute;
    width: 230px;
}

.s4d-market__eyebrow {
    color: #a9e6c8;
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.s4d-market__hero h1,
.s4d-project-detail__hero h1 {
    color: #fff;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.15;
    margin: 0 0 14px;
}

.s4d-market__hero p,
.s4d-project-detail__hero p {
    color: rgba(255, 255, 255, 0.76);
    font-size: 18px;
    line-height: 1.8;
    margin: 0 0 18px;
    max-width: 760px;
}

.s4d-market__hero strong {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    display: inline-flex;
    padding: 8px 14px;
}

.s4d-filters {
    background: #fff;
    border: 1px solid var(--s4d-border);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(21, 56, 43, 0.07);
    margin: 24px 0;
    padding: 24px;
}

.s4d-filters__heading {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.s4d-filters__heading h2,
.s4d-filters__heading p {
    margin: 0;
}

.s4d-filters__heading p {
    color: var(--s4d-muted);
    font-size: 14px;
    margin-top: 5px;
}

.s4d-filters__heading a {
    color: var(--s4d-primary);
    font-weight: 700;
}

.s4d-filters__grid {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.s4d-filter-wide {
    grid-column: span 2;
}

.s4d-dependent-field {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 150ms ease, transform 150ms ease;
}

.s4d-dependent-field.is-loading,
.s4d-dependent-field.is-hidden {
    opacity: 0;
    transform: translateY(-4px);
}

.s4d-dependent-field[hidden],
.s4d-dependent-field.is-hidden {
    display: none !important;
}

.s4d-request-form,
.s4d-request-editor .s4d-account__panel {
    margin-top: 24px;
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid rgba(15, 107, 85, 0.12);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(18, 46, 39, 0.07);
}

.s4d-profile-form input,
.s4d-profile-form select,
.s4d-profile-form textarea {
    width: 100%;
}

.s4d-request-form__wide {
    grid-column: 1 / -1;
}

.s4d-notifications-page .s4d-notification-center {
    margin-top: 1.25rem;
}

.s4d-request-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.s4d-request-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.s4d-request-form input,
.s4d-request-form select,
.s4d-request-form textarea {
    width: 100%;
}

.s4d-request-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.s4d-filters label {
    display: grid;
    gap: 7px;
}

.s4d-filters label > span {
    font-size: 13px;
    font-weight: 700;
}

.s4d-filters select {
    background: #fff;
    border: 1px solid #cbd9d1;
    border-radius: 10px;
    color: var(--s4d-ink);
    min-height: 45px;
    padding: 0 12px;
    width: 100%;
}

.s4d-filters button,
.s4d-button {
    align-items: center;
    background: var(--s4d-primary);
    border: 0;
    border-radius: 10px;
    color: #fff !important;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 45px;
    padding: 0 20px;
    text-decoration: none !important;
}

.s4d-filters button:hover,
.s4d-button:hover {
    background: var(--s4d-primary-dark);
}

.s4d-project-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.s4d-project-card {
    background: #fff;
    border: 1px solid var(--s4d-border);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.s4d-project-card:hover {
    border-color: #b9d5c5;
    box-shadow: 0 18px 45px rgba(21, 56, 43, 0.09);
    transform: translateY(-3px);
}

.s4d-project-card__topline,
.s4d-project-detail__tags {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.s4d-project-card__topline > span:first-child,
.s4d-project-detail__tags > span {
    background: var(--s4d-soft);
    border-radius: 999px;
    color: var(--s4d-primary-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
}

.s4d-project-detail__tags > span {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.s4d-project-card .s4d-status,
.s4d-project-detail__tags .s4d-status {
    background: #fff3d8;
    color: #8a5b00;
    margin-inline-start: auto;
}

.s4d-project-detail__tags .s4d-private {
    background: #f3e9ff;
    color: #5e2d85;
}

.s4d-project-card h2 {
    font-size: 21px;
    line-height: 1.45;
    margin: 16px 0 8px;
}

.s4d-project-card h2 a {
    color: var(--s4d-ink);
    text-decoration: none;
}

.s4d-project-card > p {
    color: var(--s4d-muted);
    line-height: 1.75;
    margin: 0 0 16px;
}

.s4d-project-card__facts,
.s4d-project-detail__facts dl {
    display: grid;
    gap: 0;
    margin: auto 0 18px;
}

.s4d-project-card__facts > div,
.s4d-project-detail__facts dl > div {
    align-items: center;
    border-top: 1px solid #edf1ee;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 0;
}

.s4d-project-card dt,
.s4d-project-detail__facts dt {
    color: var(--s4d-muted);
    font-size: 13px;
}

.s4d-project-card dd,
.s4d-project-detail__facts dd {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    text-align: end;
}

.s4d-project-card footer {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.s4d-project-card time {
    color: var(--s4d-muted);
    font-size: 12px;
}

.s4d-empty {
    background: #f7faf8;
    border: 1px dashed #bfd2c7;
    border-radius: 18px;
    margin: 24px 0;
    padding: 56px 24px;
    text-align: center;
}

.s4d-empty > span {
    color: var(--s4d-primary);
    display: block;
    font-size: 44px;
    margin-bottom: 8px;
}

.s4d-empty h1,
.s4d-empty h2 {
    color: var(--s4d-ink);
    margin: 0 0 8px;
}

.s4d-empty p {
    color: var(--s4d-muted);
    margin: 0 auto 18px;
}

.s4d-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 28px;
}

.s4d-pagination .page-numbers {
    align-items: center;
    border: 1px solid var(--s4d-border);
    border-radius: 9px;
    color: var(--s4d-ink);
    display: inline-flex;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    padding: 0 12px;
    text-decoration: none;
}

.s4d-pagination .current {
    background: var(--s4d-primary);
    border-color: var(--s4d-primary);
    color: #fff;
}

.s4d-back-link {
    color: var(--s4d-primary);
    display: inline-flex;
    font-weight: 700;
    margin-bottom: 16px;
    text-decoration: none;
}

.s4d-project-detail__hero code {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.72);
    display: inline-block;
    font-size: 12px;
    padding: 5px 9px;
}

.s4d-private-note {
    align-items: center;
    background: #f7efff;
    border: 1px solid #e6d2f7;
    border-radius: 14px;
    display: flex;
    gap: 12px;
    margin: 20px 0;
    padding: 16px 18px;
}

.s4d-private-note strong {
    color: #5e2d85;
}

.s4d-private-note span {
    color: #76518e;
}

.s4d-project-detail__layout {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) 330px;
    margin-top: 22px;
}

.s4d-project-detail__body,
.s4d-project-detail__facts {
    display: grid;
    gap: 18px;
}

.s4d-project-detail__body > section,
.s4d-project-detail__facts {
    background: #fff;
    border: 1px solid var(--s4d-border);
    border-radius: 18px;
    padding: 24px;
}

.s4d-project-detail__body h2,
.s4d-project-detail__facts h2 {
    color: var(--s4d-ink);
    font-size: 20px;
    margin: 0 0 14px;
}

.s4d-project-copy {
    color: #394b44;
    line-height: 1.9;
}

.s4d-project-copy p:last-child {
    margin-bottom: 0;
}

.s4d-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.s4d-chip-list span {
    background: var(--s4d-soft);
    border-radius: 999px;
    color: var(--s4d-primary-dark);
    font-size: 13px;
    font-weight: 700;
    padding: 7px 11px;
}

.s4d-file-list {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.s4d-file-list a {
    align-items: center;
    background: #f7faf8;
    border: 1px solid var(--s4d-border);
    border-radius: 10px;
    color: var(--s4d-primary-dark);
    display: flex;
    font-weight: 700;
    padding: 11px 13px;
    text-decoration: none;
}

.s4d-project-detail__facts {
    position: sticky;
    top: 24px;
}

.s4d-next-stage {
    background: #fff8e9;
    border-radius: 10px;
    color: #7c5a12;
    display: block;
    font-size: 13px;
    line-height: 1.7;
    padding: 12px;
}

.s4d-muted {
    color: var(--s4d-muted);
}

.s4d-offers-panel,
.s4d-offer-form {
    background: #fff;
    border: 1px solid var(--s4d-border);
    border-radius: 18px;
    margin-top: 22px;
    padding: clamp(22px, 4vw, 34px);
}

.s4d-section-heading {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.s4d-section-heading span {
    color: var(--s4d-primary);
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 3px;
}

.s4d-section-heading h2 {
    color: var(--s4d-ink);
    margin: 0;
}

.s4d-section-heading > strong {
    align-items: center;
    background: var(--s4d-soft);
    border-radius: 999px;
    color: var(--s4d-primary-dark);
    display: inline-flex;
    min-height: 38px;
    padding: 0 14px;
}

.s4d-received-offers {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.s4d-received-offers > article {
    border: 1px solid var(--s4d-border);
    border-radius: 14px;
    padding: 20px;
}

.s4d-received-offers__heading {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.s4d-received-offers__heading span:first-child {
    color: var(--s4d-muted);
    font-size: 12px;
}

.s4d-received-offers__heading h3 {
    color: var(--s4d-ink);
    margin: 3px 0 0;
}

.s4d-received-offers__heading .s4d-status {
    background: #fff3d8;
    border-radius: 999px;
    color: #8a5b00;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
}

.s4d-received-offers dl {
    display: grid;
    margin: 16px 0;
}

.s4d-received-offers dl > div {
    border-top: 1px solid #edf1ee;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 9px 0;
}

.s4d-received-offers dt {
    color: var(--s4d-muted);
    font-size: 13px;
}

.s4d-received-offers dd {
    font-weight: 700;
    margin: 0;
}

.s4d-received-offers details {
    border-top: 1px solid #edf1ee;
    padding: 10px 0;
}

.s4d-received-offers summary {
    color: var(--s4d-primary-dark);
    cursor: pointer;
    font-weight: 700;
}

.s4d-offer-form > form > label,
.s4d-offer-form__grid label,
.s4d-offer-extras label {
    display: grid;
    gap: 7px;
}

.s4d-offer-form label > span,
.s4d-offer-extras label > span {
    font-size: 13px;
    font-weight: 700;
}

.s4d-offer-form input,
.s4d-offer-form textarea,
.s4d-offer-form select {
    background: #fff;
    border: 1px solid #cbd9d1;
    border-radius: 10px;
    color: var(--s4d-ink);
    padding: 11px 12px;
    width: 100%;
}

.s4d-offer-form textarea {
    line-height: 1.7;
    resize: vertical;
}

.s4d-offer-form__grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.s4d-offer-form__grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.s4d-offer-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.s4d-button--secondary {
    background: #e7f1eb;
    color: var(--s4d-primary-dark) !important;
}

.s4d-button--secondary:hover {
    background: #d8e9df;
}

.s4d-offer-notice {
    background: #e8f7ef;
    border: 1px solid #bce0cb;
    border-radius: 10px;
    color: #175b40;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.s4d-offer-notice--error {
    background: #fff0f0;
    border-color: #efc7c7;
    color: #8d3030;
}

.s4d-offer-extras {
    border-top: 1px solid var(--s4d-border);
    margin-top: 24px;
    padding-top: 20px;
}

.s4d-offer-extras > form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.s4d-withdraw-form {
    border-top: 1px solid var(--s4d-border);
    margin-top: 20px;
    padding-top: 16px;
}

.s4d-withdraw-form button {
    background: transparent;
    border: 0;
    color: #a03535;
    cursor: pointer;
    font-weight: 700;
    padding: 0;
}

.s4d-auth-card {
    background: #fff;
    border: 1px solid var(--s4d-border);
    border-radius: 22px;
    box-shadow: 0 20px 55px rgba(21, 56, 43, 0.08);
    margin: 70px auto;
    max-width: 620px;
    padding: 46px;
    text-align: center;
}

.s4d-auth-card > span,
.s4d-empty > span {
    align-items: center;
    background: var(--s4d-soft);
    border-radius: 999px;
    color: var(--s4d-primary);
    display: inline-flex;
    font-size: 28px;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.s4d-auth-card h1 {
    font-size: clamp(26px, 4vw, 38px);
    margin: 18px 0 10px;
}

.s4d-auth-card p {
    color: var(--s4d-muted);
    line-height: 1.8;
    margin: 0 auto 24px;
}

.s4d-client-dashboard__hero {
    align-items: center;
    background: linear-gradient(135deg, #0d3529, #174d39 70%, #1d654a);
    border-radius: 24px;
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(28px, 5vw, 52px);
    position: relative;
}

.s4d-client-dashboard__hero::after {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    content: '';
    height: 210px;
    inset: auto auto -120px -50px;
    position: absolute;
    width: 210px;
}

.s4d-client-dashboard__hero > * {
    position: relative;
    z-index: 1;
}

.s4d-client-dashboard__hero div > span {
    color: #a9e6c8;
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 7px;
}

.s4d-client-dashboard__hero h1 {
    color: #fff;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
    margin: 0 0 12px;
}

.s4d-client-dashboard__hero p {
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.8;
    margin: 0;
    max-width: 720px;
}

.s4d-client-dashboard__hero > strong {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    flex: 0 0 auto;
    padding: 10px 16px;
}

.s4d-client-filter {
    align-items: end;
    background: #fff;
    border: 1px solid var(--s4d-border);
    border-radius: 16px;
    display: flex;
    gap: 12px;
    margin: 22px 0;
    padding: 18px;
}

.s4d-client-filter label {
    display: grid;
    gap: 7px;
    max-width: 320px;
    width: 100%;
}

.s4d-client-filter label > span {
    font-size: 13px;
    font-weight: 700;
}

.s4d-client-filter select {
    background: #fff;
    border: 1px solid #cbd9d1;
    border-radius: 10px;
    color: var(--s4d-ink);
    min-height: 44px;
    padding: 0 12px;
}

.s4d-client-filter button {
    background: var(--s4d-primary);
    border: 0;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    min-height: 44px;
    padding: 0 20px;
}

.s4d-client-filter > a {
    color: var(--s4d-primary);
    font-weight: 700;
    padding: 11px 6px;
}

.s4d-client-projects {
    display: grid;
    gap: 18px;
}

.s4d-client-project {
    background: #fff;
    border: 1px solid var(--s4d-border);
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(21, 56, 43, 0.055);
    padding: 24px;
}

.s4d-client-project__heading {
    align-items: flex-start;
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.s4d-client-project__heading h2 {
    font-size: 23px;
    margin: 10px 0 7px;
}

.s4d-client-project__heading h2 a {
    color: var(--s4d-ink);
    text-decoration: none;
}

.s4d-client-project__heading p {
    color: var(--s4d-muted);
    line-height: 1.75;
    margin: 0;
}

.s4d-client-project__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.s4d-client-project__tags span,
.s4d-client-project__heading > .s4d-status {
    background: var(--s4d-soft);
    border-radius: 999px;
    color: var(--s4d-primary-dark);
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
}

.s4d-client-project__tags .is-private {
    background: #fff3d8;
    color: #805b08;
}

.s4d-client-project__heading > .s4d-status {
    flex: 0 0 auto;
    padding: 8px 12px;
}

.s4d-client-project dl {
    border-block: 1px solid var(--s4d-border);
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 20px 0;
    padding: 17px 0;
}

.s4d-client-project dl > div {
    min-width: 0;
}

.s4d-client-project dt {
    color: var(--s4d-muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.s4d-client-project dd {
    font-weight: 700;
    margin: 0;
}

.s4d-client-project__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.s4d-client-project__actions form {
    margin: 0;
}

.s4d-client-action {
    background: transparent;
    border: 1px solid #bfd2c7;
    border-radius: 10px;
    color: var(--s4d-primary-dark);
    cursor: pointer;
    font-weight: 700;
    min-height: 43px;
    padding: 0 16px;
}

.s4d-client-action:hover {
    background: var(--s4d-soft);
}

.s4d-client-action--cancel {
    border-color: #ebc6c6;
    color: #9b3434;
}

.s4d-client-action--cancel:hover {
    background: #fff3f3;
}

.s4d-provider-stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 20px 0;
}

.s4d-provider-stats article {
    background: #fff;
    border: 1px solid var(--s4d-border);
    border-radius: 16px;
    display: grid;
    gap: 5px;
    padding: 20px;
}

.s4d-provider-stats span {
    color: var(--s4d-muted);
    font-size: 13px;
}

.s4d-provider-stats strong {
    color: var(--s4d-primary-dark);
    font-size: 28px;
}

.s4d-free-offer-balance {
    align-items: center;
    background: linear-gradient(135deg, #edf8f2, #f7fbf9);
    border: 1px solid #bcdcca;
    border-radius: 16px;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin: 0 0 20px;
    padding: 20px 24px;
}

.s4d-free-offer-balance > div {
    display: grid;
    gap: 4px;
}

.s4d-free-offer-balance span {
    color: var(--s4d-primary);
    font-size: 12px;
    font-weight: 700;
}

.s4d-free-offer-balance strong {
    font-size: 18px;
}

.s4d-free-offer-balance p {
    color: var(--s4d-muted);
    margin: 0;
    max-width: 540px;
}

.s4d-free-offer-balance__action {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.s4d-free-offer-balance__action > span {
    color: var(--s4d-muted);
    font-weight: 400;
}

.s4d-free-offer-balance__action .s4d-button {
    min-height: 40px;
}

.s4d-free-offer-balance.is-exhausted {
    background: #fff7f3;
    border-color: #edc4b0;
}

.s4d-free-offer-balance.is-exhausted span,
.s4d-free-offer-balance.is-exhausted strong {
    color: #91452c;
}

.s4d-provider-section {
    background: #fff;
    border: 1px solid var(--s4d-border);
    border-radius: 20px;
    box-shadow: 0 14px 38px rgba(21, 56, 43, 0.055);
    margin-top: 20px;
    padding: clamp(20px, 4vw, 32px);
}

.s4d-provider-section .s4d-section-heading > a {
    color: var(--s4d-primary);
    font-weight: 700;
}

.s4d-provider-opportunities {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.s4d-opportunity-card {
    border: 1px solid var(--s4d-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
}

.s4d-opportunity-card h3,
.s4d-provider-offer h3 {
    font-size: 20px;
    margin: 12px 0 8px;
}

.s4d-opportunity-card h3 a,
.s4d-provider-offer h3 a {
    color: var(--s4d-ink);
    text-decoration: none;
}

.s4d-opportunity-card > p,
.s4d-provider-offer > p {
    color: var(--s4d-muted);
    line-height: 1.7;
    margin: 0 0 16px;
}

.s4d-client-project__tags .is-match {
    background: #e6f6ea;
    color: #17653d;
}

.s4d-opportunity-card dl,
.s4d-provider-offer dl {
    border-block: 1px solid var(--s4d-border);
    display: grid;
    gap: 10px;
    margin: auto 0 17px;
    padding: 14px 0;
}

.s4d-opportunity-card dt,
.s4d-provider-offer dt {
    color: var(--s4d-muted);
    font-size: 12px;
}

.s4d-opportunity-card dd,
.s4d-provider-offer dd {
    font-weight: 700;
    margin: 2px 0 0;
}

.s4d-provider-empty {
    background: var(--s4d-soft);
    border-radius: 14px;
    display: grid;
    gap: 5px;
    padding: 22px;
    text-align: center;
}

.s4d-provider-empty span {
    color: var(--s4d-muted);
}

.s4d-provider-offers {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.s4d-provider-offer {
    border: 1px solid var(--s4d-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
}

.s4d-provider-offer__heading {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.s4d-provider-offer__heading .s4d-status {
    background: var(--s4d-soft);
    border-radius: 999px;
    color: var(--s4d-primary-dark);
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 10px;
}

.s4d-provider-offer__heading .s4d-offer-status--accepted {
    background: #e3f6e8;
    color: #17653d;
}

.s4d-provider-offer__heading .s4d-offer-status--rejected,
.s4d-provider-offer__heading .s4d-offer-status--withdrawn {
    background: #f4f1f1;
    color: #765c5c;
}

.s4d-provider-offer dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: auto;
}

@media (max-width: 980px) {
    .s4d-filters__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .s4d-project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .s4d-project-detail__layout {
        grid-template-columns: 1fr;
    }

    .s4d-offer-form__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .s4d-project-detail__facts {
        position: static;
    }

    .s4d-client-project dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .s4d-provider-opportunities {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .s4d-market {
        margin: 20px auto;
        padding: 0 14px;
    }

    .s4d-market__hero,
    .s4d-project-detail__hero,
    .s4d-client-dashboard__hero {
        border-radius: 18px;
        padding: 28px 22px;
    }

    .s4d-client-dashboard__hero,
    .s4d-client-filter,
    .s4d-client-project__heading {
        align-items: stretch;
        flex-direction: column;
    }

    .s4d-client-filter label {
        max-width: none;
    }

    .s4d-client-filter button {
        width: 100%;
    }

    .s4d-filters__grid,
    .s4d-project-grid {
        grid-template-columns: 1fr;
    }

    .s4d-filters,
    .s4d-project-card,
    .s4d-project-detail__body > section,
    .s4d-project-detail__facts,
    .s4d-offers-panel,
    .s4d-offer-form {
        border-radius: 14px;
        padding: 18px;
    }

    .s4d-client-project,
    .s4d-auth-card {
        border-radius: 14px;
        padding: 20px;
    }

    .s4d-offer-form__grid,
    .s4d-offer-form__grid--2,
    .s4d-received-offers,
    .s4d-offer-extras > form {
        grid-template-columns: 1fr;
    }

    .s4d-project-card footer,
    .s4d-private-note {
        align-items: stretch;
        flex-direction: column;
    }

    .s4d-client-project dl {
        grid-template-columns: 1fr;
    }

    .s4d-provider-stats,
    .s4d-provider-opportunities,
    .s4d-provider-offers,
    .s4d-provider-offer dl {
        grid-template-columns: 1fr;
    }

    .s4d-provider-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .s4d-provider-section,
    .s4d-opportunity-card,
    .s4d-provider-offer {
        border-radius: 14px;
        padding: 18px;
    }

    .s4d-provider-offer__heading,
    .s4d-provider-section .s4d-section-heading,
    .s4d-free-offer-balance {
        align-items: stretch;
        flex-direction: column;
    }

    .s4d-free-offer-balance__action {
        align-items: stretch;
    }

    .s4d-client-project__actions,
    .s4d-client-project__actions form,
    .s4d-client-action {
        width: 100%;
    }

    .s4d-button {
        width: 100%;
    }
}
