:root {
    --mp-paper: #f5f8ff;
    --mp-paper-soft: #f8faff;
    --mp-ink: #0f1b3a;
    --mp-ink-soft: #445077;
    --mp-line: rgba(15, 27, 58, 0.11);
    --mp-blue: #2b59ff;
    --mp-blue-deep: #1f47d8;
    --mp-blue-soft: #e9edff;
    --mp-navy: #0e1634;
    --mp-green: #21a26e;
    --mp-radius: 24px;
    --mp-shadow-card: 0 16px 46px rgba(18, 32, 78, 0.08);
    --mp-shadow-soft: 0 20px 52px -28px rgba(18, 32, 78, 0.42);
}

body.marketplace-page {
    background: var(--mp-paper);
    color: var(--mp-ink);
}

body.marketplace-page .site-header {
    background: rgba(255, 255, 255, 0.91);
    border-color: rgba(15, 27, 58, 0.1);
    backdrop-filter: blur(18px);
}

.mp-shell {
    width: min(1160px, calc(100% - 48px));
    margin-inline: auto;
}

/* ===== Buttons / chips ===== */
.mp-pill,
.mp-button {
    --mp-btn-bg: var(--mp-navy);
    --mp-btn-fg: #fff;
    height: 52px;
    min-width: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px;
    border: 0;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
    background: var(--mp-btn-bg);
    color: var(--mp-btn-fg);
}

.mp-pill:hover,
.mp-button:hover {
    transform: translateY(1px);
    box-shadow: var(--mp-shadow-soft);
}

.mp-pill--blue,
.mp-button--dark,
.mp-button--blue {
    --mp-btn-bg: var(--mp-blue);
}

.mp-pill--blue:hover,
.mp-button--dark:hover,
.mp-button--blue:hover {
    --mp-btn-bg: var(--mp-blue-deep);
}

.mp-pill--ghost,
.mp-button--ghost {
    --mp-btn-bg: #ffffff;
    --mp-btn-fg: var(--mp-ink);
    border: 1px solid var(--mp-line);
}

.mp-pill--ghost:hover,
.mp-button--ghost:hover {
    border-color: var(--mp-ink);
    box-shadow: none;
}

.mp-button--coral {
    --mp-btn-bg: #ff6d59;
    --mp-btn-fg: #fff;
}

.mp-kicker,
.mp-subtitle,
.mp-mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    border-radius: 999px;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--mp-ink);
    background: var(--mp-blue-soft);
    border: 1px solid var(--mp-line);
}

.mp-kicker > span,
.mp-subtitle::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mp-blue);
    content: "";
}

.mp-kicker::before {
    width: 0;
}

.mp-link {
    font-weight: 600;
    text-decoration: none;
}

.mp-link span {
    margin-left: 7px;
}

/* ===== Hero ===== */
.mp-landing {
    padding: clamp(20px, 3.5vw, 44px) 0 0;
}

.mp-landing .mp-shell {
    background: linear-gradient(150deg, #f8faff 22%, #f4f7ff);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    overflow: hidden;
    min-height: clamp(520px, 70vh, 650px);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 0;
    box-shadow: var(--mp-shadow-card);
}

.mp-hero,
.mp-hero-media {
    padding: clamp(26px, 5vw, 60px);
}

.mp-hero {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mp-hero h1 {
    margin: 14px 0 16px;
    font-family: var(--sans);
    font-size: clamp(42px, 5.5vw, 68px);
    line-height: 0.95;
    letter-spacing: -0.035em;
    max-width: 16ch;
}

.mp-hero p {
    margin: 0 0 22px;
    color: var(--mp-ink-soft);
    max-width: 58ch;
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.5;
}

.mp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.mp-hero-metrics {
    margin-top: auto;
    display: grid;
    gap: 8px;
    padding-top: 24px;
}

.mp-hero-metrics p {
    margin: 0;
    font-size: 13px;
    color: var(--mp-ink-soft);
}

.mp-hero-metrics strong {
    color: var(--mp-ink);
}

.mp-hero-media {
    position: relative;
    min-height: 0;
    padding: 0;
}

.mp-hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mp-hero-media::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(16, 27, 63, 0.15), rgba(14, 22, 52, 0.68));
}

