/* Public pages (D86, redesign T-2503): one small stylesheet, no scripts, readable on a cheap phone on mobile
   data. Light only (D109): homes and prices read best on white, and a shared link looks the same for all.
   Same card language as the Mini App (docs/14-DESIGN-SYSTEM.md); icons are the app's SVG set, never emoji. */
:root {
  --brand-900: #0b2a5e; --brand: #1660e8; --brand-50: #eaf1fe;
  --bg: #f3f5f9; --card: #ffffff; --text: #0f172a; --muted: #5b6474; --line: #e2e7ef; --fill: #eef1f6;
  --good: #12723a; --good-bg: #dcf5e5; --warm: #ffb703; --on-warm: #1f1600; --warm-bg: #fff5d6;
  --note-bg: #fff6e0; --note-fg: #6b4e00;
  --r-s: 10px; --r-m: 14px; --r-pill: 999px;
  --shadow: 0 1px 2px rgb(16 24 40 / .06), 0 1px 3px rgb(16 24 40 / .08);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon.s { width: 15px; height: 15px; }
.sprite { position: absolute; width: 0; height: 0; }

/* --- brand band: the one dark surface, carries the name and the promise ------------------------------ */
.band { background: var(--brand-900); color: #fff; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; color: #fff; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; display: block; }  /* the logo tile (D128), its own corners */
.brand .logo { height: 34px; width: auto; display: block; }  /* a whole lockup: the jobs pages' Ish markaz */
/* The jobs pages wear the Ish markaz blues (app/ish/logo.py): same layout, their own band and buttons. */
body.ish { --brand-900: #0a3a6e; --brand: #1673e0; --brand-50: #e8f2fe; }
.brand small { font-weight: 500; color: rgb(255 255 255 / .7); font-size: 15px; }
.hero { padding-top: 8px; padding-bottom: 22px; }
.hero h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
.hero .lead { color: rgb(255 255 255 / .82); margin-top: 6px; max-width: 60ch; }
/* City search (T-2703): the bot's own reading of a typed line, as a plain GET form (no script on the site). */
.search { display: flex; align-items: center; gap: 8px; margin-top: 14px; max-width: 560px; padding: 5px 5px 5px 14px;
  background: #fff; border-radius: var(--r-m); color: var(--muted); box-shadow: 0 6px 20px rgb(0 0 0 / .18); }
.search input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: none; color: var(--text);
  font: inherit; font-size: 16px; }
.search input::placeholder { color: var(--muted); }
.search .btn.small { background: var(--brand); color: #fff; }
.q-hint { margin-top: 8px; font-size: 14px; color: rgb(255 255 255 / .85); }
.q-hint a { color: #fff; text-decoration: underline; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding: 0; list-style: none; }
.stats li { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600;
  background: rgb(255 255 255 / .12); border-radius: var(--r-pill); padding: 5px 12px; }
.stats .icon { color: var(--warm); }

/* --- buttons ------------------------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: var(--r-m); background: var(--brand); color: #fff; font-weight: 700; border: 0; text-align: center; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 15px; border-radius: var(--r-pill); }
.btn.light { background: #fff; color: var(--brand-900); }
.btn.ghost { background: var(--card); color: var(--brand); border: 1px solid var(--line); }
.btn.warm { background: var(--warm); color: var(--on-warm); }
.btn.block { width: 100%; }

/* --- filters ------------------------------------------------------------------------------------------- */
.filters { display: grid; gap: 10px; padding: 16px 0 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--fill); border-radius: var(--r-s); padding: 3px; max-width: 420px; }
.seg a { padding: 8px; border-radius: 8px; font-weight: 600; text-align: center; color: var(--muted); }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a[aria-current] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 15px;
  border-radius: var(--r-pill); padding: 6px 14px; font-weight: 500; }
.chips a:hover { text-decoration: none; border-color: var(--brand); }
.chips a[aria-current] { background: var(--brand); color: #fff; border-color: var(--brand); }
.chips.sets a { background: var(--fill); border-color: transparent; font-weight: 600; }
/* same weight as `.chips a[aria-current]` but later, so the chosen set must win here too (white on fill was unreadable) */
.chips.sets a[aria-current] { background: var(--brand); color: #fff; border-color: var(--brand); }
/* "Kim uchun:" in the app's words (T-5412): a quiet label, then the three chips */
.chips-label { flex: none; align-self: center; color: var(--muted); font-size: 14px; }
.count { color: var(--muted); font-size: 14px; margin: 6px 0 10px; }
.other-link { display: inline-block; margin-top: 10px; font-weight: 600; }

/* --- cards: text first, a thumbnail when there is a photo (same shape as the Mini App) ---------------- */
.list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.card { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 12px 16px; background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); align-items: start; }
.card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.card.pictured { grid-template-columns: 104px 1fr; padding-left: 12px; }
.card img { width: 104px; height: 104px; object-fit: cover; border-radius: var(--r-s); background: var(--fill); display: block; }
.card .noph { width: 104px; height: 104px; border-radius: var(--r-s); background: var(--fill); display: grid; place-items: center;
  color: var(--muted); }
.card .noph .icon { width: 34px; height: 34px; opacity: .45; }
.card .body { display: grid; gap: 3px; min-width: 0; }
.card .body > * { overflow-wrap: anywhere; }
.card .head { font-weight: 600; line-height: 1.3; }
.price { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.price .unit { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price.ask { font-size: 14px; font-weight: 500; color: var(--muted); }
.line { display: flex; align-items: center; gap: 5px; font-size: 14px; color: var(--muted); min-width: 0; }
.line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.when { font-size: 13px; }
.tag { display: inline-flex; align-items: center; gap: 4px; justify-self: start; font-size: 12px; font-weight: 600;
  padding: 2px 9px 2px 7px; border-radius: var(--r-pill); background: var(--warm-bg); color: var(--on-warm); }
.tag.verified { background: #d9f7e3; color: #11592b; }
.empty { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; }
.pager { display: flex; justify-content: space-between; margin: 18px 0; font-weight: 600; }

/* --- "Topib bering" (D105): the one warm block ------------------------------------------------------- */
.offer { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 16px; border-radius: var(--r-m);
  background: var(--warm-bg); border: 1px solid color-mix(in srgb, var(--warm) 45%, transparent); grid-column: 1 / -1; }
.offer .badge-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--warm); color: var(--on-warm);
  display: grid; place-items: center; }
.offer .kicker { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.offer h2 { font-size: 19px; line-height: 1.25; margin: 2px 0 4px; }
.offer .promise { display: flex; align-items: center; gap: 5px; font-weight: 600; color: var(--good); font-size: 15px; }
.offer .fee { color: var(--muted); font-size: 14px; }
.offer .btn { grid-column: 1 / -1; }
@media (min-width: 640px) { .offer { grid-template-columns: auto 1fr auto; align-items: center; } .offer .btn { grid-column: auto; } }

/* --- "how it works": three plain steps --------------------------------------------------------------- */
.how { margin: 28px 0 8px; }
.how h2 { font-size: 20px; margin-bottom: 12px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  counter-reset: step; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px;
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; counter-increment: step; }
.steps li::before { content: counter(step); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-50); color: var(--brand); font-weight: 800; display: grid; place-items: center; }
.steps strong { line-height: 1.3; }
.steps span { color: var(--muted); font-size: 14px; }
.cta { display: grid; gap: 8px; margin: 20px 0; }
@media (min-width: 640px) { .cta { grid-template-columns: 1fr 1fr; } }

/* --- listing page ------------------------------------------------------------------------------------- */
.crumb { display: inline-flex; align-items: center; gap: 4px; margin: 14px 0 10px; font-weight: 600; }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 14px; padding: 0 16px;
  scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: min(88%, 560px); height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--r-m); scroll-snap-align: center; background: var(--fill); }
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px 16px; display: grid; gap: 8px; }
.sheet h1 { font-size: 22px; line-height: 1.25; letter-spacing: -.01em; text-wrap: balance; }
.price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.price.big { font-size: 26px; }
.price.big.ask { font-size: 18px; font-weight: 600; }
.pill { display: inline-flex; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--fill); color: var(--text); }
.pill.cheap { background: var(--good-bg); color: var(--good); }
.market { font-size: 14px; color: var(--muted); }
.market strong { color: var(--text); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 6px 0 2px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.cell { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; background: var(--fill);
  border-radius: var(--r-s); padding: 10px 12px; min-width: 0; }
.cell .icon { grid-row: span 2; width: 22px; height: 22px; color: var(--muted); }
.cell dt { font-size: 12px; color: var(--muted); }
.cell dd { margin: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facts { padding: 0; margin: 4px 0 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.facts li { background: var(--fill); border-radius: var(--r-pill); padding: 4px 12px; font-size: 14px; }
.contact { display: grid; gap: 6px; margin: 6px 0 2px; }
.contact small { color: var(--muted); font-size: 13px; text-align: center; }
.safety { display: flex; gap: 8px; background: var(--note-bg); color: var(--note-fg); border-radius: var(--r-s);
  padding: 12px 14px; font-size: 15px; }
.section-h { font-size: 18px; margin: 22px 0 8px; }
.text { white-space: pre-line; overflow-wrap: anywhere; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 14px 16px; }
.muted { color: var(--muted); }

/* --- jobs (T-4111): hh-style list (pay right under the title, the button on the card), Cloz-style sets and
   kind tiles. Same tokens as the homes pages: one site, two catalogs. ---------------------------------- */
.chips small { color: var(--muted); font-weight: 600; margin-left: 2px; }
.chips a[aria-current] small { color: rgb(255 255 255 / .8); }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile { display: grid; gap: 2px; padding: 14px; background: var(--card); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--r-m); box-shadow: var(--shadow); }
.tile:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.tile-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 6px; }
.tile-icon .icon { width: 21px; height: 21px; }
.tile strong { font-size: 15px; line-height: 1.3; }
.tile small { color: var(--muted); font-size: 13px; }
.job { position: relative; display: grid; gap: 4px; align-content: start; padding: 14px 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); }
.job:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.job > * { min-width: 0; overflow-wrap: anywhere; }
.job-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.job h3 { font-size: 17px; line-height: 1.3; font-weight: 700; }
.job-link { color: var(--text); }
.job-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }  /* the whole card opens it */
.job-link:hover { text-decoration: none; }
.pay { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pay.ask { font-size: 15px; font-weight: 600; color: var(--muted); }
.pay.big { font-size: 24px; margin: 2px 0 4px; }
.pay.big.ask { font-size: 18px; }
.who { display: flex; align-items: center; gap: 5px; font-size: 15px; font-weight: 500; }
.who .icon { color: var(--muted); }
.who.verified .icon { color: #fff; background: var(--good); border-radius: 50%; padding: 2px; stroke-width: 2.6; }
.tags { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--good-bg); color: var(--good); border-radius: var(--r-s); padding: 2px 9px; font-size: 13px; font-weight: 600; }
.pill.new { background: var(--good-bg); color: var(--good); flex: none; }
.job-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.job-foot .when { color: var(--muted); }
.job-foot .btn { position: relative; z-index: 1; flex: none; white-space: nowrap; }  /* above the stretched title link */
.nudge { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 16px; border-radius: var(--r-m);
  background: var(--brand-50); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); grid-column: 1 / -1; }
