/* Fangwork — marketplace UI, sized for older farmers on phones.
   Look: rice-paper background, paddy green, straw gold, ember for "burn soon". Type: IBM Plex Sans Thai (self-hosted). */
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/plexthai-thai-400.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/plexthai-thai-500.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/plexthai-thai-600.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/plexthai-thai-700.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/plexthai-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/plexthai-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/plexthai-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/plexthai-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f6f2e9;
  --paper-2: #eee7d8;
  --card: #fffdf8;
  --ink: #1d2b20;
  --ink-2: #3a4a3d;
  --muted: #646b5c;
  --line: #e4dccb;
  --line-2: #cfc4ad;
  --brand: #2f6b3c;
  --brand-600: #275a32;
  --brand-700: #1e4727;
  --brand-50: #e9f0e3;
  --brand-100: #d2e1c8;
  --straw: #e5b23a;
  --straw-600: #b9831a;
  --straw-50: #fbf1d9;
  --gold: var(--straw);
  --gold-50: var(--straw-50);
  --ember: #c4471a;
  --ember-50: #fbe9df;
  --danger: #b93a2b;
  --danger-50: #f9e9e5;
  --warn: #8f5500;
  --warn-50: #fcefd5;
  --info: #2d5f8a;
  --info-50: #e6eef5;
  --bg: var(--paper);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(29, 43, 32, .04), 0 1px 3px rgba(29, 43, 32, .07);
  --shadow-lg: 0 14px 36px rgba(29, 43, 32, .16);
  --font: 'IBM Plex Sans Thai', 'Noto Sans Thai', 'Leelawadee UI', Tahoma, sans-serif;
  --display: var(--font);
  --top-h: 66px;
  --bnav-h: 70px;
  font-size: 18px;
}
html.big { font-size: 21px; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink); background: var(--paper); line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
img { max-width: 100%; display: block; }
svg:not([width]) { width: 1.25em; height: 1.25em; flex: none; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 2rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.18rem; } h4 { font-size: 1rem; }
p { margin: 0 0 .8em; }
::selection { background: var(--straw); color: var(--ink); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--straw); outline-offset: 2px; border-radius: 6px; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .container { padding: 0 24px; } }
.view { flex: 1; outline: none; padding-bottom: 28px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.tiny { font-size: .78rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.hide { display: none !important; }
.center { text-align: center; }
.gap-s { gap: 8px; }
.mt-0 { margin-top: 0 !important; } .mt-s { margin-top: 8px; } .mt { margin-top: 16px; } .mt-l { margin-top: 28px; }
.mb-0 { margin-bottom: 0 !important; } .mb { margin-bottom: 16px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 253, 248, .97); backdrop-filter: saturate(1.3) blur(8px); border-bottom: 1px solid var(--line); }
.topbar .container { height: var(--top-h); display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 9px; white-space: nowrap; font-family: var(--display); font-weight: 700; font-size: 1.32rem; color: var(--ink); line-height: 1; }
.logo:hover { text-decoration: none; }
.logo img { width: 36px; height: 36px; }
.logo b { color: var(--brand); font-weight: 700; }
.logo img.wordmark { width: auto; height: 40px; }
.footer .logo img.wordmark { height: 44px; }
.top-search { flex: 1; max-width: 380px; position: relative; }
.top-search input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); padding: 0 14px 0 40px; }
.top-search input:focus { outline: 3px solid rgba(47, 107, 60, .18); border-color: var(--brand); background: #fff; }
.top-search svg { position: absolute; left: 13px; top: 12px; width: 20px; height: 20px; color: var(--muted); }
.top-nav { display: flex; gap: 2px; align-self: stretch; }
.top-nav a { color: var(--ink-2); padding: 0 12px; font-weight: 500; display: flex; align-items: center; position: relative; }
.top-nav a:hover { color: var(--brand-700); text-decoration: none; }
.top-nav a.on { color: var(--ink); font-weight: 600; }
.top-nav a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--straw); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 46px; height: 46px; border-radius: 12px; border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--paper); }
.icon-btn svg { width: 24px; height: 24px; }
.dot-count { position: absolute; top: 5px; right: 5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--ember); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.me-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 4px 12px 4px 4px; cursor: pointer; font-weight: 500; min-height: 44px; }
.me-btn:hover { border-color: var(--line-2); }
.menu { position: absolute; right: 16px; top: calc(var(--top-h) - 6px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); min-width: 250px; padding: 6px; z-index: 50; }
.menu a, .menu button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 12px; border-radius: 10px; color: var(--ink); border: 0; background: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--paper); text-decoration: none; }
.menu svg { width: 20px; height: 20px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.top-nav a, .top-actions .btn { white-space: nowrap; }
.me-btn > span:not(.avatar) { white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1180px) { .top-search { display: none; } }
@media (max-width: 1020px) { .top-nav a:nth-child(4) { display: none; } .top-actions .btn-ghost { display: none; } }
/* extra-large text: give the header room by dropping the less used links earlier */
@media (max-width: 1400px) { html.big .top-search { display: none; } }
@media (max-width: 1240px) { html.big .top-nav a:nth-child(n+3) { display: none; } html.big .me-btn > span:not(.avatar) { max-width: 120px; } }
@media (max-width: 1060px) { html.big .top-nav a:nth-child(n+2) { display: none; } html.big .me-btn > span:not(.avatar) { display: none; } }

/* ---------- bottom nav (phones) ---------- */
.bnav { display: none; }
@media (max-width: 860px) {
  .top-search, .top-nav, .top-actions .hide-m { display: none; }
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line); z-index: 40; box-shadow: 0 -2px 12px rgba(29, 43, 32, .05); }
  .bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .76rem; font-weight: 600; position: relative; }
  .bnav a svg { width: 26px; height: 26px; }
  .bnav a.on { color: var(--brand-700); }
  .bnav a.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--straw); }
  .bnav a:hover { text-decoration: none; }
  .bnav a.post span.plus { width: 52px; height: 52px; border-radius: 16px; background: var(--brand); color: #fff; display: grid; place-items: center; margin-top: -22px; box-shadow: 0 6px 16px rgba(47, 107, 60, .35); border: 3px solid var(--card); }
  .bnav a.post span.plus svg { width: 28px; height: 28px; }
  body { padding-bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); }
  .footer { margin-bottom: 0; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.35rem; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, box-shadow .15s, transform .06s; white-space: nowrap; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .08), inset 0 -2px 0 rgba(0, 0, 0, .12); }