.mp-hero-panel {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
    color: #fff;
    max-width: 90%;
    background: rgba(6, 13, 40, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 16px 18px;
    border-radius: 14px;
    backdrop-filter: blur(8px);
}

.mp-hero-panel h2,
.mp-hero-panel p {
    margin: 0;
}

.mp-hero-panel p {
    color: rgba(255, 255, 255, 0.86);
    margin-top: 8px;
}

/* ===== Shared sections ===== */
.mp-section,
.mp-feature {
    margin: clamp(38px, 7vw, 78px) 0;
    background: #fff;
    border-radius: var(--mp-radius);
    border: 1px solid var(--mp-line);
    padding: clamp(24px, 4.6vw, 48px);
}

.mp-section--soft {
    background: var(--mp-paper-soft);
}

.mp-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.mp-head--tight {
    margin-bottom: 6px;
}

.mp-head h2,
.mp-feature-copy h2,
.mp-final h2,
.mp-pricing h2,
.mp-post h1,
.mp-detail-main h1,
.mp-page-copy h1 {
    margin: 0 0 10px;
    font-family: var(--sans);
    font-size: clamp(34px, 4.8vw, 58px);
    line-height: 0.98;
    letter-spacing: -0.035em;
    font-weight: 500;
}

.mp-head .mp-subtitle {
    margin: 0 0 10px 0;
}

.mp-section p,
.mp-feature-copy p,
.mp-pricing p {
    margin: 0;
    color: var(--mp-ink-soft);
    max-width: 62ch;
}

.mp-subtitle,
.mp-mini {
    margin: 0;
}

.mp-badges {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mp-badge {
    border: 1px solid var(--mp-line);
    border-radius: 18px;
    padding: 24px;
    background: #fff;
}

.mp-badge span {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--mp-blue-soft);
    font-weight: 600;
}

.mp-badge h3 {
    margin: 16px 0 9px;
    font-size: 24px;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.mp-badge p {
    margin: 0;
    color: #5a6481;
}

.mp-feature {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.mp-feature-media {
    border-radius: 18px;
    min-height: 360px;
    position: relative;
    overflow: hidden;
}

.mp-feature-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mp-overlay-pill {
    position: absolute;
    right: 16px;
    bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    backdrop-filter: blur(4px);
    border-radius: 999px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    text-decoration: none;
    font-weight: 600;
}

.mp-feature-copy ul {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.mp-feature-copy li {
    color: var(--mp-ink-soft);
    position: relative;
    padding-left: 24px;
}

.mp-feature-copy li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--mp-green);
}

.mp-pricing {
    text-align: center;
}

.mp-final {
    text-align: center;
}

/* ===== Job list ===== */
.mp-page-head {
    padding: clamp(24px, 4.5vw, 46px) 0;
}

.mp-page-copy h1 {
    margin: 13px 0;
    font-size: clamp(40px, 5vw, 62px);
}

.mp-page-copy p {
    margin: 0;
    color: var(--mp-ink-soft);
}

.mp-search {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--mp-line);
    border-radius: 12px;
    padding: 9px;
    box-shadow: var(--mp-shadow-card);
}

.mp-search label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    padding: 8px 12px;
    color: var(--mp-ink-soft);
}

.mp-search input {
    border: 0;
    width: 100%;
    background: transparent;
    outline: none;
}

.mp-search button {
    border: 0;
    height: 44px;
    border-radius: 10px;
    padding: 0 18px;
    background: var(--mp-blue);
    color: #fff;
    font-weight: 600;
}

.mp-filters {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mp-filters button {
    border: 1px solid var(--mp-line);
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--mp-ink-soft);
}

.mp-filters button.active {
    border-color: var(--mp-ink);
    color: var(--mp-ink);
}

.mp-results {
    margin: 18px 0 24px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.mp-results p {
    margin: 0;
    color: var(--mp-ink-soft);
    font-size: 13px;
}

body.marketplace-page .job-grid,
body.marketplace-page .job-grid-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.job-grid-list {
    margin-top: 0;
}

.mp-job-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--mp-line);
    border-radius: 20px;
    min-height: 340px;
    padding: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mp-job-card:hover {
    border-color: var(--mp-ink);
    box-shadow: var(--mp-shadow-soft);
}

.mp-job-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.mp-job-image-thumb {
    position: relative;
    z-index: 1;
    height: 130px;
    border-radius: 14px;
    margin-bottom: 14px;
    width: 100%;
    object-fit: cover;
}

.mp-job-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mp-job-top > div {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.mp-job-top > div span {
    color: var(--mp-ink-soft);
}

.mp-avatar,
.avatar-development,
.avatar-writing,
.avatar-marketing {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--mp-paper-soft);
    font-weight: 700;
}

