/*
 * X-Bin design v2 — owner choice A2 "clean marketplace" (2026-11-20).
 * Loaded only when PlatformSetting.enable_design_v2 is on; <html data-design="v2">.
 * Tokens override the shared variables, so existing components follow.
 * Contrast (WCAG 2.1 AA): ink #10162f on white 17.6:1, slate #48506b on white
 * 8.1:1, muted #5b6380 on white 6.2:1, royal #1d3bd8 on white 7.3:1, white on
 * royal 7.3:1; dark: #f4f6fc on #0b1024 18:1, #b9c1dc on #121a38 9.3:1.
 * Motion is decorative and stops under prefers-reduced-motion.
 */

html[data-design="v2"] body,
html[data-design="v2"] body.orbit-page {
  --v2-ink: #10162f;
  --v2-royal: #1d3bd8;
  --v2-violet: #7c5cff;
  --v2-orange: #ff8c42;
  --orbit-cobalt: var(--v2-royal);
  --orbit-cyan: var(--v2-violet);
}

html[data-design="v2"][data-theme="light"] body,
html[data-design="v2"][data-theme="light"] body.orbit-page {
  color-scheme: light;
  --bg: #f7f8fb;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-strong: #f2f4fa;
  --surface-muted: #eef1ff;
  --surface-elevated: #ffffff;
  --border: #e3e7f0;
  --border-strong: #cfd6e6;
  --highlight: rgba(29, 59, 216, 0.06);
  --text: var(--v2-ink);
  --text-soft: #48506b;
  --muted: #5b6380;
  --primary: var(--v2-royal);
  --primary-strong: #142a9e;
  --primary-soft: #eef1ff;
  --action-bg: var(--v2-royal);
  --action-bg-hover: #142a9e;
  --action-text: #ffffff;
  --accent: #c2410c;
  --focus: var(--v2-royal);
  --placeholder: #48506b;
  --shadow-sm: 0 6px 18px rgba(16, 22, 47, 0.06);
  --shadow: 0 18px 44px rgba(16, 22, 47, 0.1);
  --xbin-bg: var(--bg);
  --xbin-surface: var(--surface);
  --xbin-text: var(--text);
  --xbin-muted: var(--muted);
  --xbin-border: var(--border);
  --xbin-primary: var(--v2-royal);
  --xbin-accent: #c2410c;
  background-image: none;
}

html[data-design="v2"]:not([data-theme="light"]) body,
html[data-design="v2"]:not([data-theme="light"]) body.orbit-page {
  color-scheme: dark;
  --bg: #0b1024;
  --bg-soft: #0f1630;
  --surface: #121a38;
  --surface-strong: #19234a;
  --surface-muted: #1f2b5a;
  --surface-elevated: #16204a;
  --border: rgba(228, 232, 245, 0.12);
  --border-strong: rgba(228, 232, 245, 0.24);
  --highlight: rgba(124, 92, 255, 0.14);
  --text: #f4f6fc;
  --text-soft: #d5dbf0;
  --muted: #b9c1dc;
  --primary: #a9b6ff;
  --primary-strong: #c8d0ff;
  --primary-soft: rgba(29, 59, 216, 0.28);
  --action-bg: #a9b6ff;
  --action-bg-hover: #c8d0ff;
  --action-text: #0b1024;
  --accent: #ffb07a;
  --focus: #c8d0ff;
  --placeholder: #e4e8f5;
  --xbin-bg: var(--bg);
  --xbin-surface: var(--surface);
  --xbin-text: var(--text);
  --xbin-muted: var(--muted);
  --xbin-border: var(--border);
  --xbin-primary: var(--v2-royal);
  --xbin-accent: #ffb07a;
  background-image: none;
}

html[data-design="v2"] :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

@keyframes v2Blob { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(28px, -18px) scale(1.08); } }
@keyframes v2Float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes v2Pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); } 100% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } }

