/* static/match.css: the self-serve brand portal (/match, templates/match/). Mobile first.
   Loaded after trp-theme.css (tokens: --trp-bg cream, --trp-accent gold, Inter). Public brand surface:
   no admin chrome, the company logo, 16px inputs (no iOS zoom), 44px+ tap targets, sticky CTA on phones. */

.bm { --bm-ink: #111111; --bm-muted: #5f5a52; --bm-line: #e6dccd; --bm-gold: #a0784a; --bm-gold-dark: #7d5a33;
      --bm-card: #ffffff; --bm-radius: 18px; --bm-pad: max(18px, env(safe-area-inset-left));
      background: var(--trp-bg, #f6ede0); color: var(--bm-ink); min-height: 100vh; margin: 0;
      -webkit-text-size-adjust: 100%; overflow-x: clip; font-family: var(--trp-font-family); }
.bm *, .bm *::before, .bm *::after { box-sizing: border-box; }
.bm a { color: inherit; }
.bm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.bm-top { position: sticky; top: 0; z-index: 20; background: rgba(246, 237, 224, 0.92);
          backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
          border-bottom: 1px solid var(--bm-line); }
.bm-top-in { max-width: 1120px; margin: 0 auto; height: 60px; padding: 0 var(--bm-pad);
             display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bm-logo { display: inline-flex; align-items: center; min-height: 44px; }
.bm-logo img { height: 18px; width: auto; display: block; }
.bm-top-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
              border-radius: 999px; border: 1px solid var(--bm-ink); font-size: 14px; font-weight: 600;
              text-decoration: none; white-space: nowrap; }
.bm-top-cta:hover { background: var(--bm-ink); color: #fff; }

.bm-wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--bm-pad); }
.bm-main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

/* hero */
.bm-hero { padding: 34px 0 18px; }
.bm-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
              color: var(--bm-gold-dark); margin-bottom: 12px; }
