:root {
  --ink: #0F1B2D; --muted: #4B5768; --line: #E3E7EC; --soft: #F4F6F8; --bg: #FFFFFF;
  --accent: #C2410C; --accent-ink: #FFFFFF; --navy: #0F1B2D; --ok: #1F7A4D; --err: #B42318;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.5 Manrope, system-ui, sans-serif; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #1F5BD8; outline-offset: 2px; }
::selection { background: var(--ink); color: #fff; }
textarea::placeholder, input::placeholder { color: #6B7686; }
main { outline: none; min-height: 70vh; }

/* header + footer */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1200px; margin: 0 auto; padding: 14px 32px; }
.logo { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
#nav { display: flex; align-items: center; gap: 6px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.nav-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--ink); color: var(--ink); font-weight: 700; text-decoration: none; margin-left: 8px; }
.nav-btn:hover { background: var(--ink); color: #fff; }
.foot { max-width: 1200px; margin: 48px auto 0; padding: 24px 32px 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* buttons */
.btn, .btn-dark, .btn-line, .btn-ghost-light { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 10px; font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; border: 0; }
.btn:hover { background: #A8370A; }
.btn { background: var(--accent); color: var(--accent-ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-line { background: #fff; color: var(--ink); border: 1.5px solid #CBD2DA; }
.btn-ghost-light { background: transparent; color: #fff; border: 1.5px solid #3C4E68; width: 100%; }
.big { min-height: 54px; font-size: 16px; width: 100%; }
button:disabled { opacity: 0.6; cursor: default; }

/* forms */
.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.lbl input, .lbl select, .lbl textarea, .filters select { min-height: 48px; border-radius: 10px; border: 1px solid #CBD2DA; padding: 0 12px; background: #fff; font-weight: 600; font-size: 16px; }
.lbl textarea { padding: 12px; resize: vertical; }
.help { font-weight: 500; color: var(--muted); font-size: 12px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.err { margin: 0; color: var(--err); font-size: 14px; font-weight: 700; min-height: 0; }
.err:empty { display: none; }
.fine { margin: 0; font-size: 13px; color: var(--muted); }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 14px; }

/* hero: grey band with the ask box */
.hero { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-in { max-width: 1200px; margin: 0 auto; padding: 56px 32px 40px; }
.ask { max-width: 820px; display: flex; flex-direction: column; gap: 12px; }
.ask h1 { margin: 0; font-size: clamp(34px, 4.6vw, 60px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.sub { margin: 0 0 14px; color: var(--muted); font-size: 19px; }
.ask-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; box-shadow: 0 8px 24px rgba(15,27,45,0.07); }
.ask-box:focus-within { border-color: #9AA6B4; }
.ask-box textarea { display: block; width: 100%; border: 0; padding: 12px 14px; font-size: 18px; font-weight: 500; resize: vertical; min-height: 64px; background: transparent; }
.ask-box textarea:focus-visible { outline: none; }
.ask-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 10px 6px 4px; border-top: 1px solid var(--line); }
.ask-row .lbl { font-size: 12px; color: var(--muted); }
.ask-row .lbl select { color: var(--ink); }
.ask-row .btn { min-height: 48px; padding: 0 26px; font-size: 17px; }
.hint { margin: 0; font-size: 15px; color: var(--muted); }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.chip-btn { min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid #CBD2DA; background: #fff; color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; }
.guess { display: flex; align-items: center; gap: 10px; }
.guess-text { font-size: 16px; font-weight: 600; line-height: 1.3; }
.guess-text strong { color: var(--accent); }
.pick { display: flex; flex-direction: column; gap: 8px; }
.pick-title { font-size: 15px; font-weight: 800; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; }
.tile:hover { border-color: var(--ink); }
.trust { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--muted); font-weight: 600; font-size: 15px; }
.trust li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 8px; vertical-align: 2px; }

/* trade thumbnails */
.thumb, .thumb-sm, .thumb-xs { display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--ink); }
.thumb { width: 92px; height: 64px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.06); }
.thumb-sm { width: 40px; height: 40px; border-radius: 10px; }
.thumb-xs { width: 22px; height: 22px; border-radius: 6px; }
.thumb-xs svg { width: 14px; height: 14px; }

/* new jobs grid */
.jobs-sec { max-width: 1200px; margin: 34px auto 0; padding: 0 32px; }
.jobs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.jobs-head h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select { min-height: 44px; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s, border-color .15s; }
.card:hover { border-color: #CBD2DA; box-shadow: 0 6px 20px rgba(15,27,45,0.07); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.ago { font-size: 13px; color: var(--muted); font-weight: 600; }
.heart { position: relative; z-index: 2; width: 40px; height: 40px; margin: -10px -12px -10px 0; border: 0; background: none; color: #8A94A3; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.heart.on { color: var(--accent); }
.heart.on svg { fill: currentColor; }
.card h3 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.25; }
.card-link { color: var(--ink); text-decoration: none; }
.card-link::after { content: ''; position: absolute; inset: 0; border-radius: var(--r); }
.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; color: var(--muted); }
.trade-name { color: var(--accent); font-weight: 800; font-size: 14px; }
.empty { color: var(--muted); padding: 24px 0; }

/* job page */
.narrow { max-width: 560px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; align-self: flex-start; color: var(--ink); font-weight: 700; text-decoration: none; }
.live { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: #EAF6EF; }
.live div { display: flex; flex-direction: column; font-size: 14px; }
.live strong { font-size: 18px; }
.live-dot { width: 40px; height: 40px; border-radius: 999px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.panel { background: var(--navy); border-radius: 28px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.job-card { background: #fff; border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 700; }
.pill.closed { padding-left: 12px; background: #FDE7E7; color: #8A1C1C; }
.job-card h1 { margin: 0; font-size: clamp(26px, 6vw, 34px); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; }
.job-text { margin: 0; color: #3F4D60; white-space: pre-wrap; overflow-wrap: anywhere; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 14px; border-top: 1px solid #E6EAF0; }
.facts dt { font-size: 12px; color: #5A6779; }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.sec-title { margin: 8px 0 0; font-size: 20px; font-weight: 800; }
.note { margin: 0; padding: 16px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); color: var(--muted); }
.cta-box { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.cta-box strong { font-size: 18px; }
.cta-box span { color: var(--muted); }
.locked { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 150px; }
#close-job { align-self: center; margin-top: 8px; }
.offer { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.offer div { display: flex; flex-direction: column; }
.offer.blur { filter: blur(5px); user-select: none; }
.lock-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(250,250,248,0.55); border-radius: var(--r); }
.offer-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.offer-card p { margin: 0; color: #333; overflow-wrap: anywhere; }
.offer-top { display: flex; justify-content: space-between; gap: 12px; }
.offer-top div { display: flex; flex-direction: column; }
.offer-top span { font-size: 13px; color: var(--muted); }
.price { text-align: right; }
.price strong { font-size: 18px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.two .btn, .two .btn-line { padding: 0 10px; font-size: 14px; }
.bid { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.sent { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 24px; border-radius: var(--r); background: #EAF6EF; }
.sent h2 { margin: 0; }
.sent p { margin: 0 0 8px; color: #3F4D60; }

/* sign in */
.auth { padding-top: 8px; }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: #E9EDF1; }
.tabs button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; font-weight: 800; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.auth-form { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.auth-title { margin: 0; font-size: 26px; font-weight: 800; }
.roles { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.roles legend { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.role { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); cursor: pointer; }
.role input { position: absolute; opacity: 0; }
.role span { font-size: 13px; color: var(--muted); }
.role.on { border-color: var(--accent); background: #FFF6F1; }
.role:focus-within { outline: 3px solid #1F5BD8; outline-offset: 2px; }

/* my page */
.me-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-top: 8px; }
.me-head h1 { margin: 0; font-size: 30px; font-weight: 800; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main span { font-size: 13px; color: var(--muted); }
.badge { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 700; }
.badge.hot { background: var(--accent); color: #fff; }

@media (max-width: 520px) {
  .hide-sm { display: none; }
  .row2 { grid-template-columns: 1fr; }
  .roles { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .top, .hero-in, .jobs-sec, .foot { padding-left: 16px; padding-right: 16px; }
  .hero-in { padding-top: 32px; padding-bottom: 28px; }
  .sub { font-size: 17px; }
  .ask-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ask-row .btn { grid-column: 1 / -1; }
  .trust { gap: 6px 18px; font-size: 14px; }
}
