:root {
  color-scheme: light dark;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #142033;
  --muted: #5c6b7f;
  --line: #dbe3ee;
  --brand: #1261a6;
  --brand-soft: #e9f3fc;
  --warning: #7a4b00;
  --warning-bg: #fff5dc;
  font-family: Inter, "Noto Sans Bengali", "Hind Siliguri", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.7; }
a { color: var(--brand); }
.legal-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--card) 94%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.legal-nav, .legal-shell { width: min(1080px, calc(100% - 32px)); margin: auto; }
.legal-nav { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.legal-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; }
.legal-brand img { width: 36px; height: 36px; }
.legal-actions { display: flex; align-items: center; gap: 8px; }
.legal-actions a, .lang-toggle { border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); padding: 7px 12px; text-decoration: none; cursor: pointer; font: inherit; font-size: .9rem; }
.legal-shell { padding: 48px 0 72px; }
.legal-hero { margin-bottom: 24px; }
.eyebrow { color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
h1 { margin: 8px 0 10px; font-size: clamp(2rem, 6vw, 3.35rem); line-height: 1.12; }
.legal-meta { color: var(--muted); }
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.legal-toc, .legal-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 35px rgba(26, 55, 91, .06); }
.legal-toc { position: sticky; top: 88px; padding: 18px; }
.legal-toc strong { display: block; margin-bottom: 8px; }
.legal-toc a { display: block; padding: 5px 0; text-decoration: none; color: var(--muted); font-size: .9rem; }
.legal-card { padding: clamp(20px, 4vw, 44px); }
.legal-card section { scroll-margin-top: 92px; padding: 4px 0 22px; border-bottom: 1px solid var(--line); }
.legal-card section:last-child { border-bottom: 0; }
h2 { font-size: 1.35rem; line-height: 1.35; margin: 22px 0 8px; }
h3 { margin-bottom: 6px; }
p, li { color: var(--text); }
ul { padding-left: 1.25rem; }
.notice { padding: 14px 16px; border-radius: 12px; border-left: 4px solid var(--brand); background: var(--brand-soft); margin: 16px 0; }
.notice.warning { border-left-color: #ad6a00; background: var(--warning-bg); color: var(--warning); }
.legal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.legal-link-card { display: block; padding: 20px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); background: var(--card); }
.legal-link-card strong { display: block; font-size: 1.1rem; }
.legal-link-card span { color: var(--muted); }
.legal-footer { border-top: 1px solid var(--line); color: var(--muted); padding: 24px 16px; text-align: center; }
body [lang="en"] { display: none; }
html[data-legal-lang="en"] body [lang="bn"] { display: none; }
html[data-legal-lang="en"] body [lang="en"] { display: revert; }
html[data-legal-lang="bn"] body [lang="bn"] { display: revert; }

@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1724; --card: #132235; --text: #edf4fc; --muted: #adbbca; --line: #2a3c51; --brand: #74b9f2; --brand-soft: #183653; --warning: #ffd68d; --warning-bg: #392d18; }
}
@media (max-width: 760px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .legal-grid { grid-template-columns: 1fr; }
  .legal-actions .home-link { display: none; }
  .legal-shell { padding-top: 30px; }
}

.support-form { display: grid; gap: 14px; max-width: 560px; }
.support-form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.support-form input, .support-form textarea, .support-form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--text); font: inherit;
}
.support-form textarea { min-height: 140px; resize: vertical; }
.support-form button {
  border: 0; border-radius: 12px; padding: 12px 18px; font: inherit; font-weight: 700;
  background: var(--brand); color: #fff; cursor: pointer;
}
.support-form button:disabled { opacity: .6; cursor: not-allowed; }
.support-honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-status { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.form-status.ok { background: #e8f7ee; color: #1b6b3a; }
.form-status.err { background: #fdecec; color: #9b1c1c; }
