/* project.html · a document-style brief (a white sheet with a folded corner on a cool paper desk) beside a sticky
   apply card, then a proposal builder: cover letter, bid inside the budget, and a milestone splitter with two
   draggable dividers. Teal-leaning; the brief's own category (purple) and the three milestone hues add colour. */

.brief { overflow-x: clip; padding: 108px 0 clamp(64px, 7vw, 104px); background:
  radial-gradient(60% 50% at 85% 0%, rgba(0, 174, 169, .12), transparent 70%),
  linear-gradient(180deg, #eef3f2, #f6f8f7 60%, #fff); }
.brief__in { display: grid; gap: 28px; align-items: start; isolation: isolate; }
@media (min-width: 1000px) { .brief__in { grid-template-columns: minmax(0, 1fr) 332px; gap: 36px; } }
@media (min-width: 1300px) { .brief__in { grid-template-columns: minmax(0, 1fr) 356px; gap: 56px; } }

/* the sheet */
.doc { position: relative; padding: clamp(22px, 4vw, 56px) clamp(20px, 4.4vw, 60px) clamp(28px, 4vw, 52px); border-radius: 6px 30px 22px 22px; background: #fff; box-shadow: 0 1px 2px rgba(3, 21, 20, .06), 0 30px 70px -40px rgba(3, 21, 20, .45), inset 0 0 0 1px rgba(3, 21, 20, .05); }
.doc::before { content: ""; position: absolute; inset: 14px -10px -12px 14px; z-index: -1; border-radius: 22px; background: #fff; box-shadow: 0 20px 40px -30px rgba(3, 21, 20, .5), inset 0 0 0 1px rgba(3, 21, 20, .05); transform: rotate(.5deg); }
.doc__fold { position: absolute; top: 0; right: 0; width: 46px; height: 46px; border-radius: 0 30px 0 12px; background: linear-gradient(225deg, #eef3f2 50%, #e4ebe9 50%); box-shadow: -4px 4px 10px -6px rgba(3, 21, 20, .35); }
.doc .crumbs { margin-bottom: 18px; }
.doc__eye { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--cd); }
.doc__glyph { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--cs); }
.doc__glyph svg { width: 18px; height: 18px; fill: none; stroke: var(--cd); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.doc__new { padding: 3px 9px; border-radius: 999px; background: var(--teal-m); color: #fff; font-size: 11.5px; }
.doc__sample { margin-inline-start: auto; padding: 4px 10px; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }
.doc__title { margin-top: 14px; font-family: var(--display); font-weight: 700; font-size: clamp(36px, 4.6vw, 64px); line-height: .98; letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
.doc__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 26px; border-radius: 16px; overflow: hidden; background: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.doc__facts li { display: grid; align-content: start; gap: 2px; padding: 12px 16px; background: #fff; }
.doc__facts small { font-weight: 700; font-size: 12px; color: var(--muted); }
.doc__facts b { font-family: var(--display); font-size: 20px; letter-spacing: -.01em; color: var(--ink); }
.doc__facts span { font-size: 13px; color: var(--muted); }
.doc__facts b.is-low { justify-self: start; margin-top: 2px; padding: 2px 10px; border-radius: 999px; background: var(--cat-admin-s); color: var(--cat-admin-d); font-family: var(--ui); font-size: 14px; }
@media (min-width: 720px) { .doc__facts { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }

.ds { margin-top: 34px; padding-top: 26px; border-top: 1.5px dashed var(--line-2); }
.ds__h { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.02em; color: var(--ink); }
.ds__h span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--teal-soft); color: var(--teal); font-size: 15px; }
.ds p { margin-top: 14px; max-width: 62ch; font-size: 17.5px; line-height: 1.65; color: var(--text); }
.ds__ul { display: grid; gap: 10px; margin-top: 14px; max-width: 62ch; }
.ds__ul li { position: relative; padding-inline-start: 22px; font-size: 17px; line-height: 1.55; }
.ds__ul li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--c); transform: rotate(45deg); }
mark { position: relative; z-index: 0; background: none; color: inherit; font-weight: 700; white-space: nowrap; }
mark::before { content: ""; position: absolute; inset: .12em -.18em .02em; z-index: -1; border-radius: .3em .5em .4em .6em; background: rgba(255, 210, 63, .55); transform-origin: 0 50%; transform: scaleX(1) skewX(-8deg); }
.js mark::before { transform: scaleX(0) skewX(-8deg); transition: transform .7s var(--spring); }
.js .ds.is-in mark::before { transform: scaleX(1) skewX(-8deg); }
.js .ds.is-in mark:nth-of-type(2)::before, .js .ds.is-in li:nth-child(2) mark::before { transition-delay: .25s; }
.js .ds.is-in li:nth-child(3) mark::before { transition-delay: .5s; }

.ticks { display: grid; gap: 10px; margin-top: 14px; }
.ticks li { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.ticks i { position: relative; flex: none; width: 24px; height: 24px; border-radius: 7px; box-shadow: inset 0 0 0 2px var(--line-2); }
.ticks i::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--teal-m); }
.ticks i::after { content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border-right: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(45deg); }
.js .ticks i::before, .js .ticks i::after { opacity: 0; transform: scale(.4); transition: opacity .3s, transform .45s var(--spring); transition-delay: calc(var(--i, 0) * 160ms + 200ms); }
.js .ticks i::after { transform: rotate(45deg) scale(.4); }
.js .ds.is-in .ticks i::before { opacity: 1; transform: none; }
.js .ds.is-in .ticks i::after { opacity: 1; transform: rotate(45deg); }

.ds__sk { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ds__sk li { padding: 7px 13px; border-radius: 999px; background: var(--cs); color: var(--cd); font-weight: 700; font-size: 14.5px; }
.dl { display: grid; margin-top: 12px; max-width: 560px; }
.dl div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 700; color: var(--ink); text-align: end; }
.by { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.by__av { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(140deg, #8A5A12, #6E460E); color: #fff; font-family: var(--display); font-size: 24px; }
.by__n { margin: 0 !important; font-family: var(--display); font-size: 22px; color: var(--ink); line-height: 1.1 !important; }
.by__m { margin: 2px 0 0 !important; font-size: 15px !important; color: var(--muted) !important; }
.ds p.by__note { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* the apply card */
@media (min-width: 1000px) { .ap { position: sticky; top: 92px; } }
.ap__card { overflow: hidden; padding: 24px; border-radius: 26px; background: #fff; box-shadow: var(--shadow-l), inset 0 0 0 1px rgba(3, 21, 20, .05); }
.ap__title { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.08; letter-spacing: -.02em; color: var(--ink); }
.ap__budget { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.ap__budget b { font-family: var(--display); font-size: 32px; letter-spacing: -.02em; color: var(--teal); }
.ap__budget span { font-size: 14px; color: var(--muted); font-weight: 700; }
.ap__meter { position: relative; height: 10px; margin: 30px 6px 0; border-radius: 5px; background: var(--teal-soft); }
.ap__rng { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #bfe6e3, var(--teal-m)); }
.ap__you { position: absolute; inset: 0; transform: translateX(calc((var(--x) - 1) * 100%)); transition: transform .5s var(--spring); }
.ap__you::before { content: ""; position: absolute; right: -11px; top: -5px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--teal), 0 4px 10px rgba(3, 21, 20, .3); }
.ap__you b { position: absolute; right: 0; bottom: 20px; transform: translateX(50%); padding: 2px 8px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12.5px; white-space: nowrap; }
.ap__draft { margin-top: 12px; font-weight: 700; font-size: 14px; color: var(--teal); }
.ap__p { margin: 12px 0 16px; font-size: 15px; line-height: 1.5; color: var(--text); }
.ap__link { margin-top: 6px; font-size: 15px; color: var(--teal); }
.ap__facts { display: grid; gap: 8px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.ap__facts li { display: flex; gap: 8px; font-size: 14px; color: var(--text); }
.ap__facts svg { flex: none; width: 18px; height: 18px; color: var(--teal-m); }

/* ═══ proposal builder ═══ */
.pb { padding: clamp(72px, 8vw, 120px) 0; background: linear-gradient(180deg, #fff, var(--teal-soft) 30%, var(--teal-soft) 75%, #fff); }
.pb__head { max-width: 760px; }
.pb__tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #fff; font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.pb__tag span { width: 8px; height: 8px; border-radius: 50%; background: var(--cat-design); }
.pb__title { margin-top: 16px; font-family: var(--display); font-weight: 700; font-size: clamp(36px, 4.6vw, 64px); line-height: .98; letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
.pb__lead { margin-top: 14px; max-width: 36em; font-size: 18px; color: var(--text); }
.pb__grid { display: grid; gap: 24px; margin-top: 36px; align-items: start; }
@media (min-width: 1000px) { .pb__grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: 32px; } }
.pb__form { display: grid; gap: 22px; padding: 24px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-s); }
.pb__count { font-variant-numeric: tabular-nums; }
.pb__count.is-ok [data-letter-need] { color: var(--cat-admin-d); font-weight: 700; }
.bid { display: flex; align-items: center; gap: 8px; }
.bid__step { flex: none; width: 48px; height: 52px; border: 0; border-radius: 14px; background: var(--paper); font-size: 24px; font-weight: 700; color: var(--ink); cursor: pointer; transition: transform .3s var(--spring); }
.bid__step:active { transform: scale(.92); }
.bid__box { flex: 1; display: flex; align-items: center; gap: 4px; min-height: 52px; padding: 0 16px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line-2); font-family: var(--display); font-size: 28px; color: var(--ink); }
.bid__box:focus-within { box-shadow: inset 0 0 0 2px var(--teal), 0 0 0 4px rgba(0, 174, 169, .2); }
.bid__in { width: 100%; min-width: 0; border: 0; background: none; font: inherit; color: inherit; outline: none; -moz-appearance: textfield; }
.bid__in::-webkit-inner-spin-button, .bid__in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bid__rng { width: 100%; margin-top: 4px; accent-color: var(--teal); }
.fld__h.is-err { color: var(--cat-content-d); font-weight: 700; }

.split { padding: 24px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-l); }
.split__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 14px; }
.split__t { font-family: var(--display); font-size: 22px; color: var(--ink); }
.split__sum { font-weight: 700; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.split__bar { position: relative; height: 96px; margin-top: 16px; border-radius: 20px; touch-action: none; user-select: none; -webkit-user-select: none; }
.pcs { position: absolute; top: 0; bottom: 0; display: grid; align-content: center; gap: 2px; padding: 0 14px 0 20px; overflow: hidden; color: #fff; }
.pcs b { font-size: 13px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.pcs span { font-family: var(--display); font-size: clamp(22px, 2.4vw, 32px); line-height: 1; font-variant-numeric: tabular-nums; }
.pcs--1 { border-radius: 20px 0 0 20px; background: linear-gradient(150deg, var(--cat-design), var(--cat-design-d)); }
.pcs--2 { background: linear-gradient(150deg, var(--cat-tech), var(--cat-tech-d)); }
.pcs--3 { border-radius: 0 20px 20px 0; background: linear-gradient(150deg, var(--cat-writing), var(--cat-writing-d)); }
.pcs.is-narrow b { opacity: 0; }
.pcs.is-narrow span { font-size: 17px; }
.pcs.is-bump span { animation: m-pop .4s var(--spring); }
.hd { position: absolute; top: -10px; bottom: -10px; z-index: 2; width: 34px; margin-left: -17px; padding: 0; border: 0; background: none; cursor: ew-resize; touch-action: none; }
.hd i { position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; margin-left: -3px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 1.5px rgba(3, 21, 20, .15), 0 6px 14px rgba(3, 21, 20, .35); transition: transform .3s var(--spring); }
.hd i::before { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 34px; margin: -17px 0 0 -11px; border-radius: 11px; background: #fff; box-shadow: 0 4px 12px rgba(3, 21, 20, .3); }
.hd i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 14px; margin: -7px 0 0 -4px; border-left: 2px solid var(--faint); border-right: 2px solid var(--faint); }
.hd:hover i, .hd.is-drag i, .hd:focus-visible i { transform: scaleX(1.3); }
.hd:focus-visible { outline: none; }
.hd:focus-visible i::before { box-shadow: 0 0 0 3px var(--teal-m), 0 4px 12px rgba(3, 21, 20, .3); }
.split.is-hint .hd[data-hd="0"] i { animation: pr-nudge 1.4s ease-in-out 2; }
@keyframes pr-nudge { 30% { transform: translateX(-8px); } 70% { transform: translateX(8px); } }
.split__hint { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.ms { display: grid; gap: 6px; margin-top: 14px; }
.ms__i { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 10px 14px; border-radius: 14px; background: var(--paper); }
.ms__n { grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-family: var(--display); font-size: 14px; }
.ms__i--1 .ms__n { background: var(--cat-design-d); }
.ms__i--2 .ms__n { background: var(--cat-tech-d); }
.ms__i--3 .ms__n { background: var(--cat-writing-d); }
.ms__name { font-weight: 700; color: var(--ink); }
.ms__amt { font-variant-numeric: tabular-nums; color: var(--ink); text-align: end; }
.ms__i small { grid-column: 2 / span 2; font-size: 13px; color: var(--muted); }
.rcv { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; margin-top: 16px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(150deg, var(--teal), #044849); color: #fff; }
.rcv__l { font-weight: 700; font-size: 15px; }
.rcv__v { grid-row: span 2; font-family: var(--display); font-size: clamp(30px, 3.4vw, 46px); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rcv__note { font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, .85); }
.pb__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pb__cap { margin-top: 20px; max-width: 70ch; }

/* close */
.pjx { padding: clamp(64px, 7vw, 104px) 0; }
.pjx__in { display: grid; gap: 22px; align-items: end; padding: clamp(24px, 3.4vw, 44px); border-radius: 30px; box-shadow: inset 0 0 0 1.5px var(--line); background:
  radial-gradient(40% 80% at 100% 100%, rgba(139, 92, 246, .12), transparent), radial-gradient(40% 80% at 0% 0%, rgba(0, 174, 169, .12), transparent), #fff; }
.pjx__title { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.6vw, 48px); line-height: 1; letter-spacing: -.03em; color: var(--ink); }
.pjx__lead { margin-top: 10px; max-width: 34em; font-size: 17px; color: var(--text); }
.pjx__cta { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 960px) { .pjx__in { grid-template-columns: minmax(0, 1fr) auto; } }

@media (max-width: 599px) {
  .brief { padding-top: 96px; }
  .split, .pb__form, .ap__card { padding: 18px; }
  .split__bar { height: 84px; }
  .pcs { padding: 0 8px 0 16px; }
  .rcv { grid-template-columns: 1fr; }
  .rcv__v { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .js mark::before { transform: scaleX(1) skewX(-8deg); }
  .js .ticks i::before { opacity: 1; transform: none; }
  .js .ticks i::after { opacity: 1; transform: rotate(45deg); }
  .split.is-hint .hd i { animation: none; }
}

/* phone pass: the bid slider and the milestone dividers get finger-sized targets (same look) */
@media (max-width: 767px) {
  .bid__rng { height: 40px; margin-top: 0; }
  .hd { width: 44px; margin-left: -22px; }
}