.bm-hero h1 { font-size: clamp(30px, 8.4vw, 54px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 14px; }
.bm-hero h1 em { font-style: normal; color: var(--bm-gold-dark); }
.bm-lead { font-size: 17px; line-height: 1.55; color: var(--bm-muted); margin: 0; max-width: 640px; }
.bm-stats { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bm-stats li { background: var(--bm-card); border: 1px solid var(--bm-line); border-radius: 14px; padding: 12px 10px; }
.bm-stats b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.bm-stats span { display: block; font-size: 12px; line-height: 1.3; color: var(--bm-muted); margin-top: 2px; }

/* errors */
.bm-alert { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: #fdecea; border: 1px solid #f3c2bc;
            color: #8a1c12; font-size: 15px; }

/* brief form */
.bm-panel { background: var(--bm-card); border: 1px solid var(--bm-line); border-radius: var(--bm-radius);
            padding: 20px 16px; margin: 18px 0; box-shadow: 0 1px 2px rgba(17, 17, 17, .04); }
.bm-step { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.bm-step:last-of-type { margin-bottom: 8px; }
.bm-step > legend, .bm-label { display: flex; align-items: baseline; gap: 10px; font-size: 16px; font-weight: 650; margin: 0 0 12px; padding: 0; }
.bm-num { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
          background: var(--bm-ink); color: #fff; font-size: 12px; font-weight: 700; transform: translateY(-1px); }
.bm-opt { font-weight: 400; color: var(--bm-muted); font-size: 14px; }

.bm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bm-tile { position: relative; }
.bm-tile input, .bm-seg input, .bm-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bm-tile span { display: flex; align-items: center; min-height: 52px; padding: 10px 12px; border: 1.5px solid var(--bm-line);
                border-radius: 12px; font-size: 15px; line-height: 1.25; background: #fffdf9; cursor: pointer;
                transition: border-color .15s, background .15s; }
.bm-tile input:checked + span { border-color: var(--bm-ink); background: var(--bm-ink); color: #fff; }
.bm-tile input:focus-visible + span, .bm-seg input:focus-visible + span, .bm-chip input:focus-visible + span { outline: 3px solid var(--bm-gold); outline-offset: 2px; }

.bm-seg { display: grid; grid-template-columns: 1fr; gap: 8px; }
.bm-seg label { position: relative; }
.bm-seg span { display: flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 10px 14px;
               border: 1.5px solid var(--bm-line); border-radius: 12px; background: #fffdf9; cursor: pointer; }
.bm-seg span b { font-size: 15px; }
.bm-seg span small { font-size: 13px; color: var(--bm-muted); margin-top: 2px; }
.bm-seg input:checked + span { border-color: var(--bm-ink); box-shadow: inset 0 0 0 1px var(--bm-ink); background: #fff; }

.bm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-chip { position: relative; }
.bm-chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 999px;
                border: 1.5px solid var(--bm-line); background: #fffdf9; font-size: 15px; cursor: pointer; }
.bm-chip input:checked + span { border-color: var(--bm-ink); background: var(--bm-ink); color: #fff; }

.bm-grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.bm-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.bm-field input, .bm-field select { width: 100%; min-height: 50px; padding: 0 14px; font: inherit; font-size: 16px;
                                     color: var(--bm-ink); background: #fffdf9; border: 1.5px solid var(--bm-line);
                                     border-radius: 12px; -webkit-appearance: none; appearance: none; }
.bm-field select { background-image: linear-gradient(45deg, transparent 50%, var(--bm-ink) 50%), linear-gradient(135deg, var(--bm-ink) 50%, transparent 50%);
                   background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.bm-field input:focus, .bm-field select:focus { outline: none; border-color: var(--bm-ink); box-shadow: 0 0 0 3px rgba(160, 120, 74, .25); }
.bm-hint { font-size: 13px; color: var(--bm-muted); margin: 6px 0 0; }

.bm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px;
          padding: 0 22px; border: 0; border-radius: 999px; background: var(--bm-ink); color: #fff; font: inherit;
          font-size: 16px; font-weight: 650; text-decoration: none; cursor: pointer; }
.bm-btn:hover { background: #2a2a2a; }
.bm-btn-gold { background: var(--bm-gold-dark); }
.bm-btn-gold:hover { background: #694b2a; }
.bm-btn-ghost { background: transparent; color: var(--bm-ink); border: 1.5px solid var(--bm-ink); }
.bm-btn-ghost:hover { background: var(--bm-ink); color: #fff; }

/* phones: the main action stays reachable */
.bm-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px var(--bm-pad) calc(10px + env(safe-area-inset-bottom));
             background: rgba(246, 237, 224, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
             border-top: 1px solid var(--bm-line); }
.bm-desktop-submit { display: none; }

/* how it works */
.bm-how { margin: 30px 0 10px; }
.bm-how h2, .bm-sec-title { font-size: 22px; letter-spacing: -0.01em; margin: 0 0 14px; font-weight: 650; }
.bm-how ol { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 10px; }
.bm-how li { counter-increment: s; background: var(--bm-card); border: 1px solid var(--bm-line); border-radius: 14px; padding: 16px 16px 16px 56px; position: relative; }
.bm-how li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 26px; height: 26px; border-radius: 50%;
                     border: 1.5px solid var(--bm-gold); color: var(--bm-gold-dark); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.bm-how b { display: block; font-size: 16px; margin-bottom: 4px; }
.bm-how p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--bm-muted); }

/* results */
.bm-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 6px; }
.bm-summary div { background: var(--bm-ink); color: #fff; border-radius: 14px; padding: 14px; }
.bm-summary div:nth-child(2) { background: var(--bm-card); color: var(--bm-ink); border: 1px solid var(--bm-line); }
.bm-summary b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.bm-summary span { display: block; font-size: 13px; opacity: .8; margin-top: 2px; line-height: 1.3; }
.bm-brief { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.bm-brief li { font-size: 13px; padding: 6px 10px; border-radius: 999px; background: rgba(17, 17, 17, .06); }
.bm-brief a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.bm-cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 18px 0 8px; padding: 0; list-style: none; }
.bm-card { background: var(--bm-card); border: 1px solid var(--bm-line); border-radius: var(--bm-radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bm-card-top { display: flex; align-items: center; gap: 12px; }
.bm-avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
             background: linear-gradient(135deg, #efe3d1, #e2d0b6); color: var(--bm-gold-dark); font-weight: 700; font-size: 16px; }
.bm-card-title { flex: 1; min-width: 0; }
.bm-card-title b { display: block; font-size: 16px; }
.bm-card-title span { display: block; font-size: 13px; color: var(--bm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-score { flex: none; text-align: center; min-width: 58px; padding: 6px 8px; border-radius: 12px; background: #f3efe8; }
.bm-score b { display: block; font-size: 22px; line-height: 1; font-weight: 700; }
.bm-score small { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--bm-muted); margin-top: 3px; }
.bm-score.ok b { color: #1f7a4d; } .bm-score.watch b { color: #9a6a00; } .bm-score.red b { color: #a2362a; }
.bm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bm-tags li { font-size: 13px; padding: 5px 10px; border-radius: 999px; background: #f6efe4; border: 1px solid var(--bm-line); }
.bm-tags li.is-main { background: var(--bm-ink); color: #fff; border-color: var(--bm-ink); }
.bm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.bm-facts div { background: #faf6ef; border-radius: 10px; padding: 8px; min-width: 0; }
.bm-facts dt { font-size: 11px; color: var(--bm-muted); text-transform: uppercase; letter-spacing: .06em; }
.bm-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-why { margin: 0; font-size: 14px; color: var(--bm-muted); display: flex; gap: 8px; align-items: flex-start; }
.bm-why i { color: var(--bm-gold); margin-top: 3px; }
.bm-note { font-size: 13px; color: var(--bm-muted); display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; }

.bm-proposal h2 { font-size: 22px; margin: 0 0 6px; }
.bm-proposal > p { margin: 0 0 18px; color: var(--bm-muted); font-size: 15px; line-height: 1.5; }
.bm-proposal .bm-grid2 { margin-bottom: 16px; }
.bm-proposal .bm-btn { margin-top: 6px; }
.bm-trust { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13px; color: var(--bm-muted); margin: 12px 0 0; }
.bm-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; text-decoration: none; }

.bm-empty { text-align: center; padding: 28px 16px; }

/* thanks */
.bm-done { text-align: center; padding: 56px 0 24px; }
.bm-done .bm-check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px;
                     background: var(--bm-ink); color: #fff; font-size: 26px; }
.bm-done .bm-lead { margin: 0 auto 26px; }
.bm-done .bm-btn { max-width: 360px; }

.bm-foot { border-top: 1px solid var(--bm-line); padding: 22px var(--bm-pad) calc(22px + env(safe-area-inset-bottom)); text-align: center;
           font-size: 13px; color: var(--bm-muted); }
.bm-foot img { height: 13px; width: auto; display: block; margin: 0 auto 8px; opacity: .8; }

.bm-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

@media (hover: none) { .bm-btn:hover { background: var(--bm-ink); } .bm-btn-gold:hover { background: var(--bm-gold-dark); } .bm-top-cta:hover { background: none; color: inherit; } }

/* small phones */
@media (max-width: 360px) {
  .bm-stats b { font-size: 17px; }
  .bm-facts dd { font-size: 14px; }
  .bm-top-cta span { display: none; }
}

/* tablets and up */
@media (min-width: 720px) {
  .bm-main { padding-bottom: 40px; }
  .bm-sticky { position: static; padding: 0; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; margin-top: 8px; }
  .bm-sticky .bm-btn { width: auto; min-width: 260px; }
  .bm-hero { padding: 64px 0 24px; }
  .bm-lead { font-size: 19px; }
  .bm-logo img { height: 22px; }
  .bm-top-in { height: 68px; }
  .bm-stats { max-width: 620px; gap: 12px; }
  .bm-stats li { padding: 16px; }
  .bm-stats b { font-size: 26px; }
  .bm-panel { padding: 30px; }
  .bm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bm-seg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bm-grid2 { grid-template-columns: 1fr 1fr; }
  .bm-how ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .bm-summary { grid-template-columns: repeat(2, minmax(0, 260px)); }
  .bm-proposal .bm-btn { width: auto; min-width: 260px; }
}
@media (min-width: 1040px) {
  .bm-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bm-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bm-split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
  .bm-split .bm-proposal { position: sticky; top: 88px; margin-top: 18px; }
  .bm-split .bm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.bm-hero-tight { padding-bottom: 0; }
.bm-details { margin-top: 12px; }
.bm-done h1 { font-size: clamp(28px, 7vw, 44px); line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 12px; }
.bm-again { margin-top: 14px; }
@media (min-width: 1040px) { .bm-sticky-results { display: none; } }

/* footer links back to the main site */
.bm-foot-logo { display: inline-flex; min-height: 44px; align-items: center; }
.bm-foot-logo img { margin: 0; }
.bm-foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin: 4px 0 8px; }
.bm-foot-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--bm-ink); font-weight: 600; text-decoration: none; }
.bm-foot-nav a:hover { text-decoration: underline; }
.bm-foot p { margin: 0; }
.bm-more { margin: 16px 0 0; font-size: 15px; color: var(--bm-muted); line-height: 1.6; }
.bm-more a { font-weight: 600; color: var(--bm-ink); }

/* cookie consent bar: the marketing site's look (ink panel, gold accept), above the sticky CTA on phones */
.consent-bar { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); max-width: 34rem;
  background: #0d0d0d; color: #faf7f2; padding: 1rem 1.15rem; border-radius: 3px; box-shadow: 0 12px 34px rgba(0,0,0,.34);
  font-size: .86rem; line-height: 1.45; transition: opacity .3s ease, transform .3s ease; }
.consent-bar--out { opacity: 0; transform: translateY(10px); }
.consent-title { font-family: "Bodoni Moda", "Didot", "Bodoni MT", serif; font-size: 1.02rem; line-height: 1.2; margin: 0 0 .3rem; }
.consent-text { margin: 0 0 .75rem; color: rgba(250,247,242,.55); }
.consent-actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.consent-yes, .consent-no { font: inherit; cursor: pointer; min-height: 44px; padding: .45rem .95rem; border-radius: 2px; border: 1px solid transparent; }
.consent-yes { background: #c49b6c; color: #0d0d0d; font-weight: 600; }
.consent-no { background: transparent; color: #faf7f2; border-color: rgba(250,247,242,.55); }
.consent-more { color: #c49b6c; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 720px) { .consent-bar { left: auto; right: 1.5rem; bottom: 1.5rem; } }

/* header language switch */
.bm-top-actions { display: flex; align-items: center; gap: 6px; }
.bm-lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 15px; font-weight: 600; text-decoration: none; }
.bm-lang:hover { text-decoration: underline; }
.bm-lang:lang(ar) { font-family: "Noto Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", Tahoma, sans-serif; }
.bm-lang:lang(en) { font-family: var(--trp-font-family); }

/* Arabic (/match/ar/, dir=rtl): Arabic system fonts after Inter (Latin digits stay Inter), no letter-spacing
   (it breaks Arabic joining), mirrored positions via logical properties. */
[dir="rtl"] .bm { font-family: "Inter", "Noto Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif; }
[dir="rtl"] .bm-eyebrow, [dir="rtl"] .bm-facts dt, [dir="rtl"] .bm-score small, [dir="rtl"] .bm-hero h1 { letter-spacing: 0; text-transform: none; }
[dir="rtl"] .bm-hero h1 { line-height: 1.3; }
[dir="rtl"] .bm-lead, [dir="rtl"] .bm-how p, [dir="rtl"] .bm-proposal > p { line-height: 1.8; }
[dir="rtl"] .bm-field select { background-position: 15px 21px, 20px 21px; padding-right: 14px; padding-left: 36px; }
[dir="rtl"] .bm-how li { padding: 16px 56px 16px 16px; }
[dir="rtl"] .bm-how li::before { left: auto; right: 16px; }
[dir="rtl"] .consent-title { font-family: "Amiri", "Noto Naskh Arabic", "Geeza Pro", serif; }
@media (min-width: 720px) { [dir="rtl"] .consent-bar { right: auto; left: 1.5rem; } }