/* ---------- Shared ---------- */
.v2-home { display: grid; gap: 0; padding-bottom: 4rem; }
.v2-section { display: grid; gap: 1.5rem; padding-block: 3.5rem 1rem; }
.v2-section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem; }
.v2-h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.35; font-weight: 600; color: var(--text); max-width: 56rem; }
.v2-h2 { margin: 0; display: flex; align-items: center; gap: 0.6rem; font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 600; color: var(--text); }
.v2-center { justify-content: center; text-align: center; }
.v2-lead { margin: 0; font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 2; color: var(--text-soft); max-width: 45rem; }
.v2-muted { margin: 0.25rem 0 0; color: var(--muted); }
.v2-link { font-weight: 800; color: var(--primary); }
.v2-gradient-text { background: linear-gradient(90deg, #1d3bd8, #7c5cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-design="v2"]:not([data-theme="light"]) .v2-gradient-text { background-image: linear-gradient(90deg, #a9b6ff, #c4b5ff); }
.v2-live-dot { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; animation: v2Pulse 1.8s ease-out infinite; }
.v2-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.v2-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* ---------- Hero ---------- */
.v2-hero { position: relative; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--border); }
.v2-hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); text-align: center; }
.v2-eyebrow { margin: 0; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.9rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 0.9rem; font-weight: 800; }
.v2-blob { position: absolute; border-radius: 50%; pointer-events: none; animation: v2Blob 16s ease-in-out infinite; }
.v2-blob--blue { width: 32rem; height: 32rem; top: -10rem; right: -8rem; background: radial-gradient(circle, rgba(29, 59, 216, 0.2), rgba(29, 59, 216, 0) 70%); }
.v2-blob--orange { width: 28rem; height: 28rem; bottom: -11rem; left: -6rem; background: radial-gradient(circle, rgba(255, 140, 66, 0.22), rgba(255, 140, 66, 0) 70%); animation-direction: reverse; animation-duration: 19s; }
.v2-blob--violet { width: 20rem; height: 20rem; top: -9rem; left: -4rem; background: radial-gradient(circle, rgba(124, 92, 255, 0.45), rgba(124, 92, 255, 0) 70%); }

