/*
 * Home rethink (H2): How it works (/how-it-works). Design: HowItWorks.dc.html. Every rule is scoped under .gm.
 * Audience tabs: .gm-hiw.is-js[data-show] hides the other audience's [data-aud] blocks; without JS both show,
 * each with a .gm-hiw-for label.
 */

.gm .gm-hiw { display: block; }
.gm .gm-hiw-wrap { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; box-sizing: border-box; }
.gm .gm-hiw-sec { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 32px; }
.gm .gm-hiw-band { border-top: 1px solid var(--gm-line); border-bottom: 1px solid var(--gm-line); }
.gm .gm-hiw-band--white { background: var(--gm-surface); }
.gm .gm-hiw-band--sunken { background: var(--gm-sunken); }
.gm .gm-hiw [id] { scroll-margin-top: 24px; }

/* Audience switching */
.gm .gm-hiw.is-js[data-show="client"] [data-aud="freelancer"],
.gm .gm-hiw.is-js[data-show="freelancer"] [data-aud="client"] { display: none !important; }
.gm .gm-hiw-for { font-weight: 600; color: var(--gm-ink); }
.gm .gm-hiw-for--block { margin: 0 0 12px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-muted); }
.gm .gm-hiw.is-js .gm-hiw-for { display: none; }
.gm .gm-hiw-panel + .gm-hiw-panel { margin-top: 8px; }

/* Type */
.gm .gm-hiw-eyebrow { display: block; margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-muted); }
.gm .gm-hiw-h1 { margin: 0; font-family: var(--gm-font-display); font-weight: 700; font-size: 64px; line-height: 1; letter-spacing: -0.035em; }
.gm .gm-hiw-h2 { margin: 0; font-family: var(--gm-font-display); font-weight: 600; font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; }
.gm .gm-hiw-h2 > span:first-child { color: var(--gm-muted); font-variant-numeric: tabular-nums; }
.gm .gm-hiw-sechead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; }
.gm .gm-hiw-sechead__text { display: flex; flex-direction: column; gap: 10px; max-width: 680px; }
.gm .gm-hiw-sechead__text p { margin: 0; color: var(--gm-ink-2); }
.gm .gm-hiw-sample { font-size: 13.5px; color: var(--gm-muted); }
.gm .gm-hiw-more { font-size: 15px; font-weight: 600; text-decoration: none; color: var(--gm-coral-ink); }
.gm .gm-hiw-more:hover { text-decoration: underline; }

