
:root {
  /* Brand CTAs — explicit semantic tokens */
  --cta-buy:        #9b0047;        /* Kaufen / Acheter / اقتناء — red */
  --cta-buy-dark:   #7a0038;
  --cta-mandate:    #ffc83d;        /* Studie beauftragen — yellow */
  --cta-mandate-dk: #e8b524;
  --cta-read:       #233e50;        /* Studie lesen — slate */
  --cta-read-dark:  #2d4a60;

  /* Brand neutrals */
  --ink:         #233e50;            /* primary text / brand dark */
  --ink-2:       #2d4a60;            /* body strong */
  --ink-3:       #8499a7;            /* muted text */
  --ink-4:       #b5c0cb;            /* lightest muted */
  --blue-ink:    #233e50;            /* legacy alias — used by brand wordmark */
  --bg:          #ffffff;

  /* Legacy --blue tokens kept so any rule using them flips to the new accent (read-slate) automatically */
  --blue:        #233e50;
  --blue-dark:   #2d4a60;
  --blue-50:     #f4f6f8;
  --blue-100:    #e7ecf0;
  --blue-200:    #cdd6de;

  --yellow:      #ffc83d;            /* accent */
  --yellow-soft: #fff4d1;

  --border:      #e3ddd2;
  --border-soft: #efeae0;
  --green:       #0d9d6b;
  --green-soft:  #e3f6ee;

  --shadow-sm:   0 1px 2px rgba(35,62,80,0.05);
  --shadow-md:   0 4px 18px rgba(35,62,80,0.10);
  --shadow-lg:   0 10px 40px rgba(35,62,80,0.14);
  --shadow-blue: 0 8px 28px rgba(35,62,80,0.18);
  --shadow-buy:  0 8px 28px rgba(155,0,71,0.28);
  --shadow-mand: 0 8px 28px rgba(255,200,61,0.36);

  /* Type — IBM Plex Sans: modern, refined, bilingual (Latin + Arabic share one design family) */
  --font:        "IBM Plex Sans", "IBM Plex Sans Arabic", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-ar:     "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
  --serif:       "Instrument Serif", "Times New Roman", Georgia, serif;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-feature-settings: "cv11", "ss01";
}
html[dir="rtl"] body { font-family: var(--font-ar); }
button { font-family: inherit; }

/* ---------- TOPBAR ---------- */
.topbar {
  position: sticky; top: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--border-soft);
}
.topbar-inner {
  max-width: 1320px; margin: 0 auto;
  padding: 16px 40px;
  display: flex; align-items: center; gap: 40px;
}
.brand {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}
.brand-stack { display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font);
  direction: ltr;            /* lock LTR even in RTL mode — brand is a visual mark */
  white-space: nowrap;
}
.brand-ubc {
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-pipe {
  display: inline-block;
  width: 2px;
  height: 24px;
  background: var(--cta-buy);
  margin: 0 6px;
  transform: translateY(2px);
}
.brand-g {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--cta-buy);
  font-size: 32px;
  letter-spacing: -0.01em;
  margin-inline-end: 10px;
}
.brand-research {
  font-family: var(--font);
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.brand-sub {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 6px;
}
html[dir="rtl"] .brand-sub { letter-spacing: 0; text-transform: none; font-size: 12px; font-weight: 500; }
/* Hide the now-unused old square brand-mark if it still appears anywhere */
.brand-mark { display: none; }

.nav-links { display: flex; gap: 28px; list-style: none; flex: 1; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 0; cursor: pointer; position: relative; transition: color 0.15s; }
.nav-links a:hover { color: var(--blue); }
.nav-links a.active { color: var(--blue); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -18px; height: 2px; background: var(--blue); border-radius: 2px; }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle { display: flex; background: var(--blue-50); border-radius: var(--r-pill); padding: 3px; }
.lang-toggle button { border: 0; background: transparent; padding: 6px 14px; font-size: 12px; font-weight: 700; color: var(--ink-3); border-radius: var(--r-pill); cursor: pointer; transition: all 0.2s; }
.lang-toggle button.active { background: var(--bg); color: var(--blue); box-shadow: var(--shadow-sm); }

/* ---------- CTA BUTTONS ---------- */
/* Semantic CTA system:
   .btn-buy     — Acheter / Kaufen        → red  #9b0047
   .btn-mandate — Étude sur mesure / Beauftragen → yellow #ffc83d (dark text)
   .btn-read    — Lire l'étude / Lesen     → slate #233e50
*/
.btn-buy, .btn-mandate, .btn-read, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; padding: 11px 20px; font-size: 14px; font-weight: 700;
  font-family: inherit; letter-spacing: 0.01em;
  border-radius: var(--r-sm); cursor: pointer; transition: all 0.2s;
  box-shadow: var(--shadow-sm); text-decoration: none; white-space: nowrap;
  line-height: 1.2;
}
.btn-buy.lg, .btn-mandate.lg, .btn-read.lg, .btn-primary.lg {
  padding: 16px 28px; font-size: 15px; border-radius: var(--r-md);
}

/* Kaufen / Acheter — primary red */
.btn-buy, .btn-primary { background: var(--cta-buy); color: #fff; }
.btn-buy:hover, .btn-primary:hover {
  background: var(--cta-buy-dark); transform: translateY(-1px);
  box-shadow: var(--shadow-buy);
}

/* Beauftragen / Étude sur mesure — yellow with dark text */
.btn-mandate { background: var(--cta-mandate); color: var(--ink); }
.btn-mandate:hover {
  background: var(--cta-mandate-dk); transform: translateY(-1px);
  box-shadow: var(--shadow-mand);
}

/* Lesen / Lire — slate dark */
.btn-read { background: var(--cta-read); color: #fff; }
.btn-read:hover {
  background: var(--cta-read-dark); transform: translateY(-1px);
  box-shadow: var(--shadow-blue);
}

/* Secondary CTA — slate outlined (for browse catalog actions next to a primary CTA) */
.btn-cta-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 9.5px 18px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.01em;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}
.btn-cta-secondary:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- MAIN ---------- */
main { position: relative; z-index: 2; }
.container { max-width: 1320px; margin: 0 auto; padding: 0 40px; }
.view { display: none; }
.view.active { display: block; animation: fadeUp 0.4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- HERO ---------- */
.hero {
  padding: 72px 40px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 1100px 520px at 50% -10%, var(--cta-50) 0%, transparent 62%),
    radial-gradient(ellipse 500px 300px at 85% 120%, var(--yellow-soft) 0%, transparent 70%),
    var(--bg);
}
.hero-inner { max-width: 920px; margin: 0 auto; position: relative; z-index: 2; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  padding: 7px 14px 7px 10px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 22px; box-shadow: var(--shadow-sm);
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(13, 157, 107, 0.18); }

.hero h1 {
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 800; line-height: 1.02;
  letter-spacing: -0.03em; color: var(--ink);
  margin-bottom: 20px;
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--cta-buy);
  background: none;
  -webkit-text-fill-color: currentColor;
  font-size: 1.05em;
  letter-spacing: -0.01em;
  margin-inline-end: 0.05em;
}
.hero h1 em::after { display: none; }
html[dir="rtl"] .hero h1 { letter-spacing: 0; line-height: 1.3; }
html[dir="rtl"] .hero h1 em::after { bottom: -2px; }

.hero-lede { font-size: 19px; color: var(--ink-2); max-width: 620px; margin: 0 auto 40px; line-height: 1.55; }