.v2-float {
  position: absolute; z-index: 1; display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem;
  border-radius: 1rem; background: var(--surface); color: var(--text); box-shadow: var(--shadow); text-align: start;
  animation: v2Float 6s ease-in-out infinite;
}
.v2-float strong { display: block; font-size: 0.82rem; }
.v2-float small { display: block; font-size: 0.75rem; color: var(--muted); }
.v2-float--a { top: 7rem; right: 4%; }
.v2-float--b { top: 18rem; left: 4%; animation-delay: 1s; animation-duration: 7s; }
.v2-float--c { top: 7rem; left: 8%; border-radius: 999px; background: var(--v2-ink); color: #ffffff; animation-delay: 2s; animation-duration: 8s; }
.v2-float-mark { width: 2.2rem; height: 2.2rem; border-radius: 0.75rem; }
.v2-float-mark--ig { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.v2-float-mark--tg { background: linear-gradient(135deg, #2aabee, #229ed9); }
@media (max-width: 1100px) { .v2-float { display: none; } }

/* Search: three fields and a full-height button on wide screens; on phones
   every field and the button take a full row, button centered and wide. */
.v2-search {
  width: 100%; max-width: 58rem; display: grid; grid-template-columns: repeat(var(--v2-fields, 3), minmax(0, 1fr)) minmax(12rem, auto);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 1.1rem; box-shadow: var(--shadow); overflow: hidden; text-align: start;
}
.v2-search:has(> .v2-search-field:nth-of-type(2):last-of-type) { --v2-fields: 2; }
.v2-search-field { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.85rem 1.1rem; border-inline-start: 1px solid var(--border); min-width: 0; }
.v2-search-field:first-child { border-inline-start: 0; }
.v2-search-field span { font-size: 0.75rem; font-weight: 800; color: var(--muted); }
.v2-search-field select { width: 100%; border: 0; padding: 0.2rem 0; background: transparent; color: var(--text); font: inherit; font-size: 1rem; font-weight: 700; }
.v2-search-action { display: flex; padding: 0.5rem; }
.v2-search-button {
  flex: 1 1 auto; min-height: 3.5rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0 1.5rem; border: 0; border-radius: 0.8rem; background: var(--action-bg); color: var(--action-text);
  font: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer;
}
.v2-search-button:hover { background: var(--action-bg-hover); }
.v2-search-button svg { width: 1.25rem; height: 1.25rem; }
@media (max-width: 860px) {
  .v2-search { grid-template-columns: 1fr; }
  .v2-search-field { border-inline-start: 0; border-top: 1px solid var(--border); }
  .v2-search-field:first-child { border-top: 0; }
  .v2-search-action { padding: 0.75rem; }
}

.v2-platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.v2-platforms a {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.4rem 0.9rem 0.4rem 1rem;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 700; font-size: 0.9rem; text-decoration: none;
}
.v2-platform-mark { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 0.55rem; background: color-mix(in srgb, var(--platform-accent, var(--v2-royal)) 18%, transparent); color: var(--platform-accent, var(--v2-royal)); }
.v2-hero-hint { margin: 0; font-size: 0.95rem; color: var(--muted); }
.v2-hero-hint a { font-weight: 800; color: var(--primary); }

/* ---------- Objectives ---------- */
.v2-goal-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.v2-goal { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.25rem; border-radius: 1.1rem; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.v2-goal strong { font-size: 1.05rem; font-weight: 600; }
.v2-goal > span:last-child { font-size: 0.9rem; line-height: 1.8; color: var(--muted); }
.v2-goal-icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 0.9rem; }
.v2-goal-icon svg, .v2-trust-icon svg { width: 1.5rem; height: 1.5rem; }

/* ---------- Media, steps, templates, trust ---------- */
.v2-media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.v2-media-grid > .v2-lift { border-radius: 1.1rem; }
.v2-band { background: var(--surface); border-block: 1px solid var(--border); margin-top: 3rem; }
.v2-band .v2-section { padding-block: 3.5rem; }
.v2-steps { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.v2-steps li { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.6rem; border-radius: 1.1rem; background: var(--bg); }
.v2-steps strong { font-size: 1.15rem; font-weight: 600; color: var(--text); }
.v2-steps span:last-child { line-height: 1.9; color: var(--text-soft); }
.v2-step-badge { display: inline-grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 1rem; color: #ffffff; font-size: 1.35rem; font-weight: 600; }
.v2-template-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.v2-card, .v2-post { display: grid; gap: 0.6rem; padding: 1.25rem; border-radius: 1.1rem; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.v2-post span { font-size: 0.9rem; line-height: 1.8; color: var(--muted); }
.v2-trust { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.v2-trust li { display: flex; gap: 0.8rem; padding: 1.25rem; border-radius: 1.1rem; border: 1px solid var(--border); background: var(--surface); }
.v2-trust strong { display: block; font-weight: 600; color: var(--text); }
.v2-trust div span { display: block; margin-top: 0.2rem; font-size: 0.9rem; line-height: 1.8; color: var(--muted); }
.v2-trust-icon { flex: 0 0 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 0.8rem; }

/* Template cards reused from the guided start. */
.v2-template { align-content: space-between; }
.v2-template-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.8rem; color: var(--muted); }
.v2-template-meta span { padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--surface-strong); }
.v2-eyebrow + .v2-h3, .v2-h3 { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--text); }
.v2-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: 0.6rem 1.3rem; border-radius: 0.8rem; font-weight: 600; background: var(--action-bg); color: var(--action-text); text-decoration: none; border: 1px solid transparent; }
.v2-btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }

/* ---------- Publisher CTA ---------- */
.v2-cta { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; padding: clamp(1.75rem, 4vw, 2.75rem); border-radius: 1.5rem; background: linear-gradient(120deg, #10162f, #1d2a6b); color: #ffffff; }
.v2-cta .v2-h2 { color: #ffffff; }
.v2-cta-copy { position: relative; display: grid; gap: 0.5rem; max-width: 40rem; }
.v2-cta-copy p { margin: 0; line-height: 1.9; color: #c9cfe4; }
.v2-cta-button { position: relative; display: inline-flex; align-items: center; min-height: 3rem; padding: 0 1.6rem; border-radius: 0.8rem; background: #ffffff; color: #10162f; font-weight: 600; text-decoration: none; }

/* ---------- Guided start page (shared quiz) ---------- */
.v2-page { display: grid; gap: clamp(2rem, 5vw, 4rem); padding-block: 2rem 4rem; }
.v2-quiz { display: grid; gap: 1.1rem; padding: clamp(1.1rem, 2.5vw, 1.75rem); border-radius: 1.25rem; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.v2-quiz fieldset { display: grid; gap: 0.6rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.v2-quiz legend { font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.v2-quiz-step { font-size: 0.8rem; font-weight: 800; color: var(--muted); }
.v2-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.v2-chip { position: relative; }
.v2-chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.v2-chip span { display: inline-flex; align-items: center; min-height: 2.6rem; padding: 0.45rem 0.95rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-soft); color: var(--text); font-weight: 700; font-size: 0.95rem; }
.v2-chip input:checked + span { background: var(--v2-royal); border-color: var(--v2-royal); color: #ffffff; }
.v2-chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.v2-quiz-result { display: grid; gap: 0.75rem; padding: 1rem; border-radius: 1rem; background: var(--surface-strong); }
.v2-quiz-result dl { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.v2-quiz-result dt { font-size: 0.8rem; color: var(--muted); }
.v2-quiz-result dd { margin: 0; font-weight: 600; color: var(--text); }
.v2-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.v2-objective { display: grid; gap: 0.5rem; padding: 1.15rem; border-radius: 1.1rem; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html[data-design="v2"] .v2-blob,
  html[data-design="v2"] .v2-float,
  html[data-design="v2"] .v2-live-dot { animation: none !important; }
  html[data-design="v2"] .v2-lift { transition: none !important; }
  html[data-design="v2"] .v2-lift:hover { transform: none; }
}

/* Guided start page keeps a two-column layout (copy + quiz). */
.v2-page > .v2-hero { display: grid; gap: 2rem; align-items: start; overflow: visible; background: none; border: 0; }
@media (min-width: 1024px) { .v2-page > .v2-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
.v2-hero-copy { display: grid; gap: 1.25rem; align-content: start; }
.v2-h1 mark { background: #eef1ff; color: var(--v2-royal); padding: 0 0.35em; border-radius: 0.3em; }
html[data-design="v2"]:not([data-theme="light"]) .v2-h1 mark { background: rgba(29, 59, 216, 0.3); color: #c8d0ff; }

/* Let font-weight drive the variable Vazirmatn axis inside v2 pages; the
   shared body rule pins "wght" to 400, which flattened v2 headings. */
html[data-design="v2"] body { font-variation-settings: normal; }

/* ---------- Owner feedback 2026-11-20: richer goal cards ---------- */
.v2-goal-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1.25rem; }
@media (min-width: 1100px) { .v2-goal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.v2-goal { padding: 0; gap: 0; overflow: hidden; border-radius: 1.25rem; }
.v2-goal-visual {
  position: relative; display: grid; place-items: center; height: 9.5rem; overflow: hidden;
  background: linear-gradient(135deg, var(--goal-bg), color-mix(in srgb, var(--goal-bg) 55%, #ffffff));
  color: var(--goal-fg);
}
.v2-goal-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v2-goal-orb { position: absolute; border-radius: 50%; background: color-mix(in srgb, var(--goal-fg) 14%, transparent); }
.v2-goal-orb--a { width: 9rem; height: 9rem; top: -3rem; left: -2rem; }
.v2-goal-orb--b { width: 6rem; height: 6rem; bottom: -2.5rem; right: 1.5rem; background: color-mix(in srgb, var(--goal-fg) 9%, transparent); }
.v2-goal .v2-goal-icon {
  position: relative; width: 4.25rem; height: 4.25rem; border-radius: 1.25rem; background: #ffffff; color: var(--goal-fg);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--goal-fg) 22%, transparent); transition: transform 0.25s ease;
}
.v2-goal .v2-goal-icon svg { width: 2rem; height: 2rem; }
.v2-goal:hover .v2-goal-icon { transform: translateY(-4px) rotate(-4deg); }
.v2-goal-body { display: flex; flex-direction: column; gap: 0.45rem; padding: 1.1rem 1.25rem 1.2rem; }
.v2-goal-body strong { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.v2-goal-text { font-size: 0.92rem; line-height: 1.8; color: var(--muted); }
.v2-goal-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.4rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.v2-goal-platforms { display: inline-flex; gap: 0.3rem; }
.v2-goal-platform { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 0.6rem; background: var(--surface-strong); }
.v2-goal-cta { font-size: 0.88rem; font-weight: 800; color: var(--primary); }

/* ---------- Media showcase (featured / newest / largest) ---------- */
.v2-showcase { display: grid; gap: 1rem; padding: 1rem; border-radius: 1.25rem; background: var(--surface); border: 1px solid var(--border); }
.v2-showcase-tabs { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.3rem; border-radius: 0.9rem; background: var(--surface-strong); justify-self: start; }
.v2-showcase-tabs button { min-height: 2.6rem; padding: 0.4rem 1.1rem; border: 0; border-radius: 0.7rem; background: transparent; color: var(--text-soft); font: inherit; font-weight: 800; cursor: pointer; }
.v2-showcase-tabs button[aria-selected="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.v2-showcase-panel[hidden] { display: none; }
.v2-showcase-list { display: grid; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.v2-showcase-row {
  display: grid; grid-template-columns: 2rem 3rem minmax(0, 1fr) 7.5rem 9.5rem 1.5rem; align-items: center; gap: 0.9rem;
  padding: 0.7rem 0.8rem; border-radius: 0.9rem; color: var(--text); text-decoration: none; transition: background 0.2s ease;
}
.v2-showcase-row:hover { background: var(--surface-strong); }
.v2-showcase-rank { font-weight: 600; color: var(--muted); text-align: center; }
.v2-showcase-logo { width: 3rem; height: 3rem; border-radius: 0.9rem; overflow: hidden; display: grid; place-items: center; background: var(--surface-strong); }
.v2-showcase-name { display: flex; flex-direction: column; min-width: 0; }
.v2-showcase-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.v2-showcase-name small, .v2-showcase-meta small { font-size: 0.78rem; color: var(--muted); }
.v2-showcase-meta { display: flex; flex-direction: column; }
.v2-showcase-meta strong { font-weight: 800; white-space: nowrap; }
.v2-showcase-go { color: var(--primary); font-weight: 600; }
@media (max-width: 760px) {
  .v2-showcase-row { grid-template-columns: 1.5rem 2.75rem minmax(0, 1fr) auto; }
  .v2-showcase-meta:nth-of-type(1), .v2-showcase-go { display: none; }
}

/* ---------- Latest blog posts ---------- */
.v2-blog-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.v2-blog-item { border-radius: 1rem; }

/* Owner choice 2026-11-20: Estedad (SIL OFL 1.1, aminabedi68/Estedad v8.5),
   bundled locally as one variable woff2 (weights 100-900); licence beside it in
   static/core/fonts/Estedad-OFL.txt. Vazirmatn stays as the fallback. */
@font-face {
  font-family: "Estedad";
  src: url("./fonts/Estedad-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
html[data-design="v2"] body {
  --xbin-font-family: "Estedad", "Vazirmatn", "Noto Sans Arabic", sans-serif;
  font-family: "Estedad", "Vazirmatn", "Noto Sans Arabic", sans-serif;
}
html[data-design="v2"] body :is(button, input, select, textarea) { font-family: inherit; }

/* ---------- Media showcase: three boxes of three (owner feedback) ---------- */
.v2-box-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.v2-box { --box-tone: var(--v2-royal); --box-soft: #eef1ff; display: flex; flex-direction: column; gap: 0.5rem; padding: 1.1rem; border-radius: 1.25rem; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.v2-box--green { --box-tone: #15803d; --box-soft: #e8f8ef; }
.v2-box--orange { --box-tone: #c2410c; --box-soft: #fff1e6; }
html[data-design="v2"]:not([data-theme="light"]) .v2-box { --box-soft: color-mix(in srgb, var(--box-tone) 22%, transparent); }
.v2-box-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.2rem 0.2rem 0.6rem; border-bottom: 1px solid var(--border); }
.v2-box-head h3 { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--text); }
.v2-box-head p { margin: 0.1rem 0 0; font-size: 0.82rem; color: var(--muted); }
.v2-box-badge { width: 0.75rem; height: 2.4rem; border-radius: 999px; background: var(--box-tone); }
.v2-box-list { display: grid; gap: 0.2rem; margin: 0; padding: 0; list-style: none; }
.v2-box-row { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.6rem 0.4rem; border-radius: 0.9rem; color: var(--text); text-decoration: none; transition: background 0.2s ease; }
.v2-box-row:hover { background: var(--box-soft); }
.v2-avatar { position: relative; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 1rem; background: var(--surface-strong); font-size: 1.35rem; font-weight: 600; }
.v2-avatar img { width: 100%; height: 100%; border-radius: 1rem; object-fit: cover; }
.v2-avatar-platform { position: absolute; bottom: -0.3rem; left: -0.3rem; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 0.5rem; background: var(--surface); box-shadow: 0 2px 6px rgba(16, 22, 47, 0.18); }
.v2-box-name { display: flex; flex-direction: column; min-width: 0; }
.v2-box-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.v2-box-name small, .v2-box-price small { font-size: 0.78rem; color: var(--muted); }
.v2-box-price { display: flex; flex-direction: column; align-items: end; }
.v2-box-price strong { font-weight: 800; white-space: nowrap; font-size: 0.92rem; }
.v2-box-more { margin-top: auto; align-self: start; padding: 0.4rem 0.2rem; font-size: 0.88rem; font-weight: 800; color: var(--box-tone); }
html[data-design="v2"]:not([data-theme="light"]) .v2-box-more { color: var(--primary); }