.avatar-development { background: #d4fbdf; }
.avatar-writing { background: #ffe6ef; }
.avatar-marketing { background: var(--mp-blue-soft); }

.mp-job-card h3 {
    margin: 14px 0 10px;
    font-size: 28px;
    line-height: 1.09;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.mp-job-card > p {
    margin: 0;
    color: var(--mp-ink-soft);
    min-height: 58px;
    position: relative;
    z-index: 1;
}

.mp-tags {
    margin: 15px 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.mp-tags span {
    border: 1px solid var(--mp-line);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 11px;
    white-space: nowrap;
}

.mp-job-foot {
    margin-top: auto;
    border-top: 1px solid var(--mp-line);
    padding-top: 14px;
    display: grid;
    grid-template-columns: 1.3fr .7fr auto;
    gap: 10px;
    align-items: end;
}

.mp-job-foot div,
.mp-job-foot time {
    display: flex;
    flex-direction: column;
}

.mp-job-foot span,
.mp-job-foot time {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mp-ink-soft);
}

.mp-job-foot strong {
    margin-top: 4px;
}

/* ===== Detail ===== */
.mp-detail {
    padding: 28px 0 110px;
}

.mp-back {
    display: inline-flex;
    margin-bottom: 20px;
    color: var(--mp-ink-soft);
}

.mp-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 28px;
}

.mp-card {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
    background: #fff;
    border: 1px solid var(--mp-line);
    border-radius: 22px;
    padding: 34px;
}

.mp-job-image {
    width: 100%;
    height: 250px;
    border-radius: 16px;
    object-fit: cover;
}

.mp-meta-line {
    margin: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--mp-ink-soft);
    font-size: 12px;
}

.mp-meta-line span {
    border: 1px solid var(--mp-line);
    border-radius: 999px;
    padding: 5px 10px;
}

.mp-lead {
    color: var(--mp-ink-soft);
    margin: 12px 0 20px;
    font-size: 20px;
}

.mp-detail-main h2,
.mp-post h2 {
    margin: 24px 0 10px;
    font-size: 30px;
}

.mp-stats,
.mp-review {
    margin-top: 14px;
    border: 1px solid var(--mp-line);
    border-radius: 14px;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 12px;
}

.mp-stats div,
.mp-review div {
    display: flex;
    flex-direction: column;
}

.mp-stats span,
.mp-review span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mp-ink-soft);
}

.mp-list {
    margin: 8px 0 0;
    padding-left: 21px;
    color: var(--mp-ink-soft);
}

.mp-list li::marker {
    color: var(--mp-blue);
}

.mp-side-card {
    position: sticky;
    top: 24px;
    background: #fff;
    border: 1px solid var(--mp-line);
    border-radius: 20px;
    padding: 24px;
}

.mp-slot {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mp-slot strong {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid var(--mp-green);
    font-family: var(--sans);
}

.mp-side-card h2 {
    margin: 18px 0 8px;
    font-size: 34px;
    line-height: 1.03;
}

.mp-side-card > p {
    margin: 0 0 20px;
    color: var(--mp-ink-soft);
    font-size: 14px;
}

.mp-checks {
    list-style: none;
    padding: 22px 0 0;
    margin: 20px 0 0;
    border-top: 1px solid #dce1f2;
}

.mp-checks li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: var(--mp-ink-soft);
    font-size: 13px;
}

.mp-checks span {
    color: var(--mp-green);
    font-weight: 700;
}

.mp-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(14, 22, 52, .68);
    display: grid;
    place-items: center;
    padding: 20px;
}

.mp-modal {
    width: min(560px, 100%);
    max-height: 92vh;
    overflow: auto;
    border-radius: 20px;
    background: #fff;
    padding: 30px;
    position: relative;
}

.mp-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: 0;
    background: transparent;
    font-size: 26px;
    cursor: pointer;
}

.mp-modal h2 {
    margin: 3px 0 14px;
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.mp-modal label,
.mp-post label,
.mp-post fieldset {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 700;
}

.mp-modal span,
.mp-review strong {
    color: var(--mp-ink);
}

.mp-modal input,
.mp-modal textarea,
.mp-modal select,
.mp-post input,
.mp-post textarea,
.mp-post select {
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--mp-line);
    border-radius: 10px;
    background: #fff;
    padding: 12px 13px;
    outline: none;
}

.mp-modal input:focus,
.mp-modal textarea:focus,
.mp-modal select:focus,
.mp-post input:focus,
.mp-post textarea:focus,
.mp-post select:focus {
    border-color: var(--mp-blue);
    box-shadow: 0 0 0 3px rgba(43, 89, 255, .14);
}

.mp-money {
    display: flex;
    align-items: center;
    border: 1px solid var(--mp-line);
    border-radius: 10px;
    background: #fff;
}

.mp-money span {
    padding-left: 12px;
    color: var(--mp-ink-soft);
}

.mp-money input {
    margin: 0;
    border: 0;
}

.mp-fee {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    background: #ecf0ff;
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 12px;
}

