:root {
  --primary: #e63946;
  --primary-hover: #cc2d3a;
  --primary-light: #fff0ee;
  --primary-border: #ffd3cd;
  --accent: #ff8a3d;
  --text: #1e293b;
  --text-gray: #475569;
  --muted: #64748b;
  --bg: #fdf5f3;
  --surface: #ffffff;
  --line: #ece6e4;
  --border-strong: #e2d6d3;
  --footer: #1d1b21;
  --ok: #10b981;
  --err: #dc2626;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --shadow: 0 10px 30px -8px rgba(230, 57, 70, .08);
  --shadow-hover: 0 20px 40px -10px rgba(230, 57, 70, .18);
  --glow: #ffe1da;
  --grad: linear-gradient(135deg, #e63946, #ff7a45);
}
/* each platform page gets its own colour family */
body.plat-facebook { --primary: #1877f2; --primary-hover: #1263d6; --primary-light: #eef4ff; --primary-border: #cddfff; --accent: #4fa3ff;
  --bg: #f5f8fd; --line: #e3e9f2; --border-strong: #d3ddea; --glow: #d9e8ff; --grad: linear-gradient(135deg, #1877f2, #4fa3ff);
  --shadow: 0 10px 30px -8px rgba(24, 119, 242, .10); --shadow-hover: 0 20px 40px -10px rgba(24, 119, 242, .22); }
body.plat-instagram { --primary: #d62976; --primary-hover: #b81f63; --primary-light: #fdeef5; --primary-border: #f6c9dd; --accent: #fa7e1e;
  --bg: #fdf6f9; --line: #f0e4ea; --border-strong: #e8d3dd; --glow: #ffdcec; --grad: linear-gradient(120deg, #feda75 -20%, #fa7e1e 15%, #d62976 55%, #4f5bd5 110%);
  --shadow: 0 10px 30px -8px rgba(214, 41, 118, .10); --shadow-hover: 0 20px 40px -10px rgba(214, 41, 118, .22); }
body.plat-twitter { --primary: #0f1419; --primary-hover: #2a3038; --primary-light: #eef2f5; --primary-border: #d5dde4; --accent: #1d9bf0;
  --bg: #f6f8fa; --line: #e5e9ed; --border-strong: #d4dbe1; --glow: #dbeefc; --grad: linear-gradient(135deg, #0f1419, #1d9bf0 160%);
  --shadow: 0 10px 30px -8px rgba(15, 20, 25, .08); --shadow-hover: 0 20px 40px -10px rgba(15, 20, 25, .18); }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", "Noto Sans", sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
:lang(ar) body, [dir="rtl"] body { font-family: Inter, "Segoe UI", Tahoma, "Noto Naskh Arabic", sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- header */
.header { background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--text); letter-spacing: -.5px; }
.logo:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a { color: var(--text-gray); font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 10px; }
.nav > a:hover { color: var(--primary); background: var(--primary-light); text-decoration: none; }
.nav > a.active { color: var(--primary); }
.lang { position: relative; margin-inline-start: 8px; }
.lang-btn { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); padding: 8px 14px; border-radius: 99px; font-weight: 600; font-size: 14px; cursor: pointer; }
.lang-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 20px 40px -10px rgba(15,23,42,.18); list-style: none; padding: 8px; width: 380px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s; }
.lang.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); font-size: 14px; }
.lang-menu a:hover, .lang-menu a.active { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.menu-btn { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; align-items: center; }
.menu-btn span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

/* ---------- nav: YouTube dropdown + platform links */
.nav-plat { display: inline-flex; align-items: center; gap: 7px; }
.nav svg { flex-shrink: 0; }
.drop { position: relative; }
.drop-btn { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; color: var(--text-gray); font-weight: 600; font-size: 15px;
  padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.drop-btn:hover, .drop.open .drop-btn { color: var(--primary); background: var(--primary-light); }
.drop-btn.active { color: var(--primary); }
.drop-menu { position: absolute; inset-inline-start: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 20px 40px -10px rgba(15,23,42,.18); padding: 8px; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s; z-index: 5; }
.drop:hover .drop-menu, .drop.open .drop-menu { opacity: 1; visibility: visible; transform: none; }
.drop-menu a { padding: 9px 12px; border-radius: 8px; color: var(--text); font-size: 14.5px; font-weight: 500; }
.drop-menu a:hover, .drop-menu a.active { background: var(--primary-light); color: var(--primary); text-decoration: none; }

/* ---------- platform switcher (hero) */
.switcher { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; background: rgba(255,255,255,.75); border: 1px solid var(--line);
  padding: 6px; border-radius: 18px; margin: 0 auto 18px; box-shadow: 0 6px 20px -10px rgba(15,23,42,.15); backdrop-filter: blur(6px); }
.sw { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 13px; font-weight: 700; font-size: 14.5px; color: var(--text-gray);
  transition: background .2s, color .2s, transform .2s, box-shadow .2s; }
.sw:hover { background: #fff; color: var(--text); text-decoration: none; transform: translateY(-1px); }
.sw.on { background: #fff; color: var(--text); box-shadow: 0 2px 10px -2px rgba(15,23,42,.15), inset 0 0 0 1.5px var(--primary); }

/* ---------- platform cards */
.plat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.plat-card { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px 22px 20px; color: var(--text); box-shadow: var(--shadow); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.plat-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--pc); }
.plat-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -14px rgba(15,23,42,.22); text-decoration: none; }
.plat-card.on { outline: 2px solid var(--pc-solid); outline-offset: -2px; }
.pc-youtube { --pc: #ff0033; --pc-solid: #ff0033; }
.pc-facebook { --pc: #1877f2; --pc-solid: #1877f2; }
.pc-instagram { --pc: linear-gradient(90deg, #feda75, #fa7e1e, #d62976, #4f5bd5); --pc-solid: #d62976; }
.pc-twitter { --pc: #0f1419; --pc-solid: #0f1419; }
.pc-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: #f6f7f9; margin-bottom: 4px; }
.plat-card strong { font-size: 18px; }
.pc-desc { color: var(--text-gray); font-size: 14.5px; flex: 1; }
.pc-go { font-weight: 700; font-size: 14px; color: var(--pc-solid); margin-top: 6px; }
.pc-go .arr { display: inline-block; transition: transform .2s; }
.plat-card:hover .arr { transform: translateX(4px); }
[dir="rtl"] .pc-go .arr { transform: scaleX(-1); }
[dir="rtl"] .plat-card:hover .arr { transform: scaleX(-1) translateX(4px); }

/* ---------- hero + tool */
.hero { padding: 48px 0 40px; text-align: center; background: radial-gradient(1000px 380px at 50% -80px, var(--glow) 0%, transparent 70%); }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--primary-light); border: 1px solid var(--primary-border); padding: 6px 16px; border-radius: 99px;
  font-size: 12px; font-weight: 700; color: var(--primary-hover); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 22px; }
.badge svg { flex-shrink: 0; }
.badge:has(svg)::before { display: none; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.hero h1, .page-hero h1 { font-size: clamp(32px, 5.2vw, 50px); font-weight: 800; line-height: 1.15; letter-spacing: -1px; margin-bottom: 16px; }
.hero-sub { color: var(--text-gray); font-size: 18px; max-width: 720px; margin: 0 auto 28px; }
.tool { max-width: 820px; margin: 0 auto; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 2px solid var(--border-strong); border-radius: 20px; padding: 10px;
  box-shadow: 0 10px 30px rgba(15,23,42,.05); transition: border-color .2s; }
.search:focus-within { border-color: var(--primary); }
.search-icon { color: var(--muted); margin-inline-start: 10px; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; padding: 10px 6px; }
.search input::placeholder { color: #94a3b8; }
.paste-btn { background: #f5f0ef; border: 0; border-radius: 12px; padding: 13px 16px; font-weight: 600; font-size: 14px; color: var(--text-gray); cursor: pointer; }
.paste-btn:hover { background: #efe6e4; }
.search-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--primary); color: #fff; border: 0; border-radius: 12px;
  padding: 14px 32px; font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: 0 6px 16px -4px rgba(230,57,70,.45); transition: .2s; }
.search-btn:hover { background: var(--primary-hover); text-decoration: none; color: #fff; }
.search-btn:disabled { opacity: .65; cursor: wait; }
.hero-note { max-width: 720px; margin: 18px auto 0; font-size: 13px; color: var(--muted); }
.captcha { display: flex; justify-content: center; margin-top: 12px; }
.captcha:empty { display: none; }

.msg { margin: 16px auto 0; padding: 13px 18px; border-radius: 14px; font-size: 15px; text-align: start; }
.msg.err { background: #fef2f2; color: var(--err); border: 1px solid #fecaca; }
.msg.info { background: #fff; color: var(--text-gray); border: 1px solid var(--line); }
.msg.ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2.5px solid var(--primary); border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite; vertical-align: -3px; margin-inline-end: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

.result { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; text-align: start; box-shadow: var(--shadow); }
.vid { display: flex; gap: 18px; align-items: flex-start; }
.vid img { width: 220px; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; background: #f1ebe9; flex-shrink: 0; }
.vid-info h2 { font-size: 18px; line-height: 1.4; margin-bottom: 6px; }
.vid-info p { font-size: 14px; margin-bottom: 8px; }
.thumb-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.tabs { display: flex; gap: 6px; margin: 20px 0 12px; background: #f6f1f0; padding: 5px; border-radius: 14px; }
.tab { flex: 1; padding: 10px; border: 0; background: transparent; color: var(--muted); font-weight: 700; border-radius: 10px; cursor: pointer; }
.tab.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.trim { margin-bottom: 8px; font-size: 14px; }
.trim summary { cursor: pointer; color: var(--text-gray); font-weight: 600; }
.trim-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 10px; }
.trim input { width: 84px; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px; margin-inline-start: 4px; }
.opts { width: 100%; border-collapse: collapse; }
.opts td { padding: 12px 6px; border-top: 1px solid var(--line); font-size: 15px; vertical-align: middle; }
.opts td:last-child { text-align: end; width: 46%; }
.q-label { font-weight: 700; }
.hd { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 5px; background: var(--primary); color: #fff; margin-inline-start: 6px; vertical-align: 2px; }
.ext { color: var(--muted); font-size: 13px; margin-inline-start: 6px; }
.dl { display: inline-flex; align-items: center; gap: 6px; background: var(--ok); color: #fff; border: 0; border-radius: 10px; padding: 9px 18px; font-weight: 700; font-size: 14px; cursor: pointer; }
.dl:hover { filter: brightness(1.06); text-decoration: none; color: #fff; }
.bar { height: 8px; background: #f1ebe9; border-radius: 99px; overflow: hidden; margin-bottom: 5px; }
.bar i { display: block; height: 100%; width: 2%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .4s; }
.prog { font-size: 12px; color: var(--muted); }
.prog.err { color: var(--err); }

/* ---------- sections */
.section { padding: 56px 0 8px; }
.pt0 { padding-top: 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 30px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 4px 12px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 12px; }
.section-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.5px; line-height: 1.25; margin-bottom: 10px; }
.lead { color: var(--text-gray); font-size: 17px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px; box-shadow: var(--shadow); transition: box-shadow .25s, transform .25s; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--text-gray); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step:hover, .feature:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad);
  color: #fff; font-weight: 800; margin-bottom: 14px; }
.ficon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--primary-light); color: var(--primary); margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ok-h { color: #059669; }
.bad-h { color: var(--err); }
.link-list { list-style: none; }
.link-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-gray); }
.link-list li:first-child { border-top: 0; }
.try { background: var(--primary-light); color: var(--primary); border: 0; border-radius: 8px; padding: 4px 12px; font-size: 12px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.try:hover { background: var(--primary-border); }
.table-card { padding: 22px; }
.guide { width: 100%; border-collapse: collapse; }
.guide th, .guide td { text-align: start; padding: 10px 8px; font-size: 14px; border-bottom: 1px solid var(--line); }
.guide th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.guide tr:last-child td { border-bottom: 0; }
.guide td:first-child { font-weight: 600; color: var(--text); }

.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 22px; }
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--primary); font-size: 22px; line-height: 1; font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--text-gray); margin-top: 10px; font-size: 15px; }

.cta { background: var(--grad); border-radius: var(--r-lg); padding: 48px 24px; text-align: center; color: #fff; margin-bottom: 30px; }
.cta h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; margin-bottom: 20px; }
.cta-btn { background: #fff; color: var(--primary); box-shadow: none; }
.cta-btn:hover { background: #fff5f3; color: var(--primary-hover); }

/* ---------- inner pages */
.page-hero { padding: 56px 0 30px; text-align: center; background: radial-gradient(900px 300px at 50% -80px, var(--glow) 0%, transparent 70%); }
.prose { padding: 36px 40px; }
.prose h2 { font-size: 20px; margin: 26px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-gray); font-size: 15.5px; margin-bottom: 10px; }
.prose ul { padding-inline-start: 22px; margin-bottom: 10px; }
.contact-line { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; }
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; max-width: 980px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.contact-form input, .contact-form select, .contact-form textarea { border: 1.5px solid var(--border-strong); border-radius: 12px; padding: 11px 14px; font-weight: 400; font-size: 15px; background: #fff; outline: 0; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--primary); }
.contact-form .captcha { justify-content: flex-start; margin: 0; }
.contact-side h3 { margin-top: 4px; }
.contact-side p { margin-bottom: 18px; }
.big404 { font-size: 110px; font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-404 .page-hero { padding: 90px 0; }

/* ---------- footer */
.footer { background: var(--footer); color: #b5b0bd; margin-top: 60px; padding: 52px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer .logo-light { color: #fff; font-size: 20px; }
.footer-about { margin-top: 14px; font-size: 14px; max-width: 360px; }
.footer h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 9px; }
.footer a { color: #b5b0bd; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2e2b33; margin-top: 40px; padding: 20px; font-size: 13px; text-align: center; max-width: none; }

/* ---------- responsive */
@media (max-width: 900px) {
  .menu-btn { display: flex; }
  .nav { position: absolute; top: 68px; inset-inline: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(0,0,0,.2); display: none; }
  .nav.open { display: flex; }
  .nav > a { padding: 12px 10px; }
  .lang { margin: 8px 0 0; }
  .lang-btn { width: 100%; justify-content: center; }
  .lang-menu { position: static; width: 100%; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; margin-top: 8px; }
  .lang.open .lang-menu { display: grid; }
  .drop-btn { width: 100%; padding: 12px 10px; }
  .drop-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0; padding-inline-start: 28px; min-width: 0; }
  .nav-plat { padding: 12px 10px; }
  .plat-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .grid2, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .hero { padding-top: 32px; }
  .hero-sub { font-size: 16px; }
  .search { flex-wrap: wrap; padding: 8px; border-radius: 16px; }
  .search-icon { display: none; }
  .search input { flex-basis: 100%; padding: 12px 10px; }
  .paste-btn { flex: 0 0 auto; }
  .search .search-btn { flex: 1; }
  .vid { flex-direction: column; }
  .switcher { gap: 4px; padding: 5px; }
  .sw { padding: 8px 10px; font-size: 13px; gap: 6px; }
  .sw span { display: none; }
  .sw.on span { display: inline; }
  .plat-grid { grid-template-columns: 1fr; }
  .vid img { width: 100%; }
  .opts td:last-child { width: 52%; }
  .prose { padding: 24px 20px; }
  .card { padding: 22px; }
}

/* gradient buttons (kept last so the background shorthand above doesn't reset them) */
.search-btn { background-image: var(--grad); background-size: 160% 160%; background-position: 0 0; transition: background-position .4s, box-shadow .2s; }
.search-btn:hover { background-image: var(--grad); background-position: 100% 100%; }
.cta .cta-btn, .cta .cta-btn:hover { background-image: none; }
.dl { background-image: none; }
.vid img.tall { object-fit: contain; background: #0f1419; }

/* ---------- legal pages: TOC + summary + numbered sections */
.hero-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--grad); color: #fff;
  box-shadow: 0 14px 30px -12px var(--primary); margin-bottom: 18px; }
.meta-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px;
  font-size: 13px; font-weight: 600; color: var(--text-gray); overflow-wrap: anywhere; }
a.pill:hover { color: var(--primary); text-decoration: none; border-color: var(--primary-border); }
.legal-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; max-width: 1080px; }
.toc { position: sticky; top: 92px; }
.toc-in { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 14px; box-shadow: var(--shadow); max-height: calc(100vh - 120px); overflow: auto; }
.toc-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 0 8px 10px; }
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: 14px; color: var(--text-gray); line-height: 1.4; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--primary); font-weight: 700; font-size: 12px; padding-top: 1px; min-width: 2.1ch; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.toc a:hover, .toc a.active { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.legal-main { min-width: 0; }
.summary-box { background: linear-gradient(135deg, var(--primary-light), #fff); border: 1px solid var(--primary-border); border-radius: var(--r-lg); padding: 24px 28px; margin-bottom: 20px; }
.summary-box h2 { font-size: 17px; margin-bottom: 10px; color: var(--primary-hover); }
.summary-box ul { list-style: none; display: grid; gap: 8px; }
.summary-box li { position: relative; padding-inline-start: 28px; color: var(--text); font-size: 15px; }
.summary-box li::before, .check-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.legal-prose { padding: 12px 36px 28px; }
.legal-sec { padding-top: 24px; scroll-margin-top: 90px; }
.legal-sec + .legal-sec { border-top: 1px solid var(--line); margin-top: 8px; }
.legal-sec h2 { display: flex; align-items: baseline; gap: 12px; font-size: 20px; margin: 0 0 10px; }
.sec-num { flex-shrink: 0; font-size: 13px; font-weight: 800; color: var(--primary); background: var(--primary-light); border-radius: 8px; padding: 3px 8px; }
.prose ul li::marker { color: var(--primary); }
.callout { background: #fffaf0; border-inline-start: 4px solid var(--accent); border-radius: 10px; padding: 12px 16px; color: var(--text) !important; font-weight: 500; }
.help-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; background: var(--footer); color: #d6d2dc;
  border-radius: var(--r-lg); padding: 26px 30px; }
.help-card h3 { color: #fff; font-size: 18px; margin-bottom: 4px; }
.help-card a:not(.search-btn) { color: #fff; text-decoration: underline; overflow-wrap: anywhere; }
.help-card .search-btn { flex-shrink: 0; }
.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.related a { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--text); }
.related a:hover { border-color: var(--primary-border); color: var(--primary); text-decoration: none; }
[dir="rtl"] .related .arr { transform: scaleX(-1); display: inline-block; }

/* ---------- about */
.about-plats { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.about-plats span { display: grid; place-items: center; width: 58px; height: 58px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 26px 18px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat strong { font-size: clamp(28px, 4vw, 40px); font-weight: 800; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--text-gray); font-size: 14px; font-weight: 500; }
.story { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: start; }
.story-text .section-title { margin-bottom: 16px; }
.story-text .lead { margin-bottom: 14px; }
.check-list { list-style: none; display: grid; gap: 12px; margin-top: 12px; }
.check-list li { position: relative; padding-inline-start: 30px; color: var(--text-gray); font-size: 15px; }
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: tl; }
.tl-item { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; box-shadow: var(--shadow); }
.tl-item .num { flex-shrink: 0; margin: 0; }
.tl-item h3 { font-size: 17px; margin-bottom: 6px; }
.tl-item p { color: var(--text-gray); font-size: 15px; }
.cta-p { opacity: .92; margin: -8px auto 22px; max-width: 560px; }

/* ---------- contact */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .search-btn { align-self: flex-start; }
.contact-side { display: flex; flex-direction: column; gap: 20px; }
.mail-card .mail-link { display: inline-block; font-weight: 700; font-size: 17px; margin: 6px 0 10px; overflow-wrap: anywhere; }
.reply-time { display: flex; align-items: flex-start; gap: 6px; }
.reply-time svg { flex-shrink: 0; margin-top: 4px; }
.dmca-card { background: var(--primary-light); border-color: var(--primary-border); box-shadow: none; }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 16px; }
  .toc { position: static; }
  .toc-in { max-height: none; }
  .toc ol { columns: 2; column-gap: 8px; }
  .toc li { break-inside: avoid; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .story, .timeline { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .toc ol { columns: 1; }
  .legal-prose { padding: 4px 20px 22px; }
  .legal-sec h2 { font-size: 18px; }
  .summary-box { padding: 20px; }
  .help-card { flex-direction: column; align-items: flex-start; padding: 22px; }
  .values, .form-row { grid-template-columns: 1fr; }
  .contact-form .search-btn { align-self: stretch; }
  .hero-icon { width: 56px; height: 56px; }
}

/* ---------- V2DL wordmark logo (bold italic, two-tone, play-notch in the D) */
.logo .wordmark { display: inline-flex; align-items: baseline; font-size: 31px; font-weight: 800; letter-spacing: -1.5px; line-height: 1;
  transform: skewX(-11deg); padding: 2px 4px 2px 2px; }
.wm-a { background: linear-gradient(135deg, #e63946 0%, #ff6a3d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wm-b { color: #1d1b21; margin: 0 1px; }
.logo-light .wm-b { color: #fff; }
.wm-d { position: relative; }
.wm-d::after { content: ""; position: absolute; left: 44%; top: 50%; transform: translateY(-50%); width: 0; height: 0;
  border-top: 0.16em solid transparent; border-bottom: 0.16em solid transparent; border-left: 0.24em solid #1d1b21; }
.logo-light .wm-d::after { border-left-color: #fff; }
.footer .logo .wordmark { font-size: 28px; }
@media (max-width: 600px) { .logo .wordmark { font-size: 27px; } }

/* ---------- global fixes */
body { overflow-wrap: break-word; }
section[id], .result { scroll-margin-top: 84px; }
.page-404 .cta-btn, .page-404 .cta-btn:hover { color: #fff; }

/* ---------- mobile polish */
@media (max-width: 900px) {
  .menu-btn { width: 44px; height: 44px; margin-inline-end: -8px; }
  .nav { max-height: calc(100vh - 68px); max-height: calc(100dvh - 68px); overflow-y: auto; overscroll-behavior: contain; }
  .drop-menu a { padding: 11px 12px; }
  .lang-menu a { padding: 11px 12px; }
  .toc a { padding: 9px 8px; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .footer-bottom { padding: 20px 16px; }
  .hero { padding-bottom: 28px; }
  .page-hero { padding: 40px 0 24px; }
  .section { padding: 44px 0 4px; }
  .section-head { margin-bottom: 22px; }
  .lead { font-size: 16px; }
  .sw { min-height: 40px; }
  /* search: Paste + Download share a row; if a long label forces a wrap, each fills its own row */
  .paste-btn { flex: 1 0 auto; }
  .search .search-btn { flex: 3 1 auto; padding: 14px 18px; }
  /* inputs at 16px so iOS Safari doesn't zoom on focus */
  .contact-form input, .contact-form select, .contact-form textarea, .trim input { font-size: 16px; }
  /* format guide tables */
  .table-card { padding: 18px 14px; overflow-x: auto; }
  .guide th, .guide td { padding: 10px 6px; }
  .guide td:nth-child(2) { white-space: nowrap; }
  /* result quality rows: label + size stacked on the left, button on the right */
  .result { padding: 16px; }
  .opts, .opts tbody { display: block; }
  .opts tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px 2px; border-top: 1px solid var(--line); }
  .opts td { border: 0; padding: 0; }
  .opts td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 13px; }
  .opts td:last-child:not(:first-child) { grid-column: 2; grid-row: 1 / span 2; width: auto; min-width: 112px; text-align: end; }
  .opts .dl { padding: 11px 18px; }
  .tab { padding: 11px 6px; }
  .help-card .search-btn { align-self: stretch; }
  .tl-item { padding: 20px 18px; gap: 14px; }
  .cta { padding: 38px 20px; }
  .cta .cta-btn { width: 100%; max-width: 320px; }
  .footer { margin-top: 44px; padding-top: 40px; }
  .footer-grid { gap: 28px 20px; }
  .footer li { margin-bottom: 2px; }
  .footer li a { display: inline-block; padding: 6px 0; }
  .big404 { font-size: 88px; }
  .page-404 .page-hero { padding: 56px 0; }
}
/* the wordmark is Latin: keep V-2-D-L order on RTL pages */
.logo .wordmark { direction: ltr; unicode-bidi: isolate; }
/* room for the skewed wordmark's overhang; never let the logo shrink next to the hamburger */
.logo { flex-shrink: 0; padding-inline-end: 4px; }