.nudge .badge-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; }
.nudge h2 { font-size: 17px; line-height: 1.3; }
.nudge p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.nudge .btn { grid-column: 1 / -1; }
@media (min-width: 640px) { .nudge { grid-template-columns: auto 1fr auto; align-items: center; } .nudge .btn { grid-column: auto; } }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.job-page { display: grid; gap: 14px; align-items: start; }
@media (min-width: 860px) { .job-page { grid-template-columns: 1fr 300px; } .apply { position: sticky; top: 16px; } }
.job-page .sheet h1 { font-size: 24px; }
.job-page .when { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.rows { margin: 6px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.rows div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rows dt { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; }
.rows dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 340px) { .rows div { grid-template-columns: 1fr; gap: 2px; } }
.sub-h { font-size: 17px; margin-top: 10px; }
.text.plain { border: 0; padding: 0; background: none; }
.safety strong { margin-right: 2px; }
.apply { display: grid; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; }
.apply small { color: var(--muted); font-size: 13px; text-align: center; }
.proof { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--good); }
.aside-alerts { display: grid; gap: 4px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.aside-alerts span { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.sticky-cta { position: sticky; bottom: 0; margin: 18px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgb(255 255 255 / .94); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
@media (min-width: 860px) { .sticky-cta { display: none; } }
@media (max-width: 859px) { .apply > .btn { display: none; } }  /* the sticky bar carries it on a phone */
/* the kind row is the second filter: quieter than the sets above it */
.chips.kinds a { font-size: 14px; padding: 5px 12px; }
.chips.kinds a[aria-current] { background: var(--brand-50); color: var(--brand); border-color: var(--brand); }
.chips.kinds a[aria-current] small { color: var(--brand); }

footer { color: var(--muted); font-size: 14px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); margin-top: 32px; }
footer p + p { margin-top: 6px; }
@media (min-width: 720px) { .hero h1 { font-size: 32px; } .hero { padding-bottom: 28px; } }