/* Icon tiles */
.gm .gm-hiw-ico { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.gm .gm-hiw-ico--sm { flex-basis: 40px; width: 40px; height: 40px; }
.gm .gm-hiw-ico--coral { background: var(--gm-coral-wash); color: var(--gm-coral-ink); }
.gm .gm-hiw-ico--blue { background: var(--gm-blue-wash); color: var(--gm-blue); }
.gm .gm-hiw-ico--teal { background: var(--gm-teal-wash); color: var(--gm-teal); }
.gm .gm-hiw-ico--amber { background: var(--gm-amber-wash); color: var(--gm-amber); }
.gm .gm-hiw-tone-blue { color: var(--gm-blue); }
.gm .gm-hiw-tone-red { color: var(--gm-red); }
.gm .gm-hiw-tone-teal { color: var(--gm-teal); }
.gm .gm-hiw-tone-ink { color: var(--gm-ink-2); }

/* Hero */
.gm .gm-hiw-hero { padding-top: 56px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-end; }
.gm .gm-hiw-hero__main { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.gm .gm-hiw-crumbs { font-size: 13.5px; color: var(--gm-muted); }
.gm .gm-hiw-crumbs a { color: var(--gm-muted); text-decoration: none; }
.gm .gm-hiw-crumbs a:hover { color: var(--gm-ink); text-decoration: underline; }
.gm .gm-hiw-lede { margin: 0; font-size: 19px; color: var(--gm-ink-2); max-width: 600px; }
.gm .gm-hiw-tabs { align-self: flex-start; display: inline-flex; gap: 4px; padding: 4px; background: var(--gm-sunken); border: 1px solid var(--gm-line); border-radius: 14px; max-width: 100%; box-sizing: border-box; }
.gm .gm-hiw-tabs[hidden] { display: none; }
.gm .gm-hiw-tab { height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--gm-muted); font: 600 15px var(--gm-font-body); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.gm .gm-hiw-tab:hover { color: var(--gm-ink); }
.gm .gm-hiw-tab[aria-selected="true"] { background: var(--gm-surface); color: var(--gm-ink); border-color: var(--gm-line); }
.gm .gm-hiw-toc { flex: 0 1 300px; background: var(--gm-surface); border: 1px solid var(--gm-line); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; }
.gm .gm-hiw-toc a { font-size: 14.5px; font-weight: 500; color: var(--gm-ink); text-decoration: none; display: flex; gap: 10px; }
.gm .gm-hiw-toc a span { color: var(--gm-muted); font-variant-numeric: tabular-nums; }
.gm .gm-hiw-toc a:hover { color: var(--gm-coral-ink); }

/* 01 Ways */
.gm .gm-hiw-ways { padding-top: 24px; gap: 28px; }
.gm .gm-hiw-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gm .gm-hiw-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.gm .gm-hiw-card { background: var(--gm-surface); border: 1px solid var(--gm-line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; min-width: 0; }
.gm .gm-hiw-card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.gm .gm-hiw-best { font-size: 12.5px; color: var(--gm-muted); text-align: right; }
.gm .gm-hiw-card h3 { margin: 0; font-family: var(--gm-font-display); font-weight: 600; font-size: 22px; line-height: 1.2; }
.gm .gm-hiw-card p { margin: 0; color: var(--gm-ink-2); font-size: 15px; }
.gm .gm-hiw-card .gm-hiw-more { margin-top: auto; font-size: 14.5px; }

/* 02 Track with the money lane */
.gm .gm-hiw-track { list-style: none; margin: 0; padding: 0; border: 1px solid var(--gm-line); border-radius: 20px; overflow: hidden;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto auto auto; }
.gm .gm-hiw-step { display: grid; grid-row: span 3; grid-template-rows: subgrid; min-width: 0; }
.gm .gm-hiw-step__head { position: relative; background: var(--gm-paper); border-bottom: 1px solid var(--gm-line); padding: 24px 12px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.gm .gm-hiw-step__head::before, .gm .gm-hiw-step__head::after { content: ""; position: absolute; top: 35px; width: 50%; height: 2px; background: var(--gm-teal); }
.gm .gm-hiw-step__head::before { left: 0; }
.gm .gm-hiw-step__head::after { right: 0; }
.gm .gm-hiw-step:first-child .gm-hiw-step__head::before, .gm .gm-hiw-step:last-child .gm-hiw-step__head::after { display: none; }
.gm .gm-hiw-step__dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: var(--gm-teal); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.gm .gm-hiw-step__name { font-family: var(--gm-font-display); font-weight: 600; font-size: 20px; }
.gm .gm-hiw-step__when { font-size: 12.5px; color: var(--gm-muted); }
.gm .gm-hiw-step__body { background: var(--gm-surface); padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.gm .gm-hiw-step__you { margin: 0; font-size: 15px; color: var(--gm-ink); }
.gm .gm-hiw-step__other { margin: 0; font-size: 14px; color: var(--gm-ink-2); }
.gm .gm-hiw-step__money { background: var(--gm-teal-wash); border-top: 1px solid #C9E6DF; padding: 18px 24px 20px; display: flex; flex-direction: column; gap: 6px; }
.gm .gm-hiw-step + .gm-hiw-step .gm-hiw-step__body { border-left: 1px solid var(--gm-line); }
.gm .gm-hiw-step + .gm-hiw-step .gm-hiw-step__money { border-left: 1px solid #C9E6DF; }
.gm .gm-hiw-step__mlabel { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-teal); }
.gm .gm-hiw-step__amt { font-family: var(--gm-font-display); font-weight: 600; font-size: 24px; color: var(--gm-teal); font-variant-numeric: tabular-nums; }
.gm .gm-hiw-step__mnote { font-size: 13.5px; color: #0F3D39; }
.gm .gm-hiw-rules { margin-top: 4px; }
.gm .gm-hiw-rule { display: flex; gap: 14px; align-items: flex-start; }
.gm .gm-hiw-rule__text { display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; color: var(--gm-ink-2); }
.gm .gm-hiw-rule__text b { font-size: 16px; font-weight: 600; color: var(--gm-ink); }

/* 03 Milestones + 05 Fees (text beside a card) */
.gm .gm-hiw-split { flex-direction: row; flex-wrap: wrap; gap: 48px; align-items: center; }
.gm .gm-hiw-split__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.gm .gm-hiw-split__text p { margin: 0; color: var(--gm-ink-2); }
.gm .gm-hiw-ms { flex: 1 1 600px; min-width: 0; background: var(--gm-surface); border: 1px solid var(--gm-line); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 18px; box-sizing: border-box; }
.gm .gm-hiw-ms__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.gm .gm-hiw-ms__title { display: flex; flex-direction: column; }
.gm .gm-hiw-ms__title b { font-size: 17px; font-weight: 600; }
.gm .gm-hiw-ms__total { font-family: var(--gm-font-display); font-weight: 600; font-size: 24px; font-variant-numeric: tabular-nums; }
.gm .gm-hiw-ms__total span { font-family: var(--gm-font-body); font-size: 13.5px; font-weight: 500; color: var(--gm-muted); }
.gm .gm-hiw-ms__bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 3px; }
.gm .gm-hiw-ms__bar .is-released { background: var(--gm-teal); }
.gm .gm-hiw-ms__bar .is-delivered { background: var(--gm-teal-bright); }
.gm .gm-hiw-ms__bar .is-held { background: #C9E6DF; }
.gm .gm-hiw-ms__sum { margin: 0; display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: 13.5px; color: var(--gm-ink-2); font-variant-numeric: tabular-nums; }
.gm .gm-hiw-ms__sum b { color: var(--gm-teal); }
.gm .gm-hiw-ms__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.gm .gm-hiw-ms__list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--gm-line); }
.gm .gm-hiw-ms__dot { flex: 0 0 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; }
.gm .gm-hiw-ms__dot.is-released { background: var(--gm-teal); color: #FFFFFF; }
.gm .gm-hiw-ms__dot.is-delivered { background: var(--gm-teal-bright); color: #FFFFFF; }
.gm .gm-hiw-ms__dot.is-held { background: var(--gm-teal-wash); color: var(--gm-teal); }
.gm .gm-hiw-ms__name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gm .gm-hiw-ms__name b { font-size: 15px; font-weight: 600; }
.gm .gm-hiw-ms__name span { font-size: 13px; color: var(--gm-muted); }
.gm .gm-hiw-ms__amt { flex: 0 0 84px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.gm .gm-hiw-chip { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; align-self: center; }
.gm .gm-hiw-chip.is-released { background: var(--gm-teal-wash); color: var(--gm-teal); }
.gm .gm-hiw-chip.is-delivered { background: var(--gm-amber-wash); color: var(--gm-amber); }
.gm .gm-hiw-chip.is-held { background: var(--gm-sunken); color: var(--gm-ink-2); }

.gm .gm-hiw-fees { flex: 1 1 620px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gm .gm-hiw-fee { background: var(--gm-surface); border: 1px solid var(--gm-line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gm .gm-hiw[data-show="client"] .gm-hiw-fee--client { border: 2px solid var(--gm-coral-ink); padding: 23px; }
.gm .gm-hiw.is-js[data-show="freelancer"] .gm-hiw-fee--free { border: 2px solid var(--gm-teal); padding: 23px; }
.gm .gm-hiw-fee__amt { font-family: var(--gm-font-display); font-weight: 700; font-size: 44px; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.gm .gm-hiw-fee__amt--teal { color: var(--gm-teal); }
.gm .gm-hiw-fee__note { font-size: 14.5px; color: var(--gm-ink-2); }
.gm .gm-hiw-fee__dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; color: var(--gm-ink-2); font-variant-numeric: tabular-nums; }
.gm .gm-hiw-fee__dl dd { margin: 0; text-align: right; }

/* 04 If something goes wrong */
.gm .gm-hiw-wrong { display: grid; grid-template-columns: 1fr 48px 1fr 1fr 1fr; gap: 0 16px; align-items: stretch; }
.gm .gm-hiw-wrong .gm-hiw-card { padding: 22px; gap: 10px; }
.gm .gm-hiw-wrong__start { align-self: center; gap: 8px !important; }
.gm .gm-hiw-wrong__start .gm-hiw-chip { align-self: flex-start; }
.gm .gm-hiw-wrong__title, .gm .gm-hiw-wrong__opt h3 { font-family: var(--gm-font-display); font-weight: 600; font-size: 20px; line-height: 1.2; }
.gm .gm-hiw-wrong__opt p { font-size: 14.5px; }
.gm .gm-hiw-held { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--gm-teal); }
.gm .gm-hiw-wrong__arrow { align-self: center; justify-self: center; color: #B8AAA0; display: flex; }
.gm .gm-hiw-wrong__end { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--gm-line); font-size: 13.5px; font-weight: 600; }

/* 06 Fair */
.gm .gm-hiw-fair { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gm .gm-hiw-fair h3 { margin: 4px 0 0; font-family: var(--gm-font-body); font-size: 17px; font-weight: 600; }
.gm .gm-hiw-fair p { margin: 0; color: var(--gm-ink-2); font-size: 14.5px; }

/* Questions + CTA */
.gm .gm-hiw-end { flex-direction: row; flex-wrap: wrap; gap: 40px; padding-bottom: 96px; }
.gm .gm-hiw-end__q { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gm .gm-hiw-faq { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--gm-line); }
.gm .gm-hiw-faq li { border-bottom: 1px solid var(--gm-line); }
.gm .gm-hiw-faq a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 4px; font-size: 16px; font-weight: 500; color: var(--gm-ink); text-decoration: none; }
.gm .gm-hiw-faq a span { color: var(--gm-coral-ink); }
.gm .gm-hiw-faq a:hover { color: var(--gm-coral-ink); }
.gm .gm-hiw-end__note { font-size: 14px; color: var(--gm-muted); }
.gm .gm-hiw-cta { flex: 1 1 400px; min-width: 0; position: relative; overflow: hidden; background: var(--gm-night); color: var(--gm-night-text); border-radius: 24px; padding: 36px; display: flex; flex-direction: column; gap: 16px; box-sizing: border-box; }
.gm .gm-hiw-cta__dot { position: absolute; right: -50px; bottom: -70px; width: 200px; height: 200px; border-radius: 50%; background: var(--gm-coral); }
.gm .gm-hiw-cta__kick { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-night-muted); position: relative; }
.gm .gm-hiw-cta__title { position: relative; max-width: 340px; font-family: var(--gm-font-display); font-weight: 600; font-size: 32px; line-height: 1.1; letter-spacing: -0.02em; }
.gm .gm-hiw-cta__btns { position: relative; margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.gm .gm-hiw-cta__btns .gm-btn--secondary { background: var(--gm-surface); color: var(--gm-ink); }

/* Tablet */
@media (max-width: 1080px) {
    .gm .gm-hiw-wrong { grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
    .gm .gm-hiw-wrong__start { grid-column: 1 / -1; align-self: stretch; }
    .gm .gm-hiw-wrong__arrow { display: none; }
    .gm .gm-hiw-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phone */
@media (max-width: 760px) {
    .gm .gm-hiw-wrap { padding-left: 16px; padding-right: 16px; }
    .gm .gm-hiw-sec { padding-top: 48px; padding-bottom: 48px; gap: 24px; }
    .gm .gm-hiw-hero { padding-top: 28px; padding-bottom: 8px; }
    .gm .gm-hiw-hero__main { flex-basis: 100%; gap: 16px; }
    .gm .gm-hiw-h1 { font-size: 40px; }
    .gm .gm-hiw-h2 { font-size: 24px; }
    .gm .gm-hiw-lede { font-size: 17px; }
    .gm .gm-hiw-tabs { align-self: stretch; display: flex; }
    .gm .gm-hiw-tab { flex: 1 1 0; justify-content: center; padding: 0 10px; font-size: 14.5px; }
    .gm .gm-hiw-toc { flex-basis: 100%; }
    .gm .gm-hiw-ways { padding-top: 24px; }
    .gm .gm-hiw-grid3, .gm .gm-hiw-grid4, .gm .gm-hiw-fees, .gm .gm-hiw-wrong { grid-template-columns: minmax(0, 1fr); }
    .gm .gm-hiw-card { padding: 20px; }
    .gm .gm-hiw-split, .gm .gm-hiw-end { gap: 28px; }
    .gm .gm-hiw-split__text, .gm .gm-hiw-ms, .gm .gm-hiw-fees, .gm .gm-hiw-end__q, .gm .gm-hiw-cta { flex-basis: 100%; }
    .gm .gm-hiw-ms { padding: 18px; }
    .gm .gm-hiw-ms__list li { flex-wrap: wrap; gap: 6px 12px; }
    .gm .gm-hiw-ms__name { flex: 1 1 calc(100% - 40px); }
    .gm .gm-hiw-ms__list .gm-hiw-chip { margin-left: 40px; }
    .gm .gm-hiw-ms__amt { flex: 1 1 auto; }
    .gm .gm-hiw-fee__amt { font-size: 36px; }
    .gm .gm-hiw-cta { padding: 28px 22px; }
    .gm .gm-hiw-cta__title { font-size: 26px; max-width: 260px; }
    .gm .gm-hiw-cta__dot { width: 120px; height: 120px; right: -40px; bottom: -50px; }

    /* Track: one card per step, a teal rail on the left instead of the horizontal line */
    .gm .gm-hiw-track { display: flex; flex-direction: column; border: 0; border-radius: 0; overflow: visible; gap: 12px; }
    .gm .gm-hiw-step { display: flex; flex-direction: column; border: 1px solid var(--gm-line); border-radius: 16px; overflow: hidden; }
    .gm .gm-hiw-step__head { flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; padding: 14px 18px; gap: 4px 10px; }
    .gm .gm-hiw-step__head::before, .gm .gm-hiw-step__head::after { display: none; }
    .gm .gm-hiw-step__name { font-size: 18px; }
    .gm .gm-hiw-step__when { flex-basis: 100%; padding-left: 34px; }
    .gm .gm-hiw-step__body { padding: 16px 18px; gap: 6px; }
    .gm .gm-hiw-step__body .gm-hiw-eyebrow { display: none; }
    .gm .gm-hiw-step__money { padding: 14px 18px; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
    .gm .gm-hiw-step__amt { font-size: 20px; }
    .gm .gm-hiw-step__mnote { flex-basis: 100%; }
    .gm .gm-hiw-step + .gm-hiw-step .gm-hiw-step__body, .gm .gm-hiw-step + .gm-hiw-step .gm-hiw-step__money { border-left: 0; }
}