.btn-primary:hover { background: var(--brand-600); }
.btn-gold { background: var(--straw); color: var(--ink); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .1); }
.btn-gold:hover { background: #dba72f; }
.btn-outline { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-700); }
.btn-ghost { background: transparent; color: var(--brand-700); }
.btn-ghost:hover { background: var(--brand-50); }
.btn-danger { background: var(--card); color: var(--danger); border-color: #e9c2ba; }
.btn-danger:hover { background: var(--danger-50); }
.btn-lg { min-height: 58px; font-size: 1.08rem; padding: 0 24px; border-radius: 14px; }
.btn-xl { min-height: 64px; font-size: 1.18rem; padding: 0 26px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: .9rem; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .spinner { width: 18px; height: 18px; border-width: 2px; }
.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; box-shadow: 0 1px 2px rgba(60, 64, 67, .12); }
.btn-google:hover { background: #f8faff; border-color: #c6d4f0; }
.btn-google svg.g { width: 20px; height: 20px; }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; margin: 18px 0; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.linkish { background: none; border: 0; color: var(--brand-600); cursor: pointer; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(39, 90, 50, .35); }

/* ---------- cards / badges ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
@media (max-width: 560px) { .card-pad { padding: 16px; } }
.card h3 { margin-bottom: .45em; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 6px; font-size: .8rem; font-weight: 600; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.badge svg { width: 14px; height: 14px; }
.badge.green { background: var(--brand-50); color: var(--brand-700); }
.badge.gold { background: var(--straw-50); color: #7a5200; }
.badge.red { background: var(--ember-50); color: #9a3412; }
.badge.blue { background: var(--info-50); color: #234d72; }
.badge.gray { background: var(--paper-2); color: var(--muted); }
.badge.solid { background: var(--brand); color: #fff; }
.avatar { width: 40px; height: 40px; border-radius: 999px; display: inline-grid; place-items: center; color: #fff; font-weight: 700; flex: none; font-size: .95rem; }
.avatar.lg { width: 72px; height: 72px; font-size: 1.6rem; font-family: var(--display); }
.avatar.sm { width: 30px; height: 30px; font-size: .8rem; }
.stars { color: var(--straw-600); letter-spacing: 1px; white-space: nowrap; font-weight: 600; }
.stars .n { color: var(--muted); font-size: .85em; margin-left: 4px; letter-spacing: 0; font-weight: 400; }

/* ---------- home ---------- */
.kicker { font-weight: 600; color: var(--brand-700); font-size: .95rem; display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.kicker::before { content: ''; width: 28px; height: 3px; border-radius: 3px; background: var(--straw); flex: none; }
.hero { background: radial-gradient(1100px 380px at 85% -10%, #e2ecd8 0%, transparent 60%), radial-gradient(800px 360px at 0% 0%, #fbeccb 0%, transparent 60%), linear-gradient(#faf7f0, var(--paper)); border-bottom: 1px solid var(--line); }
.hero .container { padding-top: 46px; padding-bottom: 58px; text-align: center; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; color: var(--brand-700); background: var(--card); border: 1px solid var(--brand-100); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.eyebrow svg { width: 18px; height: 18px; }
.hero h1 { font-size: clamp(1.8rem, 4.6vw, 3rem); margin: 18px 0 10px; letter-spacing: -.01em; }
.hero h1 .rot { color: var(--brand); display: inline-block; min-width: 6.5em; text-align: left; }
.hero h1 .rot::after { content: '|'; color: var(--straw); margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero .lead { color: var(--ink-2); max-width: 640px; margin: 0 auto 22px; font-size: 1.05rem; }
.hero-search { display: flex; max-width: 720px; margin: 0 auto; background: var(--card); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); gap: 6px; }
.hero-search input { flex: 1; border: 0; outline: 0; padding: 0 14px; min-width: 0; font-size: 1.05rem; background: transparent; }
.hero-search select { border: 0; background: var(--paper); border-radius: 999px; padding: 0 12px; max-width: 170px; }
.hero-search .btn { border-radius: 999px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.hero-cta .btn { border-radius: 999px; }
@media (max-width: 600px) { .hero-search select { display: none; } .hero h1 .rot { min-width: 0; } }
@media (prefers-reduced-motion: reduce) { .hero h1 .rot::after { animation: none; } }

.cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: -30px; position: relative; }
.cat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 10px; text-align: center; color: var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; transition: transform .12s, border-color .12s; }
.cat:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.cat .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); }
.cat .ic svg { width: 28px; height: 28px; }
.cat.gold .ic { background: var(--straw-50); color: #7a5200; }
.cat.blue .ic { background: var(--info-50); color: #234d72; }
@media (max-width: 700px) { .cats { grid-template-columns: repeat(3, 1fr); } .cats .cat:nth-child(n+4) { display: none; } }

/* signed-in home: what needs doing, my impact */
.mine { margin-top: 30px; }
.mine-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.mine-head h2 { margin: 0; }
.mine-impact { color: var(--ink-2); }
.mine-impact b { font-family: var(--display); font-weight: 700; color: var(--brand-700); font-size: 1.15em; }
.todo-list { display: grid; gap: 10px; }
.todo-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line-2); border-radius: 12px; color: var(--ink); }
.todo-item:hover { text-decoration: none; border-color: var(--line-2); }
.todo-item.act { border-left-color: var(--ember); }
.todo-item .tt { font-weight: 700; display: block; }
.todo-item.act .tt { color: #9a3412; }
.todo-item .ts { color: var(--muted); font-size: .9rem; display: block; }
.todo-item > svg { margin-left: auto; color: var(--muted); width: 22px; height: 22px; flex: none; }
.todo-none { padding: 16px; border: 1.5px dashed var(--line-2); border-radius: 12px; color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.quick a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink); font-weight: 600; min-height: 56px; }
.quick a:hover { border-color: var(--brand); text-decoration: none; }
.quick a svg { width: 24px; height: 24px; color: var(--brand); }
.quick a.main { background: var(--straw); border-color: var(--straw); }
.quick a.main svg { color: var(--ink); }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 2px 0 0; color: var(--muted); }
.section-head > a { white-space: nowrap; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.section-head > a svg { width: 18px; height: 18px; }

/* how a deal goes: the same five stages as the tracker on the deal page */
.steps5 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.steps5 li { position: relative; padding: 0 16px 0 0; }
.steps5 li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--card); border: 2px solid var(--brand); color: var(--brand-700); font-family: var(--display); font-weight: 700; font-size: 1.3rem; position: relative; z-index: 1; margin-bottom: 12px; }
.steps5 li::after { content: ''; position: absolute; top: 23px; left: 48px; right: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 8px, transparent 8px 14px); }
.steps5 li:last-child::after { display: none; }
.steps5 li:last-child::before { background: var(--brand); color: #fff; }
.steps5 b { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.steps5 span { color: var(--ink-2); font-size: .94rem; display: block; }
@media (max-width: 860px) {
  .steps5 { grid-template-columns: 1fr; gap: 0; }
  .steps5 li { padding: 0 0 18px 64px; min-height: 64px; }
  .steps5 li::before { position: absolute; left: 0; top: 0; margin: 0; width: 44px; height: 44px; }
  .steps5 li::after { top: 46px; bottom: 2px; left: 21px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--line-2) 0 8px, transparent 8px 14px); }
}
.promises { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; margin-top: 30px; border-top: 1px solid var(--line); }
.promises > div { padding: 16px 0 16px 38px; border-bottom: 1px solid var(--line); position: relative; }
.promises > div::before { content: ''; position: absolute; left: 4px; top: 21px; width: 18px; height: 10px; border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(-45deg); }
.promises b { display: block; font-size: 1.05rem; }
.promises span { color: var(--ink-2); }
@media (max-width: 700px) { .promises { grid-template-columns: 1fr; } }