/* ---------- HERO SEARCH ---------- */
.search-hero {
  max-width: 780px; margin: 0 auto;
  background: var(--bg);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center;
  padding: 8px 8px 8px 24px; gap: 8px;
  border: 1px solid var(--border-soft);
  transition: box-shadow 0.2s; position: relative;
}
.search-hero:focus-within { box-shadow: 0 0 0 4px rgba(35, 62, 80, 0.12), var(--shadow-lg); border-color: var(--blue-200); }
.search-hero svg { width: 22px; height: 22px; stroke: var(--cta-buy); fill: none; flex-shrink: 0; }
.search-hero input { flex: 1; border: 0; background: transparent; padding: 20px 8px; font-family: inherit; font-size: 17px; color: var(--ink); outline: none; font-weight: 500; }
html[dir="rtl"] .search-hero input { font-family: var(--font-ar); }
.search-hero input::placeholder { color: var(--ink-4); font-weight: 400; }
.search-hero .btn-search { background: var(--blue); color: white; border: 0; padding: 16px 28px; border-radius: var(--r-md); font-weight: 700; font-size: 15px; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.search-hero .btn-search:hover { background: var(--blue-dark); }

.search-suggest { max-width: 780px; margin: 22px auto 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.search-suggest-label { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-right: 4px; }
html[dir="rtl"] .search-suggest-label { margin-right: 0; margin-left: 4px; }
.suggest-chip { background: var(--bg); border: 1px solid var(--border); padding: 7px 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: all 0.15s; }
.suggest-chip:hover { border-color: var(--blue); background: var(--blue-50); color: var(--blue); }

/* ---------- STATS BAND ---------- */
.stats-band {
  max-width: 1100px; margin: 72px auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat-card { background: var(--bg); padding: 28px 28px; text-align: center; transition: background 0.2s; }
.stat-card:hover { background: var(--blue-50); }
.stat-n { font-size: 42px; font-weight: 800; color: var(--blue); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-top: 8px; }

/* ---------- SECTION HEAD ---------- */
.section { padding: 80px 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
.section-head p { color: var(--ink-3); font-size: 15px; margin-top: 6px; }
.section-head a { color: var(--blue); font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: var(--r-sm); transition: background 0.15s; }
.section-head a:hover { background: var(--blue-50); }

/* ---------- CATEGORY CARDS ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
/* Cards are anchor tags (real URLs) — reset browser-default link underline + color */
a.study-card, a.cat-card, a.shop-card { text-decoration: none; color: inherit; }
a.study-card:hover, a.cat-card:hover, a.shop-card:hover { text-decoration: none; }

.cat-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px 26px; cursor: pointer; transition: all 0.2s; display: flex; align-items: flex-start; gap: 18px; position: relative; overflow: hidden; }
.cat-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cat-icon { width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--blue-50); }
.cat-card:nth-child(2) .cat-icon { background: var(--yellow-soft); }
.cat-card:nth-child(4) .cat-icon { background: var(--yellow-soft); }
.cat-card:nth-child(6) .cat-icon { background: var(--green-soft); }
.cat-body { flex: 1; }
.cat-card h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.cat-card p { font-size: 14px; color: var(--ink-3); line-height: 1.55; }
.cat-count { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--blue); }
.cat-count .arrow { transition: transform 0.2s; }
.cat-card:hover .arrow { transform: translateX(3px); }
html[dir="rtl"] .cat-card:hover .arrow { transform: translateX(-3px); }

/* ---------- FEATURED ---------- */
.section-featured { background: var(--blue-50); padding: 80px 0; margin-top: 80px; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-featured .section { padding-top: 0; }

.studies-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.study-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 26px 22px; cursor: pointer; display: flex; flex-direction: column; gap: 14px; transition: all 0.2s; min-height: 320px; position: relative; }
.study-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.study-card-top { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; flex-wrap: wrap; }
.chip { display: inline-block; padding: 4px 10px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.chip-cat { background: var(--blue-50); color: var(--blue); }
.chip-new { background: var(--yellow-soft); color: #8A5A00; }
.chip-ubcg { background: var(--blue); color: white; }
.study-card .year { color: var(--ink-3); font-weight: 500; font-size: 12px; }
.study-card h3 { font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.25; letter-spacing: -0.01em; }
html[dir="rtl"] .study-card h3 { letter-spacing: 0; line-height: 1.4; }
.study-card p { font-size: 14px; color: var(--ink-3); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.study-card-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; }
.study-card-foot .author { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.study-card-foot .price { font-size: 18px; font-weight: 800; color: var(--cta-buy); font-variant-numeric: tabular-nums; }
.study-card-foot .free { color: var(--green); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.study-card-foot .free::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ---------- LIBRARY ---------- */
.library-head { padding: 60px 0 24px; }
.library-head h1 { font-size: clamp(36px, 4vw, 52px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
html[dir="rtl"] .library-head h1 { letter-spacing: 0; line-height: 1.3; }
.library-head p { color: var(--ink-3); font-size: 17px; max-width: 60ch; margin-top: 10px; }

.library-search { margin-top: 28px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); display: flex; align-items: center; padding: 6px 8px 6px 22px; gap: 8px; transition: all 0.2s; }
.library-search:focus-within { border-color: var(--blue-200); box-shadow: 0 0 0 4px rgba(35, 62, 80, 0.1); }
.library-search svg { width: 20px; height: 20px; stroke: var(--cta-buy); fill: none; flex-shrink: 0; }
.library-search input { border: 0; background: transparent; padding: 16px 8px; font-family: inherit; font-size: 16px; color: var(--ink); flex: 1; outline: none; }
html[dir="rtl"] .library-search input { font-family: var(--font-ar); }
.library-search input::placeholder { color: var(--ink-4); }
.library-search .btn-search { background: var(--blue); color: white; border: 0; padding: 12px 22px; border-radius: var(--r-sm); font-weight: 700; font-size: 14px; cursor: pointer; transition: background 0.2s; }
.library-search .btn-search:hover { background: var(--blue-dark); }

.filter-row { display: flex; gap: 8px; padding: 24px 0 20px; flex-wrap: wrap; border-bottom: 1px solid var(--border-soft); }
@media (max-width: 760px) {
  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 18px 20px 16px;
    margin: 0 -20px;
    border-bottom: 0;
  }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-chip { flex: 0 0 auto; white-space: nowrap; }
}
.filter-chip { padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--r-pill); font-size: 13px; font-weight: 600; cursor: pointer; background: var(--bg); color: var(--ink-2); transition: all 0.15s; }
.filter-chip:hover { border-color: var(--blue); color: var(--blue); }
.filter-chip.active { background: var(--blue); color: white; border-color: var(--blue); }

.study-list-meta { display: flex; justify-content: space-between; padding: 18px 0; color: var(--ink-3); font-size: 14px; }
.study-list-meta strong { color: var(--ink); }

.study-row { display: grid; grid-template-columns: 48px 1fr 180px; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--border-soft); cursor: pointer; transition: all 0.2s; }
.study-row:hover { background: var(--blue-50); padding-inline-start: 16px; margin-inline-start: -16px; padding-inline-end: 16px; margin-inline-end: -16px; border-radius: var(--r-md); }
.study-row-num { font-size: 14px; font-weight: 600; color: var(--ink-4); font-variant-numeric: tabular-nums; padding-top: 4px; }
.study-row-body h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
html[dir="rtl"] .study-row-body h3 { letter-spacing: 0; line-height: 1.5; }
.study-row-meta { font-size: 13px; color: var(--ink-3); display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
.study-row-meta .dot { color: var(--ink-4); }
.study-row-abstract { font-size: 14px; color: var(--ink-2); max-width: 72ch; line-height: 1.6; }
.study-row-cta { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; justify-content: center; }
html[dir="rtl"] .study-row-cta { align-items: flex-start; }

/* ---------- LIBRARY GRID + LOAD-MORE ---------- */
.library-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.library-more-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 40px 0 20px;
}
.btn-more {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
  padding: 14px 30px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.01em;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-more:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  transform: translateY(-1px);
}
.btn-more .count { color: var(--ink-3); font-weight: 600; }
.btn-more:hover .count { color: rgba(255,255,255,0.65); }
.library-sentinel { grid-column: 1 / -1; height: 1px; pointer-events: none; }
.price-big { font-size: 24px; font-weight: 800; color: var(--cta-buy); line-height: 1; }
.btn-row { background: var(--cta-buy); color: white; border: 0; padding: 10px 18px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.btn-row:hover { background: var(--cta-buy-dark); }
.btn-row.ghost { background: var(--bg); color: var(--cta-read); border: 1px solid var(--cta-read); }
.btn-row.ghost:hover { background: var(--cta-read); color: white; }

.badge-free { background: var(--green-soft); color: var(--green); padding: 5px 12px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 6px; }
.badge-free::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.empty-state { padding: 100px 20px; text-align: center; color: var(--ink-3); font-size: 15px; }

/* ---------- SHOP ---------- */
.shop-intro { padding: 60px 0 40px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: end; }
.shop-intro h1 { font-size: clamp(40px, 4.5vw, 60px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
html[dir="rtl"] .shop-intro h1 { letter-spacing: 0; line-height: 1.3; }
.shop-intro h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--cta-buy); font-size: 1.05em; }
.shop-intro h1 em::after { display: none; }
.shop-intro p { font-size: 16px; color: var(--ink-3); max-width: 48ch; line-height: 1.65; }

.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding-bottom: 80px; }
.shop-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 32px; cursor: pointer; display: flex; flex-direction: column; gap: 16px; min-height: 400px; transition: all 0.2s; position: relative; }
.shop-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.shop-card-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-card h3 { font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
html[dir="rtl"] .shop-card h3 { letter-spacing: 0; line-height: 1.4; }
.shop-card p { color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.shop-card-specs { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 16px; background: var(--blue-50); border-radius: var(--r-md); font-size: 12px; color: var(--ink-2); font-weight: 600; }
.shop-card-specs > span { display: inline-flex; align-items: center; gap: 6px; }
.shop-card-specs > span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.shop-card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 10px; }
.shop-price { font-size: 32px; font-weight: 800; color: var(--cta-buy); line-height: 1; font-variant-numeric: tabular-nums; }
.shop-price small { font-size: 12px; color: var(--ink-3); font-weight: 600; }

/* ---------- ABOUT ---------- */
.about-grid { padding: 50px 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.about-col { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; }
.about-col-label { font-size: 11px; font-weight: 700; color: var(--blue); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
html[dir="rtl"] .about-col-label { letter-spacing: 0; text-transform: none; font-size: 13px; }
.about-col h3 { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.about-col p { font-size: 14px; line-height: 1.65; color: var(--ink-2); }

/* ---------- DETAIL MODAL ---------- */
.detail-overlay { position: fixed; inset: 0; background: rgba(10, 24, 48, 0.55); backdrop-filter: blur(8px); z-index: 200; display: none; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 60px 20px; }
.detail-overlay.open { display: flex; animation: fadeIn 0.25s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.detail { background: var(--bg); max-width: 820px; width: 100%; padding: 48px; border-radius: var(--r-lg); position: relative; animation: slideUp 0.4s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.detail-close { position: absolute; top: 20px; inset-inline-end: 20px; width: 36px; height: 36px; border: 1px solid var(--border); background: var(--bg); border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 20px; color: var(--ink-2); transition: all 0.15s; }
.detail-close:hover { background: var(--ink); color: white; border-color: var(--ink); }
.detail-chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.detail h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 20px; }
html[dir="rtl"] .detail h2 { letter-spacing: 0; line-height: 1.4; }
.detail-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 20px; background: var(--blue-50); border-radius: var(--r-md); margin-bottom: 24px; }
.detail-meta-item .l { font-size: 11px; font-weight: 700; color: var(--blue); letter-spacing: 0.08em; text-transform: uppercase; }
html[dir="rtl"] .detail-meta-item .l { letter-spacing: 0; text-transform: none; font-size: 13px; }
.detail-meta-item .v { font-size: 15px; color: var(--ink); margin-top: 4px; font-weight: 600; }
.detail-abstract { font-size: 15px; line-height: 1.7; color: var(--ink-2); margin-bottom: 24px; }
.detail-toc { padding: 22px 24px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 24px; }
.detail-toc h4 { font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
html[dir="rtl"] .detail-toc h4 { letter-spacing: 0; text-transform: none; font-size: 14px; }
.detail-toc ul { list-style: none; }
.detail-toc li { padding: 10px 0; color: var(--ink); font-size: 14px; display: flex; gap: 14px; border-bottom: 1px solid var(--border-soft); font-weight: 500; }
.detail-toc li:last-child { border-bottom: 0; }
.detail-toc li span { color: var(--blue); font-weight: 700; min-width: 20px; font-variant-numeric: tabular-nums; }
.detail-cta { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px; background: var(--blue-50); border-radius: var(--r-md); flex-wrap: wrap; }
.detail-price-line { font-size: 32px; font-weight: 800; color: var(--cta-buy); line-height: 1; }
.detail-price-line small { font-size: 12px; color: var(--ink-3); display: block; margin-top: 8px; font-weight: 500; max-width: 30ch; line-height: 1.5; }

/* ---------- FOOTER ---------- */
footer { margin-top: 80px; background: var(--blue-ink); color: #B8C7E8; padding: 60px 0 28px; }
.footer-inner { max-width: 1320px; margin: 0 auto; padding: 0 40px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand { display: flex; align-items: center; margin-bottom: 14px; }
.footer-brand .brand-ubc,
.footer-brand .brand-research { color: #fff; }
.footer-brand .brand-pipe { background: var(--yellow); }
.footer-brand .brand-g { color: var(--yellow); }
.footer-brand + p { max-width: 38ch; font-size: 14px; line-height: 1.65; }
.footer-parent {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px;
  padding: 8px 14px 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--yellow);
  text-decoration: none;
  transition: color 0.15s, transform 0.15s;
  letter-spacing: 0.01em;
}
.footer-parent:hover { color: #fff; transform: translateX(2px); }
html[dir="rtl"] .footer-parent:hover { transform: translateX(-2px); }
.footer-parent svg { flex-shrink: 0; opacity: 0.9; }
footer h4 { font-size: 12px; font-weight: 700; margin-bottom: 16px; color: white; letter-spacing: 0.08em; text-transform: uppercase; }
html[dir="rtl"] footer h4 { letter-spacing: 0; text-transform: none; font-size: 14px; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
footer a { color: #B8C7E8; text-decoration: none; font-size: 14px; cursor: pointer; transition: color 0.15s; }
footer a:hover { color: white; }
.footer-bottom { max-width: 1320px; margin: 40px auto 0; padding: 24px 40px 0; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; font-size: 12px; color: #8393B8; flex-wrap: wrap; gap: 12px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .studies-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .shop-intro { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 760px) {
  .topbar-inner { padding: 14px 20px; gap: 18px; }
  .nav-links { display: none; }
  .brand span small { display: none; }
  .container { padding: 0 20px; }
  .hero { padding: 56px 20px 48px; }
  .search-hero { flex-direction: column; padding: 12px; align-items: stretch; }
  .search-hero input { padding: 14px 12px; font-size: 16px; }
  .search-hero .btn-search { width: 100%; padding: 14px; }
  .search-hero svg { display: none; }
  .search-suggest {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 20px 6px;
    margin: 22px -20px 0;
    justify-content: flex-start;
    align-items: center;
  }
  .search-suggest::-webkit-scrollbar { display: none; }
  .search-suggest > * { flex: 0 0 auto; white-space: nowrap; }

  /* Horizontal-scroll card rails on mobile (Featured / Latest / Categories / Shop) */
  .studies-grid,
  .cat-grid,
  .shop-grid {
    display: flex;
    flex-wrap: nowrap;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding-inline-start: 20px;
    gap: 14px;
    padding: 4px 20px 20px;
    margin: 0 -20px;
    scrollbar-width: none;
  }
  .studies-grid::-webkit-scrollbar,
  .cat-grid::-webkit-scrollbar,
  .shop-grid::-webkit-scrollbar { display: none; }
  .studies-grid > *,
  .cat-grid > *,
  .shop-grid > * {
    flex: 0 0 82%;
    max-width: 320px;
    scroll-snap-align: start;
  }
  /* Hint of next card peeking on the right edge */
  .studies-grid > *:last-child,
  .cat-grid > *:last-child,
  .shop-grid > *:last-child { margin-inline-end: 8px; }

  /* Library grid stays VERTICAL on mobile (auto-load via IntersectionObserver instead of carousel) */
  .library-grid { grid-template-columns: 1fr; gap: 14px; }
  .library-more-row { padding: 24px 0 8px; }
  .btn-more { width: 100%; justify-content: center; }

  .stats-band { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
  .stat-n { font-size: 32px; }
  .study-row { grid-template-columns: 1fr; gap: 12px; }
  .study-row:hover { padding-inline-start: 0; margin-inline-start: 0; padding-inline-end: 0; margin-inline-end: 0; background: transparent; }
  .study-row-cta { align-items: flex-start; flex-direction: row; justify-content: space-between; }
  .study-row-num { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .detail { padding: 32px 24px; }
  .detail-meta { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .shop-card { padding: 24px; min-height: auto; }
  .section-featured { padding: 56px 0; margin-top: 56px; }
  .section { padding-top: 56px; }
}
/* ---------- DARK CTA SECTION ("Beauftragen") ---------- */
.dark-cta {
  background:
    radial-gradient(ellipse 700px 320px at 12% 110%, rgba(27,79,230,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 520px 260px at 92% -10%, rgba(255,200,61,0.16) 0%, transparent 70%),
    var(--ink);
  color: #fff;
  padding: 96px 40px 104px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 80px;
}
.dark-cta-inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 2; }
.dark-cta-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 32px;
}
.dark-cta-kicker::before { content: "— "; }
html[dir="rtl"] .dark-cta-kicker { letter-spacing: 0; text-transform: none; font-size: 14px; font-weight: 600; }
.dark-cta h2 {
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 24px;
}
.dark-cta h2 em { font-style: normal; color: var(--yellow); position: relative; }
html[dir="rtl"] .dark-cta h2 { letter-spacing: 0; line-height: 1.25; }
.dark-cta-lede {
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  margin: 0 auto 40px;
}
.btn-light {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff;
  color: var(--ink);
  border: 0;
  padding: 17px 34px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.22s;
  text-decoration: none;
  font-family: inherit;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.btn-light:hover {
  background: var(--yellow);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.32);
}

/* ---------- REFINED EDITORIAL ABOUT COLUMNS (image-3 style) ---------- */
.about-col { background: transparent; border: 0; padding: 0; }
.about-col-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--cta-buy);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: inline-block;
}
.about-col-label::before { content: "— "; }
html[dir="rtl"] .about-col-label { letter-spacing: 0; text-transform: none; font-size: 13px; font-weight: 600; }
.about-col h3 { font-size: 26px; font-weight: 700; color: var(--ink); margin-bottom: 14px; line-height: 1.2; }
html[dir="rtl"] .about-col h3 { line-height: 1.4; }
.about-col p { font-size: 15px; line-height: 1.7; color: var(--ink-3); }

/* ---------- MOBILE BOTTOM APP NAVIGATION ---------- */
.bottom-nav { display: none; }
@media (max-width: 760px) {
  .bottom-nav {
    display: block;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -4px 20px rgba(35,62,80,0.07);
  }
  .bottom-nav-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 4px 12px;
    color: var(--ink-3);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    position: relative;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav-item svg {
    width: 24px; height: 24px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s, stroke-width 0.2s;
  }
  .bottom-nav-item.active { color: var(--cta-buy); }
  .bottom-nav-item.active svg { stroke-width: 2; transform: scale(1.08); }
  .bottom-nav-item.active::before {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 30px; height: 3px;
    background: var(--cta-buy);
    border-radius: 0 0 3px 3px;
  }
  /* Push body content above the fixed bottom nav */
  body { padding-bottom: 76px; }
  /* Hide the topbar in-line CTAs on mobile (redundant with bottom nav tabs) */
  .nav-actions .btn-mandate,
  .nav-actions .btn-buy,
  .nav-actions .btn-cta-secondary { display: none; }
  /* Dark CTA padding tuning for mobile */
  .dark-cta { padding: 64px 20px 72px; margin-top: 48px; }
  .dark-cta-lede { font-size: 16px; margin-bottom: 32px; }
  .btn-light { padding: 15px 28px; font-size: 14px; }
}
/* ---------- CONSULTATION DIALOG ---------- */
.consult-overlay {
  position: fixed; inset: 0;
  background: rgba(35, 62, 80, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}
.consult-overlay.open { display: flex; }
.consult-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 620px;
  padding: 48px 52px 44px;
  position: relative;
  box-shadow: 0 30px 80px rgba(10,15,25,0.34);
  animation: consultUp 0.3s cubic-bezier(.16,1,.3,1);
  max-height: none;
}
@keyframes consultUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.consult-close {
  position: absolute;
  top: 22px; right: 22px;
  width: 36px; height: 36px;
  border: 0; background: transparent;
  cursor: pointer;
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.consult-close:hover { background: var(--bg-soft); color: var(--ink); }
html[dir="rtl"] .consult-close { right: auto; left: 22px; }

.consult-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cta-buy);
  margin-bottom: 18px;
}
.consult-kicker::before { content: "— "; }
html[dir="rtl"] .consult-kicker { letter-spacing: 0; text-transform: none; font-size: 14px; font-weight: 600; }

.consult-modal h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 32px;
}
html[dir="rtl"] .consult-modal h2 { letter-spacing: 0; line-height: 1.3; }

.consult-form { display: flex; flex-direction: column; gap: 22px; }
.consult-field { display: flex; flex-direction: column; gap: 8px; }
.consult-field label {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.consult-field .req { color: var(--cta-buy); margin-inline-start: 3px; }
.consult-field input,
.consult-field textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  resize: vertical;
}
.consult-field input::placeholder,
.consult-field textarea::placeholder { color: var(--ink-4); }
.consult-field input:focus,
.consult-field textarea:focus {
  outline: none;
  border-color: var(--cta-buy);
  box-shadow: 0 0 0 3px var(--cta-50);
}
.consult-field textarea { min-height: 100px; }

.consult-file {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.consult-file:hover { border-color: var(--cta-buy); background: var(--cta-50); color: var(--ink); }
.consult-file input[type="file"] { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.consult-file svg { width: 20px; height: 20px; flex-shrink: 0; stroke-width: 1.8; }
.consult-file.has-file { color: var(--ink); border-color: var(--cta-buy); background: var(--cta-50); }

.consult-submit {
  background: var(--cta-buy);
  color: white;
  border: 0;
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.01em;
  border-radius: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 12px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  width: 100%;
  box-shadow: var(--shadow-buy);
}
.consult-submit:hover { background: var(--cta-buy-dark); transform: translateY(-2px); box-shadow: 0 14px 36px rgba(155,0,71,0.38); }

.consult-success {
  text-align: center;
  padding: 36px 0 20px;
}
.consult-success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.consult-success-icon svg { width: 32px; height: 32px; stroke-width: 2; }
.consult-success h3 { font-size: 24px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.consult-success p { color: var(--ink-3); font-size: 15px; line-height: 1.55; max-width: 36ch; margin: 0 auto; }

@media (max-width: 600px) {
  .consult-overlay { padding: 0; align-items: stretch; }
  .consult-modal { padding: 56px 22px 28px; border-radius: 0; min-height: 100vh; max-width: 100%; }
  .consult-modal h2 { font-size: 26px; margin-bottom: 24px; }
  .consult-close { top: 14px; right: 14px; }
  html[dir="rtl"] .consult-close { right: auto; left: 14px; }
}
/* ---------- STANDALONE PAGES (Mission / Contact / Legal) ---------- */
.page-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cta-buy);
  margin-bottom: 18px;
}
.page-kicker::before { content: "— "; }
html[dir="rtl"] .page-kicker { letter-spacing: 0; text-transform: none; font-size: 14px; font-weight: 600; }

.content-block { max-width: 64ch; margin-top: 32px; }
.content-block p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.content-block p:last-child { margin-bottom: 0; }
.content-block p em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--cta-buy);
  font-size: 1.05em;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: all 0.2s;
}
.contact-card:hover { border-color: var(--cta-buy); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.contact-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--cta-buy);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-block;
}
.contact-card-label::before { content: "— "; }
html[dir="rtl"] .contact-card-label { letter-spacing: 0; text-transform: none; font-size: 13px; font-weight: 600; }
.contact-card-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
a.contact-card-value { transition: color 0.15s; }
a.contact-card-value:hover { color: var(--cta-buy); }
.contact-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-3);
  margin: 0;
}

.content-cta {
  margin-top: 56px;
  padding: 28px 32px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.content-cta p { font-size: 16px; font-weight: 500; color: var(--ink); margin: 0; max-width: 40ch; }

.legal-content { max-width: 72ch; margin-top: 24px; }
.legal-section { margin-top: 36px; }
.legal-section:first-child { margin-top: 0; }
.legal-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
html[dir="rtl"] .legal-section h2 { letter-spacing: 0; }
.legal-section p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-2);
}
.legal-section p a { color: var(--cta-buy); text-decoration: none; font-weight: 600; }
.legal-section p a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 28px; }
  .contact-card { padding: 22px; }
  .contact-card-value { font-size: 19px; }
  .content-cta { padding: 22px; flex-direction: column; align-items: flex-start; }
  .content-cta .btn-mandate { width: 100%; justify-content: center; }
  .content-block p { font-size: 16px; }
  .legal-section h2 { font-size: 18px; }
}

/* ---------- DETAIL PAGE (standalone, replaces the SPA overlay) ---------- */
.detail-page-wrap { padding: 40px 0 80px; }
.detail-page-wrap .detail {
  /* drop the floating-card shadow on a real page; let it sit naturally in the container */
  background: var(--bg);
  box-shadow: none;
  padding: 8px 0 0;
  border-radius: 0;
  max-width: 820px;
  margin: 0 auto;
  animation: none;
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  margin-bottom: 22px;
  transition: color 0.15s, transform 0.15s;
}
.detail-back:hover { color: var(--cta-buy); transform: translateX(-2px); }
html[dir="rtl"] .detail-back:hover { transform: translateX(2px); }
.detail-title {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 22px;
}
html[dir="rtl"] .detail-title { letter-spacing: 0; line-height: 1.3; }


/* ---------- v1.3: CTA dock above the bottom nav, account link, scrollable rows ---------- */
.bottom-nav-item { text-decoration: none; }
.cta-dock { display: none; }
button.acct-link { cursor: pointer; font-family: inherit; }
.acct-link { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.acct-link:hover { border-color: var(--ink); }
.acct-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.library-search input { min-width: 0; }
@media (max-width: 760px) {
  .cta-dock { display: flex; gap: 6px; position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 199; padding: 8px 10px; background: rgba(255,255,255,0.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--border-soft); overflow-x: auto; scrollbar-width: none; }
  .cta-dock::-webkit-scrollbar { display: none; }
  .cta-dock a, .cta-dock button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: 9px 8px; font: 700 11.5px/1.1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; }
  .cta-dock .d-buy { background: var(--cta-buy); color: #fff; }
  .cta-dock .d-read { background: var(--ink); color: #fff; }
  .cta-dock .d-mand { background: var(--cta-mandate); color: var(--ink); }
  body { padding-bottom: 132px; }
  .bottom-nav-item { padding: 9px 2px 10px; }
  .nav-actions .acct-link { display: none; }
}


/* ===== CSS block ===== */


/* ============================================================
   UBCG Research — Marketplace layer
   Sits on top of the existing public CSS (or admin CSS) and only
   adds components the marketplace needs, using the same values:
   slate #233e50, burgundy #9b0047, yellow #ffc83d, sand borders.
   ============================================================ */
:root{
  --mk-ink:#233e50; --mk-ink-2:#2d4a60; --mk-ink-3:#8499a7; --mk-ink-4:#b5c0cb;
  --mk-red:#9b0047; --mk-red-dk:#7a0038; --mk-red-50:#fbeef3; --mk-red-100:#f6dde8;
  --mk-yellow:#ffc83d; --mk-yellow-dk:#e8b524; --mk-yellow-soft:#fff4d1;
  --mk-green:#0d9d6b; --mk-green-soft:#e3f6ee; --mk-alert:#d93b41; --mk-alert-soft:#fde7e7;
  --mk-line:#e3ddd2; --mk-line-soft:#efeae0; --mk-soft:#f4f6f8; --mk-sand:#f6f4ee; --mk-white:#ffffff;
  --mk-shadow:0 4px 18px rgba(35,62,80,.10); --mk-shadow-lg:0 30px 80px rgba(10,15,25,.34);
}
.muted{color:var(--mk-ink-3)}
.small{font-size:13px}
.xs{font-size:12px}
.num{font-variant-numeric:tabular-nums}
.serif-em{font-family:var(--serif);font-style:italic;font-weight:400;color:var(--mk-red)}
.kicker{display:inline-block;font-size:12px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--mk-red)}
.kicker::before{content:"— "}
html[dir="rtl"] .kicker{letter-spacing:0;text-transform:none;font-size:14px;font-weight:600}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--mk-ink-3)}
html[dir="rtl"] .eyebrow{letter-spacing:0;text-transform:none;font-size:12.5px}
[hidden]{display:none!important}
:focus-visible{outline:2px solid var(--mk-red);outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ---------- layout helpers ---------- */
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.between{justify-content:space-between}
.stack{display:flex;flex-direction:column;gap:12px}
.grid{display:grid;gap:16px}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.split{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:32px;align-items:start}
.sticky{position:sticky;top:96px}
.mk-section{padding-top:56px}
@media (max-width:1024px){.g4{grid-template-columns:repeat(2,minmax(0,1fr))}.g3{grid-template-columns:repeat(2,minmax(0,1fr))}.split{grid-template-columns:minmax(0,1fr)}.sticky{position:static}}
@media (max-width:600px){.g2,.g3{grid-template-columns:minmax(0,1fr)}}

/* ---------- buttons (same recipe as .btn-buy / .btn-mandate / .btn-read) ---------- */
.mk-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;padding:11px 20px;font:700 14px/1.2 var(--font);letter-spacing:.01em;border-radius:8px;cursor:pointer;transition:all .2s;text-decoration:none;white-space:nowrap}
.mk-btn:hover{text-decoration:none}
.mk-buy{background:var(--mk-red);color:#fff;box-shadow:0 1px 2px rgba(35,62,80,.05)}
.mk-buy:hover{background:var(--mk-red-dk);transform:translateY(-1px);box-shadow:0 8px 28px rgba(155,0,71,.28)}
.mk-mand{background:var(--mk-yellow);color:var(--mk-ink)}
.mk-mand:hover{background:var(--mk-yellow-dk);transform:translateY(-1px);box-shadow:0 8px 28px rgba(255,200,61,.36)}
.mk-read{background:var(--mk-ink);color:#fff}
.mk-read:hover{background:var(--mk-ink-2);transform:translateY(-1px)}
.mk-ghost{background:#fff;color:var(--mk-ink);border:1.5px solid var(--mk-line);padding:9.5px 18px}
.mk-ghost:hover{border-color:var(--mk-ink)}
.mk-text{background:transparent;color:var(--mk-ink-2);padding:9px 12px}
.mk-text:hover{background:var(--mk-soft)}
.mk-sm{padding:7px 13px;font-size:12.5px}
.mk-ghost.mk-sm{padding:6px 12px}
.mk-lg{padding:16px 28px;font-size:15px;border-radius:12px}
.mk-block{width:100%}
.mk-btn[disabled]{opacity:.45;cursor:not-allowed;transform:none;box-shadow:none}
.is-admin .mk-btn{font-weight:600;font-size:13.5px;padding:9px 18px}
.is-admin .mk-btn.mk-sm{padding:6px 12px;font-size:12.5px}

/* ---------- surfaces ---------- */
.card{background:#fff;border:1px solid var(--mk-line);border-radius:16px;padding:26px}
.card.pad-s{padding:16px 18px}
.card.soft{background:var(--mk-soft);border-color:transparent}
.panel{background:#fff;border:1px solid var(--mk-line);border-radius:16px;overflow:hidden}
.is-admin .panel{border-radius:14px}
.panel-h{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid var(--mk-line);flex-wrap:wrap}
.panel-h h2,.panel-h h3{font-size:16px;font-weight:700;color:var(--mk-ink)}
.panel-b{padding:22px}
.divider{height:1px;background:var(--mk-line-soft);margin-block:14px}
.kpi{background:#fff;border:1px solid var(--mk-line);border-radius:16px;padding:22px;display:flex;flex-direction:column;gap:8px}
.kpi .l{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--mk-ink-3)}
.kpi .v{font-size:clamp(22px,2.6vw,30px);font-weight:800;color:var(--mk-ink);letter-spacing:-.02em;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kpi .d{font-size:12.5px;color:var(--mk-ink-3)}
.kpi.hl{border-color:var(--mk-red)} .kpi.hl .v{color:var(--mk-red)}
.up{color:var(--mk-green);font-weight:600} .down{color:var(--mk-alert);font-weight:600}

/* ---------- form ---------- */
label.f{display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:600;color:var(--mk-ink)}
label.f .hint,.f .hint{font-weight:400;font-size:12px;color:var(--mk-ink-3)}
.f{display:flex;flex-direction:column;gap:8px;font-size:14px;font-weight:600;color:var(--mk-ink)}
.in{font:500 15px var(--font);color:var(--mk-ink);background:#fff;border:1px solid var(--mk-line);border-radius:10px;padding:13px 15px;width:100%;transition:border-color .15s,box-shadow .15s}
select.in{padding:12px 13px}
textarea.in{min-height:100px;resize:vertical;line-height:1.55}
.in::placeholder{color:var(--mk-ink-4);font-weight:400}
.in:focus{outline:none;border-color:var(--mk-red);box-shadow:0 0 0 3px var(--mk-red-50)}
.is-admin .in{font-size:14px;padding:10px 12px;border-radius:8px}
.mk-chips{display:flex;gap:8px;flex-wrap:wrap}
.mk-chip{padding:8px 16px;border:1px solid var(--mk-line);border-radius:999px;font:600 13px var(--font);cursor:pointer;background:#fff;color:var(--mk-ink-2);transition:all .15s;white-space:nowrap}
.mk-chip:hover{border-color:var(--mk-ink);color:var(--mk-ink)}
.mk-chip.on{background:var(--mk-ink);color:#fff;border-color:var(--mk-ink)}
.seg{display:inline-flex;background:var(--mk-soft);border-radius:999px;padding:3px;gap:2px;flex-wrap:wrap}
.seg button{border:0;background:transparent;padding:7px 15px;font:700 12.5px var(--font);color:var(--mk-ink-3);border-radius:999px;cursor:pointer;transition:all .2s;white-space:nowrap}
.seg button.on{background:#fff;color:var(--mk-ink);box-shadow:0 1px 2px rgba(35,62,80,.08)}
.check{display:flex;gap:10px;align-items:flex-start;font-size:14px;color:var(--mk-ink-2);line-height:1.5}
.check input{margin-top:3px;accent-color:var(--mk-red);width:16px;height:16px;flex:none}
.opt{display:flex;gap:12px;align-items:flex-start;border:1px solid var(--mk-line);border-radius:12px;padding:14px 16px;cursor:pointer;background:#fff;transition:border-color .15s,background .15s;font:inherit;color:inherit;text-align:start}
.opt:hover{border-color:var(--mk-ink-3)}
.opt input{accent-color:var(--mk-red);margin-top:3px;flex:none}
.opt:has(input:checked){border-color:var(--mk-red);background:var(--mk-red-50)}
.opt > span{min-width:0;flex:1}
.opt .pill{white-space:normal}
.opt b.num{white-space:nowrap}

/* ---------- pills ---------- */
.pill{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;letter-spacing:.02em;padding:4px 10px;border-radius:999px;background:var(--mk-soft);color:var(--mk-ink-2);white-space:nowrap}
.pill.ok{background:var(--mk-green-soft);color:var(--mk-green)}
.pill.warn{background:var(--mk-yellow-soft);color:#8a5a00}
.pill.bad{background:var(--mk-alert-soft);color:var(--mk-alert)}
.pill.cta{background:var(--mk-red-50);color:var(--mk-red)}
.pill.ink{background:var(--mk-ink);color:#fff}
.pill.y{background:var(--mk-yellow);color:var(--mk-ink)}
.pill.dot::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.live-dot{width:8px;height:8px;border-radius:50%;background:var(--mk-green);box-shadow:0 0 0 4px rgba(13,157,107,.18);display:inline-block;flex:none}
.stars{color:#e0a100;letter-spacing:1px;font-size:13px}
.tags{display:flex;gap:6px;flex-wrap:wrap}
.tag{font-size:12px;font-weight:600;background:var(--mk-soft);color:var(--mk-ink-2);padding:4px 10px;border-radius:999px}
.tag.hl{background:var(--mk-yellow-soft);color:#8a5a00}
.avatar{width:36px;height:36px;border-radius:50%;display:inline-grid;place-items:center;font-weight:700;font-size:12.5px;color:#fff;flex:none}
.avatar.md{width:48px;height:48px;font-size:16px}
.avatar.lg{width:80px;height:80px;font-size:26px}

/* ---------- social proof ---------- */
.sp{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:12px;background:var(--mk-soft);font-size:13.5px;line-height:1.5;color:var(--mk-ink-2)}
.sp .ic{flex:none;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:800;background:var(--mk-ink-4);color:#fff}
.sp b{color:var(--mk-ink);font-weight:700}
.sp.peer{background:var(--mk-yellow-soft)} .sp.peer .ic{background:var(--mk-yellow);color:var(--mk-ink)}
.sp.hot{background:var(--mk-red-50)} .sp.hot .ic{background:var(--mk-red)}
.sp.trust{background:var(--mk-green-soft)} .sp.trust .ic{background:var(--mk-green)}
.peers{display:flex}
.peers span{width:28px;height:28px;border-radius:50%;border:2px solid #fff;margin-inline-start:-8px;display:grid;place-items:center;font-size:10px;font-weight:700;color:#fff}
.peers span:first-child{margin-inline-start:0}
.toast-feed{position:fixed;inset-inline-start:24px;bottom:24px;z-index:150;max-width:360px}
.tf{background:#fff;border:1px solid var(--mk-line);box-shadow:var(--mk-shadow);border-radius:12px;padding:11px 14px;font-size:13px;color:var(--mk-ink-2);display:flex;gap:10px;align-items:center;animation:tfin .35s ease}
.tf b{color:var(--mk-ink)}
@keyframes tfin{from{transform:translateY(10px);opacity:0}to{transform:none;opacity:1}}
.mk-toast{position:fixed;left:50%;transform:translateX(-50%);bottom:28px;z-index:1000;background:var(--mk-ink);color:#fff;padding:13px 22px;border-radius:10px;font:600 14px var(--font);box-shadow:0 14px 36px rgba(0,0,0,.28);max-width:90vw;text-align:center}

/* ---------- tables ---------- */
.tbl-wrap{overflow-x:auto}
table.tbl{width:100%;border-collapse:collapse;font-size:13.5px}
.tbl th{text-align:start;font-size:11px;font-weight:700;letter-spacing:.10em;text-transform:uppercase;color:var(--mk-ink-3);padding:12px 18px;background:var(--mk-sand);border-bottom:1px solid var(--mk-line);white-space:nowrap}
.tbl td{padding:13px 18px;border-bottom:1px solid var(--mk-line-soft);vertical-align:middle;color:var(--mk-ink-2)}
.tbl tr:last-child td{border-bottom:0}
.tbl td.r,.tbl th.r{text-align:end}
.tbl tbody tr:hover{background:var(--mk-sand)}
.tbl b{color:var(--mk-ink)}

/* ---------- charts & meters ---------- */
.meter{height:8px;background:var(--mk-soft);border-radius:99px;overflow:hidden}
.meter i{display:block;height:100%;background:var(--mk-red);border-radius:99px}

/* ---------- marketplace cards (reuse .study-card from the site) ---------- */
.study-card .sp-chip{background:var(--mk-yellow);color:var(--mk-ink)}
.study-card .hot-chip{background:var(--mk-red-50);color:var(--mk-red)}
.r-card{min-height:0}
.r-head{display:flex;gap:14px;align-items:center}
.r-head > div{min-width:0}
.r-head h3{font-size:18px}
.r-stats{display:flex;gap:16px;font-size:13px;color:var(--mk-ink-3);flex-wrap:wrap}
.r-stats b{color:var(--mk-ink)}
.r-rate{font-size:18px;font-weight:800;color:var(--mk-ink);font-variant-numeric:tabular-nums}
.r-rate small{font-size:12px;color:var(--mk-ink-3);font-weight:600}

/* ---------- page heads on marketplace pages ---------- */
.mk-head{padding:60px 0 8px}
.mk-head h1{font-size:clamp(36px,4vw,52px);font-weight:800;letter-spacing:-.02em;line-height:1.05;color:var(--mk-ink)}
.mk-head h1 em{font-family:var(--serif);font-style:italic;font-weight:400;color:var(--mk-red);font-size:1.05em}
html[dir="rtl"] .mk-head h1{letter-spacing:0;line-height:1.3}
.mk-head p.lede{color:var(--mk-ink-3);font-size:17px;max-width:62ch;margin-top:12px;line-height:1.6}
.mk-tabs{display:flex;gap:4px;border-bottom:1px solid var(--mk-line);margin:24px 0 0;overflow-x:auto;scrollbar-width:none}
.mk-tabs::-webkit-scrollbar{display:none}
.mk-tabs a{padding:12px 16px;font-size:14px;font-weight:600;color:var(--mk-ink-3);text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap;display:inline-flex;gap:8px;align-items:center}
.mk-tabs a:hover{color:var(--mk-ink)}
.mk-tabs a.on{color:var(--mk-red);border-bottom-color:var(--mk-red)}
.mk-tabs .cnt{font-size:10px;font-weight:700;background:var(--mk-red);color:#fff;border-radius:99px;padding:2px 7px}
.ctx-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:24px;padding:16px 20px;border-radius:16px;background:var(--mk-yellow-soft)}
.ctx-bar b{color:var(--mk-ink)}
.ctx-bar .in{max-width:280px;background:#fff}
.demo-strip{background:var(--mk-ink);color:rgba(255,255,255,.75);font-size:12px;text-align:center;padding:6px 16px}
.demo-strip button{border:0;background:none;color:var(--mk-yellow);font:600 12px var(--font);cursor:pointer;text-decoration:underline}
.acct-btn{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--mk-line);background:#fff;border-radius:999px;padding:4px 12px 4px 4px;cursor:pointer;font:600 13px var(--font);color:var(--mk-ink);white-space:nowrap}
.acct-btn .avatar{width:28px;height:28px;font-size:11px}
.acct-btn.guest{padding:8px 14px}


@media (max-width:760px){.acct-btn span.lbl{display:none}.acct-btn{padding:4px}.acct-btn.guest{padding:7px 12px}.acct-btn.guest span.lbl{display:inline}.toast-feed{bottom:90px;inset-inline:16px;max-width:none}.mk-toast{bottom:92px}.mk-head{padding-top:40px}}
.bottom-nav-inner.five{grid-template-columns:repeat(5,1fr)}

/* ---------- sheet: modal (desktop public), drawer (desktop admin), bottom sheet (mobile) ---------- */
.sh-bd{position:fixed;inset:0;background:rgba(35,62,80,.62);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);z-index:400;opacity:0;transition:opacity .25s}
.sh-bd.in{opacity:1}
.sh{position:fixed;z-index:401;background:#fff;color:var(--mk-ink);display:flex;flex-direction:column;box-shadow:var(--mk-shadow-lg);font-family:var(--font);
  left:50%;top:50%;width:min(620px,calc(100vw - 40px));max-height:min(88vh,860px);border-radius:20px;transform:translate(-50%,-46%);opacity:0;transition:transform .3s cubic-bezier(.16,1,.3,1),opacity .2s}
.sh.wide{width:min(860px,calc(100vw - 40px))}
.sh.in{transform:translate(-50%,-50%);opacity:1}
.is-admin .sh{left:auto;right:0;top:0;bottom:0;height:100vh;max-height:none;width:min(560px,100vw);border-radius:0;transform:translateX(40px)}
.is-admin .sh.wide{width:min(760px,100vw)}
.is-admin .sh.in{transform:none}
html[dir="rtl"] .is-admin .sh{right:auto;left:0;transform:translateX(-40px)}
html[dir="rtl"] .is-admin .sh.in{transform:none}
.sh-grip{display:none}
.sh-h{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:30px 32px 16px}
.sh-h h3{font-size:clamp(22px,2.6vw,28px);font-weight:700;letter-spacing:-.02em;line-height:1.15;color:var(--mk-ink);margin-top:6px}
.is-admin .sh-h h3{font-size:20px;letter-spacing:-.01em}
.sh-h .sub{font-size:13.5px;color:var(--mk-ink-3);margin-top:6px}
.sh-x{border:0;background:transparent;color:var(--mk-ink-3);width:36px;height:36px;border-radius:8px;cursor:pointer;display:grid;place-items:center;flex:none}
.sh-x:hover{background:var(--mk-sand);color:var(--mk-ink)}
.is-admin .sh-x{border:1px solid var(--mk-line);width:32px;height:32px}
.sh-b{padding:4px 32px 24px;overflow:auto;overscroll-behavior:contain;flex:1}
.sh-f{padding:16px 32px calc(18px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--mk-line);display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;align-items:center}
@media (max-width:760px){
  .sh,.sh.wide,.is-admin .sh,.is-admin .sh.wide{left:0;right:0;top:auto;bottom:0;height:auto;width:100%;max-height:92vh;border-radius:22px 22px 0 0;transform:translateY(100%);opacity:1}
  .sh.in,.is-admin .sh.in{transform:translateY(0)}
  html[dir="rtl"] .is-admin .sh{transform:translateY(100%)}
  html[dir="rtl"] .is-admin .sh.in{transform:none}
  .sh.drag{transition:none}
  .sh-grip{display:block;padding:10px 0 2px;cursor:grab;touch-action:none}
  .sh-grip i{display:block;width:44px;height:5px;border-radius:99px;background:var(--mk-ink-4);margin:0 auto}
  .sh-h{padding:8px 20px 12px;touch-action:none}
  .sh-b{padding:4px 20px 20px}
  .sh-f{padding:12px 20px calc(14px + env(safe-area-inset-bottom,0px))}
  .sh-f .mk-btn{flex:1}
}

/* ---------- misc ---------- */
.steps{display:flex;gap:8px;margin-bottom:20px}
.steps span{flex:1;height:4px;border-radius:99px;background:var(--mk-line)}
.steps span.on{background:var(--mk-red)}
.kv{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;font-size:14px;margin:0}
.kv dt{color:var(--mk-ink-3)}
.kv dd{margin:0;text-align:end;font-weight:600;color:var(--mk-ink);font-variant-numeric:tabular-nums}
.sum-line{display:flex;justify-content:space-between;gap:10px;font-size:14px;padding-block:4px;color:var(--mk-ink-2)}
.sum-line.tot{font-weight:800;font-size:18px;color:var(--mk-ink);border-top:1px solid var(--mk-line);margin-top:8px;padding-top:12px}
.sum-line.tot .num{color:var(--mk-red)}
.note{font-size:13px;color:var(--mk-ink-2);background:var(--mk-soft);border-radius:10px;padding:12px 14px;line-height:1.55}
.err{font-size:13px;color:var(--mk-alert);font-weight:600}
.big-ok{width:64px;height:64px;border-radius:50%;background:var(--mk-green-soft);color:var(--mk-green);display:grid;place-items:center;font-size:30px}
.inv{font-size:13px;background:#fff;color:#233e50;border:1px solid var(--mk-line);border-radius:12px;padding:24px}
.inv .inv-brand{display:inline-flex;align-items:baseline;font-family:var(--font)}
.inv .inv-brand b{font-weight:700;font-size:20px}
.inv .inv-brand i{display:inline-block;width:2px;height:17px;background:#9b0047;margin:0 4px;transform:translateY(2px)}
.inv .inv-brand em{font-family:var(--serif);font-style:italic;color:#9b0047;font-size:23px;margin-inline-end:6px}
.inv table{width:100%;border-collapse:collapse;margin-top:14px}
.inv td,.inv th{padding:8px 4px;border-bottom:1px solid var(--mk-line-soft);text-align:start}
.inv th{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--mk-ink-3)}
.inv .r{text-align:end}
.timeline{display:flex;flex-direction:column}
.timeline > div{display:grid;grid-template-columns:18px 1fr;gap:10px;padding-bottom:14px;position:relative}
.timeline > div::before{content:"";position:absolute;inset-inline-start:5px;top:14px;bottom:0;width:2px;background:var(--mk-line)}
.timeline > div:last-child::before{display:none}
.timeline i{width:12px;height:12px;border-radius:50%;background:var(--mk-ink-4);margin-top:4px}
.timeline i.ok{background:var(--mk-green)} .timeline i.cur{background:var(--mk-red)}
.empty-s{padding:40px 20px;text-align:center;color:var(--mk-ink-3)}
.detail-cta .sp{background:#fff}
.mk-cta-box{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 24px;background:var(--mk-soft);border-radius:12px;flex-wrap:wrap}
.price-xl{font-size:34px;font-weight:800;color:var(--mk-red);line-height:1;font-variant-numeric:tabular-nums}
.price-xl small{display:block;font-size:12px;color:var(--mk-ink-3);font-weight:500;margin-top:8px}
.is-admin .mk-adm-tabs{display:flex;gap:4px;border-bottom:1px solid var(--mk-line);margin-bottom:22px;overflow-x:auto}
.mk-adm-tabs button{padding:10px 16px;background:transparent;border:0;font:600 13px var(--font);color:var(--mk-ink-3);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.mk-adm-tabs button:hover{color:var(--mk-ink)}
.mk-adm-tabs button.on{color:var(--mk-red);border-bottom-color:var(--mk-red)}
.role-pick{font:600 12.5px var(--font);color:var(--mk-ink);border:1px solid var(--mk-line);background:#fff;border-radius:8px;padding:8px 10px;height:38px}
@media (max-width:900px){
  .is-admin table.tbl thead{display:none}
  .is-admin table.tbl,.is-admin .tbl tbody,.is-admin .tbl tr,.is-admin .tbl td{display:block;width:100%}
  .is-admin .tbl tr{background:#fff;border:1px solid var(--mk-line);border-radius:10px;padding:12px 14px;margin:0 0 10px}
  .is-admin .tbl td{padding:4px 0;border:0;text-align:start!important}
  .is-admin .tbl td[data-label]::before{content:attr(data-label);display:inline-block;min-width:110px;font-size:10.5px;font-weight:700;letter-spacing:.10em;text-transform:uppercase;color:var(--mk-ink-3)}
  .is-admin .tbl-wrap{overflow:visible;padding:12px}
  .is-admin .tbl tbody tr:hover{background:#fff}
}
.meta3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:760px){.meta3{grid-template-columns:minmax(0,1fr)}}
.panel-head h3{font-size:16px;font-weight:700;color:var(--mk-ink)}
.is-admin .stat-card-v{font-size:clamp(22px,2.4vw,30px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.is-admin .page-head{align-items:flex-end}
.bottom-nav-item{text-decoration:none}
.mk-site .nav-links a{white-space:nowrap}
.mk-site .brand-sub{white-space:nowrap}

@media (max-width:760px){.mk-site .nav-actions .acct-btn{display:none}}
.library-search input{min-width:0}
.library-search select{max-width:46%;min-width:0}
@media (max-width:560px){.is-admin .role-pick{max-width:118px;font-size:12px}}

/* ============ v1.3 additions ============ */
/* horizontally scrollable tab bars, segments and chip rows */
.mk-tabs,.mk-adm-tabs,.form-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}
.mk-tabs::-webkit-scrollbar,.mk-adm-tabs::-webkit-scrollbar{display:none}
.mk-tabs a,.mk-adm-tabs button{flex:0 0 auto;scroll-snap-align:start}
.scroll-x{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.scroll-x::-webkit-scrollbar{display:none}
.scroll-x > *{flex:0 0 auto}
.tabs-fade{position:relative}
@media (max-width:760px){
  .seg{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;max-width:100%}
  .seg::-webkit-scrollbar{display:none}
  .seg button{flex:0 0 auto}
  .sh .mk-chips,.mk-chips.scroll-m{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-inline:-20px;padding-inline:20px;-webkit-overflow-scrolling:touch}
  .sh .mk-chips::-webkit-scrollbar,.mk-chips.scroll-m::-webkit-scrollbar{display:none}
  .mk-tabs{margin-inline:-20px;padding-inline:20px;scroll-padding-inline:20px}
}

/* mobile CTA dock above the bottom navigation */
.cta-dock{display:none}
@media (max-width:760px){
  .cta-dock{display:flex;gap:8px;position:fixed;left:0;right:0;bottom:calc(64px + env(safe-area-inset-bottom,0px));z-index:199;padding:8px 12px;background:rgba(255,255,255,.97);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-top:1px solid var(--mk-line-soft);overflow-x:auto;scrollbar-width:none}
  .cta-dock::-webkit-scrollbar{display:none}
  .cta-dock a,.cta-dock button{flex:1 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:999px;padding:9px 14px;font:700 12.5px/1.1 var(--font);text-decoration:none;white-space:nowrap;cursor:pointer}
  .cta-dock .d-buy{background:var(--mk-red);color:#fff}
  .cta-dock .d-read{background:var(--mk-ink);color:#fff}
  .cta-dock .d-mand{background:var(--mk-yellow);color:var(--mk-ink)}
  .mk-site{padding-bottom:132px}
  .bottom-nav-item{padding:9px 2px 10px}
  .toast-feed{bottom:140px}
  .mk-toast{bottom:144px}
}

/* tag input */
.tagbox{display:flex;flex-direction:column;gap:8px}
.tag-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.tagbox.numbered .tag-list{flex-direction:column;flex-wrap:nowrap;gap:0;border:1px solid var(--mk-line);border-radius:12px;overflow:hidden}
.tagbox.numbered .tag-list:empty{display:none}
.tag-item{display:inline-flex;align-items:center;gap:6px;background:var(--mk-soft);border-radius:999px;padding:5px 6px 5px 12px;font-size:13px;font-weight:600;color:var(--mk-ink)}
.tagbox.numbered .tag-item{border-radius:0;background:#fff;padding:10px 10px 10px 14px;border-bottom:1px solid var(--mk-line-soft);font-weight:500;font-size:14px}
.tagbox.numbered .tag-item:last-child{border-bottom:0}
.tag-n{font-weight:700;color:var(--mk-ink);min-width:24px;font-variant-numeric:tabular-nums}
.tag-t{flex:1;min-width:0}
.tag-x,.tag-mv{border:0;background:transparent;color:var(--mk-ink-3);width:26px;height:26px;border-radius:50%;cursor:pointer;font-size:16px;line-height:1;display:grid;place-items:center;flex:none}
.tag-x:hover,.tag-mv:hover:not([disabled]){background:var(--mk-line-soft);color:var(--mk-ink)}
.tag-mv{font-size:13px}.tag-mv[disabled]{opacity:.3;cursor:default}
.tag-add{display:flex;gap:8px}
.tag-add .in{flex:1;min-width:0}
.tagbox .hint{font-size:12px;color:var(--mk-ink-3);font-weight:400}

/* multi-file zone */
.fzone{position:relative;display:flex;align-items:center;gap:12px;padding:16px;border:1.5px dashed var(--mk-line);border-radius:12px;cursor:pointer;color:var(--mk-ink-3);font-size:14px;font-weight:500;transition:border-color .15s,background .15s}
.fzone:hover,.fzone.over{border-color:var(--mk-red);background:var(--mk-red-50);color:var(--mk-ink)}
.fzone input{position:absolute;inset:0;opacity:0;cursor:pointer}
.fzone b{color:var(--mk-ink)}
.fzone .hint{font-size:12px;font-weight:400}
.flist{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.flist li{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 10px;border:1px solid var(--mk-line);border-radius:10px;background:#fff}
.fic{flex:none;width:38px;height:38px;border-radius:8px;background:var(--mk-red-50);color:var(--mk-red);display:grid;place-items:center;font-size:10px;font-weight:800;letter-spacing:.04em}
.fname{flex:1;min-width:0;display:flex;flex-direction:column;font-size:13px}
.fname b{color:var(--mk-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fname .hint{font-size:11.5px;color:var(--mk-ink-3)}
.fkind{width:auto;max-width:44%;padding:7px 9px!important;font-size:12.5px!important}
@media (max-width:560px){.flist li{flex-wrap:wrap}.fkind{max-width:none;flex:1 0 100%;order:3}}

/* AI search */
.ai-search .library-search{margin-top:0}
.library-search.ai{padding-inline-start:12px}
.ai-badge{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,var(--mk-red),#c2185b);color:#fff;font:800 11px var(--font);letter-spacing:.04em}
.ai-ex{display:flex;gap:8px;align-items:center;margin-top:14px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.ai-ex::-webkit-scrollbar{display:none}
.ai-ex > *{flex:0 0 auto}
.ai-understood{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:14px;padding:12px 14px;border-radius:12px;background:var(--mk-red-50);font-size:13px;color:var(--mk-ink-2)}
.ai-understood b{color:var(--mk-ink)}
.ai-chip{display:inline-flex;align-items:center;gap:4px;background:#fff;border:1px solid var(--mk-red-100);color:var(--mk-ink);border-radius:999px;padding:4px 6px 4px 11px;font:600 12.5px var(--font)}
.ai-chip button{border:0;background:transparent;color:var(--mk-ink-3);cursor:pointer;font-size:14px;width:20px;height:20px;border-radius:50%}
.ai-chip button:hover{background:var(--mk-line-soft);color:var(--mk-ink)}
@media (max-width:760px){.ai-ex{margin-inline:-20px;padding-inline:20px}}

/* source labels on cards */
.chip-partner{background:#fff;border:1px solid var(--mk-line);color:var(--mk-ink-2)}
.chip-res{background:var(--mk-green-soft);color:var(--mk-green)}
.dl-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:1px solid var(--mk-line-soft)}
.dl-row:first-child{border-top:0}
.req-card{display:flex;flex-direction:column;gap:12px}
.req-meta{display:flex;gap:14px;flex-wrap:wrap;font-size:13px;color:var(--mk-ink-3)}
.req-meta b{color:var(--mk-ink)}
.list-tools{flex-wrap:wrap;gap:10px;align-items:center}
.list-tools .row{min-width:0;max-width:100%}
@media (max-width:760px){.list-tools > .row{width:100%;justify-content:space-between;flex-wrap:nowrap}.list-tools .seg{min-width:0}.list-tools select{flex:none}}

a.acct-btn,a.acct-btn:hover{text-decoration:none;color:var(--mk-ink)}
@media (max-width:760px){
  .cta-dock a,.cta-dock button{flex:1 1 auto;padding:9px 11px;font-size:12px}
  .grid.g3:has(> .kpi),.grid.g4:has(> .kpi){display:flex;overflow-x:auto;scrollbar-width:none;gap:10px;margin-inline:-20px;padding-inline:20px;scroll-padding-inline:20px;scroll-snap-type:x proximity}
  .grid.g3:has(> .kpi)::-webkit-scrollbar,.grid.g4:has(> .kpi)::-webkit-scrollbar{display:none}
  .grid.g3:has(> .kpi) > .kpi,.grid.g4:has(> .kpi) > .kpi{flex:0 0 68%;scroll-snap-align:start;padding:16px}
}
@media (max-width:760px){
  .library-search.ai{flex-wrap:wrap;padding:10px}
  .library-search.ai .ai-in{flex:1 1 calc(100% - 50px);padding:10px 6px}
  .library-search.ai .ai-go{flex:1 0 100%;padding:13px}
  .cta-dock{gap:6px;padding-inline:10px}
  .cta-dock a,.cta-dock button{padding:9px 8px;font-size:11.5px}
}

/* ============ v1.4: mobile chrome — search tab, CTA dock, context bars, sheet CTAs ============ */
.bottom-nav-inner.nav5{grid-template-columns:repeat(5,1fr)}
.bottom-nav-item{font-family:inherit}
.nav-search{position:relative}
.nav-search .ns-dot{width:52px;height:52px;border-radius:50%;background:var(--mk-red);color:#fff;display:grid;place-items:center;margin-top:-26px;border:4px solid #fff;box-shadow:0 6px 18px rgba(155,0,71,.35)}
.nav-search .ns-dot svg{width:22px;height:22px;stroke:#fff!important;stroke-width:2.2!important}
.bottom-nav-item.nav-search.active::before{display:none}
.cta-dock .d-mand,.cta-dock .d-read{flex:1 1 0}
.sheet-cta{display:flex;align-items:center;gap:10px;width:100%}
.sheet-price{margin-inline-end:auto;display:flex;flex-direction:column;line-height:1.1;min-width:0}
.sheet-price b{font-size:20px;font-weight:800;color:var(--mk-red);font-variant-numeric:tabular-nums;white-space:nowrap}
.sheet-price small{font-size:11.5px;color:var(--mk-ink-3);margin-top:3px}
.sh-f .sheet-cta .mk-btn{flex:0 0 auto}
@media (max-width:380px){.hide-xs{display:none!important}}
.acc-list{border:1px solid var(--mk-line);border-radius:12px;overflow:hidden}
.acc-row{display:flex;align-items:center;gap:10px;padding:13px 14px;text-decoration:none;color:var(--mk-ink);border-bottom:1px solid var(--mk-line-soft);background:#fff}
.acc-row:last-child{border-bottom:0}
.acc-row:hover{background:var(--mk-sand)}
.acc-row > span:first-child{flex:1;min-width:0;display:flex;flex-direction:column}
.acc-row b{font-size:14.5px}
.acc-row span span{font-size:12.5px;color:var(--mk-ink-3)}
.acc-row i{font-style:normal;color:var(--mk-ink-4);font-size:20px}
.linkish{border:0;background:none;padding:0;color:var(--mk-red);font:600 12px var(--font);text-decoration:underline;cursor:pointer}
button.acct-btn{font-family:var(--font)}
.est-btn{display:inline-flex;align-items:center;gap:10px;margin-top:18px;border:1px dashed var(--mk-line);border-radius:12px;padding:12px 14px;background:#fff;cursor:pointer;font:600 14px var(--font);color:var(--mk-ink)}
.est-btn:hover{border-color:var(--mk-red)}
.est-btn b{color:var(--mk-red)}
@media (max-width:760px){
  .sh-f{padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))}
}
.ss-ex > span:last-child{flex:0 0 auto}
.sum-line .num{white-space:nowrap}
.sh .detail-meta{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px}
@media (max-width:760px){.sh-f .sheet-cta .mk-btn{flex:0 0 auto}.sh-f .sheet-cta{flex-wrap:nowrap}}
.tbl td.r.num,.tbl td.r .num{white-space:nowrap}

/* ============ v1.5: mobile stack (tabs → CTA dock → bottom nav), floating Retour / Filtres, paid visibility ============ */
.m-float{display:none}
.mf-n{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--mk-red);color:#fff;font:800 11px var(--font)}
.btn-become{display:inline-flex;align-items:center;gap:8px;background:var(--mk-ink);color:#fff!important;border-radius:999px;padding:10px 18px;font:700 13.5px/1 var(--font);text-decoration:none;white-space:nowrap;border:0;cursor:pointer;transition:background .2s}
.btn-become:hover{background:#16293a}
.btn-become svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2.2}


@media (min-width:761px) and (max-width:900px){.nav-actions .lang-toggle{display:none!important}.nav-actions .acct-btn span.lbl,.nav-actions .acct-link span{display:none!important}.nav-actions .acct-link{padding:8px!important}.brand-sub{display:none!important}.nav-links{gap:16px!important}}
@media (max-width:760px){
  .btn-become{display:none!important}
  .m-hide{display:none!important}
  .m-bar{position:fixed!important;left:0;right:0;z-index:198;margin:0!important;padding:8px 12px!important;background:rgba(255,255,255,.98)!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-top:1px solid var(--mk-line-soft,#efeae0)!important;border-bottom:0!important;display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;scrollbar-width:none;gap:8px;max-width:none!important;width:auto!important;scroll-padding-inline:12px}
  .m-bar::-webkit-scrollbar{display:none}
  .m-bar > *{flex:0 0 auto!important}
  .m-bar.mk-tabs,.m-bar.ctx-tabs{padding:0 8px!important;gap:0}
  .m-bar.mk-tabs a,.m-bar.ctx-tabs a{padding:13px 12px!important;border-bottom-width:3px;margin:0!important}
  .m-bar .filter-chip{padding:9px 15px}
  .cta-dock{gap:10px!important;padding:10px 12px!important;overflow:visible!important}
  .cta-dock a,.cta-dock button{flex:1 1 0!important;min-height:52px;padding:12px 10px!important;border-radius:14px!important;font:700 14.5px/1.15 var(--font,'IBM Plex Sans',sans-serif)!important;letter-spacing:-.005em;box-shadow:0 2px 8px rgba(35,62,80,.10);white-space:nowrap}
  .cta-dock .d-read{background:var(--mk-ink,#233e50)!important;color:#fff!important}
  .cta-dock svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2.2;flex:none}
  .cta-dock a,.cta-dock button{min-width:0;gap:6px!important}
  .cta-dock span{overflow:hidden;text-overflow:ellipsis}
  .m-float{display:flex;justify-content:space-between;align-items:center;position:fixed;left:12px;right:12px;z-index:197;pointer-events:none}
  .m-float[hidden]{display:none}
  .mf-btn{pointer-events:auto;display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 16px 0 12px;border-radius:999px;border:1px solid var(--mk-line,#e3ddd1);background:#fff;color:var(--mk-ink,#233e50);font:700 14px var(--font,'IBM Plex Sans',sans-serif);box-shadow:0 6px 20px rgba(35,62,80,.16);cursor:pointer}
  .mf-btn[hidden]{display:none}
  .mf-filter{margin-inline-start:auto;padding:0 14px}
  .mf-filter.on{background:var(--mk-ink,#233e50);color:#fff;border-color:var(--mk-ink,#233e50)}
  .sh-f .mk-btn{min-height:50px;font-size:15px;border-radius:12px}
  .sh-f .mk-btn.mk-sm{min-height:44px}
  .toast-feed{bottom:calc(var(--m-stack,140px) + 64px)!important}
  .mk-toast{bottom:calc(var(--m-stack,140px) + 64px)!important}
  .rail-m{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;gap:12px!important;margin-inline:-20px;padding:2px 20px 8px;scroll-snap-type:x mandatory;scroll-padding-inline:20px;grid-template-columns:none!important}
  .rail-m::-webkit-scrollbar{display:none}
  .rail-m > *{flex:0 0 84%!important;scroll-snap-align:start;max-width:84%}
  .detail-back{display:none}
}
@media (min-width:761px){.d-hide{display:none!important}}
.rail-hint{display:none}
@media (max-width:760px){.rail-hint{display:inline;font-size:12px;color:var(--mk-ink-3);font-weight:600}}
/* account type */
.chip-kind{background:#fff;border:1px solid var(--mk-line);color:var(--mk-ink-2)}
.chip-kind.kind-gov{border-color:#c9d6e0;background:#eef3f7;color:#233e50}
.chip-kind.kind-cooperative,.chip-kind.kind-association{background:var(--mk-green-soft);color:var(--mk-green);border-color:transparent}
/* sponsored */
.chip-spon{background:var(--mk-yellow);color:var(--mk-ink);font-weight:800}
.spon{position:relative;box-shadow:0 0 0 2px var(--mk-yellow) inset}
.study-card.spon,.card.spon{border-color:var(--mk-yellow)}
.pos-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.pos-opt{position:relative;display:flex;flex-direction:column;gap:4px;align-items:flex-start;border:1.5px solid var(--mk-line);border-radius:12px;padding:12px;background:#fff;cursor:pointer;font:inherit;color:inherit;text-align:start}
.pos-opt b.n{font-size:22px;font-weight:800;line-height:1;color:var(--mk-ink)}
.pos-opt .num{font-weight:700;font-size:13.5px;white-space:nowrap}
.pos-opt small{font-size:11.5px;color:var(--mk-ink-3)}
.pos-opt.on{border-color:var(--mk-red);background:var(--mk-red-50)}
.pos-opt[disabled]{opacity:.45;cursor:not-allowed;background:var(--mk-soft)}
.boost-line{display:flex;gap:12px;align-items:flex-start;border:1.5px solid var(--mk-line);border-radius:12px;padding:14px;cursor:pointer;background:#fff}
.boost-line:has(input:checked){border-color:var(--mk-red);background:var(--mk-red-50)}
.boost-line input{accent-color:var(--mk-red);margin-top:3px;flex:none;width:18px;height:18px}
.boost-line > span{flex:1;min-width:0}
.boost-line .num{font-weight:800;white-space:nowrap}
.notif{display:flex;gap:10px;align-items:flex-start;padding:12px 0;border-top:1px solid var(--mk-line-soft)}
.notif:first-child{border-top:0}
.notif .dot{width:8px;height:8px;border-radius:50%;background:var(--mk-red);margin-top:7px;flex:none}
.notif.read .dot{background:var(--mk-line)}
.kind-pick{display:flex;flex-wrap:wrap;gap:8px}
@media (max-width:760px){.kind-pick{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-inline:-20px;padding-inline:20px}.kind-pick::-webkit-scrollbar{display:none}.kind-pick > *{flex:0 0 auto}}
.ss-mode{display:flex;width:100%}
.ss-mode button{flex:1}
.ss-ex-row{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin-inline:-20px;padding:2px 20px 4px;scroll-padding-inline:20px}
.ss-ex-row::-webkit-scrollbar{display:none}
.ss-ex-row .mk-chip{flex:0 0 auto;font-weight:500}
@media (min-width:761px){.ss-ex-row{margin-inline:-32px;padding-inline:32px;flex-wrap:wrap;overflow:visible}}
@media (max-width:380px){.pos-grid{gap:6px}.pos-opt{padding:10px 8px}.pos-opt .num{font-size:12px}}

@media (max-width:420px){.cta-dock svg{display:none}.cta-dock a,.cta-dock button{font-size:14px!important;padding:12px 6px!important}}
@media (max-width:340px){.cta-dock a,.cta-dock button{font-size:12.5px!important}}
@media (max-width:760px){.boost-line{flex-wrap:wrap}.boost-line > .num{flex:1 0 100%;padding-inline-start:30px;margin-top:-4px}}
.pos-opt .num{white-space:normal;line-height:1.2}.pos-opt .num small{display:block;font-weight:500}
.boost-line > span.num{flex:none}

/* ============ v1.6: favourites, sharing, researcher popup, escrow, licences, premium ============ */
.icon-btn{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--mk-line);background:#fff;color:var(--mk-ink-2);cursor:pointer;transition:all .15s;flex:none;padding:0}
.icon-btn:hover{border-color:var(--mk-ink);color:var(--mk-ink)}
.fav-btn.on{color:#fff;background:var(--mk-red);border-color:var(--mk-red)}
.fav-btn.on svg{fill:currentColor}
.card-acts{position:absolute;top:14px;inset-inline-end:14px;display:flex;gap:6px;z-index:2}
.card-acts .icon-btn{width:32px;height:32px;box-shadow:0 1px 3px rgba(35,62,80,.08)}
.card-acts .icon-btn svg{width:16px;height:16px}
.study-card{position:relative}
.study-card .card-acts + .study-card-top{padding-inline-end:76px}
.r-card .card-acts + .r-head,.r-card .card-acts + .study-card-top{padding-inline-end:76px}
.sheet-acts{display:flex;gap:8px;justify-content:flex-end;margin:-6px 0 10px}
.share-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}
.share-opt{display:flex;align-items:center;justify-content:center;padding:12px;border:1px solid var(--mk-line);border-radius:12px;text-decoration:none;color:var(--mk-ink);font-weight:700;font-size:14px}
.share-opt:hover{border-color:var(--mk-ink);background:var(--mk-soft)}
.chip-lang{background:#eef3f7;color:#233e50;font-weight:800;letter-spacing:.04em}
.chip-prem{background:linear-gradient(135deg,#233e50,#3d5a70);color:#ffc83d;font-weight:800}
.r-card.prem{border-color:#cdd6de}
.free-tag{display:inline-block;background:var(--mk-green);color:#fff;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;border-radius:999px;padding:3px 9px;vertical-align:middle;margin-inline-start:4px}
.opt-new{align-items:center}
.opt-new i{font-style:normal;color:var(--mk-ink-4);font-size:20px}
.opt-new:hover{border-color:var(--mk-green);background:var(--mk-green-soft)}
.rail-s{display:flex;gap:10px;overflow-x:auto;scrollbar-width:none;margin-inline:-32px;padding:2px 32px 6px;scroll-snap-type:x proximity}
.rail-s::-webkit-scrollbar{display:none}
@media (max-width:760px){.rail-s{margin-inline:-20px;padding-inline:20px}}
.mini-study,.mini-rev{flex:0 0 240px;scroll-snap-align:start;display:flex;flex-direction:column;gap:8px;align-items:flex-start;text-align:start;border:1px solid var(--mk-line);border-radius:12px;padding:14px;background:#fff;font:inherit;color:inherit}
.mini-study{cursor:pointer}
.mini-study:hover{border-color:var(--mk-ink-3)}
.mini-study b{font-size:14.5px;line-height:1.3;color:var(--mk-ink)}
.mini-study .num{font-weight:800;color:var(--mk-red);font-size:14px}
.mini-rev{flex-basis:260px;background:var(--mk-sand,#faf8f4)}
.r-mini:hover{border-color:var(--mk-ink-3)}
.esc-box{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--mk-line);border:1px solid var(--mk-line);border-radius:12px;overflow:hidden}
.esc-box > div{background:#fff;padding:10px 12px;display:flex;flex-direction:column;gap:2px;min-width:0}
.esc-box span{font-size:11px;color:var(--mk-ink-3);font-weight:600}
.esc-box b{font-size:15px;color:var(--mk-ink);white-space:nowrap}
.esc-box .hl{background:var(--mk-red-50)}
.esc-box .hl b{color:var(--mk-red)}
@media (max-width:600px){.esc-box{grid-template-columns:repeat(2,minmax(0,1fr))}}
.esc-steps{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.esc-steps span{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--mk-ink-3);background:var(--mk-soft);border-radius:999px;padding:4px 10px 4px 4px}
.esc-steps span.on{color:var(--mk-green);background:var(--mk-green-soft)}
.esc-steps i{font-style:normal;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#fff;font-size:10px;font-weight:800}
.esc-steps small{font-weight:500;opacity:.8}
.lic-row{display:flex;align-items:center;gap:10px;border:1px solid var(--mk-line);border-radius:10px;padding:8px 10px}
.lic-row .in{width:120px;flex:none}
@media (max-width:480px){.lic-row{flex-wrap:wrap}.lic-row .in{width:100%}}
.prem-card{border-color:#cdd6de;background:linear-gradient(180deg,#fff,#f6f8fa)}
footer a.footer-hl{display:inline-flex;align-items:center;gap:6px;color:#fff!important;font-weight:700;background:rgba(255,255,255,.1);border-radius:999px;padding:5px 12px;margin-inline-start:-12px}
footer a.footer-hl.y{background:#ffc83d;color:#233e50!important}
footer a.footer-hl:hover{background:rgba(255,255,255,.2)}
footer a.footer-hl.y:hover{background:#ffd666}
.hdr-search{width:38px;height:38px}
@media (max-width:760px){.hdr-search{display:none}}
.res-tools{flex-wrap:wrap}
.seg .cnt{display:inline-block;min-width:18px;margin-inline-start:4px;padding:0 6px;border-radius:999px;background:var(--mk-line-soft,#efeae0);font-size:11px}
.seg button.on .cnt{background:var(--mk-red);color:#fff}
.req-card[data-qid]{cursor:pointer;transition:border-color .15s,box-shadow .15s}
.req-card[data-qid]:hover{border-color:var(--mk-ink-3);box-shadow:0 4px 18px rgba(35,62,80,.08)}
.try-ai{border-style:dashed}
.notif .t{flex:1}
.doc-view{border:1px solid var(--mk-line);border-radius:12px;background:#f3f1ec;padding:18px;display:flex;justify-content:center}
.doc-page{width:100%;max-width:420px;aspect-ratio:1/1.32;background:#fff;box-shadow:0 6px 24px rgba(35,62,80,.14);border-radius:4px;padding:28px 26px;display:flex;flex-direction:column;gap:10px;font-size:11px;color:#2d4a60;overflow:hidden}
.doc-page h4{font-size:15px;color:#233e50;margin:0}
.doc-page .ln{height:7px;border-radius:4px;background:#e7ecf0}
.doc-page .ln.s{width:60%}.doc-page .ln.m{width:82%}
.doc-page .ph{width:64px;height:78px;border-radius:6px;background:linear-gradient(135deg,#cdd6de,#e7ecf0)}
.doc-page .stamp{align-self:flex-end;border:2px solid #9b0047;color:#9b0047;border-radius:50%;width:70px;height:70px;display:grid;place-items:center;font-weight:800;font-size:10px;text-align:center;transform:rotate(-12deg);margin-top:auto}
.kv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px}
.kv-grid > div{border:1px solid var(--mk-line);border-radius:10px;padding:10px 12px;background:#fff}
.kv-grid span{display:block;font-size:11px;color:var(--mk-ink-3);font-weight:600}
.kv-grid b{font-size:14px;color:var(--mk-ink)}

/* header (v1.6): Accueil · Études · Chercheurs · Missions + Déposer une mission + Devenir chercheur */
@media (min-width:761px){
  .topbar-inner{gap:22px!important}
  .nav-links{gap:20px!important}
  .nav-actions{gap:8px!important}
  .lang-toggle button{padding:6px 10px!important}
  .nav-actions .btn-buy,.nav-actions .btn-become,.nav-actions .btn-mandate{padding:10px 14px!important;font-size:13.5px!important}
}
@media (max-width:1640px){.nav-actions .btn-mandate{display:none!important}}
@media (max-width:1440px){.nav-actions .acct-btn span.lbl,.nav-actions .acct-link span{display:none!important}.nav-actions .acct-link{padding:8px!important}.nav-actions .acct-btn.guest{padding:7px 10px!important}.nav-actions .acct-btn.guest span.lbl{display:inline!important}}
@media (max-width:1280px){.brand-sub{display:none!important}}
@media (max-width:1180px){.nav-actions .btn-buy{display:none!important}}
@media (max-width:1000px) and (min-width:761px){.nav-links li:first-child{display:none!important}.lang-toggle{display:none!important}}
@media (max-width:860px) and (min-width:761px){.nav-actions .btn-become span{display:none}.nav-actions .btn-become{padding:10px!important}}
@media (max-width:440px){.hide-sm{display:none!important}.sheet-price b{font-size:18px}}
/* RTL (Arabic) */
html[dir="rtl"] .mf-back svg,html[dir="rtl"] .acc-row i,html[dir="rtl"] .opt-new i{transform:scaleX(-1)}
html[dir="rtl"] .mf-filter{margin-inline-start:auto}
html[dir="rtl"] body,html[dir="rtl"] .mk-btn,html[dir="rtl"] .in,html[dir="rtl"] .sh{font-family:var(--font-ar,"IBM Plex Sans Arabic","IBM Plex Sans",sans-serif)}
html[dir="rtl"] .kicker,html[dir="rtl"] .eyebrow{letter-spacing:0}
html[dir="rtl"] .num,html[dir="rtl"] .price,html[dir="rtl"] .sheet-price b{unicode-bidi:plaintext}

/* ============ v1.7: bottom sheets everywhere (desktop too): slide up, swipe / drag down to close ============ */
@media (min-width:761px){
  .sh,.sh.wide,.is-admin .sh,.is-admin .sh.wide{left:50%!important;right:auto!important;top:auto!important;bottom:0!important;height:auto!important;max-height:90vh!important;width:min(720px,calc(100vw - 48px))!important;border-radius:22px 22px 0 0!important;transform:translate(-50%,100%)!important;opacity:1!important;transition:transform .34s cubic-bezier(.16,1,.3,1)!important}
  .sh.wide,.is-admin .sh.wide{width:min(940px,calc(100vw - 48px))!important}
  .sh.in,.is-admin .sh.in,html[dir="rtl"] .is-admin .sh.in{transform:translate(-50%,var(--dy,0px))!important}
  html[dir="rtl"] .sh,html[dir="rtl"] .is-admin .sh{transform:translate(-50%,100%)!important}
  html[dir="rtl"] .sh.in{transform:translate(-50%,var(--dy,0px))!important}
  .sh.drag{transition:none!important}
  .sh-grip{display:block;padding:12px 0 2px;cursor:grab;touch-action:none}
  .sh-grip i{display:block;width:52px;height:5px;border-radius:99px;background:var(--mk-ink-4);margin:0 auto}
  .sh-h{padding:10px 32px 14px}
}

/* ============ v1.7 components ============ */
.lvl{background:#eef3f7;color:#233e50;font-weight:800}
.lvl-guru{background:linear-gradient(135deg,#9b0047,#c2185b);color:#fff}
.lvl-senior{background:#233e50;color:#fff}
.lvl-confirme{background:#e3f6ee;color:#0d9d6b}
.lvl-junior{background:#fff4d1;color:#8a5a00}
.lvl-nouveau{background:#f4f6f8;color:#8499a7}
.stars-in{display:flex;gap:6px;direction:ltr}
.stars-in button{border:0;background:none;font-size:36px;line-height:1;color:#cdd6de;cursor:pointer;padding:0 2px}
.stars-in button.on{color:#e8b524}
.checks{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.checks li{position:relative;padding-inline-start:28px;line-height:1.5}
.checks li::before{content:"✓";position:absolute;inset-inline-start:0;top:0;width:20px;height:20px;border-radius:50%;background:var(--mk-green-soft);color:var(--mk-green);display:grid;place-items:center;font-size:12px;font-weight:800}
.report-link{margin-inline-end:auto;align-self:center;font-size:12px;color:var(--mk-ink-3);text-decoration:underline}
.sheet-acts{align-items:center}
.trf{border:1px solid var(--mk-line);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:12px;background:#fcfbf8}
.trf-body{display:flex;flex-direction:column;gap:10px}
.trf-lock{opacity:.85}
.head-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.head-row h1{flex:1;min-width:0}
.head-search{flex:none;display:inline-flex;align-items:center;gap:8px;border:0;border-radius:999px;background:var(--mk-red);color:#fff;padding:12px 18px;font:700 14px var(--font);cursor:pointer;box-shadow:0 8px 22px rgba(155,0,71,.25);margin-top:14px}
.head-search:hover{background:#7a0038}
@media (max-width:760px){.head-search{padding:12px;margin-top:10px}.head-search span{display:none}}
.cmp-wrap{overflow-x:auto;border:1px solid var(--mk-line);border-radius:14px;background:#fff}
.cmp{border-collapse:collapse;min-width:100%}
.cmp th,.cmp td{padding:12px 14px;border-bottom:1px solid var(--mk-line-soft);text-align:start;vertical-align:top;font-size:13.5px}
.cmp thead th{background:var(--mk-soft);min-width:220px}
.cmp tbody th{color:var(--mk-ink-3);font-weight:600;font-size:12px;white-space:nowrap;position:sticky;inset-inline-start:0;background:#fff}
/* footer social proof */
.foot-proof{background:#1b3242;color:#dfe7ee;margin-top:80px;padding:34px 0}
.foot-proof + footer{margin-top:0}
.fp-inner{max-width:1320px;margin:0 auto;padding:0 40px;display:grid;grid-template-columns:1.1fr 1.3fr;gap:20px 40px}
.fp-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.fp-stats b{display:block;font-size:28px;font-weight:800;color:#fff;line-height:1}
.fp-stats span{font-size:12px;color:#9fb3c2}
.fp-live{display:flex;flex-direction:column;gap:8px;font-size:13.5px}
.fp-live p{display:flex;gap:8px;align-items:flex-start;margin:0}
.fp-live .ic{flex:none;width:20px;height:20px;border-radius:50%;background:#ffc83d;color:#233e50;display:grid;place-items:center;font-size:11px;font-weight:800}
.fp-live .ic.hot{background:#9b0047;color:#fff}
.fp-trust{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px 18px;font-size:12.5px;color:#9fb3c2;border-top:1px solid rgba(255,255,255,.08);padding-top:14px}
@media (max-width:900px){.fp-inner{grid-template-columns:1fr;padding:0 20px}.fp-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.foot-proof{margin-top:48px}}
/* cookie banner */
.ckb{position:fixed;inset-inline:12px;bottom:calc(var(--m-stack,0px) + 12px);z-index:450;display:flex;justify-content:center;pointer-events:none}
.ckb-in{pointer-events:auto;max-width:880px;width:100%;background:#fff;border:1px solid var(--mk-line);border-radius:16px;box-shadow:0 18px 50px rgba(35,62,80,.22);padding:16px 18px;display:flex;gap:16px;align-items:flex-end;flex-wrap:wrap}
.ckb-t{flex:1 1 320px;min-width:0;font-size:13.5px;color:var(--mk-ink-2)}
.ckb-t b{color:var(--mk-ink);font-size:15px}
.ckb-t p{margin:4px 0 0}
.ckb-t a{color:var(--mk-red);font-weight:600}
.ckb-opts{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.ckb-b{display:flex;gap:8px;flex-wrap:wrap}
@media (max-width:600px){.ckb-b{width:100%}.ckb-b .mk-btn{flex:1 1 30%;padding-inline:8px;font-size:13px}}
/* legal pages */
.legal-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:40px;padding:10px 0 60px;align-items:start}
.legal-toc{position:sticky;top:96px;font-size:13px;max-height:calc(100vh - 120px);overflow:auto}
.legal-toc ol,.legal-toc ul{margin:0;padding-inline-start:18px;display:flex;flex-direction:column;gap:6px}
.legal-toc a{color:var(--mk-ink-2);text-decoration:none}
.legal-toc a:hover,.legal-toc a[aria-current]{color:var(--mk-red);font-weight:600}
.legal-body{max-width:76ch}
.legal-body section{padding-top:8px;margin-bottom:26px;scroll-margin-top:90px}
.legal-body h2{font-size:21px;font-weight:700;color:var(--mk-ink);margin:0 0 10px}
.legal-body h3{font-size:16px;font-weight:700;color:var(--mk-ink);margin:16px 0 6px}
.legal-body p,.legal-body li{font-size:15px;line-height:1.7;color:var(--mk-ink-2)}
.legal-body p{margin:0 0 10px}
.legal-body ul,.legal-body ol{margin:0 0 12px;padding-inline-start:22px}
.legal-body table{width:100%;border-collapse:collapse;margin:8px 0 14px;font-size:13.5px}
.legal-body th,.legal-body td{border:1px solid var(--mk-line);padding:8px 10px;text-align:start;vertical-align:top}
.legal-body th{background:var(--mk-soft)}
.legal-body a{color:var(--mk-red);font-weight:600}
mark.todo{background:#fff1b8;color:#6b4e00;border-radius:4px;padding:0 4px}
.legal-body form{display:flex;flex-direction:column;gap:12px;max-width:560px;border:1px solid var(--mk-line);border-radius:14px;padding:18px;background:#fff}
@media (max-width:900px){.legal-layout{grid-template-columns:1fr;gap:16px}.legal-toc{position:static;max-height:none;border:1px solid var(--mk-line);border-radius:12px;padding:14px}.legal-body table{display:block;overflow-x:auto}}

/* v1.7 admin: language switch + RTL */
.adm-lang{display:inline-flex;border:1px solid var(--line,#e5e2dc);border-radius:999px;padding:2px;gap:2px;background:#fff}
.adm-lang button{border:0;background:none;font:inherit;font-size:12px;font-weight:700;padding:5px 9px;border-radius:999px;cursor:pointer;color:var(--ink-2,#555);min-width:30px}
.adm-lang button.on{background:var(--ink,#1a1a1a);color:#fff}
html[dir="rtl"] .sb-item.active::before{left:auto;right:0;border-radius:3px 0 0 3px}
html[dir="rtl"] .admin-layout{direction:rtl}
html[dir="rtl"] .tb-btn .dot{right:auto;left:6px}
html[dir="rtl"] .tbl th,html[dir="rtl"] .tbl td{text-align:start}
html[dir="rtl"] .tbl .r,html[dir="rtl"] .tbl th.r{text-align:end}
html[dir="rtl"] .perm-tbl .check{justify-content:flex-start}
@media (max-width:760px){.adm-lang button{padding:4px 7px;min-width:26px}.role-pick{max-width:120px}}

html[dir="rtl"] .brand-wordmark{direction:ltr;unicode-bidi:isolate}
@media (max-width:560px){.is-admin .tb-search{display:none}.is-admin #tbReset{display:none}.is-admin .role-pick{max-width:150px;font-size:12px}.is-admin .tb-actions{gap:6px;margin-inline-start:auto}}
.legal-layout>*{min-width:0}.legal-body{overflow-wrap:anywhere}.legal-body table{max-width:100%}
/* v1.8: yellow CTAs */
.hero h1 em{color:#f2ad00!important;-webkit-text-fill-color:#f2ad00!important}
.search-hero .btn-search,.library-search .btn-search{background:#ffc83d!important;color:#1d3247!important}
.search-hero .btn-search:hover,.library-search .btn-search:hover{background:#f5b400!important}
.btn-become{background:#ffc83d!important;color:#1d3247!important}
.btn-become:hover{background:#f5b400!important}
/* v1.8 kanban */
.kb{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(260px,1fr);gap:14px;overflow-x:auto;padding-bottom:12px;scroll-snap-type:x proximity;align-items:start;-webkit-overflow-scrolling:touch}
.kb-col{background:#f4f2ee;border:1px solid var(--mk-line,#e6e1d8);border-radius:14px;padding:10px;min-height:180px;scroll-snap-align:start;transition:background .15s,box-shadow .15s}
.kb-col.locked{opacity:.75}
.kb-col.over{background:#fff7dc;box-shadow:inset 0 0 0 2px #ffc83d}
.kb-h{display:flex;align-items:center;gap:8px;padding:4px 4px 8px;font-size:13.5px}
.kb-n{margin-inline-start:auto;background:#fff;border-radius:999px;padding:2px 9px;font-size:12px;font-weight:700;color:var(--mk-ink-2,#556)}
.kb-dot{width:9px;height:9px;border-radius:50%;background:#9aa4ae;flex:0 0 auto}.kb-dot.warn{background:#e8a33a}.kb-dot.cta{background:#9b0047}.kb-dot.ok{background:#1f9d6a}.kb-dot.bad{background:#c8322f}.kb-dot.y{background:#ffc83d}
.kb-hint{font-size:12px;color:var(--mk-ink-3,#7a8691);margin:0 4px 8px}
.kb-list{display:flex;flex-direction:column;gap:8px;min-height:60px}
.kb-card{background:#fff;border:1px solid var(--mk-line,#e6e1d8);border-radius:11px;padding:11px 12px;font-size:13px;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;box-shadow:0 1px 2px rgba(20,30,40,.05)}
.kb-card:hover{border-color:#cfc8bb}.kb-card:focus-visible{outline:2px solid #9b0047;outline-offset:2px}
.kb-card.lock{cursor:default}
.kb-card .kb-t{font-weight:700;line-height:1.3}.kb-card .kb-s{color:var(--mk-ink-3,#7a8691);font-size:12px;margin-top:3px}
.kb-card .kb-row{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:8px}
.kb-move{margin-top:8px}.kb-move select{width:100%;font:inherit;font-size:12px;padding:5px 8px;border:1px solid var(--mk-line,#e6e1d8);border-radius:8px;background:#faf9f7;color:var(--mk-ink-2,#556)}
.kb-empty{border:1.5px dashed #d8d1c4;border-radius:10px;padding:18px 10px;text-align:center;font-size:12px;color:#9aa4ae}
.kb-src{opacity:.35}
.kb-ghost{position:fixed;z-index:9999;pointer-events:none;transform:rotate(2deg) scale(1.02);box-shadow:0 14px 34px rgba(20,30,40,.22);margin:0}
body.kb-dragging{cursor:grabbing;user-select:none}
.kb-switch{margin-inline-start:auto}
@media (max-width:760px){.kb{grid-auto-columns:82%;margin-inline:-16px;padding-inline:16px}.kb-move select{padding:8px}}
@media (hover:hover){.kb-move{opacity:.0;transition:opacity .15s}.kb-card:hover .kb-move,.kb-card:focus-within .kb-move{opacity:1}}
/* v1.8 document checklist */
.doc-check{border:1px solid var(--mk-line,#e6e1d8);border-radius:14px;padding:14px;background:#fbfaf7}
.dc-bar{height:6px;border-radius:99px;background:#ebe6dc;overflow:hidden;margin-bottom:10px}.dc-bar i{display:block;height:100%;background:#1f9d6a;transition:width .3s}
.dc-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.dc-list li{display:flex;align-items:center;gap:10px;padding:8px 10px;background:#fff;border:1px solid #eee8de;border-radius:10px}
.dc-list li.ok{background:#f1faf5;border-color:#cfe9db}
.dc-ck{width:22px;height:22px;border-radius:50%;border:2px solid #cfc8bb;display:grid;place-items:center;font-size:13px;font-weight:800;color:#fff;flex:0 0 auto}
.dc-list li.ok .dc-ck{background:#1f9d6a;border-color:#1f9d6a}
.dc-t{display:flex;flex-direction:column;min-width:0;flex:1;font-size:13.5px}
.dc-tag{font-size:11px;font-weight:700;border-radius:99px;padding:3px 8px;white-space:nowrap;background:#f1ede6;color:#6b7785}
.dc-tag.req{background:#fde8ef;color:#9b0047}.dc-tag.rec{background:#fff4d1;color:#8a6200}
@media (max-width:520px){.dc-list li{flex-wrap:wrap}.dc-list li .mk-btn{margin-inline-start:32px}}
/* v1.8 role bar */
.role-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:18px;padding:12px 14px;border:1px solid var(--mk-line,#e6e1d8);border-radius:14px;background:linear-gradient(90deg,#fff 0%,#fff9e6 100%)}
.rb-l{display:flex;flex-direction:column;gap:2px;font-size:14px}
.rb-seg button{display:inline-flex;align-items:center;gap:6px}
.rb-seg svg,.role-bar .mk-btn svg,.d-role svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2}
.role-bar .mk-btn{display:inline-flex;align-items:center;gap:6px}
@media (max-width:760px){.role-bar{padding:10px 12px}.rb-seg{width:100%}.rb-seg button{flex:1;justify-content:center}}
/* v1.8 compare: narrow label column */
.cmp thead th:first-child{min-width:0;width:1%;position:sticky;inset-inline-start:0;z-index:1}
.cmp tbody th{box-shadow:1px 0 0 var(--mk-line-soft)}
@media (max-width:760px){
  .cmp thead th{min-width:170px}
  .cmp thead th:first-child{min-width:0;width:78px;max-width:78px}
  .cmp tbody th{white-space:normal;width:78px;max-width:78px;min-width:78px;font-size:11px;line-height:1.25;padding:10px 8px;hyphens:auto;overflow-wrap:anywhere}
  .cmp th,.cmp td{padding:10px 10px;font-size:13px}
}
/* v1.9 plan card, offers, inbox */
.plan-card{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;padding:12px 14px;border:1px solid var(--mk-line,#e6e1d8);border-radius:14px;background:#fff}
.plan-card.prem{background:linear-gradient(90deg,#fffaf0,#fff4d1);border-color:#f3dc9b}
.plan-ic{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-weight:800;background:#eef1f4;color:#1d3247;flex:0 0 auto}
.plan-card.prem .plan-ic{background:#ffc83d;color:#1d3247}
.plan-t{display:flex;flex-direction:column;gap:2px;flex:1;min-width:180px;font-size:14px}
.plan-off{background:#9b0047;color:#fff;font-weight:800;font-size:12.5px;border-radius:999px;padding:4px 10px}
.offer-banner{display:flex;gap:12px;align-items:center;padding:12px 14px;border-radius:12px;background:#fff4d1;border:1px solid #f3dc9b}
.ob-pct{background:#9b0047;color:#fff;font-weight:800;border-radius:10px;padding:8px 10px;font-size:15px;flex:0 0 auto}
.msg-item{display:flex;gap:12px;padding:14px;border:1px solid var(--mk-line,#e6e1d8);border-radius:14px;background:#fff}
.msg-item.unread{border-color:#e7b8cc;background:#fff8fb}
.msg-dot{width:9px;height:9px;border-radius:50%;background:#9b0047;margin-top:7px;flex:0 0 auto}.msg-item:not(.unread) .msg-dot{background:#d5dbe1}
.msg-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:#9b0047;color:#fff;font-size:11px;font-weight:800;margin-inline-start:6px}
.kb-card{position:relative}
.kb-grip{position:absolute;top:6px;inset-inline-end:6px;width:30px;height:30px;display:grid;place-items:center;border-radius:8px;color:#9aa4ae;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none}
.kb-grip svg{width:16px;height:16px;fill:currentColor}
.kb-grip:hover{background:#f1ede6;color:#1d3247}
.kb-card .kb-t{padding-inline-end:28px}
@media (pointer:coarse){.kb-grip{width:40px;height:40px;top:2px;inset-inline-end:2px;color:#6b7785;background:#f6f3ee}.kb-grip svg{width:18px;height:18px}}
/* mail preview (admin messages) */
.mail-prev{border:1px solid var(--mk-line,#e6e1d8);border-radius:12px;overflow:hidden;background:#fff;font-size:13.5px}
.mp-h{background:#f6f4ef;padding:10px 14px;font-size:12.5px;color:#556;line-height:1.5}.mp-h span{color:#1d3247;font-weight:700;font-size:14px}
.mp-b{padding:12px 16px}.mp-b p{margin:0 0 10px}.mp-btn{display:inline-block;background:#9b0047;color:#fff;border-radius:999px;padding:9px 16px;font-weight:700}
.mp-f{font-size:11px;color:#8a95a1;border-top:1px solid #eee;padding-top:8px}
/* v1.9 language popup on mobile */
.lang-mbtn{display:none}
.lp-bd{position:fixed;inset:0;background:rgba(15,25,35,.45);z-index:10000;opacity:0;transition:opacity .2s}.lp-bd.in{opacity:1}
.lp-sh{position:fixed;left:0;right:0;bottom:0;z-index:10001;background:#fff;border-radius:20px 20px 0 0;padding:8px 16px calc(18px + env(safe-area-inset-bottom));transform:translateY(100%);transition:transform .25s cubic-bezier(.2,.8,.2,1);box-shadow:0 -10px 30px rgba(15,25,35,.18);font-family:inherit}
.lp-sh.in{transform:none}
.lp-grip{display:flex;justify-content:center;padding:6px 0 10px}.lp-grip i{width:42px;height:5px;border-radius:9px;background:#d5dbe1}
.lp-t{font-weight:800;font-size:15px;color:#1d3247;margin:0 4px 10px}
.lp-o{display:flex;align-items:center;gap:12px;width:100%;border:1px solid #e6e1d8;background:#fff;border-radius:14px;padding:14px;margin-bottom:8px;font:600 16px/1.2 inherit;font-family:inherit;color:#1d3247;cursor:pointer;text-align:start}
.lp-o.on{border-color:#9b0047;background:#fff7fa}.lp-o b{margin-inline-start:auto;color:#9b0047}
.lp-c{width:34px;height:34px;border-radius:10px;background:#f1ede6;display:grid;place-items:center;font-weight:800;font-size:13px}
.lp-o.on .lp-c{background:#9b0047;color:#fff}
@media (max-width:760px){
  .lang-toggle,.adm-lang{display:none!important}
  .lang-mbtn{display:inline-flex;align-items:center;gap:5px;border:1px solid #e1dbd0;background:#fff;border-radius:999px;padding:7px 11px;font:700 13px/1 inherit;font-family:inherit;color:#1d3247;cursor:pointer}
  .lang-mbtn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}
}
/* v2.0 card layouts: content keeps a readable width, actions wrap below and stay right-aligned */
.row.between > :first-child:not(:last-child){flex:1 1 170px!important;min-width:0}
.row.between > :last-child:not(:first-child){margin-inline-start:auto;flex:0 1 auto;max-width:100%}
.row.between > .stack:last-child:not(:first-child){align-items:flex-end}
.panel-h > div:first-child:not(:last-child),.panel-head > div:first-child:not(:last-child){flex:1 1 200px;min-width:0}
.panel-h,.panel-head{flex-wrap:wrap;row-gap:8px}
.panel-h > :last-child:not(:first-child),.panel-head > :last-child:not(:first-child){margin-inline-start:auto}
.row.between .tags{flex-wrap:wrap}
.tag{white-space:nowrap}
.btn-mandate,.btn-buy,.btn-read,.mk-btn,.btn{white-space:nowrap}
@media (max-width:760px){
  /* button groups: right-aligned, wrap cleanly */
  .card .row:has(> .btn, > .mk-btn, > a.btn-mandate),.panel-body .row:has(> .btn, > .mk-btn),.panel-b .row:has(> .btn, > .mk-btn){justify-content:flex-end}
  .card .row:has(> .btn, > .mk-btn):has(> :not(.btn):not(.mk-btn):not(button):not(a)),.panel-b .row:has(> :not(.btn):not(.mk-btn):not(button):not(a)){justify-content:space-between}
  .row.between > :last-child:not(:first-child){width:auto}
  .row.between > .row:last-child:not(:first-child){justify-content:flex-end}
  .btn-mandate{white-space:normal;text-align:center}
}
@media (max-width:760px){
  .detail-cta{flex-wrap:wrap}
  .detail-cta > .row{width:100%;justify-content:flex-end}
  .row:has(> .btn-buy, > .btn-read, > .btn-cta-secondary, > .btn-mandate, > .mk-buy, > .mk-read):not(:has(> :not(a):not(button))){justify-content:flex-end}
  .sh-f{justify-content:flex-end}
}
/* ---------- v2.1 ---------- */
/* popups: explicit « Fermer » button under the content, in addition to × and swipe-down */
.sh-close-row{padding:6px 20px calc(10px + env(safe-area-inset-bottom,0px));display:flex;justify-content:center;border-top:1px solid var(--mk-line)}
.sh-f + .sh-close-row{border-top:0;padding-top:0}
.sh-f{padding-bottom:10px}
.sh-close{border:1px solid var(--mk-line);background:#fff;color:var(--mk-ink-2,#3a4a57);font:600 14px/1 var(--font);border-radius:999px;padding:11px 26px;cursor:pointer;min-width:160px}
.sh-close:hover{border-color:var(--mk-ink);color:var(--mk-ink)}
@media (max-width:760px){.sh-close{width:100%}}
/* study cards: long texts are cut with « … », the tile keeps its height */
.study-card h3{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.study-card:not(.r-card) p{-webkit-line-clamp:3;min-height:calc(1.55em * 3);overflow-wrap:anywhere}
.study-card:not(.r-card) .study-card-top{flex-wrap:nowrap;overflow:hidden;-webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent)}
html[dir="rtl"] .study-card:not(.r-card) .study-card-top{-webkit-mask-image:linear-gradient(270deg,#000 88%,transparent);mask-image:linear-gradient(270deg,#000 88%,transparent)}
.study-card:not(.r-card) .study-card-top > *{flex:none}
.study-card .study-card-foot .author{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lp-close{display:block;width:100%;margin-top:6px;border:0;background:transparent;color:#5b6b78;font:600 14px/1 inherit;font-family:inherit;padding:12px;border-radius:12px;cursor:pointer}.lp-close:hover{background:#f4f2ee}
/* header: « Missions » next to the language selector on mobile (desktop has it in the main navigation) */
.nav-mis{display:none}
@media (max-width:760px){
  .topbar .nav-actions{margin-inline-start:auto}
  .nav-mis{display:inline-flex;align-items:center;border:1px solid #e1dbd0;background:#fff;color:#1d3247;border-radius:999px;padding:7px 12px;font:700 13px/1 var(--font);text-decoration:none;white-space:nowrap}
  .nav-mis.on{background:#1d3247;border-color:#1d3247;color:#fff}
  .topbar .brand-sub{display:none}
}
@media (max-width:360px){.topbar .brand-research{display:none}}
/* « Étude sur commande » band above the footer */
.foot-cmd{background:#f6f1e6;border-top:1px solid #ece4d3}
.foot-cmd .fc-in{max-width:1240px;margin:0 auto;padding:44px 32px;display:flex;gap:28px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.foot-cmd h2{font-size:clamp(22px,2.6vw,32px);line-height:1.2;margin:10px 0 8px;color:var(--ink,#233e50);letter-spacing:-.01em}
.foot-cmd h2 em{font-weight:400}
.foot-cmd p{margin:0;color:var(--ink-3,#5b6b78);max-width:640px;font-size:15px;line-height:1.55}
.foot-cmd .fc-b{display:flex;gap:10px;flex-wrap:wrap}
.foot-cmd .fc-b .mk-btn{padding:14px 20px;font-size:15px}
@media (max-width:760px){.foot-cmd .fc-in{padding:30px 20px}.foot-cmd .fc-b{width:100%}.foot-cmd .fc-b .mk-btn{flex:1 1 100%}}
.footer-hl.cmd{background:#9b0047!important;color:#fff!important;font-weight:700}
/* public missions page: search with city on desktop, list + side column */
.mis-search{display:flex;gap:10px;align-items:flex-end;margin-top:22px;flex-wrap:wrap}
.mis-search .ms-q{flex:1 1 380px;margin:0}
.mis-search .ms-f{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:700;color:var(--mk-ink-3,#5b6b78);min-width:170px}
.mis-search .ms-f .in{padding:12px 14px}
.mis-search > .mk-btn{padding:14px 22px}
.mis-bar{margin:18px 0 16px;gap:12px;flex-wrap:wrap}
.mis-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start;padding-bottom:48px}
.mis-side{position:sticky;top:96px;display:flex;flex-direction:column;gap:16px}
@media (max-width:980px){.mis-layout{grid-template-columns:minmax(0,1fr)}.mis-side{position:static}}
@media (max-width:760px){.mis-search .ms-f,.mis-search > .mk-btn{display:none}.mis-bar .mk-mand{display:none}}
@media (max-width:760px){
  .mk-site .topbar-inner,.topbar-inner{padding-left:14px!important;padding-right:14px!important;gap:8px!important}
  .topbar .nav-actions{gap:6px!important}
  .nav-mis{padding:7px 10px;font-size:12.5px}
  .topbar .lang-mbtn{padding:7px 9px!important}
}
@media (max-width:400px){.topbar .brand-wordmark{font-size:88%}.topbar .brand-research{margin-inline-start:4px}}
@media (max-width:760px){
  .mk-site .topbar-inner,.topbar-inner{padding-left:14px!important;padding-right:14px!important;gap:8px!important}
  .topbar .nav-actions{gap:6px!important}
  .nav-mis{padding:7px 10px;font-size:12.5px}
  .topbar .lang-mbtn{padding:7px 9px!important}
}
@media (max-width:400px){.topbar .brand-wordmark{font-size:88%}.topbar .brand-research{margin-inline-start:4px}}
@media (max-width:420px){footer .footer-inner{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}footer .footer-inner > div:first-child{grid-column:1/-1}footer .footer-inner *{min-width:0;overflow-wrap:anywhere}}
.foot-cmd .fc-b .mk-btn{white-space:normal;text-align:center}
/* ---------- messaging (v2.1) ---------- */
.mx{display:grid;grid-template-columns:340px minmax(0,1fr);border:1px solid var(--mk-line);border-radius:18px;background:#fff;overflow:hidden;min-height:560px;height:min(76vh,760px)}
.mx-list{border-inline-end:1px solid var(--mk-line);display:flex;flex-direction:column;min-height:0}
.mx-lh{display:flex;gap:8px;padding:12px;border-bottom:1px solid var(--mk-line)}
.mx-lh .in{padding:9px 12px;font-size:14px}
.mx-f{padding:10px 12px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;border-bottom:1px solid var(--mk-line)}
.mx-f::-webkit-scrollbar{display:none}
.mx-f .mk-chip{flex:none;font-size:12.5px;padding:6px 11px}
.mx-items{overflow-y:auto;flex:1}
.mx-item{display:flex;gap:10px;width:100%;text-align:start;border:0;border-bottom:1px solid #f1ece3;background:#fff;padding:12px 14px;cursor:pointer;font:inherit;color:inherit;align-items:flex-start;position:relative}
.mx-item:hover{background:#faf8f4}
.mx-item.on{background:#f6f1e6}
.mx-item.unread .mx-n,.mx-item.unread .mx-s{font-weight:800;color:var(--mk-ink)}
.mx-it{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.mx-n{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.mx-s{font-size:13px;color:var(--mk-ink-2,#3a4a57);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mx-p{font-size:12.5px;color:var(--mk-ink-3,#6b7a86);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mx-dot{position:absolute;inset-inline-end:12px;bottom:12px;background:#9b0047;color:#fff;border-radius:999px;font:700 11px/1 var(--font);padding:4px 7px}
.mx-av-ubcg{background:#233e50!important;color:#ffc83d!important}
.mx-conv{display:flex;flex-direction:column;min-height:0;min-width:0}
.mx-ch{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-bottom:1px solid var(--mk-line)}
.mx-ct{font-size:16px;display:block;margin-bottom:4px}
.mx-ctx{display:inline-flex;gap:6px;align-items:center;margin-top:6px;font-size:12.5px;color:#9b0047;font-weight:700;text-decoration:none}
.mx-back{display:none;border:0;background:#f4f2ee;border-radius:10px;width:34px;height:34px;font-size:22px;line-height:1;cursor:pointer;flex:none;color:var(--mk-ink)}
.mx-msgs{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;background:#fbfaf7}
.mx-b{max-width:78%;align-self:flex-start;background:#fff;border:1px solid #ece6db;border-radius:16px 16px 16px 4px;padding:10px 14px}
.mx-b.me{align-self:flex-end;background:#233e50;color:#fff;border-color:#233e50;border-radius:16px 16px 4px 16px}
.mx-b.me .mx-bh,.mx-b.me .muted{color:rgba(255,255,255,.75)}
.mx-bh{font-size:11.5px;color:var(--mk-ink-3,#6b7a86);margin-bottom:4px}
.mx-bt{font-size:14.5px;line-height:1.55;overflow-wrap:anywhere}
.mx-bf{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.mx-b.me .tag{background:rgba(255,255,255,.14);color:#fff}
.mx-comp{border-top:1px solid var(--mk-line);padding:12px 14px;background:#fff}
.mx-row{display:flex;gap:8px;align-items:flex-end}
.mx-row textarea{flex:1;resize:vertical;min-height:46px}
.mx-att{cursor:pointer}
.mx-fl{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
#mxWarn{background:#fff6dd;border:1px solid #ffd977;border-radius:10px;padding:8px 10px;margin-bottom:8px;color:#5a4300}
.mx-empty{margin:auto;text-align:center;max-width:380px;padding:40px 20px;display:flex;flex-direction:column;gap:10px;align-items:center}
.mx-to{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}
.mx-chip{display:inline-flex;gap:6px;align-items:center;background:#f4f2ee;border-radius:999px;padding:5px 6px 5px 10px;font-size:13px;font-weight:600}
.mx-chip button{border:0;background:#fff;border-radius:999px;width:22px;height:22px;cursor:pointer}
.mx-pick{border:1px solid var(--mk-line);border-radius:12px;margin-top:6px;max-height:260px;overflow-y:auto;background:#fff;box-shadow:0 8px 24px rgba(20,30,40,.08)}
.mx-pick button{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center;width:100%;border:0;border-bottom:1px solid #f1ece3;background:#fff;padding:10px 12px;cursor:pointer;text-align:start;font:inherit;color:inherit}
.mx-pick button:hover{background:#faf8f4}
.mx-pick .xs{flex-basis:100%}
.is-admin .mx{height:min(72vh,760px)}
@media (max-width:900px){
  .mx{grid-template-columns:minmax(0,1fr);height:auto;min-height:0}
  .mx .mx-conv{display:none}
  .mx.open .mx-list{display:none}
  .mx.open .mx-conv{display:flex;min-height:70vh}
  .mx-back{display:grid;place-items:center}
  .mx-b{max-width:88%}
  .mx-acts{flex-wrap:wrap!important}
}
.contact-form-card{max-width:820px;margin:28px auto 8px;padding:28px}
.mx-tag{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font:700 11px/1.5 var(--font);background:#f1ede6;color:#4b5b6b;white-space:nowrap}
.mx-tag.t-researcher{background:#e7f4ee;color:#0b7a52}
.mx-tag.t-client{background:#e8eef6;color:#2f4f7a}
.mx-tag.t-ubcg{background:#233e50;color:#ffc83d}
.mx-tag.t-guest{background:#fff3d6;color:#7a5600}
/* search results grouped by language */
.lang-sec{margin:18px 0 26px}
.lang-h{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:800;color:var(--ink,#233e50);margin:0 0 12px;padding-bottom:8px;border-bottom:1px solid var(--mk-line)}
.lang-h .cnt{background:#f1ede6;color:#4b5b6b;border-radius:999px;padding:2px 9px;font-size:12px}
.res-tools{flex-wrap:wrap}
.ss-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
@media (max-width:760px){.ss-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.ss-grid .f:first-child{grid-column:1/-1}}

.cf-ok{display:flex;gap:10px;align-items:flex-start}.cf-ok span{flex:1}.cf-ok a{color:var(--burgundy,#9b0045);font-weight:600;text-decoration:underline}

/* ---------- v2.2 · home tabbed search, desktop search bars, desktop filter popup ---------- */
.hs-tabs{display:inline-flex;gap:4px;padding:4px;margin:0 auto 14px;background:rgba(35,62,80,.07);border-radius:999px}
.hs-tabs button{border:0;background:none;font:700 14px var(--font);color:var(--mk-ink-2,#2d4a60);padding:9px 20px;border-radius:999px;cursor:pointer}
.hs-tabs button.on{background:#fff;color:var(--mk-ink,#233e50);box-shadow:0 2px 8px rgba(35,62,80,.14)}
.search-hero.has-sel{max-width:920px}
.search-hero .hs-sel{display:flex;flex-direction:column;justify-content:center;gap:1px;border-inline-start:1px solid var(--mk-line);padding:4px 12px;min-width:0;flex:0 1 170px}
.search-hero .hs-sel span{font-size:11px;font-weight:700;color:var(--mk-ink-3,#5b6b78);letter-spacing:.04em;text-transform:uppercase}
.search-hero .hs-sel select{border:0;background:transparent;font:600 14px var(--font);color:var(--mk-ink,#233e50);padding:2px 0;outline:none;cursor:pointer;max-width:100%;min-width:0}
.search-hero.has-sel .btn-search{margin-inline-start:8px}
@media (max-width:760px){
  .hs-tabs{display:flex;width:100%;max-width:420px}.hs-tabs button{flex:1;padding:9px 6px;font-size:13px}
  .search-hero .hs-sel{border-inline-start:0;border-top:1px solid var(--mk-line);flex:none;padding:10px 12px}
  .search-hero.has-sel .btn-search{margin:6px 0 0}
}
.d-search .d-filt{padding:12.5px 18px;gap:8px;align-self:flex-end}
.d-search .d-filt.on{border-color:var(--mk-red);color:var(--mk-red)}
.d-search .df-n{background:var(--mk-red);color:#fff;border-radius:999px;font-size:11px;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;padding:0 6px}
@media (min-width:761px){
  .library-head .head-search{display:none}
  .d-closed{display:none!important}
}
@media (max-width:760px){.d-search{display:none!important}}
.mis-search .d-filt{padding:12.5px 18px;gap:8px}
.mis-search .d-filt.on{border-color:var(--mk-red);color:var(--mk-red)}
.mis-search .df-n{background:var(--mk-red);color:#fff;border-radius:999px;font-size:11px;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;padding:0 6px}
@media (max-width:760px){.mis-search .d-filt{display:none}}
.vis-top .vis-btn{width:auto}
@media (max-width:760px){.top-pair{grid-template-columns:1fr}.vis-top .vis-btn{width:100%}}
.search-hero .hs-sel{flex:0 0 190px;align-items:flex-start;text-align:start}
.search-hero .hs-sel select{width:100%}
@media (max-width:760px){.search-hero .hs-sel{flex:none}}
.library-grid > *, .studies-grid > *, .grid > *{min-width:0}
.library-grid,.studies-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))}
/* study-card chips: whole chips only (wrap, max two rows), never cut through a chip */
.study-card:not(.r-card) .study-card-top{flex-wrap:wrap;overflow:hidden;max-height:58px;-webkit-mask-image:none;mask-image:none;row-gap:6px}
html[dir="rtl"] .study-card:not(.r-card) .study-card-top{-webkit-mask-image:none;mask-image:none}
.study-card:not(.r-card) .study-card-top > *{flex:none;max-width:100%}
/* mobile: nothing may push past the right edge */
@media (max-width:760px){
  .shop-intro{grid-template-columns:minmax(0,1fr)!important}
  .shop-intro > *,.split > *,.mis-layout > *{min-width:0}
  .mk-btn,.btn-buy,.btn-cta-secondary,.btn-light{max-width:100%;white-space:normal;text-align:center}
  .sh .pill,.sh .chip{white-space:normal;max-width:100%}
  .row{min-width:0}
}
/* mobile KPIs: 2-column grid instead of a swipe row that looks cut off */
@media (max-width:760px){
  .grid.g3:has(> .kpi),.grid.g4:has(> .kpi){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;margin-inline:0;padding-inline:0;gap:10px}
  .grid.g3:has(> .kpi) > .kpi,.grid.g4:has(> .kpi) > .kpi{padding:14px;min-width:0}
  .kpi .v{font-size:20px!important;overflow-wrap:anywhere}
  .kpi .l{font-size:10.5px}
}
/* recherche: desktop uses the search bar + « Filtres » popup; the old select row and the inline AI input stay for mobile */
@media (min-width:761px){
  .rs-page #ai > .library-search{display:none}
  .rs-page .res-tools > label{display:none!important}
  .rs-page .rs-dsearch{margin-top:18px}
  .rs-page #aiHost{margin-top:4px!important}
}
@media (min-width:761px){
  .rs-page .library-head{display:flex;flex-direction:column}
  .rs-page .library-head > .res-tools{order:1}
  .rs-page .library-head > .rs-dsearch{order:2}
  .rs-page .library-head > #aiHost{order:3}
}
.search-hero .ai-badge{margin-inline-start:6px}
@media (max-width:760px){
  .search-hero{position:relative}
  .search-hero .ai-badge{position:absolute;top:22px;inset-inline-start:22px;width:28px;height:28px;border-radius:8px;font-size:10px;margin:0}
  .search-hero input{padding-inline-start:46px!important}
}
/* « Plus » menu (bottom navigation) */
.cta-dock[hidden]{display:none!important}
.bottom-nav-item{position:relative}
.bn-badge{position:absolute;top:4px;inset-inline-start:calc(50% + 6px);min-width:17px;height:17px;padding:0 5px;border-radius:999px;background:var(--mk-red);color:#fff;font:800 10px/17px var(--font);text-align:center}
.bn-badge.in{position:static;margin-inline-start:auto}
.more-list{display:flex;flex-direction:column;border:1px solid var(--mk-line);border-radius:14px;overflow:hidden;background:#fff}
.more-it{display:flex;align-items:center;gap:12px;padding:13px 14px;border:0;border-bottom:1px solid var(--mk-line-soft);background:#fff;font:inherit;text-align:start;color:var(--mk-ink);text-decoration:none;cursor:pointer;width:100%}
.more-it:last-child{border-bottom:0}
.more-it:hover{background:var(--mk-sand)}
.more-ic{flex:none;width:36px;height:36px;border-radius:10px;background:var(--mk-soft);display:grid;place-items:center}
.more-ic svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.more-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.more-tx b{font-size:14.5px}
.more-tx span{font-size:12.5px;color:var(--mk-ink-3,#5b6b78)}
.more-it > i{font-style:normal;color:var(--mk-ink-3,#5b6b78);font-size:20px}
.more-lang{display:flex;width:100%}.more-lang button{flex:1}
.more-links{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:18px;font-size:13px}
.more-links a{color:var(--mk-ink-2,#2d4a60);text-decoration:underline}
.cta-dock a svg,.cta-dock button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;margin-inline-end:6px;flex:none}
/* « Missions » stands out in the header */
.nav-links a.nav-hl{color:var(--mk-red)!important;font-weight:700;display:inline-flex;align-items:center;gap:6px}
.nav-links a.nav-hl::before{content:"";width:7px;height:7px;border-radius:50%;background:#0d9d6b;box-shadow:0 0 0 3px rgba(13,157,107,.18)}
.nm-n{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;padding:0 6px;border-radius:999px;background:var(--mk-red);color:#fff;font:800 11px/1 var(--font)}
a.nav-mis.nav-hl{background:var(--mk-red);border-color:var(--mk-red);color:#fff;gap:6px}
a.nav-mis .nm-n{background:#fff;color:var(--mk-red);min-width:17px;height:17px;font-size:10px}
.nav-links a.nav-hl{display:inline}
.nav-links a.nav-hl::before{display:inline-block;vertical-align:middle;margin-inline-end:7px;position:relative;top:-1px}
.nav-links a.nav-hl .nm-n{vertical-align:middle;margin-inline-start:6px;position:relative;top:-1px}
.more-it .bn-badge.in{position:static;flex:none;width:auto;min-width:22px;height:22px;line-height:22px;font-size:11px;inset:auto}
/* Formule Basic / Premium: the button always sits on the right */
.plan-card .plan-t{flex:1 1 220px;min-width:0}
.plan-card > .mk-btn,.plan-card > a.mk-btn{margin-inline-start:auto;flex:none}
.plan-card .plan-off{flex:none}
/* admin · SEO & GEO */
.seo-len{display:inline-block;margin-inline-start:6px;font:700 11px/1 var(--font);padding:3px 6px;border-radius:999px;background:#eef2f5;color:#5b6b78;vertical-align:middle}
.seo-len.ok{background:#e3f6ee;color:#0b7a53}.seo-len.warn{background:#fff4d1;color:#8a6d00}.seo-len.bad{background:#fbeef3;color:#9b0047}
.seo-snip{border:1px solid var(--mk-line);border-radius:12px;padding:14px 16px;background:#fff;font-family:Arial,Helvetica,sans-serif;max-width:620px}
.seo-snip-url{font-size:12.5px;color:#202124;margin-bottom:4px;overflow-wrap:anywhere}
.seo-snip-t{font-size:19px;line-height:1.3;color:#1a0dab;margin-bottom:4px}
.seo-snip-d{font-size:13.5px;line-height:1.5;color:#4d5156}
.seo-pre{margin:0;padding:14px 16px;max-height:380px;overflow:auto;background:#1d2733;color:#e6edf3;font:12.5px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre;border-radius:0 0 12px 12px;direction:ltr;text-align:left}
.seo-det summary{cursor:pointer;font-weight:700;font-size:13.5px}
.sw-mini{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;font-weight:600;cursor:pointer}
.sw-mini input{width:16px;height:16px;accent-color:var(--mk-red)}
/* Modal - Devenir chercheur */
.login-required-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-required-modal.is-visible {
    display: flex;
}

.login-required-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 28, 38, 0.68);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.login-required-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 36px 30px 26px;
    border: 1px solid rgba(35, 62, 80, 0.1);
    border-radius: 18px;
    background: #fff;
    color: #233e50;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
    animation: loginModalAppear 0.22s ease-out;
}

.login-required-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #71808a;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.login-required-close:hover {
    background: #f0f4f6;
    color: #233e50;
}

.login-required-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #edf3f6;
    color: #233e50;
}

.login-required-icon svg {
    width: 30px;
    height: 30px;
}

.login-required-content h2 {
    margin: 0 0 12px;
    color: #233e50;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
}

.login-required-description {
    margin: 0 0 24px;
    color: #687985;
    font-size: 14px;
    line-height: 1.75;
}

.login-required-actions {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.login-required-primary,
.login-required-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.login-required-primary {
    background: #233e50;
    color: #fff;
}

.login-required-primary:hover {
    transform: translateY(-1px);
    background: #182f3e;
    color: #fff;
}

.login-required-secondary {
    border: 1px solid #d9e2e7;
    background: #fff;
    color: #233e50;
}

.login-required-secondary:hover {
    background: #f3f7f9;
    color: #233e50;
}

.login-required-later {
    margin-top: 19px;
    padding: 5px 12px;
    border: none;
    background: transparent;
    color: #75838c;
    font-size: 13px;
    cursor: pointer;
}

.login-required-later:hover {
    color: #233e50;
    text-decoration: underline;
}

body.login-modal-open {
    overflow: hidden;
}

@keyframes loginModalAppear {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .login-required-content {
        padding: 32px 21px 23px;
    }

    .login-required-content h2 {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-required-content {
        animation: none;
    }
}


