/* ===== Write My Paper Reviews — Shared Stylesheet ===== */
:root {
  --navy: #0f1f3d;
  --navy-2: #16294d;
  --blue: #1d4ed8;
  --blue-light: #3b82f6;
  --ink: #1a1a2e;
  --slate: #475569;
  --slate-light: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-tint: #eef4ff;
  --gold: #b8860b;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(15,31,61,.06), 0 1px 2px rgba(15,31,61,.04);
  --shadow-md: 0 4px 16px rgba(15,31,61,.08);
  --shadow-lg: 0 12px 40px rgba(15,31,61,.12);
  --maxw: 880px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1080px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1080px; margin: 0 auto; padding: 0 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); font-size: 18px; }
.brand .dot { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--navy), var(--blue)); display: grid; place-items: center; color: #fff; font-size: 15px; }
.brand a { color: inherit; text-decoration: none; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--slate); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--navy); text-decoration: none; }
.lang-switch { font-size: 14px; color: var(--slate-light); }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 50% -100px, #eef4ff, transparent),
    linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
  font-weight: 800;
  margin-bottom: 18px;
}
.hero .lede {
  font-size: 20px; color: var(--slate); max-width: 680px; margin-bottom: 26px;
}
.hero-figure { margin: 26px 0 8px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-figure img { width: 100%; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--slate-light); margin-top: 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Quick Answer ---------- */
.quick-answer {
  background: var(--bg-tint);
  border: 1px solid #d8e4ff;
  border-left: 5px solid var(--blue);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 30px 0;
}
.quick-answer h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); margin-bottom: 12px; font-weight: 700; }
.quick-answer ol { margin: 0; padding-left: 22px; }
.quick-answer li { margin-bottom: 8px; }
.quick-answer li a { font-weight: 600; }

/* ---------- Article body ---------- */
.article { padding: 36px 0 10px; }
.article h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  color: var(--navy);
  letter-spacing: -0.01em;
  margin: 44px 0 14px;
  font-weight: 800;
  line-height: 1.25;
}
.article h3 {
  font-size: 22px; color: var(--navy-2); margin: 28px 0 10px; font-weight: 700;
}
.article p { margin-bottom: 16px; color: #243; }
.article ul, .article ol { margin: 0 0 18px 22px; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--navy); }

/* ---------- CTA blocks ---------- */
.cta {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  border-radius: var(--radius);
  padding: 30px 32px;
  margin: 34px 0;
  box-shadow: var(--shadow-md);
}
.cta h3 { color: #fff; font-size: 24px; margin-bottom: 10px; }
.cta p { color: #cdd9f0; margin-bottom: 18px; }
.cta .btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .btn {
  display: inline-block;
  background: #fff; color: var(--navy);
  padding: 13px 24px; border-radius: 10px;
  font-weight: 700; font-size: 16px;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.cta .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); text-decoration: none; }
.cta .btn.alt { background: var(--blue-light); color: #fff; }
.cta.soft {
  background: var(--bg-tint);
  color: var(--ink);
  border: 1px solid #d8e4ff;
  box-shadow: none;
}
.cta.soft h3 { color: var(--navy); }
.cta.soft p { color: var(--slate); }

/* ---------- Service cards (Top 3) ---------- */
.service {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 26px 0;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.service:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service.best { border: 2px solid var(--gold); background: linear-gradient(180deg, #fffdf5, #fff); }
.service .rank {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gold); margin-bottom: 8px;
}
.service h3 { font-size: 26px; margin-bottom: 6px; }
.service h3 a { color: var(--navy); }
.service .blurb { color: var(--slate); margin-bottom: 14px; }
.service .who { font-size: 15px; color: var(--slate-light); margin-bottom: 14px; }
.service ul { margin: 0 0 16px 20px; }
.service .visit {
  display: inline-block; background: var(--blue); color: #fff;
  padding: 11px 22px; border-radius: 10px; font-weight: 700; text-decoration: none;
}
.service .visit:hover { background: var(--navy); text-decoration: none; }
.service.best .visit { background: var(--gold); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; max-width: 100%; margin: 28px 0; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 15px; table-layout: fixed; }
@media (max-width: 600px) {
  table.cmp { font-size: 13px; }
  table.cmp th, table.cmp td { padding: 10px 8px; word-break: break-word; }
}
table.cmp th, table.cmp td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
table.cmp th { background: var(--bg-soft); color: var(--navy); font-weight: 700; font-size: 14px; }
table.cmp tr:last-child td { border-bottom: none; }
table.cmp td:first-child { font-weight: 700; color: var(--navy); }

/* ---------- Callout boxes ---------- */
.callout {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 28px 0;
}
.callout.tip { border-left: 4px solid #22c55e; }
.callout.warn { border-left: 4px solid var(--gold); background: #fffdf5; }
.callout h3 { margin-top: 0; }

.checklist { list-style: none; margin-left: 0; padding-left: 0; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #22c55e; font-weight: 800; }

.stats {
  display: flex; flex-wrap: wrap; gap: 16px; margin: 28px 0;
}
.stat {
  flex: 1 1 180px; background: var(--bg-tint); border: 1px solid #d8e4ff;
  border-radius: var(--radius); padding: 22px; text-align: center;
}
.stat .num { font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1; }
.stat .label { font-size: 14px; color: var(--slate); margin-top: 6px; }

.brainstorm {
  background: #fffdf5; border: 1px dashed var(--gold);
  border-radius: var(--radius); padding: 24px 26px; margin: 28px 0;
}
.brainstorm h3 { color: var(--gold); margin-top: 0; }
.brainstorm ul { margin-left: 20px; }

/* ---------- FAQ ---------- */
.faq { margin: 36px 0; }
.faq details {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; margin-bottom: 12px; background: #fff;
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--navy); font-size: 18px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--blue); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 12px; color: var(--slate); }

/* ---------- Inline figure ---------- */
figure.inline { margin: 28px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
figure.inline img { width: 100%; }
figcaption { font-size: 14px; color: var(--slate-light); padding: 10px 14px; background: var(--bg-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy); color: #cdd9f0; margin-top: 60px; padding: 48px 0 28px;
}
.site-footer .grid {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
}
@media (max-width: 720px) { .site-footer .grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer h4 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.site-footer a { color: #cdd9f0; font-size: 15px; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 20px; max-width: 1080px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; font-size: 14px; color: #8aa0c8; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 14px; color: var(--slate-light); padding: 14px 0; }
.breadcrumbs a { color: var(--slate); }

/* ---------- RTL (Arabic) ---------- */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .quick-answer ol { padding-right: 22px; padding-left: 0; }
html[dir="rtl"] .article ul, html[dir="rtl"] .article ol { margin: 0 22px 18px 0; }
html[dir="rtl"] .checklist li { padding-right: 30px; padding-left: 0; }
html[dir="rtl"] .checklist li::before { right: 0; left: auto; }

/* ---------- Misc ---------- */
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg-tint); color: var(--blue); }
.updated { font-size: 14px; color: var(--slate-light); margin-bottom: 24px; }
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 28px 0; }
.toc h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); margin-bottom: 10px; }
.toc ul { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; }