/* public counter: straw that went to use instead of the fire */
.counter { background: var(--straw-50); border: 1px solid #ecd9a8; border-radius: 18px; padding: 26px 28px; }
.counter h2 { margin: 0 0 4px; }
.counter > p { color: var(--ink-2); margin: 0 0 18px; }
.counter .nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.counter .nums div { border-left: 3px solid var(--straw); padding-left: 14px; }
.counter .nums b { display: block; font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.counter .nums span { color: var(--ink-2); font-size: .92rem; }
@media (max-width: 760px) { .counter { padding: 20px; } .counter .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } .counter .nums b { font-size: 1.6rem; } }

/* the people behind it: a real name and a real phone */
.team { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; background: var(--brand-700); color: #f3efe2; border-radius: 18px; padding: 28px; }
.team h2 { color: #fff; margin: 0 0 8px; }
.team p { margin: 0; color: #d7e0d2; }
.team .kicker { color: #f2d48a; }
.team-who { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 18px; display: grid; gap: 4px; }
.team-who b { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: #fff; }
.team-who span { color: #cfdac9; }
.team-who .btn { margin-top: 10px; }
.team-who .btn-gold { font-size: 1.15rem; }
@media (max-width: 760px) { .team { grid-template-columns: 1fr; padding: 22px; } }

/* ---------- listing cards ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
@media (max-width: 560px) { .grid-cards { grid-template-columns: 1fr; gap: 14px; } }
.lcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); transition: box-shadow .15s, transform .15s, border-color .15s; box-shadow: var(--shadow); }
.lcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); text-decoration: none; border-color: var(--line-2); }
.lcard .cover { position: relative; aspect-ratio: 16 / 10; background: #d7cfa9; overflow: hidden; }
.lcard .cover img { width: 100%; height: 100%; object-fit: cover; }
.lcard .cover .pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 999px; border: 3px solid #fff; background: var(--straw); box-shadow: 0 0 0 6px rgba(229, 178, 58, .35); }
.lcard .cover .tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
/* satellite cover: yellow field outline, status, clear-by flag, kind label, credit */
svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rd { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 999px; white-space: nowrap; background: #e4f0de; color: #24572f; }
.rd i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.rd.ready i { animation: rdPulse 1.8s infinite; }
@keyframes rdPulse { 0% { box-shadow: 0 0 0 0 rgba(36, 87, 47, .5); } 70% { box-shadow: 0 0 0 7px rgba(36, 87, 47, 0); } 100% { box-shadow: 0 0 0 0 rgba(36, 87, 47, 0); } }
.rd.soon { background: var(--straw-50); color: #7a5200; }
.rd.later { background: var(--info-50); color: #234d72; }
.rd.done { background: var(--paper-2); color: var(--muted); }
.rd.tr { position: absolute; top: 10px; right: 10px; background: var(--card); box-shadow: 0 1px 4px rgba(0, 0, 0, .22); }
.clr { position: absolute; top: 10px; left: 10px; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; color: #fff; background: var(--ember); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.clr.w { background: var(--straw); color: var(--ink); }
.kind-lbl { position: absolute; left: 10px; bottom: 10px; background: rgba(20, 28, 22, .78); color: #fff; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; }
.credit { position: absolute; right: 8px; bottom: 8px; font-size: .68rem; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 2px rgba(0, 0, 0, .85); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .rd.ready i { animation: none; } * { transition: none !important; } }
.dcard .thumb, .thumbs button { position: relative; }
/* drawing a field outline on the satellite map */
.draw-map { position: relative; height: min(58vh, 460px); border-radius: var(--radius); overflow: hidden; background: #cdbb86; }
.draw-map .map { position: absolute; inset: 0; }
.draw-busy { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(12, 24, 16, .35); color: #fff; font-size: 1.05rem; }
.draw-busy[hidden] { display: none; }
.draw-busy .spinner { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.draw-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.draw-modes .chip { min-height: 52px; font-size: .98rem; }
.draw-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.draw-bar #dtip { font-weight: 600; }
.draw-bar #darea { background: #ffd84a; color: #3a2c00; font-weight: 700; border-radius: 8px; padding: 3px 12px; }
.draw-bar #darea:empty { display: none; }
.lcard .cover .tags .badge { box-shadow: 0 1px 4px rgba(0, 0, 0, .15); background: #fff; }
.lcard .cover .tags .badge.red { background: #fff1ec; }
.lcard .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lcard .title { font-weight: 600; font-size: 1.04rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.lcard .meta { color: var(--muted); font-size: .9rem; display: flex; gap: 6px; align-items: center; }
.lcard .meta svg { width: 17px; height: 17px; flex: none; }
.lcard .who { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-2); line-height: 1.35; min-width: 0; }
.lcard .foot { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-2); display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.lcard .price { font-family: var(--display); font-weight: 700; font-size: 1.4rem; line-height: 1.15; color: var(--ink); text-align: right; white-space: nowrap; }
.lcard .price small { font-family: var(--font); font-weight: 500; color: var(--muted); font-size: .76rem; display: block; }
.demo-ribbon { position: absolute; right: -34px; top: 12px; transform: rotate(35deg); background: #3b4a42; color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 40px; }

/* ---------- market filters ---------- */
.filters { position: sticky; top: var(--top-h); z-index: 20; background: var(--paper); padding: 12px 0; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); border-radius: 10px; padding: 8px 15px; font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { border-color: var(--brand); }
.tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab .n { background: rgba(0, 0, 0, .07); border-radius: 6px; padding: 0 7px; font-size: .78rem; }
.tab.on .n { background: rgba(255, 255, 255, .2); }
.selects { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.selects select, .selects input { height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); padding: 0 12px; }
/* phones: filters scroll away with the page and sit in a tidy two-column grid */
@media (max-width: 860px) {
  .filters { position: static; padding: 10px 0 12px; }
  .filters .row.between { gap: 8px; }
  .selects { display: grid; grid-template-columns: 1fr 1fr; }
  .selects input { grid-column: 1 / -1; }
  .selects select, .selects input { width: 100%; min-width: 0; }
}

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.field > span .opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.input, .field input, .field select, .field textarea { width: 100%; min-height: 54px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 10px 14px; background: #fff; font-size: 1.05rem; }
.field textarea { min-height: 100px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: 3px solid rgba(47, 107, 60, .16); }
.hint { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.err { color: var(--danger); font-weight: 600; margin-top: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--card); cursor: pointer; }
.check input { width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }

/* big choice chips — one tap answers; the chosen one gets a tick, not only a colour */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.chips.cols-1 { grid-template-columns: 1fr; }
.chips.cols-2 { grid-template-columns: repeat(2, 1fr); }
.chip { position: relative; min-height: 62px; border: 1.5px solid var(--line-2); background: var(--card); border-radius: 14px; padding: 10px 14px; font-weight: 600; font-size: 1.05rem; cursor: pointer; display: flex; align-items: center; gap: 12px; text-align: left; color: var(--ink); transition: border-color .12s, background .12s; }
.chip:hover { border-color: var(--brand); text-decoration: none; }
.chip.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand); }
.chip.on::after { content: ''; margin-left: auto; width: 26px; height: 26px; border-radius: 50%; flex: none; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat; }
.chip .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--paper); display: grid; place-items: center; flex: none; font-size: 1.5rem; }
.chip.on .ic { background: #fff; }
.chip .ic svg { width: 26px; height: 26px; }
.chip small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.chip.center { justify-content: center; text-align: center; }
.chip.center.on::after { position: absolute; right: 6px; top: 6px; width: 18px; height: 18px; margin: 0; background-size: 12px; }

.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 64px; height: 64px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--card); font-size: 2rem; font-weight: 600; cursor: pointer; color: var(--brand-700); }
.stepper button:active { background: var(--brand-50); }
.stepper input { flex: 1; min-width: 0; height: 64px; text-align: center; font-family: var(--display); font-size: 1.9rem; font-weight: 600; border: 1.5px solid var(--line-2); border-radius: 16px; background: #fff; }
.stepper .unit { font-weight: 600; color: var(--muted); }

/* PIN pad */
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 8px 0 18px; }
.pin-dots i { width: 20px; height: 20px; border-radius: 999px; border: 2.5px solid var(--line-2); }
.pin-dots i.on { background: var(--brand); border-color: var(--brand); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 340px; margin: 0 auto; }
.pinpad button { height: 66px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--card); font-family: var(--display); font-size: 1.7rem; font-weight: 600; cursor: pointer; }
.pinpad button:active { background: var(--brand-50); border-color: var(--brand); }
.pinpad button.fn { font-family: var(--font); font-size: 1rem; color: var(--muted); }
.pin-hidden, .field input.pin-hidden { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; overflow: hidden; }
.pin-dots { position: relative; }

/* ---------- wizard (one question per page) ---------- */
.wz { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.wz-top { display: flex; align-items: center; gap: 10px; padding: 14px 0 8px; }
.wz-top .count { color: var(--muted); font-weight: 600; font-size: .92rem; margin-left: auto; }
.wz-bar { height: 8px; background: var(--paper-2); border-radius: 999px; overflow: hidden; }
.wz-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s; }
.wz-banner { margin-top: 12px; }
.wz-q { display: flex; gap: 10px; align-items: flex-start; margin: 24px 0 6px; }
.wz-q h2 { font-size: 1.6rem; margin: 0; flex: 1; }
.speak { width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--brand-700); flex: none; }
.speak svg { width: 22px; height: 22px; }
.wz-hint { color: var(--muted); margin-bottom: 18px; }
.wz-body { min-height: 200px; }
.wz-foot { position: sticky; bottom: 0; background: linear-gradient(rgba(246, 242, 233, 0), var(--paper) 22%); padding: 22px 0 16px; display: flex; gap: 10px; margin-top: 18px; }
.wz-foot .btn { flex: 1; }
.wz-foot .btn-outline { flex: 0 0 auto; }
@media (max-width: 860px) { .wz-foot { bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); } }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.summary .sr { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.summary .sr:last-child { border-bottom: 0; }
.summary .sr span:first-child { color: var(--muted); }
.summary .sr span:last-child { font-weight: 600; text-align: right; }
.summary .sr button { margin-left: 8px; }

/* map picker */
.map-pick { position: relative; height: 52vh; min-height: 300px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #cfc7a5; }
.map-pick .map { position: absolute; inset: 0; }
.map-pick .center-pin { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -100%); pointer-events: none; z-index: 2; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.map-pick .where { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 2; background: rgba(255, 253, 248, .96); border-radius: 12px; padding: 8px 12px; font-weight: 600; box-shadow: var(--shadow); }
.map-pick .locate { position: absolute; right: 10px; bottom: 10px; z-index: 2; }
.map-full { height: calc(100vh - var(--top-h) - 120px); min-height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.maplibregl-popup-content { border-radius: 12px; padding: 0; overflow: hidden; font-family: inherit; }

/* ---------- listing page ---------- */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 26px; align-items: start; margin-top: 18px; }
@media (max-width: 960px) { .page-grid { grid-template-columns: 1fr; } }
.side { position: sticky; top: calc(var(--top-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 960px) { .side { position: static; } }
.gallery { border-radius: var(--radius); overflow: hidden; background: #d7cfa9; position: relative; aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .pin { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 999px; border: 4px solid #fff; background: var(--straw); box-shadow: 0 0 0 8px rgba(229, 178, 58, .35); }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 10px; overflow: hidden; width: 86px; height: 60px; flex: none; cursor: pointer; background: #ddd; }
.thumbs button.on { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.buybar { display: none; }
@media (max-width: 960px) {
  .buybar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 36; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(29, 43, 32, .08); }
  .buybar .price { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.15; }
  .buybar .price small { display: block; font-family: var(--font); font-size: .76rem; font-weight: 500; color: var(--muted); }
  .buybar .btn { flex: 0 1 auto; }
  body.has-buybar .view { padding-bottom: 96px; }
  body.has-buybar .fab-call { bottom: 96px; }
}
@media (max-width: 860px) {
  .buybar { bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  body.has-buybar .fab-call { bottom: calc(var(--bnav-h) + 92px + env(safe-area-inset-bottom)); }
}
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.fact .k { color: var(--muted); font-size: .85rem; }
.fact .v { font-weight: 700; font-size: 1.08rem; }
.price-box .big { font-family: var(--display); font-size: 2.1rem; font-weight: 600; line-height: 1.15; }
.impact { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius); padding: 16px 18px; }
.impact .nums { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 6px; }
.impact .nums b { font-family: var(--display); font-weight: 700; font-size: 1.45rem; color: var(--brand-700); display: block; }

/* ---------- deals ---------- */
.dcard { display: flex; gap: 14px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); align-items: center; box-shadow: var(--shadow); }
.dcard:hover { border-color: var(--line-2); text-decoration: none; box-shadow: var(--shadow-lg); }
.dcard .thumb { width: 96px; height: 74px; border-radius: 10px; overflow: hidden; flex: none; background: #d7cfa9; }
.dcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.dcard .t { font-weight: 600; }
.dcard .todo { margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 6px; font-weight: 600; font-size: .85rem; }
.pill.pending { background: var(--warn-50); color: var(--warn); }
.pill.agreed, .pill.scheduled { background: var(--info-50); color: #234d72; }
.pill.counted { background: var(--straw-50); color: #7a5200; }
.pill.paid, .pill.closed { background: var(--brand-50); color: var(--brand-700); }
.pill.declined, .pill.withdrawn, .pill.expired, .pill.cancelled { background: var(--paper-2); color: var(--muted); }
.flow { display: flex; gap: 0; margin: 16px 0 6px; overflow-x: auto; }
.flow .st { flex: 1; min-width: 86px; text-align: center; position: relative; font-size: .84rem; color: var(--muted); font-weight: 600; }
.flow .st i { width: 32px; height: 32px; border-radius: 999px; background: var(--card); border: 2px solid var(--line-2); display: grid; place-items: center; margin: 0 auto 6px; font-style: normal; font-family: var(--display); font-size: .92rem; position: relative; z-index: 1; }
.flow .st::before { content: ''; position: absolute; top: 15px; left: -50%; right: 50%; height: 3px; background: var(--line); }
.flow .st:first-child::before { display: none; }
.flow .st.done { color: var(--brand-700); }
.flow .st.done i { background: var(--brand); border-color: var(--brand); color: #fff; }
.flow .st.done::before, .flow .st.now::before { background: var(--brand); }
.flow .st.now { color: var(--ink); }
.flow .st.now i { border-color: var(--straw-600); background: var(--straw); color: var(--ink); box-shadow: 0 0 0 5px rgba(229, 178, 58, .28); }
.todo-box { border: 1px solid var(--line); border-left: 6px solid var(--brand); background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.todo-box.wait { border-left-color: var(--line-2); }
.todo-box h3 { display: flex; align-items: center; gap: 8px; }
.todo-box .offer-big { font-family: var(--display); font-size: 1.9rem; font-weight: 600; margin: 4px 0 2px; line-height: 1.2; }
.actions-col { display: grid; gap: 10px; margin-top: 14px; }
.party { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.party:last-child { border-bottom: 0; }
.party .role { color: var(--muted); font-size: .82rem; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: flex; gap: 12px; padding: 10px 0; }
.tl li .ic { width: 34px; height: 34px; border-radius: 999px; background: var(--paper); display: grid; place-items: center; flex: none; }
.tl li .ic svg { width: 18px; height: 18px; color: var(--muted); }
.tl li.msg .bubble { background: var(--brand-50); border-radius: 4px 14px 14px 14px; padding: 8px 12px; display: inline-block; }
.tl li .when { color: var(--muted); font-size: .8rem; }
.qr-box { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.qr-box svg { width: 230px; height: 230px; }
.qr-box .pp { display: inline-block; background: #0e3b67; color: #fff; font-weight: 700; padding: 4px 14px; border-radius: 8px; margin-bottom: 10px; letter-spacing: .03em; }
.rate-stars { display: flex; gap: 6px; }
.rate-stars button { font-size: 2.3rem; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--line-2); padding: 2px; }
.rate-stars button.on { color: var(--straw); }

/* ---------- misc blocks ---------- */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; } }
.how .card { padding: 20px; position: relative; }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty .ic { width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; transform: rotate(-4deg); }
.empty .ic svg { width: 36px; height: 36px; color: var(--brand); }
.empty h3 { color: var(--ink); }
.note { background: var(--info-50); color: #1f4466; border-radius: 12px; padding: 12px 14px; font-size: .95rem; }
.note.warn { background: var(--warn-50); color: #6e4300; }
.note.green { background: var(--brand-50); color: var(--brand-700); }
.note.red { background: var(--danger-50); color: #85281d; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.page-head { padding: 26px 0 8px; }
.page-head h1 { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; margin-top: 14px; min-height: 40px; }
.back svg { width: 18px; height: 18px; }
.list-gap > * + * { margin-top: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }

/* call-team floating button */
.fab-call { position: fixed; right: 16px; bottom: 20px; z-index: 35; display: flex; align-items: center; gap: 8px; background: var(--card); color: var(--brand-700); border: 1.5px solid var(--brand); border-radius: 14px; padding: 10px 16px; font-weight: 700; box-shadow: var(--shadow-lg); min-height: 50px; }
.fab-call svg { width: 22px; height: 22px; }
.fab-call:hover { text-decoration: none; background: var(--brand-50); }
@media (max-width: 860px) { .fab-call { bottom: calc(var(--bnav-h) + 14px + env(safe-area-inset-bottom)); padding: 10px 13px; } .fab-call .lbl { display: none; } }

/* footer */
.footer { background: var(--card); border-top: 1px solid var(--line); margin-top: 48px; padding: 32px 0 28px; color: var(--muted); font-size: .92rem; }
.footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 24px; }
.footer .cols > div > b { color: var(--ink); display: block; margin-bottom: 6px; }
.footer a { color: var(--ink-2); display: inline-block; padding: 3px 0; }
.footer a.logo { display: flex; color: var(--ink); padding: 0; }
.footer .phone { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--brand-700); }
.footer .fine { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 14px; }
@media (max-width: 860px) { .footer .cols { grid-template-columns: 1fr 1fr; } .footer .cols > div:first-child, .footer .cols > div:last-child { grid-column: 1 / -1; } }

/* toasts & modal */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); top: 78px; z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); }
.toast { background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; animation: tin .2s ease-out; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--brand-600); }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
.modal-back { position: fixed; inset: 0; background: rgba(20, 28, 22, .5); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--card); border-radius: 18px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); padding: 22px; }
.modal h3 { margin-top: 0; }
.modal .row.end { justify-content: flex-end; margin-top: 18px; }

/* loading */
.spinner { width: 34px; height: 34px; border-radius: 999px; border: 3px solid var(--brand-100); border-top-color: var(--brand); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { min-height: 50vh; display: grid; place-items: center; }
.sk { background: linear-gradient(90deg, #ece5d5, #f6f1e6, #ece5d5); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* who bales / whose truck hauls, on the deal page */
.crew { display: grid; gap: 6px; margin: 10px 0 4px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.crew > div { display: flex; gap: 8px; align-items: flex-start; }
.crew svg { width: 20px; height: 20px; color: var(--brand); margin-top: 3px; }
.crew b { margin-right: 4px; }

/* seller services: own baler / own truck */
.svc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.svc-tags span { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--brand-700); background: var(--brand-50); border-radius: 6px; padding: 2px 8px; }
.svc-tags svg { width: 15px; height: 15px; }
.svc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .svc-row { grid-template-columns: 1fr; } }
.svc { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.svc .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--paper); display: grid; place-items: center; flex: none; color: var(--muted); }
.svc .ic svg { width: 24px; height: 24px; }
.svc.on { border-color: var(--brand-100); background: var(--brand-50); }
.svc.on .ic { background: #fff; color: var(--brand); }
.svc b { display: block; }
.svc .d { color: var(--muted); font-size: .88rem; }

/* help, rules, faq, privacy */
[id] { scroll-margin-top: calc(var(--top-h) + 64px); }
.hsteps { list-style: none; margin: 14px 0 18px; padding: 0; counter-reset: h; }
.hsteps li { position: relative; padding: 4px 0 16px 58px; min-height: 52px; }
.hsteps li::before { counter-increment: h; content: counter(h); position: absolute; left: 0; top: 0; width: 42px; height: 42px; border-radius: 999px; background: var(--brand); color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.2rem; display: grid; place-items: center; }
.hsteps li:not(:last-child)::after { content: ''; position: absolute; left: 20px; top: 44px; bottom: 2px; width: 2px; background: var(--brand-100); }
.hsteps b { display: block; font-size: 1.08rem; }
.hsteps span { color: var(--ink-2); }
.rules { margin: 0; padding-left: 1.2em; }
.rules li { margin: 8px 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; min-height: 44px; list-style-position: outside; }
.faq details p { margin: 0 0 12px; color: var(--ink-2); }
.prose h3 { margin-top: 1.4em; }
.prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }

/* notifications */
.nitem { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.nitem:hover { text-decoration: none; border-color: var(--line-2); }
.nitem .ic { width: 40px; height: 40px; border-radius: 999px; background: var(--paper); display: grid; place-items: center; flex: none; color: var(--muted); }
.nitem.unread { border-color: var(--brand-100); border-left: 5px solid var(--brand); background: var(--brand-50); }
.nitem.unread .ic { background: var(--brand); color: #fff; }

/* LINE linking */
.steps-ol { padding-left: 1.3em; margin: 0 0 10px; }
.steps-ol li { margin: 10px 0; }
.code-big { font-family: var(--display); font-size: 2.2rem; font-weight: 600; letter-spacing: .25em; background: var(--paper); border: 2px dashed var(--line-2); border-radius: 14px; padding: 8px 14px; display: inline-block; margin-top: 6px; user-select: all; }

/* certificate satellite pin */
.cert .pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 999px; border: 3px solid #fff; background: var(--straw); box-shadow: 0 0 0 6px rgba(229, 178, 58, .35); }

/* certificate (printable) */
.cert { background: #fff; max-width: 820px; margin: 18px auto; padding: 36px; border: 1px solid var(--line); border-radius: 8px; }
.cert h1 { font-size: 1.6rem; text-align: center; }
.cert .seal { text-align: center; color: var(--brand-700); font-weight: 700; }
.cert table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.cert td { border-bottom: 1px solid var(--line); padding: 8px 4px; vertical-align: top; }
.cert td:first-child { color: var(--muted); width: 38%; }
.cert .photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cert .photos img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
@media print {
  .topbar, .bnav, .footer, #fab, .no-print, .toasts { display: none !important; }
  body { background: #fff; padding: 0; }
  .cert { border: 0; margin: 0; max-width: none; }
}
