/* ══ /for-sale — marketplace redesign (review points 1-7) ═════════════════════════════ */

/* 1) dark-navy hero + 4-stat bento */
.forsale-hero {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 34px);
  align-items: center; padding: clamp(24px, 3.2vw, 38px) clamp(22px, 3.2vw, 42px);
  border-radius: 26px; color: #fff; margin-bottom: 22px;
  background:
    radial-gradient(850px 360px at 90% -10%, rgba(34,211,238,.20), transparent 60%),
    radial-gradient(700px 360px at 8% 110%, rgba(46,107,255,.30), transparent 60%),
    linear-gradient(135deg, #091533 0%, #0C1C44 55%, #132C6B 100%);
  box-shadow: 0 34px 60px -46px rgba(5,11,31,.9);
}
.forsale-hero .mkt-kicker { color: #7FD8F5; }
.forsale-hero h1 { font: 800 clamp(30px, 3.6vw, 44px)/1.1 var(--display, var(--sans));
  letter-spacing: -.03em; margin: 8px 0 12px; color: #fff; }
.forsale-hero .lead { color: #C6D4F5; font-size: 15.5px; line-height: 1.7; margin: 0 0 18px; max-width: 62ch; }
.fh-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.forsale-hero .btn { background: #1F5BFF; border-color: #1F5BFF; color: #fff; border-radius: 12px;
  padding: 12px 20px; font-weight: 700; box-shadow: 0 14px 26px -16px rgba(31,91,255,.95); }
.forsale-hero .btn:hover { background: #1B4FE0; border-color: #1B4FE0; }
.forsale-hero .btn.ghost-light { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.28);
  box-shadow: none; color: #EAF1FF; }
.forsale-hero .btn.ghost-light:hover { background: rgba(255,255,255,.16); }
.fh-note { margin: 12px 0 0; font-size: 11.5px; color: #9FB0D6; line-height: 1.5; }

.fh-bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fh-stat { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px; padding: 14px 16px; backdrop-filter: blur(6px); }
.fh-stat span { display: block; font: 700 9.5px var(--mono); letter-spacing: .09em;
  text-transform: uppercase; color: #8FA6D8; }
.fh-stat b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; font: 800 clamp(16px, 1.45vw, 20px)/1.25 var(--sans); color: #fff; margin: 5px 0 3px;
  letter-spacing: -.02em; }
.fh-stat i { display: block; font-style: normal; font-size: 11px; color: #9FB0D6; line-height: 1.4; }

/* 5) filter bar as a raised command card */
form.filters.card-bar { border-radius: 18px; padding: 12px 14px; gap: 10px;
  background: #fff; border: 1px solid #DCE5F5;
  box-shadow: 0 2px 4px rgba(11,18,32,.03), 0 14px 30px -20px rgba(11,18,32,.25); }
form.filters.card-bar input[type=search] { border-radius: 11px; }
form.filters.card-bar select { border-radius: 11px; }
.qchips { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 16px; }
.qchip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid #D8E1F2; background: #fff; color: #3D4B6B; font: 600 12.5px var(--sans);
  text-decoration: none; transition: all .14s ease; white-space: nowrap; }
.qchip:hover { border-color: #1F5BFF; color: #1F5BFF; background: #F2F6FD; }
.qchip.is-on { background: #1F5BFF; border-color: #1F5BFF; color: #fff; }
.qchip b { font-weight: 800; opacity: .85; }

/* 2) outer white showcase + vertical 3D row-cards */
.tablewrap.plain { background: #fff; border: 1px solid #DCE5F5; border-radius: 26px;
  padding: 24px 26px 28px; position: relative; overflow: hidden;
  box-shadow: 0 2px 4px rgba(11,18,32,.03), 0 18px 44px -12px rgba(11,18,32,.08); }
.tablewrap.plain::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #1F5BFF, #0EA5E9, #0B8B63); }
.tablewrap.plain table.rowcards, .tablewrap.plain table.rowcards tbody { display: block; width: 100%; }
.tablewrap.plain table.rowcards thead { display: none; }
.tablewrap.plain table.rowcards tbody { display: flex; flex-direction: column; gap: 14px; }
html body .tablewrap.plain table.rowcards tbody tr {
  display: grid;
  grid-template-columns: minmax(230px, 2.1fr) minmax(150px, 1.05fr) minmax(104px, .72fr) minmax(104px, .72fr) minmax(120px, .86fr) minmax(196px, max-content);
  gap: 16px; align-items: center; padding: 17px 20px; border-radius: 18px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 100%);
  border: 1px solid #D5E0F2;
  box-shadow: 0 1px 0 rgba(255,255,255,.95) inset, 0 4px 0 -1px #DCE5F5, 0 10px 24px -8px rgba(11,18,32,.08);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
html body .tablewrap.plain table.rowcards tbody tr:hover { transform: translateY(-3px);
  border-color: rgba(31,91,255,.48);
  box-shadow: 0 1px 0 #fff inset, 0 5px 0 -1px rgba(31,91,255,.22), 0 18px 34px -10px rgba(31,91,255,.16); }
html body .tablewrap.plain table.rowcards tbody tr.rowfeat { border-left: 5px solid #F59E0B;
  background: linear-gradient(90deg, #FFFDF7 0%, #FFFFFF 32%, #F6F9FF 100%); }
html body .tablewrap.plain table.rowcards tbody tr > td { display: block; padding: 0; border: 0; }

/* 3) .si glued to the name */
.tname { font: 700 20.5px/1.2 var(--mono); letter-spacing: -.02em;
  display: inline-flex; align-items: baseline; gap: 0; }
.tname .tld { font-size: 18px; font-weight: 700; color: var(--brand, #1F5BFF); margin-left: 0; }
.rnote { font-size: 12.5px; line-height: 1.5; margin-top: 4px; max-width: 46ch; }

/* 4) micro-labelled valuation columns */
.num { position: relative; }
.cell-kicker { display: block; font: 700 9px var(--mono); letter-spacing: .1em;
  text-transform: uppercase; color: #8B98B4; margin-bottom: 4px; }
.val { border-radius: 9px; padding: 3px 9px; font-weight: 700; font-variant-numeric: tabular-nums; }
.val-ask { background: #FFF4CC; border: 1px solid #F3DA8B; color: #6B4708; }
.val-est { background: #EAF1FF; border: 1px solid #C9DAF8; color: #1B3B7A; }
.vs { border-radius: 999px; padding: 4px 10px; font: 700 11.5px var(--sans); white-space: nowrap; }
.vs.good { background: #E6F7F0; color: #0B8B63; border: 1px solid #A7F3D0; }
.vs.good::before { content: "↓ "; }
.vs.dear { background: #FEF0F0; color: #B4232C; border: 1px solid #F8C9CB; }
.vs.fair { background: #F1F5FD; color: #4A5878; border: 1px solid #DCE5F5; }
.rowact { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.rowact .btn.sm { border-radius: 10px; padding: 8px 14px; font-weight: 700; white-space: nowrap; }
.card-report-link { font: 600 11.5px var(--sans); color: #64748B; text-decoration: none;
  padding: 7px 10px; border-radius: 9px; border: 1px solid transparent; white-space: nowrap; }
.card-report-link:hover { color: #1F5BFF; border-color: #D8E1F2; background: #F7FAFF; }

/* 6) methodology trust strip */
.methodology-strip { display: flex; gap: 16px; align-items: flex-start; margin-top: 22px;
  padding: 18px 20px; border-radius: 20px; background: #F4F7FC; border: 1px solid #E3EAF6; }
.ms-ico { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: #1F5BFF; color: #fff; }
.ms-body b { display: block; font: 800 14.5px var(--sans); color: var(--ink, #0B1630); margin-bottom: 4px; }
.ms-body p { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.6; max-width: 80ch; }
.ms-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-pills span { font: 600 11.5px var(--sans); color: #3D4B6B; background: #fff;
  border: 1px solid #DCE5F5; border-radius: 999px; padding: 4px 10px; }

/* 7) how-listing works cards */
.card.feature.feat-lift { position: relative; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.card.feature.feat-lift::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  transform: scaleX(0); transform-origin: left; transition: transform .28s ease;
  background: linear-gradient(90deg, #1F5BFF, #22D3EE); }
.card.feature.feat-lift:hover { transform: translateY(-8px);
  box-shadow: 0 22px 44px -26px rgba(31,91,255,.45); }
.card.feature.feat-lift:hover::before { transform: scaleX(1); }
.card.feature.feat-lift:hover .feat-ico { background: #1F5BFF; color: #fff; }
/* step number removed: the h3 already reads "1 · Submit" and the watermark
   collided with it on narrow cards */

@media (max-width: 1100px) {
  .forsale-hero { grid-template-columns: minmax(0, 1fr); }
  html body .tablewrap.plain table.rowcards tbody tr { grid-template-columns: minmax(0,1fr) minmax(0,.9fr);
    row-gap: 10px; }
  html body .tablewrap.plain table.rowcards tbody tr > td:nth-child(3),
  html body .tablewrap.plain table.rowcards tbody tr > td:nth-child(4),
  html body .tablewrap.plain table.rowcards tbody tr > td:nth-child(5) { display: inline-block; margin-right: 12px; }
  .rowact { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .forsale-hero { padding: 20px 18px; border-radius: 20px; }
  .fh-bento { grid-template-columns: 1fr 1fr; }
  .fh-stat b { font-size: 17px; }
  .tablewrap.plain { padding: 14px; border-radius: 20px; }
  html body .tablewrap.plain table.rowcards tbody tr { grid-template-columns: minmax(0,1fr); padding: 14px; gap: 9px; }
  .tname { font-size: 18px; }
  .tname .tld { font-size: 16px; }
  .methodology-strip { flex-direction: column; gap: 10px; }
  .rowact { justify-content: stretch; }
  .rowact .btn.sm { flex: 1; text-align: center; }
}
@media (prefers-color-scheme: dark) {
  .tablewrap.plain, form.filters.card-bar, .qchip, .ms-pills span { background: var(--card); border-color: var(--line-2); }
  html body .tablewrap.plain table.rowcards tbody tr { background: linear-gradient(180deg, #0E1836, #0B1430); border-color: var(--line-2); }
  .toc-card, .methodology-strip { background: #0E1836; border-color: var(--line-2); }
}
/* name + crown + featured badge read as one unit; nothing pulls the name away from .si */
.rowname { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.rowname > a.tname { margin-right: 0; }
.rowname .crown { width: 13px; height: 13px; transform: translateY(1px); }
.fh-stat b { font-variant-numeric: tabular-nums; }

/* ── فراغ قبل التصفيح ── */
.pager-top{margin:26px 0 26px}

/* ── كارت المنهجية: خلفية بيضاء بحدود واضحة بدل الرمادي الباهت ── */
.methodology-strip{background:#fff;border:1.5px solid #D8E2F3;
  box-shadow:0 1px 2px rgba(12,23,51,.05),0 18px 36px -28px rgba(12,23,51,.5)}
.methodology-strip .ms-body b{font-size:15.5px;color:#0B1630;letter-spacing:-.01em}
.methodology-strip .ms-body p{font-size:13px;color:#4A5876}
.methodology-strip .ms-pills span{background:#F1F5FD;border-color:#DCE5F5}