.mp-fee-preview {
    margin-top: 8px;
    background: var(--mp-blue-soft);
    border-radius: 10px;
    padding: 9px 12px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.mp-success {
    text-align: center;
    padding: 20px 0;
}

.mp-success > span {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: var(--mp-blue-soft);
    font-size: 26px;
}

/* ===== Post job ===== */
.mp-post {
    padding: 18px 0 110px;
}

.mp-post-shell {
    display: grid;
    grid-template-columns: .82fr 1.2fr;
    gap: 50px;
}

.mp-post-intro h1 {
    margin: 12px 0 12px;
    font-size: clamp(38px, 5vw, 62px);
}

.mp-post-intro p {
    color: var(--mp-ink-soft);
}

.mp-stepper {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 11px;
}

.mp-stepper > div {
    border: 1px solid var(--mp-line);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    background: #fff;
}

.mp-stepper b {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--mp-paper-soft);
}

.mp-stepper .active b,
.mp-stepper .done b {
    background: var(--mp-blue);
    color: #fff;
}

.mp-stepper p {
    margin: 0;
    font-weight: 600;
    font-size: 13px;
}

.mp-post-card {
    background: #fff;
    border: 1px solid var(--mp-line);
    border-radius: 20px;
    padding: 36px;
}

.mp-post h2 {
    margin-top: 0;
    font-size: 34px;
}

fieldset {
    border: 0;
    margin: 10px 0 0;
    padding: 0;
}

.mp-category-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mp-category-grid button {
    border: 1px solid var(--mp-line);
    background: #fff;
    border-radius: 10px;
    min-height: 48px;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    font-weight: 600;
}

.mp-category-grid button span {
    margin-right: 7px;
}

.mp-category-grid button.selected {
    border-color: var(--mp-ink);
    background: var(--mp-blue-soft);
}

.mp-form-actions {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.mp-review {
    margin-bottom: 12px;
}

.mp-form-errors {
    margin-bottom: 16px;
    border: 1px solid #ffd1d1;
    border-radius: 12px;
    background: #fff5f5;
    padding: 12px 14px;
    color: #702f2f;
}

.mp-form-errors p {
    margin: 0 0 8px;
}

.mp-form-errors ul {
    margin: 0;
    padding-left: 18px;
}

.mp-empty {
    margin: 0;
    color: var(--mp-ink-soft);
}

.mp-note {
    border: 1px solid var(--mp-line);
    border-radius: 10px;
    background: #f4f6ff;
    padding: 12px 13px;
    color: var(--mp-ink-soft);
    font-size: 13px;
}

/* ==== responsive =================================================== */
@media (max-width: 1030px) {
    .mp-landing .mp-shell,
    .mp-feature {
        grid-template-columns: 1fr;
    }

    .mp-landing .mp-shell {
        min-height: auto;
        padding-bottom: 0;
    }

    .mp-hero,
    .mp-hero-media {
        padding: 26px;
    }

    .mp-hero-media {
        min-height: 340px;
    }

    .mp-badges,
    body.marketplace-page .job-grid,
    body.marketplace-page .job-grid-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mp-post-shell {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .mp-detail-grid {
        grid-template-columns: 1fr;
    }

    .mp-side-card {
        position: static;
    }
}

@media (max-width: 740px) {
    .mp-shell {
        width: min(100% - 22px, 1160px);
    }

    .mp-hero h1,
    .mp-page-copy h1,
    .mp-post-intro h1,
    .mp-final h2,
    .mp-head h2 {
        font-size: 44px;
    }

    .mp-hero p,
    .mp-feature-copy p,
    .mp-head + p {
        font-size: 16px;
    }

    .mp-badges,
    body.marketplace-page .job-grid,
    body.marketplace-page .job-grid-list {
        grid-template-columns: 1fr;
    }

    .mp-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .mp-form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .mp-hero-media,
    .mp-feature-media {
        min-height: 290px;
    }

    .mp-search,
    .mp-search button,
    .mp-search label {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .mp-search {
        padding: 7px;
        min-height: 56px;
    }

    .mp-filters button {
        min-height: 38px;
    }

    .mp-section,
    .mp-feature,
    .mp-pricing,
    .mp-final,
    .mp-post {
        padding: 22px 18px;
    }

    .mp-post-shell,
    .mp-side-card,
    .mp-card,
    .mp-post-card,
    .mp-modal {
        padding: 22px;
    }

    .mp-back,
    .mp-results,
    .mp-hero-metrics,
    .mp-feature-copy {
        margin-inline: 6px;
    }

    .mp-filters,
    .mp-results {
        gap: 10px;
    }
}

/* prevent Alpine flicker */
[x-cloak] { display: none !important; }
